Forum: Poser - OFFICIAL


Subject: Underwater submarine

Helgard opened this issue on Jun 26, 2010 · 195 posts


kawecki posted Fri, 09 July 2010 at 2:58 AM

And now the submarine:

The attenuation is some function of the distance (x), in general can be exp(x) or some polynomial approximation of exp(x).
Now what is x? Is supposed to be the distance between the camera and a point of an object.
The problem is from where do we get the value of the distance(x)?
We can get the distance from the z value in the camera space, but where is z = 0 and the zscale factor that depends on the scene?
The distance can be  d = scale.(Zcamera - Zpoint).
Now the z value in the camera space is perspective corrected:  Zcamera = k/(d + Zreal)
where a and d are parameters that depend on the camera setting.
We must know all those parameters and scales, then invert the perspective transformation and only then we can have the real and correct distance to be used in the attenuation function.
For complicating more the illumination of a point depend on how much the light illuminating the point attenuated traveling through the water.
And much more the attenuation in water depend on the frecuency or wave lenght of the light, longer wave length attenuate much more that shorter and illumination turn more blueish as light travel more distance. Deep water is not green as generally painted, is blue!

Stupidity also evolves!