Fire

The purpose of this project was to write a surface shader that when used in conjunction with the previously written (water) displacement shader would give a simple object the appearance of being an animated flame. As with the previous assignments, the emphasise was on the vital need to carefully observe and document a natural phenomena before creating a digital version of it.

Fire reference image, flame, black background,animation

This reference photographs are taken with high shutter speeds to capture the form of the flame as accurate as possible. Also, I had to manually increase the F value to the highest value in order to get the right values and colors of the flame.

Noise Process

The image sequence above shows how I created the basic flame shape and pattern.

1. noise is remapped using smoothstep function and t value.

(1 - smoothstep(t - blur, t + blur, val));

 

 

blur variable is used to control sharpness of the edge while incandescence controls brightness.

2. Blur is increased

3. The image is inverted

4. Inverted image is multiplied with the first image.

5. The color gradient is applied.

6. Another noise is introduced to the noise function.

7. Gradient ramp is added to the result.

-abs(0.5-s)*1.6

 

 

Turbulence reference

 

In the next step, my goal was to create a turbulent distortion of the st space. I tried to achieve that effect with spiral swirls deformations. For that purpose, I created a secondary st space which is deformed with built-in rotate function in Renderman. Example on the left shows how rotation work from a single point on a grid. After I got the desired rotation and falloff, I created a loop that generates multiple swirls centers and moves them up. Also the rotation is multiplied with t value so that rotation angle increases while the center moves up.

 

This is a test with an actual fire shader juxtaposed with the reference video. Although the result did not match the reference, I decided to keep experimenting with this approach other possible results.

This is one of the resoults that I found very interesting because it resembles 2D fluid effects from maya and it renders in just few seconds. If I find time, I hope to keep experimenting with this shader. Also, you are free to take the shader and play with it. If you get any interesting resoults, please share it with me.

 

Here is the shader:

Turbulent fire renderman shader