home about gallery publications education links contact


..::splat gun::..

The clay animation of the porridge in "A Close Shave" produces a liquid effect which is very effective considering it was completely animated by hand. Therefore, animating it using our particle system should be a breeze. Shouldn’t it? Well, not exactly. Step forward Particle Flow and Blobmesh to make our lives a little easier.

The first thing to consider is the way that the “gun” fires off the initial blast of the gooey stuff. This blast is more of a squirt, similar to a ejected mass from a tube of toothpaste, which is quite awkward to produce. Therefore to keep the amount of work we are going to have to do, we will simply create a round(ish) mass. In order to do this, we will spawn a few extra particles from the initial single emitted particle which will have a slight variation in velocity (and scale) to break up the mass a little in “mid-air” to simulate air resistance.

Upon striking the surface (or Deflector in our 3ds max scene), our substance needs to disperse in a particular fashion. Firstly, the main mass of the projectile (and spawned copies) need to be spread out over the impact area without any ricochet due to the substance the projectile is made from. Due to its initial velocity, the resulting impact would create a wide dispersal with several trails from its impact point which would quickly rush out and decelerate due to friction of the impacted surface. This is generated using a Collision Spawn test to generate the dispersal of the impacted particles which, in turn, spawn particle trails depending on the distance its parent particle travels along the impacted surface. As we need these particles to spread out a fair amount and follow the contours of the surface, a Speed By Surface operator is used to distribute the particles over the surface geometry. The initial splat emitter particles quickly slow down courtesy of a Drag Space Warp which reduced their velocities to 0. Please note that, in the steps opposite, we will use different Integration Steps for the Viewport and Render; therefore the Viewport “splat” may spread out more due to there being less steps to calculate its reduction in speed.

All of these impacted particles are affected by gravity, therefore immediately after slowing down they begin to run down the side of the impacted surface, smearing as they travel. The spawned trails which generate the splat mark are also affected by gravity so that they also run down the side of the geometry. Because of the presence of the Drag Space Warp in the system, we have to increase the influence of the gravity to ensure they gently run down the side of the impacted surface else they would hardly move.

In addition to the splat marks, some particles do not immediately adhere to the impact surface and are therefore flung out from this point. These particles are also affected by gravity, but not the Drag Space Warp, so therefore fall to the ground where they come to rest on a Deflector.

This particle system is made non-renderable, even though we have spent time setting up its characteristics so that they can drive a Blobmesh object which will take the size of the particles into consideration when it encompasses the particles with solid geometry. The Blobmesh does not take their shape into consideration; the Shape operator’s Sphere setting (as defined in the steps opposite) is simply used for our visual reference in the Viewport so that we can design and amend our particle system without having to wait for Blobmesh to update which, later on in the animation when there is a lot of particles to be calculated, can take a little while to update. To lessen render times (and Viewport update times) the Evaluation Coarseness setting in the Blobmesh object has been increased so that the polygon count is severely reduced. The default setting for the Evaluation Coarseness, for this scene’s scale anyway, is set exceptionally low so the polygon count would be very high indeed. Because of this, pre-render calculations would also take an age so the Evaluation Coarseness is also increased to reduce the amount of time required for these calculations; without amending these settings the pre-render calculations would take longer than the render itself! Also, please bear in mind that the further we progress into the animation, the more particles will exist and therefore it will take longer to render a frame.

