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> if(*z1 <= *z2) {<br> out[0] = (src1[3]*src1[0]) + ((1-src1[3]) * src2[0]);<br>
out[1] = (src1[3]*src1[1]) + ((1-src1[3]) * src2[1]);<br> out[2] = (src1[3]*src1[2]) + ((1-src1[3]) * src2[2]);<br> out[3] = (src1[3]) + ((1-src1[3]) * src2[3]);<br> }<br> else {<br> out[0] = (src2[3]*src2[0]) + ((1-src2[3]) * src1[0]);<br>
out[1] = (src2[3]*src2[1]) + ((1-src2[3]) * src1[1]);<br> out[2] = (src2[3]*src2[2]) + ((1-src2[3]) * src1[2]);<br> out[3] = (src2[3]) + ((1-src2[3]) * src1[3]);<br> <br> if(node->custom1)<br>
*z1= *z2;<br> }<br>}<br clear="all"><br>But It works only when "Save Buffers" and "Full Sample" is enabled on the "output" 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&aid=8557&group_id=9&atid=127">http://projects.blender.org/tracker/index.php?func=detail&aid=8557&group_id=9&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.