home about gallery publications education links contact


..::blood spatter on a wall::..

Although quite gruesome and morbid, this effect is quite tricky, mainly due to the type of distribution pattern this type of effect produces. Forensic blood dispersion patterns makes for interesting reading and is essential if we are understand how the effect is produced so that we can effectively simulate it. For example, high velocity spatter, namely from a gunshot, results in a fine mist and leaves very small directional droplet trails on surfaces, while arterial or cast-off patterns create larger pools and directional trails. We are going to simulate a high velocity spatter effect, with some elements of medium velocity spatter to create interesting trails mainly around the main distribution area of our emission point, with few smaller sized trails scattered out from the centre.

The main goal for this paper is to create a good mask animation (a black & white image sequence) which we can then use in an additional scene to generate the blood spray on the wall. As we are dealing with flat surfaces this method is suitable, however if you want the blood to interact with more complex surfaces then you would need to introduce additional deflectors, apply a blood material directly to the particle system and render it off in a single pass either directly onto the cg scene or on a proxy scene to be composited.

To get effective blood distribution, we are going to be using multiple birth events within the particle system for different spray size groups which will be emitted using greyscale maps to drive the emission points and velocities of the particles so we get a nice pattern instead of a uniform spray pattern if we just used a basic emitter. In addition to this, to crank up the number of particles and to get clumps we will spawn additional particles of the same size with a small divergence. Upon impact with our surface, the particles will be made renderable and tested for size, with the larger ones passed to another event to generate trails down the wall. As larger droplets will fall faster than smaller ones, we will introduce a basic Script Operator to drive a Force operator’s influence value derived from the particle’s Scale, generating a more realistic trailing result. Finally, we will add materials to the system – an opaque self-illuminate white for all main particles, and a dynamic material creating a reduction in opacity for the trails as the main droplet is travelling down the wall.

