Shadows, How to do them?
Hello all.
I think its my first post here hehe :P
Well I read about Shadow Volume, didn't have enough luck with realizing it. But as I understood to get shadow volume work correct I need to render the scene twice, it can affect the fps if the scene have many triangles.
Anyway I wanted to ask for references about how to make shadows in OpenGL and what is the "best" way to do it?
Hmm also wanted some references/tutorials (better with code) for frustum culling if possible.
Thanks.
There are two real ways of doing Shadows:
1.)Shadow Mapping
Render the Scene twice once from the view of the light the second time compare depth values to determine if an pixel is in shadow or not. For this there are various technices to improve the shadow quality like PSM (perspectific shadow mapping)
2.)Shadow Volumes
Through drawing the Shadow Volumes and Objects various times (depents on the used method) the number of rayintersetions with the shadowvolume is counted in the stencil buffer.
Even number => no shadow
uneven Number => Shadow
The only real way to produce robust shadow volumes is Carmack's reverse on which creative has a patent on. Also it is a bit of a hack to code it with opengl because there is no standard extension, you have to write the code twice for ati / nvidia.
I would recommend Shadow Mapping
Usefull google phrases:
Shadow Mapping (^^)
Frame Buffer Object
1.)Shadow Mapping
Render the Scene twice once from the view of the light the second time compare depth values to determine if an pixel is in shadow or not. For this there are various technices to improve the shadow quality like PSM (perspectific shadow mapping)
2.)Shadow Volumes
Through drawing the Shadow Volumes and Objects various times (depents on the used method) the number of rayintersetions with the shadowvolume is counted in the stencil buffer.
Even number => no shadow
uneven Number => Shadow
The only real way to produce robust shadow volumes is Carmack's reverse on which creative has a patent on. Also it is a bit of a hack to code it with opengl because there is no standard extension, you have to write the code twice for ati / nvidia.
I would recommend Shadow Mapping
Usefull google phrases:
Shadow Mapping (^^)
Frame Buffer Object
There is really nothing to add: Real time shadaows rely on implementation of these two classes of algorithms. The Doom 3 engine (quake 4, prey, fear) use volume shadows. My opinion is that Shadow mapping are a better choice for future games, the only problem being that SM have a number of issues (aliasing, z precision artifacts atc) not yet fully solved. AFAIK, you should be able to address them in accettable ways though (a lot of papers recently focus on ne versions of SM). By the way, I think that Crisys use them.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement