views:

190

answers:

4

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

A: 

These questions are not easy to answer here, it'll require you some study and understanding of how graphic primitives works. However, there are some good sites over the web you can take a look, like Nehe and GameDev. There are lots of articles and tutorials there, just take some time to search and read them. There is also some rendering engines that you can use that will do a lot of nice things for you, like Ogre3d and Irrlicht but if you cant understand the principles behind them (like shadows, illumination...), I recomend you to try in OpenGL first, learn it, and then use some engine to get the work done for you.

eMgz
+2  A: 

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:

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).

Maurice Gilden
A: 

In addition to the other useful sources mentioned here, you should consider getting an introductory text on linear algebra, or Eric Lengyel's excellent Mathematics for 3D Game Programming and Computer Graphics, Second Edition. Computer graphics are made of math, and at some level it gets really hard to implement things out of a cookbook without some understanding of the underlying algebra.

Crashworks
A: 

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.

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

Ricket