Enlarge Screenshot
Open the blood_spatter_start.max file included in the resources zip file below. Here we have our basic scene set up, consisting of two instanced Plane primitives (one for the emitter and another for controlling speed), and a deflector for our blood particles to interact with. The Pflow source is positioned just to give a visible indication of the particle direction, and has initial parameters already set up for Integration step and particle upper limit amounts.
Enlarge Screenshot
We are using plane primitives for the emission and speed as we can add extra control by assigning greyscale materials to them to vary the particle and speed distribution, however we will need to add a bit of extra variation to the distribution which we can apply by simply subtly displacing the surfaces to widen any divergence we will have once we have set up our particle system speeds.
Enlarge Screenshot
Select the Plane Speed object, add a Displace modifier and set the Strength to 1. Next we will create a map to displace this surface, and its instanced copy (the emitter plane). Open the Material Editor and create a Splat map in the first free material slot. Label it Blood Emitter Displacement. Set the Source mapping to Explicit Map Channel.
Enlarge Screenshot
In the Splat Parameters rollout, set the Size to 0.6 and amend the Threshold to 0.3 so we get some large and small splotches. Next, set the Colour 1 slot to black and Colour 2 to white. Instance this map to the Displace modifier’s Map slot to displace the Plane geometry.
Enlarge Screenshot
The result works, though we want the displacement to be more smooth in the middle so we get a stronger displacement at centre and a reduction around the edges. Therefore, add a Gradient Ramp map to the Colour 2 slot of the Splat map, set the Gradient Type to Radial, and design the gradient as illustrated using Ease Out Interpolation.
Enlarge Screenshot
The particle system we will create will use the plane material’s greyscale information to control speed and particle emitter distribution. In the Material Editor, label a new material Blood Distribution and assign it to the Plane Distribution object. Instance the Blood Emitter Displacement map to the Diffuse slot of this material so that the particles are emitted at the extremities of the displacement.
Enlarge Screenshot
Next, we will set up the material that controls the speed of the particles. As we want the particles in the centre of the emitter to travel faster, we can blend the Splat map tree we have already generated with an additional gradient map, so the centre of the gradient is white, which then fades to the Splat map, and then to black so we get a nice variation of speed intensity, with the greatest being around the “bullet exit point”.
Enlarge Screenshot
Label a new material Blood Speed and assign it to the Plane Speed object in the scene. In the Diffuse slot, create a new Gradient Ramp map and set its gradient type to Radial. Design the gradient as illustrated, so that we end up with a solid white centre which then fades off to a grey of approx RGB 60,60,60 at position 50 and then to black at position 100.
Enlarge Screenshot
Next, we need to inset the Splat map into the Gradient so that it fades from white to the Splat map and then to black. Right-click the flag at position 50 and select Edit Properties. Instance the Blood Emitter Displacement map to the Texture map slot in the Gradient Ramp flag’s Edit Properties panel. Close the panel when complete.
Enlarge Screenshot
To get the particles to behave as they fly through the air so they distribute nicely, and also as they travel down the wall in an erratic fashion (try running water droplets down a vertical surface to see the effect in real life), we will add some Force Space Warps to the scene, namely Gravity (to get the particles to fall), Wind (to get them to create erratic patterns) and Drag (to control the trail motion).
Enlarge Screenshot
In the Top Viewport, create a Gravity Space Warp and set it Strength value to 0.5. This will be used in the initial emitter particles motion so they spread further down the wall if their velocity isn’t that high. Next, create a Wind Space Warp in the same Viewport. Set its Strength value to 0 so there isn’t any directional force influence. Set the Turbulence to 1, and Frequency to 0.1 so that we get a varied motion…
Enlarge Screenshot
… later on, these Space Warps will be controlled with a MAXScript derived from particle scale. As these Space Warps (combined) will create large rate changes in velocity and direction, we will keep them under control with a Drag Space Warp. Create one in the Top Viewport and set its Time Off setting to 300 (the length of the sequence) and set the Linear Damping X Y and Z Axis values to 90%.
Enlarge Screenshot
Next we will go into Particle View and start designing our initial system, however due to us using Spawn tests we should disable the system until the particles exit from the birth event(s) else if we scrub through the animation we may experience lags or crashes due to spawned particles spawning more particles. Press 6 to open Particle View and turn off the PF Source 01 root event.
Enlarge Screenshot
Add a new Birth operator to the canvas to create a new event. Label the event Large and wire it to the output of the PF Source 01 event. In the Birth operator, set the Emit Start to 10 and Emit Stop to 11 so we get a burst of particles, and set the amount to 30. Add a Position Object operator to the event and add the Plane Distribution object to its Emitter Objects list.
Enlarge Screenshot
Enable Density by Material so that the particles are scattered over the object accordingly at birth. Next, add a Scale operator and set its Scale Factor to 200 and a Variation to 75 for all axes. Add a Speed By Surface operator, set the Speed and Variation to 5000 and add the Plane Speed object to the Surface Geometry list. Enable Speed By Material and set the Divergence to 25.
Enlarge Screenshot
Next, add a Force operator and add the Gravity Space Warp to it to get the particles to fall down as they are travelling to the wall. Add a Spawn test to the event and enable Delete Parent. Set the Spawnable % to 70, Offspring to 10 and Variation to 100 to get a clump of particles. Set the Speed Variation to 75 with a Divergence of 3 for a small sized clump. Set the Scale Variation to 75.
Enlarge Screenshot
Finally, add a Collision test and add the Deflector to its list. Set the Collides Speed to Stop so that the particles remain on the Deflector on collision. Instance this event four times and wire them to the root event. Make each Birth, Scale, Speed By Surface & Spawn operator unique and label the events Medium Narrow, Medium Wide, Small and Fine as illustrated.
Enlarge Screenshot
In the Medium Narrow and Medium Wide Birth operators, set Amount to 100, and their Scale operator’s Scale Factor to 125%. Set these two events’ Speed to 10000 with a 2500 Variation with the Medium Narrow’s Divergence to 30 and Medium Wide to 50. Set the Small event’s Birth amount to 2000, Scale to 70 with 50 Variation. Set its Speed to 20000 with 5000 Variation and a Divergence of 40. In its Spawn test set Offspring to 20, Speed Divergence to 5 and Scale Variation to 100.
Enlarge Screenshot
In the Fine event, set the Birth amount to 5000, Scale Factor to 45 with 50 Variation, Speed to 40000 with 10000 Variation and Divergence to 50, and in the Spawn test set the Offspring to 20 with a Speed Divergence of 7 and Scale Variation of 100. The result of these settings ensures the finer the particles, the wider the angle of distribution and wider the clumping area.
Enlarge Screenshot
Add a Shape operator to the canvas to create a new event, wire the output of all Collision tests to the input of this event and label the event Blood Wall. Set the Shape operator’s Shape to Sphere and Size to 0.5. Add a Material Static operator to the event and a Scale test. Set the Scale Test’s Test Value to 175 with a Variation of 50 so that only particles greater than this will create trails.
Enlarge Screenshot
Instance the Material Static operator to the canvas to create a new event, wire it to the output of the Scale test and label it Blood Trail Parent. Add a Script operator and click on the Edit Script button. Open 3ds max’s MAXScript reference and copy & paste the “How To Affect Particle Flow Particles by Mass” script in to overwrite the existing script (the explanation of what this script does is found in the MAXScript tutorial documentation).
Enlarge Screenshot
Navigate to the pCont.particleFloat = 1.0/(pCont.particleScale^3) line and edit to pCont.particleFloat = pCont.particleScale^3 so that larger particles are affected more than small ones. Close the script. Add another Force operator and add the Gravity & Wind Space Warps. Right-click the operator and enable Use Script Wiring so that the Float channel data can be used within this operator.
Enlarge Screenshot
In the Force operator, enable Use Script Float as Influence so the Float channel data drives the influence of the Gravity & Wind Space Warps, resulting in a stronger gravity and larger turbulent motion the higher the particle’s scale is set. Add another Force operator, add the Drag Space Warp to it and set its Influence to 2000. Add a Spawn test, set it to By Travel Distance and Inherited Speed to 0.
Enlarge Screenshot
Add a Material Dynamic operator to the canvas, wire it to the output of the Spawn test and rename the event Blood Trails. Open the material editor and instance the Blood Matte Fadeout material to the Material Dynamic operator and the Blood Matte material to either instanced Material Static operator. Add a Delete operator, set it to By Particle Age and the Life Span to 400 and 0 Variation so the Particle Age map in the assigned material works. Enable the system. Once the final sequence has been rendered out in the Front Viewport, it can be overlaid either in a compositor or using 3ds max. In the provided “taken further” 3ds max scene on the CD ROM I’ve dropped the spatter mask onto the wall of a bathroom backplate complete with blood material!
Download the max file! Zip file to accompany (NOTE: please read the README file included in this zip file regarding the Taken Further 3ds max scene.

..::additional tip::..

Try getting the blood to pool and collate for an instant horror titles sequence; eg falling droplet trails could be set to expand when they come into contact with a Keep Apart operator.

Initially published: 3D World magazine, Issue 71, December 2005.

Copyright © Pete Draper, December 2005. Reproduction without permission prohibited.

www.xenomorphic.co.uk