9
$\begingroup$

I want to render an image of a fire in cycles, but as a png with a transparent background. Without a transparent background, the output image looks like this:

fire without transparent background

But as soon as I tick the "Transparent" checkbox under Render->Film, all the semi-transparent parts of the image are not rendered and it looks like this

fire with transparent background

which is clearly not what I want. I've tried to add a holdout shader or a transparent shader to my smoke domain material nodes, but it didn't help. I've only found answered questions for semi-transparent glass, but none for volumes. My node setup looks like this:

fire node setup

but the transparent shader doesn't do anything.

Has anyone an idea how to fix this?

Thanks

Edit: I've just changed the flow type to "Fire and Smoke" instead of "Fire" and now the semi-transparent parts render too, but I don't want the smoke.

$\endgroup$
  • $\begingroup$ You shouldn't add transparent shader at all in order to get smoke on transparent background. Checking Transparent as you said should solve this; after that you can add rendered smoke on desired background with AlphaOver node. In order to make smoke and flames brighter you can multiply brightness while compositing. $\endgroup$ – Mr Zak Nov 14 '15 at 20:08
  • $\begingroup$ How does that work if I have no background? And where would these nodes go? I'm pretty new to Blender. $\endgroup$ – Isa Nov 14 '15 at 20:40
  • $\begingroup$ your expected result is exactly what I'd need. I didn't add composite nodes as far as I know, all the nodes I set up are for the smoke domain material and are shown in the question. Maybe it helps if you take a look at the blender file (dropbox share)? dropbox.com/s/glznlqlz22btbks/fireball.blend?dl=0 $\endgroup$ – Isa Nov 14 '15 at 21:19
  • $\begingroup$ It seems pretty strange to me, because when I change the flow type to fire + smoke, it gets rendered on the transparent background, but not as bright as it should be. Maybe the image needs some smoke to be displayed? In my file, the smoke amount is set to 0.0 $\endgroup$ – Isa Nov 15 '15 at 10:02
  • 1
    $\begingroup$ It is possible to render that fire in Cycles and see the flame on the transparent background. In the gif I show the RenderLayers with image transparent and then lay it on black backgr with AlphaOver. The flow object is set to Fire, I just added smoke amount in Smoke Flames in domain settings. I'm not sure why to see the smoke on the background (but anyway you can do that)- that data is present as Brecht told and will be visible when overlayed. $\endgroup$ – Mr Zak Nov 15 '15 at 11:22
11
$\begingroup$

PNG images can't represent objects that emit light but not block any light, due to the way they represent transparency. For that reason, you must always have some amount of volume absorption for the emission to be visible when saved as a PNG image.

If your volume has zero density, you could use the flame to drive the volume absorption density, adding just enough to keep the flame visible.

The render and compositing image representations and EXR images can represent such objects, but this information can't be preserved when displaying in the image editor or converting to PNG. This is one of the subtle differences between associated/premultiplied and unassociated/unpremultiplied alpha.

$\endgroup$
  • $\begingroup$ That makes partitially sense to me. I now 'solved' the problem by using the Blender Render, which is able to render the fire with the flow type 'fire' and no absorbing smoke on a transparent background. If your answer is correct, this shouldn't be possible, though? $\endgroup$ – Isa Nov 15 '15 at 10:05
  • 2
    $\begingroup$ It depends on how you set up the Blender material, but the default Quick Smoke material for Blender Internal makes Flame contribute to the Density. That has the same effect as letting Flame contribute to the Volume Absorption density in Cycles. If you disable the Density contribution in Blender Internal you will see the same problem. $\endgroup$ – brecht Nov 15 '15 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.