Bassam: that sounds nice, what about image input nodes? convert all to premul based on image type?<div class="gmail_extra"><br clear="all">Daniel Salazar<br><a href="http://patazstudio.com" target="_blank">patazstudio.com</a><br>


<br><br><div class="gmail_quote">On Sat, Dec 8, 2012 at 6:52 PM, Bassam Kurdali <span dir="ltr">&lt;<a href="mailto:bassam@urchn.org" target="_blank">bassam@urchn.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Brecht, then it&#39;s perfect,<br>
<br>
- output files dictate the choice,<br>
<br>
- renderlayers are always premul.<br>
<br>
I had been initially scared you meant the renderdlayers themselves would<br>
end up switching their alpha between key and premul based on the output<br>
file choice!!<br>
<br>
Suggestions for the renderlayer nodes: a convenience &#39;key alpha&#39; check<br>
box that does a convert to key alpha if checked, removing the need for<br>
the extra node... benefits:<br>
<br>
1- removes need for an extra node in some setups.<br>
2- communicates to the user that the renderlayer is (unless you check<br>
it) with premul alpha.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Sat, 2012-12-08 at 20:47 +0100, Brecht Van Lommel wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; &gt; So I would make the following suggestion to avoid the ambiguity:<br>
&gt; &gt;<br>
&gt; &gt; 1- do as you said and switch key/premul based on output format (with a a<br>
&gt; &gt; choice if the format allows both) in the output file settings.<br>
&gt;<br>
&gt; Yes, probably there would be 3 choices: automatic, premul, key. I&#39;m<br>
&gt; not sure about the design yet, it&#39;s probably not feasible to make the<br>
&gt; compositor keep track automatically of what the user did. I&#39;m thinking<br>
&gt; there would be some settings that says if the compositor outputs<br>
&gt; premul or key, and based on that it could do automatic conversion to<br>
&gt; the file format then.<br>
&gt;<br>
&gt; So there would actually be 2 settings, but I would hope that in nearly<br>
&gt; all cases the compositor output type can be set to premul and file<br>
&gt; format to automatic. This should work for the cases where you use<br>
&gt; typical intermediate formats like OpenEXR and TIFF, and do final<br>
&gt; output either without alpha or with alpha in a web format like PNG.<br>
&gt;<br>
&gt; &gt; 2- allow switching key/premul in renderlayers regardless of output<br>
&gt; &gt; format , and make them a sane and consistent default (regardless of<br>
&gt; &gt; output format chosen, maybe something suitable for openexr).<br>
&gt;<br>
&gt; Not sure what you mean by this, where this switching would happen. But<br>
&gt; basically anything that comes out of a render engine is naturally<br>
&gt; premul. OpenEXR is always premul, and TIFF has metadata to indicate<br>
&gt; which alpha type was used. For intermediate formats premul seems the<br>
&gt; best option.<br>
&gt;<br>
&gt; Layers can be converted to key after rendering but there&#39;s no<br>
&gt; information to be gained there, and it would give some information<br>
&gt; loss for surfaces that are both emissive and transparent (though<br>
&gt; that&#39;s no so common, maybe for fire volumetrics or so). I think it<br>
&gt; would be good to make compositing nodes work by default with premul as<br>
&gt; a convention, so blur type nodes would have to do no conversion, and<br>
&gt; color correction nodes would optionally convert to key and back.<br>
&gt;<br>
&gt; Brecht.<br>
&gt; _______________________________________________<br>
&gt; Bf-cycles mailing list<br>
&gt; <a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
<br>
<br>
_______________________________________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
</div></div></blockquote></div><br></div>