Helgard opened this issue on Jun 26, 2010 · 195 posts
bagginsbill posted Fri, 09 July 2010 at 9:58 AM
Sorry, but everything you said after the underlined sentence is not true. What you describe is the Z-Depth, but that's not the "x" that DepthCue is using. It is using the exact straight line distance from the camera to the object. Nothing about the camera rotation or focal length or perspective mode matters at all. It is doing exactly what it is supposed to do, as you said in the second sentence above.
This is easily proven by a simple test. Set up a tile pattern on the ground. Point the camera down a bit. Set the Depth_Cue start distance (a) to something within your view. Set the Depth_Cue end distance (b) just slightly past that. I used a = 10 feet, and b = 10.1 feet. Thus, the linear decrease in attenuation will start at 10 feet and end at 10.1 feet, forming a pretty sharp gradient that is only 1 inch thick.
If what you say is true, the gradient will appear to be a straight line. If, on the other hand, it is actual radial distance, not Z-depth, the gradient will appear to be an ellipse. If you point the camera straight down at the ground it will be a circle.
Observe the curve (sometimes I am poetic).
So, having established that all the problems you anticipated do not exist, can you figure out how we can calculate the distance from the camera to the object?
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)