this effect using rigid body dynamics would grind your computer
to a standstill! With the amount of pins required to create a decent
effect, the software would have to calculate collisions between
the each pin and the object, and also any other geometry that may
be used to hold the pins vertically so that they don’t fall
over. The Houdini tutorial (on the cover cd of issue 36) actually
makes use of depth maps and displacement to create the effect, something
of which we can utilise here.
a couple of ways to distribute the pins over a surface so they are
placed and react to the surface of the object that is displacing
them. One way would be to use scripting to place individual pins
at vertices of a displaced mesh. However, there is a tool within
Max which allows us to create the effect a lot quicker and easier
– the Scatter Compound object.
it’s default settings, the Scatter object takes the original
geometry and duplicates it across the distribution object using
the original geometry’s pivot point as the point of contact
with the distribution geometry and also it’s alignment. But
how can we generate a complex 3D object such as a face or hand in
our pin toy using just displacement?!
is quite simple. We position a camera directly perpendicular to
the object we want to displace, and then set the near and far ranges
of the camera’s clipping planes; the distance between the
two of them should correspond to the length of the pin as the pin
cannot be displaced any further else it would be floating in space
(for an easy method to set this up, see the tips section). Using
the File Output render effect (or the Z Depth Render Element if
so desired), the depth map can be output to a file. This effect
uses the camera’s near and far ranges as settings to determine
the depth - white as the nearest, black as the furthest away, and
shades of grey inbetween.
this method allows us to use virtually any object to be displayed
with our pin table, the depth map will be shot with a camera which,
although benefits from having the ability to grab clipping plane
values directly into the File Output render effect, has it’s
downside. Unfortunately as we’re using a camera, we have sense
of perspective which we need to remove. We can do this in two ways.
One is to use the Orthographic Projection option in the Camera’s
Parameter’s rollout as this removes the sense of perspective
and distortion and makes the resulting render appear flat, like
the User view. Another way, would be to reposition the camera very
very far back in the scene, and then zoom (not dolly) the camera
in. This results in a very flat image, virtually removing all sense
of perspective. The camera ranges will have to be re-amended if
they’re already set, but this is a useful method and on par
with the Orthographic technique.
some thought regarding the model we’re taking the depth map
of should be taken into consideration. The main reason being is
that no geometry underneath the widest extremity of an object can
be displayed using the pins as they cannot float. For example, a
ledge sticking out at the side of a building will result in the
area underneath the ledge being filled in by the pins that build
up the ledge.
depth map now rendered out, we can add additional effects on top
of the original render, either by using additive, subtractive or
overlaid blending methods, depending on how you want the pins to
react to the depth map. Again, bear in mind that white is the full
extent of the displacement, and black has no effect on the pins
decide that this displacement method is not for you, there are other
ways to create effective pin designs. For example, instead of using
a displace modifier on the distribution plane, try using procedural
modifiers such as Noise, Ripple and so on, or other mesh deformation
based modifiers like FFD cages. Should you decide to use the best
of both worlds, really effective results can be achieved with little
working with units today, so set up your units to work in cm.
Create a Cylinder with a radius of 1cm, a height of 100cm, 4
height segments and 5 sides. Add a Edit mesh modifier and amend
the vertex positions to lengthen the pin if required and to
form the pin head.
a Plane with a Length and Width of 600cm, and 50 Length and
Width Segments. This gives us enough to work with in the Viewport.
Increase its Render Multiplier Density to 4 to render 4 times
more segments than is displayed in the Viewport.
||Add a Displace
modifier to the Plane’s stack and set the Strength to
150cm ( a high value due to the size of the plane and pins.
If the toy was smaller then the displacement value would be
lower). Load in the pins_face_displace.JPG file into a blank
slot in the Materials Editor and instance copy it to the Displace
modifier’s Map slot.
the Pin and clone it. Label the new copy Pins. Hide the original.
With the Pins pin selected, create a Scatter Compound Object.
Select the Plane as the Distribution Object, check off Perpendicular
and select All Vertices as the distribution method. In the Scatter’s
Display rollout, check on Hide Distribution Object. Hide the
original plane geometry.
our scene, we’ll use just a simple two light setup due
to the amount of objects at close proximity to one another.
Create a Target Spot and position it at a diagonal to the Pins.
Set it’s shadow Bias to 0.001, Size to 2048 and Sample
Range to 8. This creates a large detailed shadow, but will be
faster to render than using Raytraced shadows.
an Omni light on the opposite side of the Pins to the Spot light
to act as a fill light. Set the Bias to 0.001 again, the Size
to 256 and the Sample Range to 20. This light is to add some
“reflected” illumination from the other side of
the scene. Render out the image (it may take some time due to
the Plane’s density multiplier increasing the amount of
wait for the geometry to calculate and here’s our final
image. Next task is to animate it; see the tips column for details…
to accompany - maps (etc) referred to in the above text.
can be easily animated. As the displacement of the pins is driven
by the distribution plane’s displacement using a depth map,
all we have to do is animate the map itself. As the source scene
uses camera clipping planes to create the depth map, all we have
to do is to animate the object’s position from behind the
furthest camera clipping setting to just behind the closest.
the Houdini tutorial, the camera clipping settings can be easily
set up within the same scene so we know how much to displace the
mesh by – if we position the object so it intersects the pins,
we can therefore determine where to put our clipping planes: at
the rear of the array of pins and at the front of them as this is
the furthest the pins should be displaced by, else they will be
displaced too far and will be floating in space.
table scene from XMen can be recreated using a depth mask generated
from a 3d model of a city. By animating basic objects within this
scene, the depth mask animation can be quickly set up (eg of a shockwave,
animating a “target” etc). The result of which can then
be easily assigned to our pin setup which should display the result
without any problems. Just remember that to set up the depth mask
correctly, we have to animate geometry, be it deformation or translation…
materials will not work, unless they are overlaid on top of the
pre-rendered depth map.
they would look good, with the amount of objects in the scene that
it would be applied to, stay away from raytraced reflections as
it will take an age to render. An alternative would be to create
a reflection cube map or environment map to be used as the reflection
in the material assigned to the metal pins. Feel free to complete
the model and assign relevant materials to the geometry.
World magazine, Issue 38, May 2003.
Draper, May 2003. Reproduction without permission prohibited.