Jim Wilson wrote:
> How about cheating?  Add a rectangle under the aircraft, map a fuzzy
> silhouette texture onto it and animate it down to ground level
> (translate it based on AGL).  Above 50m AGL you'd have to offset up a
> little to keep it "above" the terrain.

That would work very well for the (exceedingly) common case of an
aircraft in a level attitude projecting a shadow on flat ground
beneath it.  Even the lighting would work correctly as long as the
ground is flat (just pre-calculate an ambient color for flat ground
and use blending to interpolate between the pre-existing frame buffer
contents and this color).

Getting a tiny bit fancier, you could pre-render this shadow map into
a texture at load time.  No need to do it per frame.

And I've read stuff about people using texture LOD bias (an extension
that forces use of different mipmap levels than normal) to get cheap
"soft" shadows.

The closest way to a "correct" way to do this is to render a shadow
map from the light's perspective into a texture every frame, and
multitexture it onto the shadowed geometry during render.  This works
for everything but self-shadowing (engine nacelles casting shadows on
the wing, etc...), for which you need to use stencil.  Stencil shadows
are a big pain, and very difficult to make fast.  I've been playing
with these on my own project for the last few days; I'm pretty sure
it's worth it, but it's not cheap.

Andy

-- 
Andrew J. Ross        Beyond the Ordinary        Plausibility Productions
Sole Proprietor       Beneath the Infinite       Hillsboro, OR
                  Experience... the Plausible?



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to