[Bf-committers] Re: [Openexr-devel] OpenEXR in Blender's CVS

Gernot Ziegler gz at lysator.liu.se
Tue Mar 15 12:05:23 CET 2005

Hej Florian !

> Limiting RGB values to a zero-to-one range degrades the image
> unnecessarily; you lose information about bright highlights.
Sorry, my fault:
What I meant was that Blender's clamped output maps to 0.0-1.0, but of
course the values _beyond_ that range are retained!
(Otherwise I would truly have misunderstood the main goals of OpenEXR, I
agree ;) )

> Normalizing Z to a zero-to-one range is also undesirable;
> see my reply to Gernot's other mail to openexr-devel:
My normalization of Z to between 0.0 and 1.0 is only a first solution for
orthographic cameras.

Z data storage is still somewhat undefined, therefore I always resort to
the only common denominator: providing a formula on how to derive world
coordinates for each pixel sample from the x,y coordinates and z value in
the image. The only way for mixing Z output from different renderers is to
have this formula available. Such a formula implies usually the camera
position in world space, its orientation, its x/y extents (ortho mode) or
FOV (perspective mode) and its near and far clipping planes.

I haven't yet thought about how this should be written to OpenEXR (is
there a standard yet ?), in the meanwhile I store it in an extra

I know this Z mapping formula for perspective OpenGL cameras, and
I know how this works for general orthographic cameras (they simply do a
linear subdivision between the near and far clipping plane).

For non-OpenGL renderers in perspective rendering mode or other lens
setups, I need to know how its Z buffer values map to world coordinate
values.  Since I don't know this yet for Blender's output, I only map its
near=-INTMAX to far=+INTMAX to 0.0 and 1.0, which is correct for its
orthographic mode, but NOT for the perspective mode :-)

What does ILMs rendering setup use ?


O  The Austria <=> Sweden <=> Germany <=> Netherlands connection.....   H
|  http://www.mpi-sb.mpg.de/~gziegler | http://lysator.liu.se/~gz       E

More information about the Bf-committers mailing list