home about gallery publications education links contact


..::when worlds collide::..

Note from the author: The two animated sequences are referenced using .ifl files. please render off the crack maker.max and fire wave maker.max files and drop the resulting image sequences in the same folder as the .ifl files so they can be referenced. The original tutorial came with the sequences, but due to bandwidth and web delivery these have had to be removed to reduce the total archive file size.

Due to space restrictions, the planet maps have been reduced in size and have been jpeg encoded. Should you find that the quality is not up to your expectation, please download LunarCell from www.flamingpear.com and output your own planet maps to whatever resolution you require.

Planets. You just can’t resist blowing them up can you? The core elements of a science fiction blockbuster movie involve something smashing into another thing at great speed to result in some spectacular pyrotechnics, which, when we’re starting out in 3D, is something we love to recreate. A little further down the track, we can revisit that old stomping ground and this time do it with a little more experience under our belts!

The process is relatively straight forward. Particles take up the majority of the effects work, which are automatically emitted from the colliding geometry. For effects shots like these, it’s best to automate the procedure so we can manually tweak object collision / intersection speeds and positioning to generate the best result as the debris is automatically created. The shockwave(s) are created by using animated UVW mapping which rush over several hemispheres to give the illusion of a dramatic impact.

The main key to creating realism here is the direction in which the particles fly when they are emitted. Simply having them spray outwards will not look plausible. For example, if you threw a ball into a large mass of sand, the sand fragments will be displaced away from the impact site and outwards. However, these fragments will deflect off the crater created by the impact and therefore shoot out in the opposite direction of the impacted ball’s trajectory, before hitting the ball and deflecting outwards again. Therefore, as we are going to be smashing together two different sized planets, we need to bear this effect in mind for our own debris and pyrotechnic effects.

But before we can begin, we need to create our planets. Max’s procedural planet map is good, but not all that great for what we require. Therefore, Flaming Pear’s “LunarCell” was used to generate the texture maps required; a demo of the software can be found on Flaming Pear’s own website – www.flamingpear.com should you wish to create your own texture maps. All the maps you need can be found on the cover CD, so let’s destroy things!

Enlarge Screenshot Create a Sphere primitive with 128 segments and a radius of 100 and rotate and position it as shown. Label it “Big Planet”. Add a new UVW Map modifier to the stack. This modifier is to display any fragmentation or dissolving effects we will add to the sphere’s material later on.
Enlarge Screenshot Add another UVW Map modifier to the stack and set it’s Map Channel to 2. Set it’s alignment to X. This modifier will allow us to mask out the planar mapping of the first UVW map so that the effect applied to the material only appears on one side by the use of a gradient.
Enlarge Screenshot Add another UVW Map modifier to the stack and set it’s Map Channel to 3. Set the mapping type to Shrink Wrap. Using this, we can stretch a map over the surface like a balloon (only pinches at one pole) so a map can be pulled over the surface without stretching or smearing at the sides.
Enlarge Screenshot Finally, add another UVW Map modifier to the stack and set it’s Map Channel to 4. Set the mapping type to Spherical. Rotate the gizmo so it’s poles are vertical. This is to be our main mapping for the planet’s main textures (ie it’s surface textures) and will not be used for anything else.
Enlarge Screenshot Add a Volume Select modifier to the stack. Set the Stack selection level to Face. Enter sub-object level and reposition the Volume Select’s gizmo so that the first 13 or 14 rings of polygons facing the front viewport are selected as illustrated. This is to be used to be our initial particle placement when the planets collide.
Enlarge Screenshot Clone the sphere and label the new copy Rogue. Move the copy 300 units away to the right of the Big Planet sphere and rotate it 180 degrees so that the sub-object selections are facing one another. Amend the radius of the Rogue sphere to 90. This will result in the Volume Select being reduced in size, so amend it so that the two object’s face selections are lined up as illustrated.
Enlarge Screenshot Over 500 frames, animate the Rogue planet moving towards and intersecting the Big planet. The intersection should begin at around frame 80, then both of the planets travel in the same direction, with the big planet travelling a little slower after being hit by the Rogue planet. Therefore animate the rogue to frame 80, then animate both to frame 500, but move the rogue inwards a little further. Ensure that the big planet’s animation starts at frame 80 by offsetting the key at frame 0 to frame 80.
Enlarge Screenshot To get a smooth animation, you may wish to amend the position controllers of the two objects. Select the Big planet and go to the motion tab. Hilight the Position controller, select the “?” button and choose Bezier position. Perform the same task for the Rogue planet. Amend the in/out curves for each keyframe to get a more realistic motion for the objects when they collide instead of an abrupt start/stop.
Enlarge Screenshot You may find it best to offset the 2nd keyframe of the rogue planet to frame 100. View the scene at frame 80 and open the 2nd keyframe’s info. Amend the position of the Y axis value (which is what is animated) so the spheres just touch. This way the Rogue will not being slowing down until it is inside the other sphere.
Enlarge Screenshot Create a new Pyramid primitive with Width and Depth of 1 and a Height of -5 in the top Viewport. Set the Width and Depth Segs to 1 and the Height Segs to 3. Label this Pyramid “Shard01”. Add a Twist modifier with a 75 degree angle. Add a Noise modifier with Fractal on and Scale and X Y and Z spinners set to 1. Clone the Shard another 5 times and vary the settings to generate different shapes as shown.
Enlarge Screenshot In the top Viewport, create an SDeflector and label it “SDeflector Big Planet”. Set the Variation to 10 and, Chaos to 50 and Diameter to 190. Position it in the centre of the Big Planet sphere as shown. Clone the SDeflector and label the copy “SDeflector Rogue”. Position it at frame 0 in the centre of the Rogue sphere. Amend it’s Diameter to 170. Link the relevant SDeflector to the relevant sphere.
Enlarge Screenshot Create a Deflector around the Big Planet sphere and link it to the sphere. Rotate it 90 degrees along the Y axis so it faces the approaching Rogue. Create another Deflector and position and link it to the Rogue Sphere. Rotate it so it is facing the Big Planet. These deflectors are to prevent any leaked particles coming through the rear of the planets.
Enlarge Screenshot Create a Cylinder in the front Viewport with a radius of 10, height of 4 with 5 height segments and 18 sides. Label it Fire Emitter. Add an Edit Mesh modifier and delete the end caps. Add a Taper modifier and set the amount to -0.1. Add a Noise modifier with a Scale of 10, Fractal on and X Y and Z Strength to 1. Check on Animate Noise. Animate the Radius and position of the cylinder so it lies just above the intersection of the two spheres as illustrated. Turn off Renderable in it’s object properties.
Enlarge Screenshot The particles we require need to be born at the exact places of intersection, when the two objects collide. The best way to do this is by using particle spawn, but we don’t need the original particles. Therefore create a box object and add a delete mesh modifier to remove all polygons. This is just so the particle system can be set to instanced geometry for the particle spawn.
Enlarge Screenshot Create a PArray System and label it “PArray Big Planet Shards”. Choose the Big Planet as the emitter and check on Use Selected SubObjects. Select Use Total and set it’s value to 3000. Set the Speed to 0, Emitter Start and Stop to 80 and Display Until and Life to 1000. Set the Particle Size to 0.75 with 300 Variation and Grow and Fade For set to 0.
Enlarge Screenshot Set the particle type to Instanced Geometry and choose the null Box object. Set the Spin Time to 500 with 50% variation and the Spin Axis Controls set to Direction of Travel. In the Particle Spawn rollout, enable Spawn on Collision and set the Spawns setting to 10. Set the Direction Chaos to 10 and the Speed Chaos to 20. Check on Inherit Parent Velocity. Add all shards to the Object Mutation Queue. Bind the particle system to all Space Warps in the scene.
Enlarge Screenshot Clone the Particle System and label the copy “PArray Rogue Shards”. Choose the Rogue sphere as the emitter. Create a new PArray system and label it “PArray Fire”. Choose the Fire Emitter as the emitter. Set the Use Rate to 5, Speed to 1, Variation to 100, Start to 80, Stop and Display Until to 1000, Life to 100 with 50 variation, Size to 80 with 10 variation, Grow for 100 and Fade for 0. Change the seed of the system.
Enlarge Screenshot Set the Standard Particle type to Facing. Set the Spin Time to 500 with 50 variation. Bind the particle system to the two SDeflector Space Warps. Clone the system and label “PArray Fire Trails”. Set Speed to 1, Life to 50 with 40 Variation, Size to 3 with 50 variation, Grow For to 0, Fade for to 50, Spin Time to 200, check on Spawn Trails in Particle Spawn. Set Multiplier to 2, Direction Chaos to 2, Speed Chaos to 50 and enable Inherit Parent Velocity. Bind the system to the Deflector Space Warps.
Enlarge Screenshot To finish off the Fire trails, animate the speed reducing from 2 to 1 from frames 80 to 200, and also animate the Birth Rate from 5 to 1 over the same timeframe. Clone the system and set a new seed so that the particles are not emitted in exactly the same place! Hide all particle systems for the time being.
Enlarge Screenshot Clone the Big Planet sphere and label it “Big Planet Clouds”. Remove the Volume Select modifier and all keyframes. Link the Clouds sphere to the planet. As we are going to be using the mapping later on, we don’t want to amend it. Therefore, simply scale the Cloud sphere up to 101% (an increase of 1%). Clone this sphere and scale up again by 1%. Remove all modifiers and label it “Big Planet Atmosphere”.
Enlarge Screenshot Clone the Rogue sphere and label it “Rogue Atmosphere”. As this planet has no cloud layer, we don’t need an additional sphere. Therefore, remove all modifiers and keyframes from the sphere and link it to the Rogue sphere. Scale the Rogue Atmosphere sphere up by 1%. Turn off shadow casting for both Atmosphere spheres.
Enlarge Screenshot Create a sphere with 180 radius and 128 segments in the front Viewport and position it in the left Viewport so it’s right side is in the center of the Fire Emitter. Label this Shockwave01. Using a Volume Select modifier, select the faces on the left hand side of the sphere and a few rings of those on the right hand side as illustrated. Add a Delete Mesh modifier to the stack to remove the polygons and a Mesh Select modifier to clear the Sub-Object selection.
Enlarge Screenshot Add a UVW Map modifier to the stack and set it to Cylindrical. Scale it along the X-axis to about 180% of it’s original size and animate it so it travels completely along the sphere from frames 80 to 200 and so no part of the gizmo overlaps the sphere at the start or at the end of the animation. Add another UVW Map modifier, set to Cylindrical and set the Map Channel to 2.
Enlarge Screenshot Turn off animate and scale the Shockwave geometry to 180% in the front Viewport along the X & Y axis. Scale it to 150% along the Z axis and reposition it so it’s right side is in the center of the Fire Emitter in the left Viewport. Link it to the Fire Emitter. Turn off cast and receive shadows for the object. Clone the Shockwave and scale it to 125% along the X & Y axis. Reposition as before. Clone and mirror as illustrated and link all Shockwave objects to the Fire Emitter.
Enlarge Screenshot Create a new material and label it “Shockwave”. Check on 2-Sided, Self-Illumination and Additive Transparency. In the Diffuse slot, add a Gradient Ramp map, turn off U and V tiling and enable V mirroring. Increase the V Tiling spinner to 2 and enter -90 in the W angle spinner. Design the gradient as shown using yellow and red colours. Use a Turbulence noise type with 0.05 Amount, Size 2, 10 levels and animate the phase from 0 to 2 from frames 80 to 200. Create the Output Colour Map as illustrated.
Enlarge Screenshot Instance copy the gradient map to the self-illumination slot. Add a Mask map in the Shockwave material’s opacity slot. Copy (not instance copy) the gradient ramp map into the map slot and change the red colour to black and the yellow colours to white. Copy the Mask’s map gradient to the Mask slot and increase the V tiling to 4 and the Map ID channel to 2. Turn off Enable Colour Map. Set the amount to 0.1 and the Size to 4.
Enlarge Screenshot Create a new Shellac material and call it Shockwave Shellac. Instance copy the Shockwave material to the two slots in the Shellac material and increase the Shellac Colour Blend to 100. Assign the material to the Shockwave geometry, and rotate the geometry individually so no mirroring or repetition is visible.
Enlarge Screenshot Create a new Oren Nayar Blinn standard material. Set the Diffuse colour to RBG 105,166,207. Check on Self-Illumination. Create a Mask map in the Self-Illumination slot, add a Fresnel Falloff map in the Map slot with it’s side slot set to the diffuse blue colour, and the Mask slot to a default Fresnel Falloff map. Copy the Self-Illumination slot to the Opacity slot and change the blue colour of the Falloff map in the Map slot to white, change the Falloff type of the map in the mask slot to Shadow/Light and amend the Mix curve. Assign this material and a copy of it (tinted brown instead of blue) to the Big planet (blue) and Rogue planet (brown).
Enlarge Screenshot Create a new material and label it “Fire Trails”. Set the diffuse to white, check on Face Map and Self-Illumination. Add a Particle Age map to the Self-Illumination slot and set Colour #1 to yellow, Colour #2 to orange (with Age #2 set to 5) and Colour #3 set to red (with Age #3 at 60). Add a Mask map to the Opacity slot and add a Particle Age map to the mask slot. Set Colour #1 to a light grey, Colour #2 at Age 20 to near-black and Colour #3 to black.
Enlarge Screenshot In the Self-Illumination Mask’s Map slot, add another Mask map. Add a Gradient map to the new Mask’s Map and Mask slots. In the Map gradient, check on Radial and enter 0.6 in the Noise amount, size of 3.1, using Fractal noise. In the Mask’s other Gradient map, set the type to Radial and colour 2 to white. Unhide all particles and assign this material to the Fire Trails particle systems.
Enlarge Screenshot Copy the Fire Trails material and label it Fire. Set the transparency type to Additive and instance copy the Particle Age map in the Self-Illumination slot into the Diffuse slot. Set it’s Age #2 to 10 and Age #3 to 100. In the Opacity Mask’s Particle Age map, set Colour #1 to a mid-grey and Age #2 to 30. In the Opacity Mask’s Mask map, change the Map gradient’s noise size from 3.1 to 2 and set the Mask gradient’s Colour 2 to mid-grey. Assign this material to the Fire particle system.
Enlarge Screenshot Create a new material and label it Debris. Set the diffuse colour to red and check on Self-Illumination. Create a Falloff map in the Self-Illumination slot and set the Front Colour to yellow and the Side colour to red. Amend the Mix Curve as illustrated. Add a noise map to the Bump slot and increase it’s value to 100. In the Noise map, set the Size to 0.1 and set to Fractal. Assign this material to the Shards objects.
Enlarge Screenshot Select the PArray Big Planet Shards particle system and ensure Instanced Geometry is selected under Mat’l Mapping and Source. Click on the Get Material From button. Perform the same operation for the PArray Rogue Shards system.
Enlarge Screenshot Load in the wwc_materials.mat materials library. Here you will see the individual components of the Big Planet Clouds, Big Planet and Rogue planet material that include the final scorched materials. These are composited using animated texture maps generated from the additional 3ds max files – “crack maker.max” and “fire wave maker.max”. More explanation about how they were created can be found in the side columns of this tutorial.
Enlarge Screenshot Assign the relevant materials from the included library to the relevant objects in the scene. Create a direct light and, using the highlight tool, position it just off the perpendicular of the Big Planet. Set it’s shadows to raytraced and to exclude all particle systems and shockwaves from receiving light and casting shadows from it.
Enlarge Screenshot Add additional debris if required by either increasing the shard particle count or use additional geometry (eg: snapshotted particle fragments of a sphere) to create the desired effect. You may also wish to increase the amount of ambient light in the scene to see the dark side of the planets. The only thing left to do is to add a brightness & contrast effect and render!
Download the max file! Zip file to accompany.

