Masking problem

I’ve rendered a scene in Yafray with some characters flying around. I’ve taken the same scene and rendered a billowing cloud of smoke using Blender’s particles. I want to superimpose this smoke onto the Yafray render in such a way that the characters flying around fly in front of the billowing smoke.

I thought the way to do this was to render the characters with a black shadeless material and render as a series of RGBA files, but that isn’t working.

What kind of material do I have to give the foreground characters so that they mask out the background smoke when the scene is composited?

What type of RGBA files did you use? Did you use a file format that supports transperency such as PNG?

DwarvenFury

Uncompressed Targa - and the weird thing is that parts of the background do show through.

I’ve just tried shifting the smoke to another layer and rendering that on its own with a black ‘World’ background. That composites fine, although obviously not masked by any foreground elements.

Did you try setting the alpha for your mask material to 0?

DwarvenFury

I did, but that stops them from masking the the background smoke - they just become entirely transparent. I want them to be solid, but black, so that they show up as a transparent alpha channel during compositing. For some reason they are coming out completely black, but not in the alpha channel…

Here’s an example file. Hope this helps.:smiley: The color of my alpha material is the same color as my world background, not sure if it has to be like that, though.

http://z23.zupload.com/download.php?file=getfile&filepath=2727

DwarvenFury

Wow, thanks! I appended the alpha material from your .blend file and it has fixed the problem.

If only I knew what I was doing wrong!

Thanks again!