PDA

View Full Version : Shadows in heightmap?



runggu
07-31-2002, 04:53 AM
How to make shadows in heightmaps(so that hills have shadows)

nexusone
07-31-2002, 01:04 PM
Just my guess the same way, you make shadows with any other object.

1. Render the as scene as viewed from the light source.
2. use the stincel buffer to create a shadow texture.
3. Create the scene from the camara's view and apply the shadow texture to the hight map.



Originally posted by runggu:
How to make shadows in heightmaps(so that hills have shadows)

runggu
08-01-2002, 05:38 AM
Errrmmm what?

08-01-2002, 08:54 AM
The shadow texture must be created with stencil buffer only once and then used every time I draw my scene?

nexusone
08-01-2002, 11:26 AM
You need to check out some examples of creating shadows, that would be more helpful for you.


try nehe.gamedev.net



Originally posted by runggu:
Errrmmm what?

nexusone
08-01-2002, 11:29 AM
only if the object and light do not change position. If the light or object moves then the shadow will also have to change to reflect the new position.



Originally posted by Ehm...:
The shadow texture must be created with stencil buffer only once and then used every time I draw my scene?

Alessandro_dup1
08-01-2002, 01:53 PM
you should try to use lightmaps, search for some tutorials about terrain engine, heightmaps and lightmaps !

runggu
08-02-2002, 06:32 AM
But aren't stencil buffers non voodoo compatible?

nexusone
08-02-2002, 07:23 AM
If the hardware does not support it, then it will be rendered by the software.

Anyway the voodoo is an out dated video card anyway!!!!

http://www.opengl.org/discussion_boards/ubb/smile.gif



Originally posted by runggu:
But aren't stencil buffers non voodoo compatible?

runggu
08-02-2002, 09:16 AM
I checked Nehe's Stencil buffer tut and i didn't figured it out