..::tips::..

Due to space, the planet’s materials setup has been provided ready to be assigned to the scene’s geometry. However, a breakdown of the materials is in order.

At the bottom of the material tree sits the main planetary material. This comprises of an Oren Nayar Blinn standard material. As air desaturates colour, in the diffuse slot we mix two maps - one normal map and one greyscale - together using a perpendicular falloff map to create this effect. The specularity of the material is handled by another map as the sea would have a higher specular value than the land. To add a slight glow to the edge of the object, we also use falloff maps in the self-illumination slot; a fresnel map to create the colour, which is masked with another falloff map set to shadow/light. This ensures that only the lit side of the object has this rim glow. An additional map is also mixed with the rim glow effect to create a blurred orange glow to give the impression that the fire around the impact site is illuminating the surface of the planet. Finally, additional texture is applied by using the bump slot. In this slot, a procedural noise map (for the sea surface) is mixed with a bump map of the land (generated by LunarCell) using an additional black and white map that separates the land from the sea (white for land, black for sea).

This base material is then mixed (using another Blend material) with a Fireball material, using a modified component of the fireball material; a smoke map of the same size containing an animated map to mask the smoke’s white slot. The fireball material consists of another Oren Nayar Blinn self-illuminated material. The colour and texture is constructed using nested smoke maps to create a falloff within the smoke. This is also created by using different exponent values to control the way the colours are overlaid. Additionally, to create a gradient of colour emitting from the impact site, a gradient ramp map is used as the main colour in each smoke map, each with different gradient colours; for example white to yellow to orange, orange to red which is mixed with black. The same smoke tree is used in the self-illumination (along with a falloff map to create a glowing rim effect) and the bump slots.

