Results 1 to 10 of 10

Thread: Shadows in heightmap?

  1. #1
    Member Contributor
    Join Date
    Jun 2002
    Posts
    50

    Shadows in heightmap?

    How to make shadows in heightmaps(so that hills have shadows)

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Shadows in heightmap?

    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)

  3. #3
    Member Contributor
    Join Date
    Jun 2002
    Posts
    50

    Re: Shadows in heightmap?

    Errrmmm what?

  4. #4
    Guest

    Re: Shadows in heightmap?

    The shadow texture must be created with stencil buffer only once and then used every time I draw my scene?

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Shadows in heightmap?

    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?

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Shadows in heightmap?

    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?

  7. #7
    Senior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Florence, Italy
    Posts
    209

    Re: Shadows in heightmap?

    you should try to use lightmaps, search for some tutorials about terrain engine, heightmaps and lightmaps !

  8. #8
    Member Contributor
    Join Date
    Jun 2002
    Posts
    50

    Re: Shadows in heightmap?

    But aren't stencil buffers non voodoo compatible?

  9. #9
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Shadows in heightmap?

    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!!!!




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

  10. #10
    Member Contributor
    Join Date
    Jun 2002
    Posts
    50

    Re: Shadows in heightmap?

    I checked Nehe's Stencil buffer tut and i didn't figured it out

Similar Threads

  1. Deferred Shadows or Forward Shadows?
    By mrMatrix in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 01-18-2016, 01:01 PM
  2. Problem with point light shadows (cubemap shadows)
    By Ryno Engine in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 08-20-2015, 04:36 AM
  3. heightMap help
    By Pops in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 09-20-2003, 02:02 AM
  4. Replies: 2
    Last Post: 08-17-2003, 01:57 AM
  5. Heightmap
    By in forum OpenGL: Linux
    Replies: 2
    Last Post: 11-27-2001, 01:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean