home about gallery publications education links contact


..::colliding asteroids::..

Note from the author: The explosion sprites used in the original article, printed in 3D World, were sourced from Digital Vision, therefore due to licencing and copyright issues, I cannot provide these sprites to be downloaded. However, you can use the Hercules explosion that is included on the 3ds max 6 Learning & Training CD, which will yeild similar results. To use this sequence, amend the Explosion A and Explosion B materials in the start (and finish) scenes to use the Hercules map and matte files instead of the listed .ifl sequence. If possible, try to source an additional explosion sequence for Explosion B. Again, this article and its assets are un-amended and are provided as-is. If you have problems replacing the maps, please check the forum and/or post a message there and I'll help as soon as I can :)

3ds max 6 has been widely anticipated by the effects community, not just due to the inclusion of Mental Ray but because of Particle Flow, 3ds max 6’s brand new event-driven particle system. For what seems like an eternity, 3ds max users have had to put up with the standard (legacy) systems which, although some pretty cool effects could be made with them, they were quite dated with respect to the competition. Things have now changed with the introduction of this new system (which 3ds max 5 subscription users have already had access to) and it opens the doors to a load of particle-based solutions right out of the box.

Here we are going to create a nice little animation of a load of small asteroids smashing into larger ones. The impact effects will be handled with multiple particle spawning tests, so all we need to do is to set up a few initial asteroids, then crank up the amount at the end and watch the display! First off, our small asteroids have an initial velocity which have a negative attraction to each other (bouncing off one another), but are also attracted to the larger asteroids. On collision with one of these asteroids, multiple systems are generated – we have an initial large explosion and fragmentation which fires off a few chunks of debris and also showers the impact area in displaced fiery debris from the large asteroid. When these large chunks hit another surface, they spawn further debris, each of which causes another explosion and more debris. This can all be wired together so that it’s a completely autonomous process within particle flow. If you felt like diving in further, using a scripted operator, you could even generate lights at the impact sites to illuminate the surrounding asteroids with the explosions!

Enlarge Screenshot
Open up the pflow_asteroids_start.max scene. Here we have the basic elements of our scene – an animated camera, a large sphere for particle distribution and several modified geospheres which will be used as particle types in our Small and Large Asteroids particle systems
Enlarge Screenshot
In the Top Viewport, create a Particle Flow particle system and label it Large Asteroids. In the particle system’s Quantity Multiplier, set the Viewport % to 100. Expand the System Management rollout and set the Viewport Integration step to Half Frame.
Enlarge Screenshot
Click on the Particle View button to open up the Particle View canvas. Select the Birth operator and set the Emit Stop setting to 0 and the Amount to 20. Drag a Position Object operator from the Depot over the top of the Position Icon operator in the event to overwrite it.
Enlarge Screenshot
In this operator, click on the By List button and select the GeoSphere01 object. Change the Location pull-down menu to Volume to distribute the particles based on the GeoSphere’s volume. Delete the Speed operator so the particles do not move.
Enlarge Screenshot
Overwrite the Shape 01 (Tetra) operator with a new Shape Instance operator. In this operator, select the asteroid original01 object as the Particle Geometry Object. Check on Separate Particles for Object and Children (as the asteroid geometry has objects linked to it). Set the Scale% to 1000 with 25% variation. Set the Display operator to show geometry.
Enlarge Screenshot
Close Particle View for the time being and hide the Geosphere distributor. Create a new UDeflector Space Warp in the Top Viewport and label it Large Asteroid Deflector. Again, in the Top Viewport, create a Mesher Compound Object and use the Large Asteroids system in it.
Enlarge Screenshot
Label the Mesher Large Asteroid Proxy Deflector and reposition so it is in the same place as the original Large Asteroid particles. Right-click the mesher and select Convert to > Editable Poly so the mesher does not update every frame. In the Large Asteroid Deflector Space Warp, choose this collapsed mesh as the deflector item.
Enlarge Screenshot
Hide the collapsed mesher as we do not need it to render. Select the Asteroid Original geosphere and set the segments to 10. You’ll notice that the particles change densities aswell as the other Asteroid Original objects as this is the original copy of the mesh – the others are purely reference copies.
Enlarge Screenshot
Hide all of the Asteroid Original objects as we don’t need them any longer. To check everything’s in place and that the camera does not pass through any geometry, create a preview using the preview feature or scrub through the animation. If the camera does pass through an asteroid, steer it around it or use a new particle distribution seed (you’ll also need to redo the mesher distributor if this is the case).
Enlarge Screenshot
Create a new Particle Flow system and label it Small Asteroids. Set the Particle Amount Upper Limit to 10000000 (its maximum setting). Open Particle View and set this new system’s Birth operator’s Emit Stop to 0 with 10 particles. Label the Large Asteroids’ Event 01 to LA Birth and the Small Asteroids’ Event 01 to SA Birth.
Enlarge Screenshot
Copy the Position Object operator from the LA Birth event to the SA Birth event and delete the Position Icon operator. Set a new seed in this operator copy. Set the Speed operator’s Direction to Random 3D. Overwrite the existing Shape operator with a Shape Instance operator.
Enlarge Screenshot
Choose the Asteroid Small01 object as the particle type and check on Object and Children as before. Set the Scale Variation to 100. Add a Spin operator and set the Spin Rate and Variation to 50 with the Spin Axis set to Speed Space Follow and X,Y and Z to 1.
Enlarge Screenshot
Add an Age test to the event and set the Test Value to 60 and the Variation to 30. Set the Display operator to Geometry. Drag out a Keep Apart operator to the canvas top create a new event and wire the Age Test to this new event. Label the Event SA Dynamics and the Keep Apart operator as LA Attraction.
Enlarge Screenshot
Set the LA Attraction’s Force to -0.5 and turn off Accel Limit. Turn on Relative to Particle Size and set the Core to 100 and Falloff to 2000. Enable Selected Events and select the LA Exist event in the events list.
Enlarge Screenshot
Copy this operator and label the copy SA Repulsion. Change the Force to 20 and Falloff to 0. Deselect the LA Exist event from the (new) Selected Events list and select the SA Dynamics event in its place. Add a Material Static operator, label it Asteroid Material and Instance copy the Asteroid material from the Materials Editor to this operator’s materials slot.
Enlarge Screenshot
Add a Collision Test to the event and add the Large Asteroid Deflector to its Deflectors list. Copy the SA Birth’s Shape Instance operator and paste it onto the canvas to create a new event – label it Large Fragmentation. Change the Shape Instance copy’s particle geometry to Asteroid Fragments01 and set the Variation to 50. Set the new Display Operator to show geometry.
Enlarge Screenshot
Add a Spin operator and set the Spin Rate to 100 and Variation to 50. Add a Spawn test and label it Debris Cloud. Set the Spawnable % to 75, 500 offspring with a 10% variation, 75% Speed inheritance with 100% variation with a Divergence of 50 and a Scale variation of 100%.
Enlarge Screenshot
Add another Spawn Test and label it Explosion Spawn. Set the Divergence to 0 and Scale Variation to 75. Add another Spawn Test and label it Large Fragments. Check on Delete Parent, 20 Offspring with 10 variation, Speed Inheritance to 80 with 10 variation, 45 Divergence, and 30% Scale Factor with 50% variation.
Enlarge Screenshot
Add another Spawn test and label it Fire Trails. Set the Offspring to 3, 50% Speed Divergence, 75% Scale Factor with 30% Variation. Instance copy the LA Attraction operator and Collision test into this event.
Enlarge Screenshot
Instance copy the Collision test to the canvas to create a new event, label this event Fire Trails Emitter and wire it to the Fire Trails spawn test in the Large Fragmentation event. Add a Spawn test and label it Trails. Turn on By Travel Distance and enter a Step Size of 25. Set the Inherited Speed and Divergence to 0. Add a Delete operator and set By Particle Age’s Life Span and Variation to 50. Add a Material Dynamic operator to the event.
Enlarge Screenshot
Drag out a Shape Facing operator to the canvas to create a new event and label the event Trails. Wire this event to the Trails spawn test in the Fire Trails Emitter event. Use the scene’s Camera as the Look At item and set In Local Space to 150 with 25% variation. Set the orientation to Allow Spinning.
Enlarge Screenshot
Add a Speed operator and set the Speed and Variation to 10 with Random 3D direction. Add a Scale operator and set to Relative First type and 25% Variation for all axis and Synch by Event Duration enabled. Go to frame 100, turn on Auto Key and set the Scale Factor to 0 for X Y and Z. Turn Auto Key back off.
Enlarge Screenshot
Add Material Dynamic and Delete operators. In the Delete operator, set to By Particle Age with a Life Span of 100 with 25 Variation. Set the Display operator to geometry as before. Drag out a Scale operator to the canvas and label the new Event Debris Cloud Initial Velocity. Wire this event to the Debris Cloud test in the Large Fragmentation event.
Enlarge Screenshot
Set the X Y and Z Scale Factors to 3% each with a Scale Variation of 30%. Add a Material Dynamic and label it Impact Debris. Add a Spin operator, set the Spin Rate to 100 with 50 variation. Drop in an Age test. Set the Display operator to geometry as before.
Enlarge Screenshot
Instance copy the Impact Debris Material Dynamic operator and paste it onto the canvas to create a new event and label it Debris Cloud. Add a Delete operator and set to By Particle Age with 100 Life Span and Variation. Instance copy the Collision test to this event.
Enlarge Screenshot
Drag a Split Amount test to the canvas to create a new event and label the event Debris Cloud Impact. Set the Fraction of Particles Ratio to 75%. Add a Delete operator to the event. Paste an instance copy of the Explosion Spawn test from the Large Fragmentation event to the canvas and label the new event Small Fragmentation. Wire this new event to the Large Fragmentation event’s Collision test.
Enlarge Screenshot
Instance copy the Large Fragments test and paste it into this new event. Label it Small Fragments. Add a Spin operator and set the Spin Rate to 200 with 50 Variation. Instance copy the Asteroid Material into this event. Copy and paste the LA Attraction operator and rename it LA Attraction Small. Set the Falloff to 5000. Instance copy the Collision test into this event.
Enlarge Screenshot
Drag out a Spawn test to the canvas to create a new event and label the Event Explosion Splitter. Label the Spawn Glow. Wire the Split Amount from the Debris Cloud Impact event, all Explosion Spawn tests and the Collision tests from the Fire Trails Emitter and Small Fragments events to this new event as illustrated. Some re-arrangement of the diagram may be required so it is easily read.
Enlarge Screenshot
Add a Spin operator and set the Spin Rate to 0 to stop any particles spinning. Add a Split Amount test and set the Every Nth Particle option to 2. Add a Send Out test to the event. Drag out a Speed operator to the canvas and label the resulting new event Glow Emission. Set the Speed to 0 and wire it to the Glow test in the Explosion Splitter event.
Enlarge Screenshot
Add Material Dynamic and Scale operators to the Glow Emission event. Label the Material Dynamic operator Explosion Glow. Set the Scale operator’s Type to Relative First and X Y and Z Scale Factors to 0 with 50 variation for all axis. Set the Animation Offset Keying Sync By to Event Duration.
Enlarge Screenshot
Enable Auto Key and go to frame 10. Set the Scale Factor to 100 for all axis. Go to frame 250 and set it back to 0. Disable Auto Key. You may wish to turn off the particle system for this step and turn it back on else updates may be slow in the Viewport depending on your system. Add a Delete operator and set its Particle Age Life Span to 250 with 0 Variation.
Enlarge Screenshot Drag a Spawn test to the canvas and label the resulting event Explosion A. Set the Spawn’s Speed Divergence to 0. Add a Speed operator and set its speed to 10 in a Random Horizontal direction. Add a Shape Facing operator and set the scene’s Camera as the Look At item. Set the Local Space Inherited % to 1500 with 100 Variation and set the orientation to Allow Spinning.
Enlarge Screenshot Add Rotation and Delete operators and set the Delete’s Particle Age Life Span to 100 with 0 variation. Select the entire event and instance copy it. Label the event copy Explosion B. Add a unique Material Dynamic operator to each explosion event underneath the Rotation operator. Wire the Explosion A event to the Split Amount test and Explosion B to the Send Out test of the Explosion Splitter event.
Enlarge Screenshot With the particle system now set up, we can simply copy the included materials to generate the glows and trails. These materials are pretty basic, so you may wish to improve on them at a later date. Simply drag and drop the relevant material onto its corresponding material operator.
Enlarge Screenshot One material has an effects ID assigned to it, which is utilised in the pre-set Render Effect in the scene to create a nice glow around each impact. The main light source in the scene is set to cast shadows, so right-click an event, select properties and turn off cast and/or receive shadows for non-shadow casting particles (eg the trails and explosions).
Enlarge Screenshot With everything now set up, and after a quick test render, we can simply increase the amount of particles in the Small Asteroids’ Birth operator to a setting that would look effective. I’ve used around 300-400, but you may wish to decrease (or increase!) depending on the speed of your machine. Hide the Asteroid Small and Asteroid fragments source geometry and render away!
Enlarge Screenshot
A frame from the final rendered animation.
Download the max file!
Zip file to accompany

Initially published: 3D World magazine, Issue 46, Xmas 2003.

Copyright © Pete Draper, November 2003. Reproduction without permission prohibited.

www.xenomorphic.co.uk