 |
 |
|
 |
|
|
|
Introduction: This tutorial will help get you started in the world of image based particle emitters. The idea behind
this concept is that you can take a gray scale or black and white image and use it to control a particle emitter. Once
we create our image map will use it to control the birthrate of the particles from our emitter. You won't need a paint
program to follow this tutorial since I'll include one in the project files. If you want to create your own image you
can use any paint program you wish. I have used Photoshop here.
Note: While I will be using LW8 for this tutorial earlier versions of LW can be used to accomplish the same
effects. The only thing that will be different will be how you get to first create your particle emitter. Now, enough
chatter, lets play!
|
|
|
1 – In the paint application of your choice you need to create a test image to explore these effects with.
I used Photoshop and have include the final image in the projects files which you can download from the link at the
bottom of this tutorial. For my image I have used my good ole friend Mr. Smiley Face. You'll be seeing a lot of him
in my particle tutorials! Along with Mr. Smiley Face you'll notice a simple gradient bar and some happy text in the
image as well. This will help us explore what is really happening and what we can do with this method of particle
emission. The idea for the gradient bar came from a great tutorial on controlling
hair with Sasquatch. I now use
and highly recommend to you to remember this technique of using a gradient bar for future projects where you need
to control effects using images or weight maps. You should also notice that I have used all kinds of ugly things on
Mr. Smiley Face. Ragged outlines, an unsmooth mouth and blurry eyes. These were intentional to show you what happens
in many different drawing styles.
|
|
|
2 – Once you have completed your masterpiece you'll need to save it. But first if you have not done so
convert your image over to a simple gray scale image. Why? Because Layout is only going to see the scale of the image.
Colors not only will have no effect but probably give you different results then what you expect. So lets save some
sanity and memory for more important things. As for image format use your desired format. I choose the .png format
for no special reason other then I personally like it.
|
|
|
3 – Now open up LightWave Layout and lets take care of all the little things first. First change the end keyframe
to 250. This will give you an animation just a hair over 4 seconds and will allow us to see the particles in a decent manner
from birth to death.
|
|
|
4 – Next lets take care of the lights. Well other then turning the 'Ambient Intensity' on the 'Global Illumination'
panel to 0. Your done. No objects means no need for lights.
|
|
|
5 – Since I'm not a big fan of having 100% black backgrounds for rendering (even with space scenes) I went in and changed
the background color to R = 35, G = 50, B = 50.
|
|
|
6 - Lets go ahead and create our emitter by selecting Items->Add->Dynamic Object->Particle.
Name it Emitter_Smiley (always name you objects it will save you a lot of sanity later!). Leave the Type set to 'HV Emitter'.
|
|
|
7 – Once you hit enter the FX-Emitter properties panel opens for you. But lets not use this panel (unless you are in
a version of LW prior to LW8.) Close the panel. Now select your new Emitter-Smiley object and open its properties panel.
Flip to the 'Dynamics' tab. Double click on the 'FX emitter'. Now the first and most important thing we need to do is create
our image based emitter using the birth rate. To do this press the texture 'T' button to the far right of 'Birth Rate'.
This opens the texture editor for birthrate. Lets make these setting for out image.
Layer Type - Image Map
Blending mode - Alpha
Projection - Planar
Image - Load the Smiley.png or whatever images you created
Pixel Blending - unchecked
Texture Antialiasing - unchecked
Texture Axis - Y
Scale X - 2m
Y - 0m
Z - 2m
Leave the rest at their default values. To make life easier for us hit the 'Copy' button above the texture layers and select 'Selected Layer(s)'
We'll be using these settings again in a few minutes.
So what we have done here is set the birthrate and in our case the position of where the particles are being born to match
the image we have loaded. In the white areas no particles will be emitted. The darker the shading the more particles will be
birthed. Why did we set the size to 2m? Just to give us something easier to look at. You could have easily set it to any size
you want.
|
|
|
8 - Now back on the 'Generator' tab. Change these settings
Birth Rate - 1000
Generate by - Frame
Nozzle - Box
Generator Size X - 2m
Y - 0m
Z - 2m
Particle Limit - 15000
|
|
|
9 - Go ahead and hit the 'Calculate' button. After a couple seconds you will see your image being drawn by particles!
I recommend keeping the animation playing while you work so you can see the changes you make. If it slows your machine down to much
then stop the playing and just start it up after you make changes so you can see the effects of what you have done. This is called
learning, in grade school we hated it, now we live for it! What your saying, 'No way, I still hate it!' Then why are you reading a
tutorial?
|
|
|
10 - Well since we are looking at things lets set up our camera up now so we can get a really good look at our progress.
Switch to 'Camera' and move it to where ever you like. Here's the settings I used.
Position X - 0
Y - 4m
Z - -3m
Rotation H - 0
P - 52
B - 0
I set the camera resolution to NTSC with a zoom factor of 4.5. Make sure you set a keyframe on Keyframe 0. Switch to camera view and
play your animation. You should now see something similar to this. If you don't see particles being emitted forming your image. The
first thing I would do is re-calculate the particles. If its still not working check to make sure that you have set the blending mode
for your image map to alpha. If its still not working check all your other settings and/or make sure you are using a gray scale image.
|
|
|
11 - Reselect your Emitter_Smiley object, open its properties, hit the Dynamics tab, double click on the FX-Emitter and
flip to the Particle tab. Change:
Life Time (frame) - 120
|
|
|
12 - If you were to play the animation now you will see the particles being born and die evenly across your image.
So lets take this a step further and get a little more control on those particles. Flip to the 'Motion' tab and hit the texture 'T'
button for 'Velocity'. Hit the 'Paste' button and select 'Replace Selected Layer(s)'. If you did not copy the settings from
step 7 then either hand enter them or go back to Birth Rate and copy those settings.
|
|
|
13 - Well that did not do much that we can see. So lets get them flying up off the image plane now.
Set the Velocity(m/s) Y - 500mm
If you now play the animation (if its not already playing) you should see the particles not only being emitted with the density of the
particle birth rate controlled by our image but now so is the velocity of the particles. With pure white areas the particles have 0
velocity. The darker the shading the greater the particle velocity. Cool ain't it?
|
|
|
14 - The last thing we should do is smooth into the birthing of the particles so move back to the Generate tab.
Click on the envelope 'E' key to the right of 'Birth Rate'. This will open the graph editor with birth rate automatically selected.
First select the keyframe at 0 and set it back to 0. Next add a new keyframe at 15 and set that one to 0 as well. Add another keyframe
at 45 (1 second after we start generating particles) and set its value to 1000. Finally select all the points and set the tension to 1
for a TCB Spline incoming curve.
|
|
|
15 - That's it for actually creating the particles. Now lets create some HyperVoxels to render our scene with.
To create your HV's go to Windows->Volumetrics and Fog Options. Click on the 'Add Volumetrics' button and select "HyperVoxels'.
As a quick side note I highly recommend you take a couple of minutes and create a new tab with all of the different Dynamic and HV options
available on it. It will really help speed your work flow up and save more then a few brain cells when you forget where to find something.
If you are not sure how to do this I have I quick tutorial that will walk you through how to create such a tab.
|
|
|
16 - Double click on the Emitter_Smiley object (it should now be selected with a checkmark next to it. Now set the geometry
up like so:
Object Type - Sprite
Particle Size - 20 mm
Stretch Direction - Velocity
Stretch Amount - 125%
Align to Path - checked
Show Particles - checked
The velocity stretch just helps smooth the motion blur just a bit giving a more fluid look to our final render.
|
|
|
17 - Lets make our particle change a little over time so click on the 'T' button to the right of 'Particle Size'.
Here we will create a gradient controlling the particle age. So make these change to your new texture:
Layer Type - Gradient
Input Parameter - Particle Age
Now click on the on the top arrow bar for the gradient and set it to:
Value - 20%
Alpha - 100%
Parameter - 0
Now extend the time period from 30 frames to 40 frames by changing 'End' to 40. Now simply mouse click anywhere on the gradient to
create a new parameter and set its values to:
Value - 100%
Alpha - 100%
Parameter - 40
What this is going to do is increase the size of the particle to expand to its full 20 mm size over a span of 40 keyframes.
We are now all done here so go ahead and click 'Use Texture'
|
|
|
18 - Move to the 'Shading' tab. Click on the 'T' for Color and give it these settings:
Layer Type - Gradient
Input Parameter - Particle Age
End - 120
Now create 3 new parameters for your gradient by just mouse clicking anywhere on the gradient. Now start at the top one
add these values to each parameter in succession.
Color - 255, 255, 171
Alpha - 100%
Parameter - 0
Color - 210, 20, 6
Alpha - 100%
Parameter - 92
Color - 124, 75, 106
Alpha - 100%
Parameter - 108
Color - 40, 137, 207
Alpha - 100%
Parameter - 120
This will make the particle start of life with a yellow glow and as it gets older it fades to red then finally flares
out to blue as it dies.
|
|
|
19 - Lets add a gradient to the luminosity as well. Press the 'T' button next to 'Luminosity and set
it to:
Layer Type - Gradient
Input Parameter - Particle Age
End - 120
Now create 3 new parameters for your gradient by just mouse clicking anywhere on the gradient. Now start at the top one
add these values to each parameter in succession.
Value - 150%
Alpha - 100%
Parameter - 0
Value - 163%
Alpha - 100%
Parameter - 93
Value - 191%
Alpha - 100%
Parameter - 108
Value - 225%
Alpha - 100%
Parameter - 120
This gradient will cause the luminosity of the particle to increase as it flares out just as it dies.
|
|
|
20 - Finally lets make our particle fizzle out as it flares out and dies. So click on the 'T'
to the right of 'Opacity' and give it these settings:
Layer Type - Gradient
Input Parameter - Particle Age
End - 120
Now create 2 new parameters for your gradient by just mouse clicking anywhere on the gradient. Now start at the top one
add these values to each parameter in succession.
Value - 89%
Alpha - 100%
Parameter - 0
Value - 89%
Alpha - 100%
Parameter - 93
Value - 50%
Alpha - 75%
Parameter - 120
Note we actually changed the alpha channel for that last parameter. Don't miss it.
|
|
|
21 - On the 'Shading' tab itself change the 'Number of Slices' to 3 and check 'Use All Lights'
|
|
|
22 - Move to the 'HyperTexture' tab. There's no real need to slow our
render down just for this so
we'll just set 'Texture' to none.
|
|
|
23 - There's surely a lot more we could do to fine tune the final look. But our object here was to see
how to create and use images for particle emitters. We have accomplished that goal we just need to see our results.
You can do this a couple of ways. First you could just plan cheat and do it the same and dirty way by making and OpenGL
preview. To do this make sure you are in Camera view (just hit '5' on your keypad.) Next on the lower right corner under the
VCR like play buttons click on the 'Preview' button. Select 'Make Preview' and set the Start to 0 and the End to 250. Press
'OK' and after a few seconds you'll have a nice preview to watch. Just hit the play arrow and off you go. You can even save
this preview if you so choose.
The other normal option is to just render your frames out. No special render options are needed so I suggest turning off
all of the Ray Tracing options. Turn off 'Extra Ray Trace Optimization'. Set the 'Ray Recursion Limit' to something low like 2-4.
You could also set particle motion blur to something like 80% - 150% in the Camera Options if you like as well. Then just render away.
|
|
|
24 - Well that's about it for this tutorial. If you noticed the stray particles popping up where you don't
think they should then stay tuned to a future tutorial on using EditFX for particles It will show you how to get rid of them as
well as several really cool other tricks.
|
|
|
Please feel free to contact me with any questions, problems or comments: aurora@auroragrafx.com
|
|
|
Project Files: The project zip file contains the SmileyFace.png file, the completed LW8 scene file
and a render of the final project comped as a DivX file.
IBPfx_ProjFiles.zip
|
|
|
--Top of Page-- |