Sunday, November 18, 2012

Procedural Fire in After Effects


Improved Procedural Fire in After Effects

Effects used:

CC Particle Systems II
Trapcode Shine

Time: Approx 10 mins

This is a cool way to make a quick flame burst, like a flamethrower. If you have a bit of experience with particle systems you can probably do a lot more with it, if not then just experiment like I did until you get the look you're after.

Particles

Start by creating an adjustment layer, and label it 'particles'. Then apply a CC Particle Systems II Effect to it (Effect>Simulate>CC Particle Systems II)

Set particles to "Shaded&Faded Sphere"
Set Opacity Map to "Fade out sharp"
Set Color Map to "Birth to Origin", and make the birth colour about 65% grey.
Set Transfer Mode to "Composite" (in the particle rollout, not the layer)

Depending on what you want the flame to do, you will want to adjust the longevity, the direction and the all the physics attributes, but for our purposes today:

Longevity should be 0.8 seconds

Animate the birth size so it starts at zero, gets to it's largest point about frame 5 and then trails off to zero again at the frame you want it to stop- remember this is not when the flame will disappear, just when it will stop generating. It will take another 0.8 seconds for the flames to die out.  Death size should be set to zero. This will give the flame it's puffing look and make it break up as it dies.

Set the gravity to -2. This will depend on how far you want the flames to rise, and if it's a big fireball then you may want a higher number, but remember to increase the birth size at frame 5 so it looks in proportion.

Velocity- like the birth size, this should start small, increase to it's highest rate about frame 5 and then tail off to a low number. In this case, start with a value of 0.5, increase to 1.5, and then tail off to 0.2

At this point you should have something which looks like smoke, and you can use it like this if you want. But to take this further and make it into fire, we need to do a few more things.


Flame colours

Add a Levels effect (Effect>Color Correction>Levels). Leave it as is for now, but later on you can use it to adjust the brightness and contrast of the flames; you will probably need to make them darker once you add the shine effect to give the flames some detail.

On top of this, add a Tritone effect (Effect>Color Correction>Tritone). Set the highlights to bright yellow, set the midtones to a medium orange, and set the shadows to a dark red. Again you can play with these later to get the look you want.


Glow and movement

Now create a second adjustment layer, and label it 'distortion'. Add the Shine effect by selecting effect>trapcode>shine.

By default, Shine starts with fiery colours, so leave them as is. In the colorize rollout, change the 'Base on' parameter from 'Lightness' to 'Red'.

Set the Ray length to 0.2. This will effectively control how sharp or blurry your flames are; a higher value makes them blurrier. Set boost light to 5, and then position the source point below the bottom of your layer- you want the rays to point upwards, not outwards. Finally, set the transfer mode to Add.


You're almost there- it nearly looks like fire. But we need to add the movement of little vortexes in the flame, so add a Turbulent Displace effect (effect>distort>turbulent displace).

Set the displacement type to 'twist smoother', the amount to 30 and the size to about 60. Set Complexity to about 3, but adjust to your taste.

Key the evolution at frame 0, and then set a keyframe at the end. Add 1 revolution per second of animation- so, if your animation is 3 seconds, the evolution value should read '3x +000' at the final frame.

Under evolution options, set pinning to 'Pin Bottom' and tick the box for 'resize layer'.
Now hit play, and you should have a fairly convincing looking burst of flame!



If you don't have Trapcode Shine, you can use the stylise>glow effect plus a slight directional blur on the vertical axis to approximate the look. It won't look as good, but it's still fairly effective.

I think it's about as good as you can get without a dedicated flame plugin, but if anyone figures out something better, please let me know.