I’m working on a program that simulates a 3D physical environement.
The ideea is that I wish to add some simple shadows (something like the shadows from Direct3D) in order to give more detail to the 3D positioning of the objects.
So i don’t want high quality shadows but something well shaped (not blurry) that will not decrease very much the 3D performances.
Is there a very fast but reasonablly accurate method of obtaining Direct3D like shadows using OpenGL?
I've seen the NeHe tutorial about Shadows, but I ask if there is something faster ( with the appropiate loss of quality) that will still give me the contours right?
Thank you very much,
Can you clarify what you mean by “Direct3D like shadows”? I am not aware of any special shadow feature built into direct3D. Just some generic features (like stencil buffers, render to texture/projective textures, etc) that can be used to implement shadows, but these same features exist in OpenGL.
Direct3D comes with some tutorials that use Shadows.
One of those tutorials has a Byplane Airplane that casts shadows on the bumpy ground and onto itself.
I was mentioning the ASPECT of the shadows generated using Direct3D. They kind of ressemble the blurr that win95&98 use to do before dispalying the ShutDown dialog.
I imagine that that is a more economic way that will be enough for me.
So, how could i obtain something like that in OpenGL?
Those are shadow volumes.
Ok, but how to implement them in OpenGL?
Shadow volumes are hard to implement ( the most complex method and also expensive to create and render ). Results are excellent though ( personal opinion of cause ).
NVIDIA has lots of papers and some demos, http://developer.nvidia.com/