Hi,<br><br>I was playing with this node, add saw that the alpha channel for each images was not taken into account.<br>I use an external renderer (Pixie) with my Blender rib exporter and export Z and A channels and when I motion blur, the result is not what I expected (only Z do the mask).<br>
<br>I made this tweak to CMP_zcombine.c to make it work:<br><br>static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *src2, float *z2)<br>{<br>&nbsp;&nbsp;&nbsp; if(*z1 &lt;= *z2) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out[0] = (src1[3]*src1[0]) + ((1-src1[3]) * src2[0]);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out[1] = (src1[3]*src1[1]) + ((1-src1[3]) * src2[1]);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out[2] = (src1[3]*src1[2]) + ((1-src1[3]) * src2[2]);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out[3] = (src1[3]) + ((1-src1[3]) * src2[3]);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out[0] = (src2[3]*src2[0]) + ((1-src2[3]) * src1[0]);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out[1] = (src2[3]*src2[1]) + ((1-src2[3]) * src1[1]);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out[2] = (src2[3]*src2[2]) + ((1-src2[3]) * src1[2]);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out[3] = (src2[3]) + ((1-src2[3]) * src1[3]);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(node-&gt;custom1)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *z1= *z2;<br>&nbsp;&nbsp;&nbsp; }<br>}<br clear="all"><br>But It works only when &quot;Save Buffers&quot; and &quot;Full Sample&quot; is enabled on the &quot;output&quot; render panel.<br><br>The other case seems a bit harder to code (with the current implementation).<br>
<br>One last thing, can someone look at <a href="http://projects.blender.org/tracker/index.php?func=detail&amp;aid=8557&amp;group_id=9&amp;atid=127">http://projects.blender.org/tracker/index.php?func=detail&amp;aid=8557&amp;group_id=9&amp;atid=127</a> and tell me if the python particle patch can be added in the SVN?<br>
<br>Best regards.<br><br>-- <br>Cedric PAILLE.