Simulating "light" in Illusion 2.0    28 Jan 01


(Note: an Illusion project file containing the emitter used here can be found at the end of the tutorial, and CAN be loaded by the demo version of Illusion.)


I wasn't sure what to call this tutorial. "Simulating Light" isn't quite right, but "lighting a smoke column" doesn't seem right either. "Adding more depth"?   "Increasing realism"?   "Who needs 3D"?   Well, let's forget about the title and just jump into a very cool technique I came up with while thinking about how to integrate "lighting" of some sort into a future version of Illusion.

Here's what the end result is:

273 KB DivX



To begin we'll need a simple smoke emitter, something that can create a rising column of smoke. The library Alan_00_04 has an emitter called "Heavy Smoke" that I like and is a good starting point.



First we'll need to convert this from a "falling smoke" emitter into a rising smoke one. Add the emitter to the stage and open the properties dialog (r-click on it and select "properties"). Do the following:

1) Decrease the emission range to 20.
2) Change the emission angle to 90.
3) Change the particle type weight property from positive to negative so the smoke will rise. Don't set it to "-max" -- make it about 2/3 between "0" and "-max".
What we've got at this point:



Now the "guts" of the technique -- adding the "shadow". In the hierarchy window of the properties dialog select the particle type (named "plumes" unless you changed it) and then click the "New Particle Type" button below the hierarchy window. The result is that a copy of the "plumes" particle type is made. This particle type will become the "shadowed" portion of the smoke column, so let's rename it "shadow" ("copy of plumes" doesn't tell us too much). Click the particle type name and rename it.

There are only 2 simple steps we need to do to convert "shadow" into something that looks like a shadow:

1) Click the Color tab and change the color gradient from a light gradient to a dark gradient. Here's my before and after gradients:

before (light smoke)

after (dark smoke)

This is what the shadow smoke looks like now:

dark smoke that will be the shadow

Note that the "Choose random color..." option is checked. Since the colors in the gradient are not too different from each other, this option gives each of the particles a slightly different color, which helps to add some "texture" to the effect.

2) This is the key step in making the dark smoke the "shadow" -- we need to slightly offset the reference point of the particle shape for the dark smoke. Click the "Ref. Point" button and move the shape reference point slightly off-center.



This shifts the shadow smoke to the left. If we view the entire smoke emitter now (select one of the emitter properties in the hierarchy window), we can see that we're getting the "lit on one side" effect that we want.



A little more tweaking and I'll be satisfied. First I want to make the shadow a little darker.



Then I want a little more distinction between the light and dark sides, so I need to move the reference point a little further to the right.



That looks good to me. If you drag the emitter around to see how it looks, you might see the odd light particle showing up on top of the dark ones, or a random dark one showing up on top of the light side. Not too drastic, but can spoil the effect (depending on how picky you are). I've found that checking the "Keep particles in order" option gets rid of this problem.



That's all there is to it. I haven't played with it too much, but by changing the size and reference point of the shadow particle type you should be able to get the "light source" to be in almost any location you choose. You may even be able to have the light source appear to move by having multiple shadow particle types and using their visibility property to fade between them.

Hmmmm, I'll have to play with that idea a little...



The project file:    (32 KB)
(This project file CAN be loaded by the demo version of Illusion 2.0.)



Alan Lorence    28 Jan 01