This blend material is then mixed with a material designed to create an intense glow. Using a different animated texture, it is masked out so it only appears around the main impact site. This mask is then blurred so it is slightly fainter than normal, but adds a subtle glow around the main impact site. This glow is added to create a slight self-illumination effect that appears as it is has been emitted from the final (following) material…

At the Top level sits the Cracks Blend material. This mixes the lower materials with a very bright material, using an animated map (planar mapping UVW1) with a gradient mask (UVW2) across it so the map does not appear on the rear of the planet. This glow material (which is the same material as the one lower down) is comprised of several Falloff maps overlaid to create a slight gradient depending on the distance from the perpendicular (a similar effect could be derived from using a Gradient Ramp map set to Normal).

Using mixes and masks allows us to design our materials separately and composite them together at the very last stage. The main difficulty of this procedure is to design the individual materials and how they should behave and interact with one another (eg the self-illumination glows on one material “emitted” by the other blended material). The other planetary material (Rogue) uses exactly the same tree structure and materials; infact they are instances, which makes any amendments a lot easier to handle, apart from it’s base planetary map.

The Cloud layer’s material is constructed in a similar way to a base planetary map. A standard white material is self-illuminated using the same (instanced) map setup as the Big Planet’s atmosphere mask with an amendment or two (namely the omission of the fire glow). It is masked out using a bitmap of a procedural cloud map outputted from LunarCell, which is in turn masked out using the fire glow animated mask, which is blurred to give the appearance of the cloud layer evaporating as the fire grows. The bump map (another outputted map from LunarCell) is constructed ina similar fashion.

The animated masks were created using animated Gradient Ramp maps derived from two additional scenes (included on the cover CD, should you wish to output your own animated maps or to render them off at a higher resolution). But why not use an animated gradient in our scene instead of a rendered version? This is because you cannot blur procedural maps as you can bitmaps, so an animated map of the growing gradient map had to be pre-rendered.

Initially published: 3D World magazine, Issue 36, March 2003.

Copyright Pete Draper, March 2003. Reproduction without permission prohibited.

www.xenomorphic.co.uk