Smoke domain causes loss of transparent background in render

I’m rendering to RGBA .png files, but in some cases my renders have a black background rather than a clear background.

I have a smoke domain in my scene. If the camera clipping limits include the front or back of the domain then the render’s background is black. If I adjust the clipping limits to exclude the domain or to exist entirely within the domain then I have a transparent background.

I’d like to have a transparent background regardless of clipping limits. How can I achieve this?


I forgot to mention that if I set the limits so that I have a transparent background, I also lose my smoke.

Anyway, I’ve found that if I switch my domain object to use z-transparency then I get my transparent background back. Adjusting some settings gives me something approximating my original, but it just isn’t of the same quality delivered by ray tracing.

So, I came up with the idea of using ray tracing and the compositor to remove the black background. My understanding is that I can send each pixel’s z-value to the compositor. The black background must have a different z-value than the image components, so I thought I would be able to replace those pixels with a transparent value. I’ve played around with the Z Combine compositor node, but haven’t had any luck.

Is this possible? If so, how. Thanks.

Edit: Actually, on second thought, that won’t work, because the smoke won’t have any transparency. If I can’t get transparency of my smoke domain using ray tracing, I’ll just need to accept the lower-quality z-transparency render.

Are you rendering the sky?

In the Layers panel of the Render tab I have checked

  • Solid
  • Halo
  • ZTransp
  • Edge
  • Strand

Sky is not checked. I think that means I’m not rendering the sky. But I may be wrong.

Edit: OK. I was wrong. I changed the horizon color, and the render’s background changed along with it. I don’t know how to not render the sky then.

I’ve recreated the issue I’m having in the simple, attached .blend file. I made the default cube my flow object, and added a domain around it. When the domain is set to use ray tracing, it takes the horizon color as it’s background, as shown in the attached .png. If I switch to z-transparency then the domain is transparent, and the red sky is never seen. Unfortunately, z-transparency just isn’t going to work for me, so I’m hoping someone can show me how to make my domain transparent while using ray tracing.


RayTraceTest.blend (749 KB)

I have not tested your file. Here is my test with transparent smoke domain.

transparent_smoke.blend (91 KB)

EDIT: Sorry my bad. You have requested a transparent background with raytrace. In my file it’s z-transparency. :o

Thanks for trying to help. I even upgraded to 2.65, hoping I could see how you did it.

It is not possible to render smoke with raytrace and a transparent domain.
For compositing you have to use z-transparency.

I have found this older bugreport:

There brecht answered:

For getting alpha values for compositing transparent objects, Z transparency instead of Raytraced Transparency must be used.

Thanks for tracking that down. That’s unfortunate, but I’m working on another way to handle this scene.