Enlarge Screenshot
Load in the splat_start.max scene on the cover CD. In the Top Viewport, create a Gravity Space Warp so that it is pointing straight down. Create a Drag Space Warp and set its Time Off to 200 and X Y and Z Linear Damping Axis to 100. Create a Particle Flow system, label it Splat, position it inside the Barrel object and link it to this object.
Enlarge Screenshot
Set the Viewport Quantity Multiplier to 100 and the System Management Viewport Integration Step to 1/8 Frame and the Render Integration Step to 4 Ticks to test collision detection accurately. Open particle view and rename Event 01 to Projectile. Set the Birth operator’s Emit Stop to 90 and the Amount to 10.
Enlarge Screenshot
Set the Position Icon operator’s Location to Pivot, the Speed operator’s Speed to 100m with a Divergence of 2, and the Shape operator’s Shape to Sphere and Size to 0.75m. Add a Spawn test and set its Offspring to 5 with a Variation of 50, Inherited Speed of 99 with a Variation of 3 and Divergence of 2, plus a Scale Factor of 75 with 25 Variation.
Enlarge Screenshot
Add a Collision Spawn test and add the Deflector Wall to its Deflectors list. Set the Offspring to 5 with 50 Variation, and set the Scale Factor to 75 with 25 Variation. Drag out a Split Amount test to the canvas to create a new event, label the event Impact and wire it to the output of the Collision Spawn test. Set the Split Amount Ratio to 10.
Enlarge Screenshot
Add a Spawn test and set its By Travel Distance Step Size to 0.2, Spawnable to 75, Inherited Speed to 0 and Scale Factor to 50 with 25 Variation. Add a Speed By Surface operator to the event, set the Speed to 100m with 50m Variation and add the Wall object to its Surface Geometry list. Set the Direction to Out Of Surface and Divergence to 90. Add a Force operator and add the Gravity Space Warp to it with an Influence of 2000. Add another Force Space Warp and add the Drag Space Warp to it.
Enlarge Screenshot
Add a Collision test to the event and add the two Deflector Space Warps to its Deflectors list. Copy the Force (Gravity) operator and paste it onto the canvas to create a new event. Label the event Splat Trails and wire it to the output of the Impact event’s Spawn test. Set the new Force operator’s influence to 1000 and instance the Force (Drag) operator and the Collision test to this new event. (continued in the Tips…)
Enlarge Screenshot
The final render shows our Gunk-o-Matic ™ blasting blobs of goo against the wall, creating an effective splatter effect!
Download the max file!
Zip file to accompany.

..::tips::..

Drag out a Spawn test to the canvas and label the resulting event Impact Debris. Wire this event to the output of the Split Amount test. Set its Offspring to 3 and Speed Divergence to 45. Add a Speed operator and set the Speed to 10m, Variation to 5m, Direction to Inherit Previous with a Divergence of 25. Copy a Force (Gravity) operator into this event and set its Influence to 3000. Instance one of the Collision tests into the bottom of this event. Add a Speed operator to the canvas and label the resulting event Collision Resting. Set its Speed to 0 and wire the event to the Output of the Impact Debris event’s Collision test.

Create a Blobmesh object in the Top Viewport. Set the Render and Evaluation Evaulation Coarseness settings to 25. In its Blob Objects group, click on the Add button and select the Splatter particle system from the resulting list. You may want to reduce the coarseness if you’ve got a decent machine to prevent any geometry flickering. Also, try adding Object motion blur to the Blobmesh (not Image motion blur as the geometry updates each frame which may result in blur artefacts), although you may wish to turn down the amount of Samples and Duration Subdivisions to 5.

The material assigned to the Blobmesh is an unmodified GummyRed material from the Raytraced_02.mat library which ships with 3ds max. This material works effectively well as a gooey substance due to its translucency and colour diffusion. Try creating other materials, including Wallace’s own porridge mix and assign them to the Blobmesh object. Due to the difference in integration steps, the particle (and Blobmesh) results you will see in the Viewport are not necessarily when you will get at render time… the render will be more accurate.

Different shaped surfaces will dictate the design of the particle system; for example a deformed sphere will required a UDeflector to check to see if the particles have collided with the surface geometry. Also, due to its shape, you may wish to set the particles to run underneath the sphere a little, then fall to the ground – try using a Find Target test to check the distance from the particles to the ground then send them to the next event which creates gloopy trails to the ground.

Currently, if a splat is close to the edge of the wall, then the resulting trails may stick out over the edge of the wall and appear to be hovering in space! To get these to fall to the ground, add a Find Target test and set it so that it checks to see if the particle is close to a (non-renderable) object situated outside the boundary of the wall. The particles can then be passed onto the next event which has a Force operator with Gravity and a Collision test to check when the particles hit the ground (or any other surface). This is a similar setup to the previous tip.

Initially published: 3D World magazine, Issue 51, May 2004.

Copyright Pete Draper, May 2004. Reproduction without permission prohibited.

www.xenomorphic.co.uk