Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: New to shading

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2013
    Posts
    8

    New to shading

    Hi,

    I am getting pretty familiar with OpenGL basics. I have created a huge terrain with caves underneath. The problem is that objects above do not cast shadows on objects below. Consequently, my caves look a little funny. Not dark at all.

    I am brand new to shading. I have read a bunch of tutorials and watched quite a few videos. But I am still confused. Can someone point me to the basic of the basics on shading? I mean like, what libraries I need to download and install.

    Thanks.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,106
    It am not aware of any library to do shadows - you will have to build it yourself from tutorials on the web (be warned it is not as simple as it sounds)

  3. #3
    Junior Member Regular Contributor
    Join Date
    Mar 2012
    Posts
    129
    Now I am no expert, but I believe the standard way of shadowing larger terrains is cascaded shadow maps. I implemented these myself, and boy, is it a pain! So if you are making a Minecraft clone (I am just guessing, since it is popular to do that now), you can easily do shadows by just baking lighting into the vertices of the mesh instead of using full shadow maps. You can ray cast through the voxel grid to see if a vertex is visible from the light's point of view.
    If you want to go the cascaded shadow maps route, first research basic shadow mapping, and then cascaded shadow mapping (since this is an extension of basic shadow mapping).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •