[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] Multi-layer multi-pass files
From: |
Ton Roosendaal |
Subject: |
Re: [Openexr-devel] Multi-layer multi-pass files |
Date: |
Wed, 20 Dec 2006 10:22:37 +0100 |
Hi,
On 19 Dec, 2006, at 22:46, Chris Cox wrote:
If we're going to support layers in OpenEXR files, I would much rather
see something more concrete that isn't based on parsing comments and
channel names.
The naming schedule I propose follows the notes in ImfChannelList.h:
// Support for image layers:
//
// In an image file with many channels it is sometimes useful to
// group the channels into "layers", that is, into sets of channels
// that logically belong together. Grouping channels into layers
// is done using a naming convention: channel C in layer L is
// called "L.C".
//
// For example, a computer graphic image may contain separate
// R, G and B channels for light that originated at each of
// several different virtual light sources. The channels in
// this image might be called "light1.R", "light1.G", "light1.B",
// "light2.R", "light2.G", "light2.B", etc.
//
// Note that this naming convention allows layers to be nested;
// for example, "light1.specular.R" identifies the "R" channel
// in the "specular" sub-layer of layer "light1".
//
// Channel names that don't contain a "." or that contain a
// "." only at the beginning or at the end are not considered
// to be part of any layer.
There seem to be API functions to parse layers/channels too, but I
didn't try this.
What only differs in our implementation is the specific definition of a
"Pass", to distinguish it from a 'nested layer'.
Where are you going to put the user assigned names for layers and
channels? In another comment?
No, all names are stored in the channel itself, as mentioned above. The
user only assigns names to the Layers. Pass/channel names are generated
based on defaults.
Where are you putting the compositing modes and other attributes of
each layer?
Do you have any way to represent layer data that isn't pixels (ie:
"this should be solid 1.0,0,0", or "this is a reference to another
node in the graph").
That's outside of the scope for how we like to use OpenEXR.
And how does this map to other applications that support layers and
extra channels, such as Photoshop?
Well, if you would do a similar parsing of layer/channel names (also
for saving) that would be very nice! :) Afaik photoshop only has
"Layers" with RGBA, right?
What kind of support Photoshop has now for OpenEXR?
-Ton-
Chris
--------------------
Currently there is no standard naming scheme for layers. Would you
like
to suggest one?
While working on multilayer files I decided it would be very hard to
get a generic parser for a multilayer formatted exr file. There are too
many dependencies also with our internal conventions for reading and
saving, so I've tied it more to what is possible now in Blender (i.e.
the separation in "Layers", "Passes" and "Channels").
In short the parsing goes as follows;
- check for a comment in the file with string "Blender MultiChannel"
- read all channels from the file, and it put it in a list
- split up channel names, with the following assumptions:
(reading string from right to left)
- channel type identifier is the last character, preceded with a "."
- search back to another "." to get the pass name
- the remainder is the layer name.
- create a list of Layers, each with a list of Passes, with an array of
Channels,
and read everything.
This allows any "random" name, for as long it has three dots to
separate :)
Examples:
Front Shot 21.01.Diffuse.R
Light.Group.Blue.Spec.R
Character John Hair.Speed.X
(Note that these names get close to the 32 character limit! I've
hardcoded Layer names to a maximum of 19 chars now. Pass names are max
10).
As for a standard; our image system will show any named layer/pass
combo. But for the Blender compositor UI I had to standardize pass
names. Available now in Blender are:
"Combined" : RGBA (the default combined result of Passes in a Layer)
"Depth": Z.
"Vector": XYZW
"Normal": XYZ
"UV": UVA (we store alpha for UV pass, to allow antialising)
"Color": RGBA
"Diffuse": RGB
"Spec": RGB
"Shadow": RGB
"AO": Ambient occlusion, RGB
"Reflect": RGB
"Refract": RGB
"Radio": RGB
"IndexOB": X
That list is easy to extend of course.
-Ton-
_______________________________________________
Openexr-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/openexr-devel
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation address@hidden
http://www.blender.org