Source Filmmaker

Source Filmmaker

401 voti
Depth Of Field
Da haroonY | speedyzoot™
This guide will teach you how to add Depth of Field to your Source FilmMaker scene
   
Premio
Aggiungi ai preferiti
Preferito
Rimuovi dai preferiti
What is Depth of Field?
In optics, particularly as it relates to film and photography, depth of field (DOF) is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in an image. Although a lens can precisely focus at only one distance at a time, the decrease in sharpness is gradual on each side of the focused distance, so that within the DOF, the unsharpness is imperceptible under normal viewing conditions. Source: Wikipedia[en.wikipedia.org]

In English, Depth of Field is the focus of an object, that will blur out objects behind and/or in front of it, making the subject more sharp. It can be used to get the viewer to focus on a certain part of your scene.

A diagram of how Depth of Field works. Source; Wikipedia[en.wikipedia.org]
How to add Depth of Field to SFM
Adding DoF (Depth of Field) to Source FilmMaker is a relatively easy and painless task to accomplish. First of all, we will need our camera to be in the animation set. Make sure you have a scene camera, then click on the button, and chose the "Create Animation Set(s) for Existing Element(s)". There should be a camera named "Camera1". Add it to the animation set list.

Next, we will need to change the "focalDistance" of the camera. This is located underneath the sliders that have "Zero, Smooth, Jitter" etc. by default:


Go onto the Motion Editor (TAB by default) and drag the focalDistance slider either way. You should notice a purple sheet take up some of the screen. It will probably look something like this:


So let's explain what it is. In short; whatever is inside the purple bit (the bit that clips through stuff) is what will be in focus. Anything behind, or in front, will become out of focus. We will also need to turn the slider "aperture" up. Nono, not the company. That went out of business years ago. The aperture is what applies the blur to the camera. Once you have turned it up to an amount you like (I personally like 0.5) and hit TAB. Now you should see some blur!

Here is what you should get:

Before:
After:

The difference of the shed in the background is the most obvious. Play around with different setting until you get one you like.
Conclusion
Congratulations! You have just learned how to add Depth of Field to the Source FilmMaker! You can use this to add some atmosphere to your scenes! I swear I've worded something wrong somewhere. Paranoia's time to kick in!

Thanks for reading! Feedback is greatly appreciated.

Credit given where credit is due;

One image and some text is from Wikipedia[en.wikipedia.org].
One image from the Valve Developer Wiki. Go check it out for some detailed help!
Stuff to take note on
Thank you to Sooperphilly letting me know, for the depth of field to take effect in the viewport, you need to be on the timeline view. If you are in the graph / motion editor, none of the DoF will have any effect on the viewport at all. All DoF changes will still show in a final render, though.
47 commenti
gcadtg 25 ago 2023, ore 18:17 
Pluvillion 10 apr 2022, ore 20:53 
Heads up, in some cases, the clearest part of the image would be something that's slightly behind the purple box. Experiment because it's really wonky.
grey 12 apr 2021, ore 10:04 
no dags found
Mesozoic Gamer 26 feb 2021, ore 17:31 
I feel like either A, this doesn't work anymore, or B, I somehow did something wrong despite following the directions down to the letter, because one, the purple box thing does not show up, and secondly, even when I fiddle with the focalDistance and aperature settings, I see literally no change whatsoever in the viewport, or in the ending render.
Dudud 20 feb 2021, ore 21:48 
thx
ZACBINE 20 feb 2021, ore 14:31 
doesnt work for me
Glesas 🍍 20 gen 2021, ore 6:31 
Thanks
jURIS 16 dic 2017, ore 18:41 
In dota2 reborn, is there a way to export the depth map pass?
Natsuki- 21 set 2017, ore 18:44 
Is there a way to only blur behind the pink square?
Yuriyalloween ᗜˬᗜ 3 set 2017, ore 17:12 
Appreciate it. QUACK