
trashcan
with Depth-map (left) vs Raytrace
shadows
In
the above image, the key light is
using D-map shadows (left), which
are casting a fully opaque shadow
based not on the object's transparency
but on its tesselation. The right
image displays accurate shadows,
at the cost of enabling raytrace
shadows. For a 720x480 render, the
D-map shadow took 7sec while the
raytrace shadow took 150 sec!
In
order to solve this dilemma (which
if you are going to use fog volume
occlusion you must solve somehow
but, if not, you still want to avoid
raytracing), we are going to create
a 'shadow object'. A surface whose
purpose is to cast the accurate
Dmap shadow, but not actually render.
We will therefore end up with two
objects on top of each other in
our scene.
Step
by Step on a Sphere:

mesh
Shader on sphere:
Dmap vs raytrace
shadows
1.
Select the original transparency
mapped object and turn off the 'casts
shadows' attribute in the Attribute
Editor render stats.
2.
Put the object on a display layer
called 'primary object'.
3.
Duplicate the primary object and
put the copy on another layer called
'shadow object'.
4.
Turn off the visibility of the primary
object's layer.
5.
Assign a new lambert shader to the
shadow object.
6.
Assign the primary object's bump
map to the shadow object's displacement.

render of mapped Displacement
with default settings
7.
Determine the appropriate tesselation
and alpha gain to yield the desired
displacement.
An
object's tesselation settings determine
how accurately the displacement
represents the source image... the
higher the tesselation, however,
the more polys you are going to
get. Keep this to a minimum through
the understanding that the displacement
will be used to create the Depth
map... therefore if your scene is
going to have soft light sources
(soft shadows), you can get away
with fewer polys in the shadow object.

render of displacement after
lowering 'alpha gain'
Also
be sure to have the depth of the
displacement correlate to the shader
on your primary object. With the
default settings, the displacement
was way too deep. To reduce the
displacement's depth, lower the
'alpha gain' attribute on the displacement
texture.
8.
Select the shadow object and utilize
'Modify/Convert/Displacement to
Polygons'. This step will create
a new poly surface which is the
actual 'shadow object'. The object
which was converted can be deleted.

shadow
object converted to polys
9.
Delete faces which represent the
'primary' objects's transparency.
Select the poly shadow object, goto
Edit/Paint Selection and the vertices
will appear. To switch to faces,
right-click on the surface and choose
'faces' from the pop-up. You can
now 'paint select' with Artisan.
To re-size your brush, the default
hotkey is 'b'.

progress of deleting faces
via Artisan
This
step can be time consuming if you
select and delete faces manually.
Artisan can greatly speed up this
process and is almost always faster,
unless your shadow object is flat
and faces can be quickly selected
from an orthographic view.
note:
one question that you may be asking
is why even bother with the primary
object once you have modeled/created
the shadow object. The reason is
simply that you can get a much smoother
level of detail via transparency.
The shadow object does not need
to have as many polys as the primary
object would need... especially
when dealing with soft shadows.
10.
Turn off 'primary visibility' for
the poly shadow object.
11.
Turn on the visibility for the primary
object's layer.
At
this point we have two objects,
primary and shadow, which should
both be visible in Maya before rendering.
One is the object which we see and
which the light illuminates, the
other we do not see, but the lights
incorporates it into the Dmap calculation.

Primary and Shadow objects visibile
The
only thing left to do is determine
the Dmap settings necessary for
the quality of shadows required...
high-res for hard shadows, low-res
for soft shadows... this will depend
on your project.

Dmap
Shadows: 256x vs 512x, filter size
= 5
In
the above image we have achieved
our goal... A transparency mapped
object casting Dmap shadows which
can be efficiently managed in regards
to quality and render time. The
above images took only 10 seconds
to render at 720x480, while raytracing
softshadows for the object took
about 150 seconds. Plus, we have
the added benefit of being able
to incorporate fog shadow occlusion
effects with the object.

point light with Dmap shadows
and fog
Well,
that about covers it for now...
hope this technique helps you out
of a tough spot someday, and shows
you how to manage Dmap calculation
time as well. While the focus of
our discussion was transparency
shadows, the concept of having a
'shadow object' is a common production
technique used to speed up render
time. If a low-res version of an
object is casting the shadow, you
have to ask yourself if anyone would
really be able to tell.