PDA

View Full Version : shadows on terrain



Poons
05-07-2003, 02:32 AM
i have a terrain on which trees are placed. the trees should cast a shadow.

i tried projected shadows, but the problem is that the terrain is not flat all the time.

has anybody some hints for me or links to some good sources. itīs important that the it can run in real time.

thanks,
poons

iordannalbantov
05-08-2003, 03:19 AM
It's just my idea (I never try it) to use 2D picture of the shadow (your projection on the bottom plane) like a texture. You must set texture coordinates (if your bottom plane is in XY you must set XY as texture coordinates) on any triangle on the ground (if you use triangles) and then you will have a shadow.

titan
05-11-2003, 07:57 AM
Two ideas.
a) bake the static shadow into the vertex colours or texture under the tree.
b) shadow maps or stencil buffers?

nvidia has a lot of examples.