Re: shadows...

Len Wanger (wanger@intsim.com)
Mon, 4 Dec 1995 18:45:48 -0500


>Does vrml support shadow casting? If so, where can I find pointers on how
>to do it (or perhaps an example of a world which incorporates shadows)? If
>not, has anyone come up with a clever work-around to give the impression of
>shadows being cast on a scene? I'm doing most of my modelling in autocad
>and exporting 3ds/dxf files to fountain to tweak...

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: wanger@intsim.com
5330 Carroll Canyon Rd, Suite #203 Phone: (619) 658-9783
San Diego, CA 92121 FAX: (619) 658-9463
http://www.intsim.com


  • Next message: Mark E. Marshall: "Re: Role of copyright in innovation"
  • Previous message: Kenneth Simpson: "Re: Role of copyright in innovation"
  • Maybe in reply to: david richard: "shadows..."
  • Next in thesad: Pete McCann: "Re: shadows..."