In this tip, we are going to delve deep into the power of Digital Fusion's particle system. I will step you through the creation process of an advanced particle system to simulate a fireworks display, complete with launching mortars, smoke trails, and the final boom. We will cover a number of particle modifiers, and work a great deal with particle sets. It assumes you have completed the tutorials and/or training tapes and have a basic understanding of Digital Fusion concepts at this point.
Starting in a new flow, let's create the basic particle system, and merge it over our supplied backdrop.
|
- Create a new flow.
- Load the Miami backdrop
- Set the extend last frame to 200
- Add a particle emitter
- Add a particle renderer
- Merge the particle renderer over the backdrop.
- Set the merge to additive
|
|
|
Next we will add a particle directional force to simulate gravity and set up a few of the parameters for our mortars.
|
- Insert a pDF between the pEm and pRn.
|
|
- Adjust the controls of the pDF so the strength is 0.03.
|
|
I've reduced the amount of gravity in this case because we want our fireworks to fall, but not look like they are made from bowling balls. We want to keep them "light".
|
- Open the controls for the particle emitter, and set the following values;
- Random seed (pick a nice number of your choice)
- Number = 0.25
- Lifespan = 45
- Velocity = 0.15
- Angle = 90
- Angle Variance = 15
- Angle Z Variance = 30
|
|
- Under the region tab, change the region to a line, and position it along the shoreline of the background image.
|
|
|
Now is a good time to use the interactive playback function to tweak the settings a little bit. As you can see, we have mortars launched from the shoreline, and as they reach the top of their arc, they die. I want to be able to see a few of them fall a little bit further before they die, so lets adjust the Lifespan Variance;
|
- Set your render range from 0-200 and start interactive playback
|
|
- Under the control tab for the particle emitter, set the Lifespan Variance to approx. 40.
|
|
Here you will see a few odd particles begin to fall past the top of their arc. Next let's modify the look of the mortar to something a little more appropriate than a white dot.
|
- Under the style tab, enter the following;
- Style = Line
- Color
- R = 177
- G = 134
- B = 0
- A = 255
|
|
|
If you look at the system now, the mortars are not angled to orient themselves around their trajectory. To change this;
|
- In the control tab for the particle emitter, set the rotation mode to "Rotation Relative to Motion"
|
|
Now the particle should start to look more like a hot spark flying into the night sky. The next stage will be to add a smoke trail to the mortar using the particle spawn tool. The spawn tool will use an existing particle as a source for a second set of particles. Here we will begin to use the particle sets to define different elements of our system, so tools only affect a certain set or "channel." So in this case, we will tell the spawn tool only to affect the mortars by using set 1.
|
- Insert a particle spawn [pSp] tool between the particle emitter and particle direction force.
|
|
- Under the main controls, set the following values;
- Random Seed (pick a nice number of your choice)
- Number = 3
- Velocity Transfer = 0.02
- Velocity = 0.001
- Angle Variance = 360
- Angle Z Variance = 360
|
|
|
During playback here, you will notice that the mortars begin to leave trails behind them. They don't look much like smoke yet, and they are also being affected by the gravity.
|
- Open the controls for the particle emitter, and under the sets tab, check set 1.
|
|
|
This means that the mortars have a unique ID of 1. We can then limit later tools to affect only ID 1.
|
- In the Directional Force, open the conditions tab, and set the dropdown to "affect specified sets"
- Uncheck 2,3,4,5,6,7,8
|
|
|
Now the gravity will only affect set #1, in this case the mortar.
|
- Under the particle spawn 1,
- Check set 6 under the Sets tab.
|
|
- In the conditions tab,
- Set mode to "affect specified sets",
- Uncheck 2,3,4,5,6,7,8
|
|
|
This tells the directional force to affect only the main particles at this point. I only unchecked 2-8 because I won't be using more than 8 sets, so the rest don't matter. I've defined the smoke as set # 6, and I also limited the particle spawn to just the main mortars by affecting set 1 under the conditions.
To get a nice smoky look to the particle spawn, we need to adjust a few style parameters.
|
- Under the particle spawn 1 style tab, adjust the following settings
- Style = Point Cluster
- Color
- R = 125
- G = 125
- B = 125
- A = 25
- Adjust the size over life LUT so at birth the particle is 0 and 1 at its death.
- Fade controls
- In = 0
- Out = 0.2
- Apply mode = Merge
|
|
|
Now would be a good time to clean things up a bit. Let's rename a few of our tools and get ready to add the next stage of our composite.
|
- Rename particle emitter 1 to "pEm Mortar" (Use the F2 key as a shortcut.)
- Rename particle spawn 1 to "pSp Mortar Smoke"
- Rename particle direction force 1 to "pDF Gravity"
|
|
|
Next we'll add the flashy part of the particle system, the BOOM. We'll add another particle spawn to the flow, and set it up so it only spawns particles at the death of each of the mortars. This will slow things down significantly until we make a few changes. It might be a good idea to stop interactive playback here.
|
- Add a second pSpawn between the pSp Mortar Smoke and the pDF Gravity nodes.
|
|
- Rename the second pSpawn, to "pSp BOOM"
|
- In the controls tab, enter the following settings;
- Random seed (pick a nice number of your choice)
- Number = 300
- Lifespan = 35
- Lifespan Variance = 5
- Velocity Transfer = 0
- Velocity = 0.1
- Velocity Variance = 0.025
- Angle Variance = 360
- Angle Z Variance = 360
- Rotation mode = Rotation relative to motion
|
|
- Check set 5 under the sets tab.
|
|
- Under the conditions tab
- Start age = 0.999
- Set mode = Affect specified sets
- Uncheck 2,3,4,5,6,7,8 (we want set 1)
|
|
|
To get the gravity to also affect the boom clusters;
|
- Under the pDF Gravity tool conditions check set 5
|
|
|
Playing this back reveals that we now have the second spawn tool exploding particles just before the death of each mortar. They still don't look right though. There's no color yet, and no air friction. Let's add a particle tool, friction, to simulate this.
|
- Add a particle friction [pFr] between the pSp BOOM and the pDF Gravity.
|
|
- Rename it to "pFr Air"
|
- Change the following control settings;
- Random seed (pick a nice number of your choice)
- Velocity Friction = 0.1
|
|
- Edit the conditions;
- Set mode = Affect specified sets
- Uncheck 1,2,3,4,6,7,8 (we want set 5)
|
|
|
Now we have a bit more realistic motion on the booms. Let's go back to the pSp BOOM tool and modify it to change the color and add a bit of variance to the force behind each explosion. To do this we will use the "shake" animation modifier for each.
|
- Under the controls tab for the pSp BOOM, right click on the velocity slider, and choose "Modify with - Shake"
|
- Open the modifier tab, to adjust the shake, make the following changes;
- Random seed (pick a nice number of your choice)
- Smoothness = 1
- Minimum = 0.05
- Maximum = 0.15
|
|
|
This will add a bit of variation to the power behind each explosion. Now for the color;
|
- In the style tab, open the color variance controls.
- Right click on the red low value, and choose "Modify with - Shake"
|
|
|
- Right click on the red high value, and choose "Connect to - Shake on pSp BOOM:Red low - X value"
|
|
|
- Open the Modifier tab, and open the controls for Shake on pSp BOOM:Red Low
- Random seed (pick a nice number of your choice)
- Smoothness = 2
- Min = -0.75
- Max = 0
|
|
- After completing the above, do the same for both the green and blue variations.
- To complete the look of the booms set the following;
- Style = Line
- Size to Velocity = 0.25
- Fade out = 0.6
|
|
|
All right, now we're getting there. As you can see we now have a particle branch of the flow to create a fairly realistic fireworks display, but I like to really push things. Lets add some turbulence to the smoke trails of the mortars, and get those booms to really pop in the composite with some glow, and the addition of the reflection in the water.
|
- Add a turbulence tool to the particle system, between the pFr Air and pDF Gravity.
|
|
- Set the controls to reflect;
- Random seed (pick a nice number of your choice)
- X strength = 0.03
- Y strength = 0.03
- Z strength = 0.03
|
|
- Set the Conditions to;
- Set mode = Affect specified sets
- Uncheck 1,2,3,4,5,7,8 (we want set 6)
|
|
|
Ok, now for the glow and reflections;
|
- Add a glow tool between the pRender and merge 1 tools.
|
|
- Enter the following;
- Glow size = 1
- Uncheck alpha
- Apply mode = Threshold
- Low = 0
- High = 0.8
|
|
- Blend = 0.6 (under the radio active tab)
|
|
- Insert a Brightness Contrast [BC] tool between the glow and merge,
- Adjust the saturation to 1.5
|
|
- Add a transform tool to separate from the main flow, and take a 2nd branch out from the Brightness Contrast and connect to the transform.
- Check the "Flip Vertical"
|
|
- Add a blur after the transform tool;
- Uncheck "Lock X/Y"
- Set X = 10
- Set Y = 0
|
|
- Add a merge after the merge 1 tool, and connect the blur's output to the merge 2's foreground.
|
|
- Set the merge center Y to 0.75
- Set the merge to "additive"
- Add an effects mask - rectangle, and position it to cover just the water area.
- Set the mask softness to 0.025
|
|
|
It looks better, but still needs a bit of tweaking. Let's soften the particles a bit, and set up the pRender to calculate the frames at a sub frame level. This generally slows down the interactive playback too much, so I generally leave this step to the last.
|
- In the pRender tool, under the controls tab;
- Check the pre-roll checkbox
- Set the blur to 0.5
- Sub frame calculation accuracy = 4
|
|
|
So there we have it, a complete fireworks display courtesy of the particle system of Digital Fusion. Something that isn't maybe apparent right now is that this is a full 3D particle system. Try the following to see;
|
- Select the pRender tool, and open the scene tab.
- Scrub the angle Y rotation to about 40.
|
|
Now you can see as Fusion updates, the particle system is fully 3D.
|
- Return the angle Y rotation back to 0
|
|
Most people will be happy at this point but I am a bit of a perfectionist, and want to add the smoke from the booms, however this step is completely optional, as it will bring most systems to their knees. If you proceed with this step, we will add yet another spawn tool to affect only the boom particles.
|
- Add a pSpawn tool to the flow, but do not connect it to anything yet.
|
|
- Rename it to pSp Boom Smoke
|
- Adjust a few parameters before you insert it in the particle branch;
- Under the controls;
- Random seed (pick a nice number of your choice)
- Number = 1
- Lifespan = 180
- Velocity Transfer = 0.15
- Velocity = 0.01
- Angle Variance = 360
- Angle Z Variance = 360
|
|
- Under the sets tab, check 8
- Inside the conditions tab
- Set mode = Affect specified sets
- Uncheck 1,2,3,4,6,7,8 (we want set 5)
|
- Enter the following in the style tab
- Style = Point cluster
- Color
- R = 85
- G = 85
- B = 85
- A = 16
- Size = 2
- Size over life LUT like so
- Fade out = 0.1
- Apply mode = merge
- Check Sub pixel rendered.
|
|
- Insert the pSp Boom Smoke into the flow, by holding down the shift key, and drop it on the connection. (Make sure the connection highlights)
|
|
|
|
This should add the final look of realism to the flow. Now hopefully you understand a bit more about particle sets, and how to use them. Until next time;
|
Keep On Fusioning!
Jason Kolodziejczak
eyeon Software Inc.
|