depth values and curve surface

Hi all,

I have a trouble with depth values obtained from z-buffer.

I have a plane surface in a blender project and I use perspective viewing. If I plot in matlab the values in the z-buffer I get a curve surface and not a plane. I noticed that if I use orthographic viewing it doesn’t happen.

Does somebody know why the plane become a curve surface and how i can obtain a plane using perspective viewing?

Thanks

All lenses distort geometry and it is all relative to the way your eyeball works, eg if you were a cow then a picture that matches what a human eye sees would seem distorted. I’m not being esoteric here nor invoking special relativity, mapping 3D space onto a 2 dimensional image always introduceses distortions, that is called perspective. So if you want to go to matlab and do more calculations of 3D space based on a 2D projection then use orthographic, which really looks distorted to the human eye. The alternative is to set the camera focal length to something close to 53 mm.

the best discussion on this I’ve seen in is in Papasmurfs book on the compositor, sorry I can’t find the linky

if the plane is oriented perfectly to the camera, either manually or via the track to constraint, all z values for the plane should be the same whether you are using a perspective or orthographic camera. If you are getting a curve in values, then the plane is not aligned to face the camera perfectly.