Integrating fire and smoke into cycles without compositing.

I was having a play with the smoke and fire simulator over the past few days - but unfortunately it doesn’t work in cycles yet. I started looking around for some compositing tutorials - but whilst doing so, hit on another idea (one used in gaming).

Render out the smoke/fire as an image with alpha channel - then apply this as a texture to one or more planes in your cycles scene. By applying the correct materials to this plane (i.e. combining emission, transparency, alpha etc) - you can make the fire give off light and the smoke will cast shadows.

Whilst its not as good as true volumetric smoke in cycles - it might work quite well for simple scenes. Here is a quick and dirty test scene (obviously with more tweaking - it could probably look much better). I have also given the node setup for the material.

Next step is to try animating this method by rendering an colour and alpha pass in BI as an AVI - then applying the movie as a texture instead of an image.




And if you have camera movement you can record that onto your projection too for simulated volume.

Really clever, I wonder what over illumination, occlusion effects you could achieve like this?

Next step is to try animating this method by rendering an colour and alpha pass in BI as an AVI - then applying the movie as a texture instead of an image.

Maybe you can just load an image sequence in the texture node? I think it should work.

Yep, but I have a pre-rendered animation of the smoke/fire colour channel - so all I need to do is render the alpha channel as another movie (which I have just done). I can then load the colour and alpha AVIs in place of the png colour and alpha channels. I have an animation render in progress…i’ll post it later - but its looking good.

The motion blur idea didn’t really work…well, it did, but didn’t look great. The displacement map idea worked fine, gave better depth to the fire and made the light look more dimensional (i.e. looked like it was coming from actual physical 3d fire, rather than a mapped flat plane). It would work for animations too as long as the camera didn’t stray too far off to the side (it looks a bit weird at oblique angles). I guess you could track the plane to the camera to keep it facing.

Here is a quick test animation to prove the concept. Sorry about the low quality, i’ll try and render a higher resolution/higher samples version (although that said - it took 1000 samples to get this quality - a couple of higher resolution individual frames with 4000 samples are provided below the video.). This version has two planes at 90 degrees to each other to better smooth the light emission. If you only have one plane - you get a dark line in the plane of the erm…plane.

The fire reflects quite well and the caustics off the glass ball respond to it. The scene is lit by nothing but the fire and a very small contribution from a HDR environment light - turned down to 0.2 to provide a little ambient light.



Any reason why you are using a 8 bit format for this? i would expect better (and more realistic) results if it were rendered off as 32 bit exrs… so that you get the correct light intensity rather then it being clipped at 1 (exrs go beyond the value 1)

No reason other than I was simply playing with BI and had rendered JPEGs, PNGs and AVIs - then the idea popped into my head and I ran with it. It wasn’t pre-planned. I just wanted to see if it was feasible and just happened to have suitable PNGs and AVIs to hand.

Like I said in my OP - these are quick and dirty tests and there are probably many things that could be done to improve this method (using EXRs may be one). I think the results even using 8 bit image files are pretty decent - and definitely prove the concept.

This is a quick test using EXRs as the input images. The colour does look a little richer.