• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How To: Camera Focal Distance and Depth of Field

Have you wondered what Camera Focal Distance and Depth of Field do? Have you tried to use them without success?

Stay a while, and listen.

What is Depth of Field (DoF)?

  • DoF is the total area that is in focus, or the distance between the closest object/subject in focus and the furthest object/subject in focus.

What is Focal Distance (FD)?

  • This is the distance to the target point (focal point). You can think of this as the origin point of where you are aiming.
How do these two relate?
  • You may read "narrow" or "wide" DoF and wonder what this means. These are terms referring to the scale or total area that will be in focus around the FD point.


  • Narrow DoF


dofnarrow-png.374757

  • Wide DoF


When I try this the values don't seem to behave as they should. What is wrong?
  • In many occasions the camera focal point, the blue arrow tip in the World Editor, will not be on the target object/subject. This means you must compensate when defining FD and DoF.


  • Example focal point on the target



  • Example focal point past the target

  • In this case you will need to account for the ~448 distance the focal point exceeds the target by.
Now that you have a basic grasp let's look at an example for DoF.
  • Follow along with this test map
    • Typing "Reset" will reset all values
  • Here I am using the example above where the focal point is on the target, 800 units apart
  • You will notice I start at -300 DoF, and you can see the effect in the lower corners
    • You can use + or - integers, the effect is identical.
  • You will see as I continue decreasing DoF the focus narrows


What about FD?
  • Imagine a horizontal line across the screen. As you increase FD this line will move.
  • You can see this as the closest Footman leaves focus and eventually the Farm is almost in focus.


What if you have 0 for either field?
  • 0 in either field means there will be no effect


Test map and tutorial request by Tamplier777
 

Attachments

  • CameraPosition01.png
    CameraPosition01.png
    2.4 MB · Views: 675
  • CameraPosition02.png
    CameraPosition02.png
    2.4 MB · Views: 668
  • DoFNarrow.png
    DoFNarrow.png
    3.7 MB · Views: 678
  • DoFNarrow01.png
    DoFNarrow01.png
    3.2 MB · Views: 671
  • DoFNarrow02.png
    DoFNarrow02.png
    3 MB · Views: 655
  • DoFNarrow03.png
    DoFNarrow03.png
    2.9 MB · Views: 632
  • DoFNarrow05.png
    DoFNarrow05.png
    2.9 MB · Views: 629
  • DoFNarrow06.png
    DoFNarrow06.png
    2.8 MB · Views: 481
  • DoFWide.png
    DoFWide.png
    3.7 MB · Views: 676
  • FD01.png
    FD01.png
    2.9 MB · Views: 658
  • FD02.png
    FD02.png
    2.9 MB · Views: 634
  • FD03.png
    FD03.png
    2.9 MB · Views: 613
  • FD04.png
    FD04.png
    2.9 MB · Views: 621
  • NoEffect01.png
    NoEffect01.png
    3.5 MB · Views: 637
  • NoEffect02.png
    NoEffect02.png
    3.5 MB · Views: 655
  • CameraLensTest.w3x
    98.2 KB · Views: 98
Last edited:
Top