Atmospheric depth: input issues?

at Video around 10:52

(I'm using 3.6.7 LTS.) If I use input "Camera Data: View Distance", I get odd results. For example, in Ortho:Left view, if I pan the 3D viewport the values seem to stay put while the objects move. They look kind of spherical. The effect is more obvious if stepped a ramp with Constant interpolation is used.

If instead I use "Geometry: Position: Y" (and adjust the range), I get the desired results. Of course it is decoupled from the camera position.

Am I missing something?

1 love
Reply
  • Martin Bergwerf replied

    Hey @techworker ,

    View Depth is, how far away in the Cameras Z-Axis something is (blue lines) and View Distance is how far away something is from the Camera (red circles):

    Camera Data.png

    Now, this all isn't applicable in Orthographic View...(think about that...)

    1 love
  • techworker1 replied

    Hi, I did some further testing and confirmed a suspicion (surprising): the distance value appears to be relative to the viewport rather than the camera. Two test examples are below. (You need to multiply/add, differently, to get the ramp in range.) This explains the bizarre behavior I was experiencing. I don't think I have missed a setting somewhere. Perspective/orthographic seems to have no effect.

    For a render, I guess it wouldn't matter. But it does make setting up the material more difficult and confusing.

    test-view-01.png

    test-view-02.png

    1 love
  • Martin Bergwerf replied

    Hi techworker1 ,

    The Viewport is considered a  Camera, when not in Camera View (even if there isn't a Camera in the Scene):

    View.png


    1 love
  • techworker1 replied

    So "Camera Data: View Distance" is effectively the distance from your eyes to objects in the scene (viewport zoom in/out affects it too).

    For the purposes of the landscape exercise, Position seems more practical.

  • Martin Bergwerf replied

    The Y Position of the Geometry is 'absolute' and doesn't change when moving the Camera (or changing the view in the Viewport)...

    For a static Camera this can be totally fine (depending on the Cameras orientation). View Distance would be more natural and View Z Depth is a bit like 'something in between' those two.

    You can use whichever you want, as long as you're happy with the result.

    • 💯
    1 love
  • Kent Trammell replied

    Great exploration and testing in this thread techworker1! Martin is absolutely right: Use whichever method you prefer. As with most 3D / creative workflows, there's never a singular "right way". Keep up the good work! 

    1 love