VRML doesn't have any support for shadows. The most appropriate shadow
hacks I know of was described by Jim Blinn in a CG&A article s few years
ago called "Me and My Fake Shadow). The basic technique is to scale your
model down so that its flat (i.e. scale Y by something really small like
0.000001) then transform the geometry with a skew that is equivalent to the
projection of the geometry from the light source and cast onto the ground
plane. The Blinn article elegantly shows all of the math you need to
implement this.
It should be possible to do a nice VRML hack to implement this by only
defining the geometry once. How about drawing the geometry once with a DEF
around it, then re-instancing the DEF'd geometry within a matrix transform
node that does the projection. The tricky part here would be to draw it in
a homogenous dark color (so it looks like a shadow), but that should be
doable by changing the material within the separator for the second
instance of the geometry.
For really pretty, accurate shadows you could go out and by a copy of
Lightscape (I'm pretty sure it will directly read in your DXF files).
Lightscape will perform a radiosity solution for your environment and save
the shadow information in the vertex colors for your model. Very pretty,
physically accurate, and usually a big file.
Any thoughts folks?
Len Wanger
------------------------------------------------------------------
Interactive Simulations, Inc. Email: [email protected]
5330 Carroll Canyon Rd, Suite #203 Phone: (619) 658-9783
San Diego, CA 92121 FAX: (619) 658-9463
http://www.intsim.com