User ratings
5 star:
4 star:
3 star:
2 star:
1 star:
2 ratings
Average user rating:
Comment from: chrysl666 [Visitor]  

very nice ideia for multimatte .. I`m trying to test it using 3delight , but with no sucess yet , seems that 3delight do not works with float[200] array type , any tip of it ? tnx for sharing !

09/03/09 @ 01:57 am
Comment from: o.z [Member]

After quite a lot of testing with 3Delight, here are my conclusions:
1. 3Delight does not support multiple OpenExr layers at this point, so you have to use PSD instead (which is a bit disappointing, since their PSD implementation only supports 8bit images).
2. You have to make sure the size of the arrays is the same in both the SL and the RIB. This means you can’t just put a high value in the SL to avoid re-compiling (unless you also put a high number in the RIB, but that would be a waste for 2 reasons: memory usage and the number of wasted layers in the PSD file.)
3. 3Delight doesn’t seem to support the SL short writing: color “hsv” Os; so it needs to be changed to ctransform("hsv", Oi).

So, once we realize these issues, here are the changes that would make it work with 3Delight:

The shader should now look like this:

surface multiMatte (
uniform float id=0;
output varying float ids[4]=0;
Oi = Os;
Ci = Cs * Oi;
if (id != 0) {
ids[0] = id / (arraylength(ids) - 1);
ids[id] = comp(ctransform("hsv", Oi), 2);

In the RIB, the only change needed is to the additional display line. The output is now set to PSD, and note the quantize values to convert the float to 8bit values.
Display "+output_multi_layer.psd" "psd" "ids" "int[4] quantize" [0 255 0 255] "float dither" [0]

One more thing to note about the RIB, the number in this line:
DisplayChannel "varying float[4] ids"
_MUST_ be the same as the number in ids array declaration in the SL (in the line: output varying float ids[4]=0; )
If they are not the same, all layers will be rendered black.


09/12/09 @ 04:55 pm
Comment from: chrysl666 [Visitor]

Thank you very much .!! I never gonna got this by my self . thanks for sharing , this ideia gonna help me a lot .. cos render masks requests to comps is a big pain in the a** when you first have made this shader , did you have realize this from scratch ? or is a kind of regular method for mask used in CG studios ? .cos is the first time I have seen mask renders like this , one objs in each layer of OpenExr or Psd.. cheers !

09/12/09 @ 06:59 pm
Comment from: Moritz Moeller [Visitor]
Moritz Moeller

What’s wrong with using TIF? Perfect for mattes, supports 16bit int and 32bit float precision, if needed. And any number of AOVs.

PSD support in 3Delight was meant for look dev, not use on actual shots.


10/04/09 @ 03:34 am

This post has 2 feedbacks awaiting moderation...

Form is loading...