openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] OpenEXR 3D texture format


From: Florian Kainz
Subject: Re: [Openexr-devel] OpenEXR 3D texture format
Date: Tue, 24 May 2005 17:49:51 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114

Hi Derek,

Right now there is no standard way to store 3D texture maps in OpenEXR
files.  You'll have to come up with your own method.  (In the long run,
OpenEXR should probably have built-in support for 3D pixel grids,
including mipmaps and ripmaps.)

As you mentioned, you could store a 3D pixel block with nx by ny by nz
pixels in a 2D image that is nx pixels wide by ny pixels high and has nz
layers.  Alternatively you could use a single-layer 2D image with a
resolution of nx by ny*nz pixels. (Or nx*nz by ny, or nx*ny by nz, etc.)

This should work well for single-level images, but with mipmaps and
ripmaps some amount of file space is wasted.  With any of the 2D workarounds
mipmap level L in the 2D image contains (nx*ny*nz / pow(2,-2*L)) pixels,
but in a true 3D mipmap, level L should contain (nx*ny*nz / pow(2,-3*L))
pixels.  Overall, a file using a 2D workaround will be about 16% larger
than a true 3D mipmap.

Florian

Derek Gerstmann wrote:
Hi.  I just wanted to find out if there was a common structure
that most developers are using to store 3d textures or volumetric
datasets as OpenEXR image data.

My initial idea would be to use the recent addition of layers
to the ChannelList class to identify 2D slices of volumetric data,
where such that "layername.channelname" identifies the volumetric
slice and type of data allocated per channel, eg "Z0.A" would be
the "A" channel of slice 0 along the Z axis.

Anyone have any other suggestions or solutions they've adopted
(other than arbitrary header tags)?

Thanks!

-[dg]

....

Derek Gerstmann
Jitter Engineer
Cycling '74


_______________________________________________
Openexr-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/openexr-devel







reply via email to

[Prev in Thread] Current Thread [Next in Thread]