Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL: Easiest way to make shadow and light Volumes?

Tags:

shadow

opengl

I want to ask what is the easiest way to make shadow and light volume ? How can I bring to scene more realism? Do you know any nice tricks ? I hear that to make shadow i must use stencil buffer, but I don't know how:/ I can't find any super simple example how to make it.

like image 555
piotrek Avatar asked May 16 '10 21:05

piotrek


2 Answers

There's no super simple way to do shadows. Sorry to disappoint you but shadows are one of the more complex problems in computer graphics, especially if they have to look good.

Now with that said here are some maybe helpful links for further reading:

  • The Theory of Stencil Shadow Volumes
  • Shadow Mapping with Today's OpenGL Hardware
  • Real-time Shadow Algorithms and Techniques

There's a simple example of shadow mapping in the NVIDIA SDK 9 here (Paper) which might be easy to adopt. There's also a section on shadows in all volumes of GPU Gems and a good overview in the Real-Time Rendering book (without code).

like image 112
Maurice Gilden Avatar answered Oct 21 '22 21:10

Maurice Gilden


The Wolfire blog has had some good articles on shadows. Nothing too technical, no code samples, but to get a good overview of the concepts, they are great (and I love the pictures that always accompany the articles!).

Here is a full list of every article with "shadow" or "shadows" in the title. You may also choose to do a search on their blog for "shadow|shadows" to see every possible article, but beyond this list you probably won't find too much. Might also want to add "-alpha" so that you don't get any hits from their weekly alpha updates, which wouldn't have any worthwhile content.

  • 2006/05/10: Starting shadows
  • 2006/05/18: More shadows
  • 2008/11/24: High-detail terrain shadows
  • 2008/12/02: Object shadows
  • 2009/03/29: Environment shadows - step 1
  • 2009/04/03: Environment shadows - step 2
  • 2009/04/07: Environment shadows - step 3
  • 2009/04/10: Environment shadows - step 4
  • 2009/11/13: Character shadows
  • 2010/03/17: Two-part shadow maps
  • 2010/04/19: Catching baked shadows

(list gathered 2010/05/19 by a google search for site:blog.wolfire.com intitle:shadow|shadows)

like image 26
Ricket Avatar answered Oct 21 '22 21:10

Ricket