Jump to content

  • Log In with Google      Sign In   
  • Create Account


Aligning shadows with terrain


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 SHilbert   Members   -  Reputation: 647

Like
Likes
Like

Posted 29 February 2000 - 10:08 AM

I''m writing a flight sim, and I''m trying to get the shadow of the plane to map onto the terrain. (If it helps, the shadow is a textured square w/ transperency FX.) Is there any simple (or at least not overly complex) way to do this?

Sponsor:

#2 Spellbound   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 February 2000 - 10:52 AM

Find the triangles that might will be shadowed by the texture. You do this by parallell projecting the shadow texture and checking if the triangle is inside the frustum that the parallell projected edges make up.

Then apply the shadow texture on these, where you use the parallell projection to find the texture coordinates.

The vector that is used for the parallell projection is the light vector from the sun.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS