View Full Version : stencil shadow volume

07-09-2004, 04:14 PM
until know i used projective stencil shadows, but they work only with planes like a floor or wall. So i decided to take the step to stencil shadow volumes. But to no avail yet. Are the some tutorials that explain the topic in plain english?

I tried looking at the stencil shadow volume example from http://www.codesampler.com/oglsrc.htm but that only seem to be able to cast shadows from a plane? I would like to cast a shadow volume from one mesh on another mesh.

07-09-2004, 05:38 PM
Try Googleing on the topic. There's a Delphi demo of it at Delphi3d http://www.delphi3d.net/download/stencilshadows.zip

07-09-2004, 06:02 PM
i know that demo, but i dont understand it, i dont need a demo, i need some documentation that explains what is going on in plain english.

Also googling led me to numerous examples i even tried implementing some, but i get no shadows out of them other then with the supplied mesh. There must be something special on that mesh. As casting with a complicated mesh needs some extra do, the delphi3d demo does that, but i cannot quit follow it. It is supposed to find a siloutte using edges?

08-10-2004, 02:46 PM
I stopped trying to get shadows working, i do get something that sometimes looks good (zpas), but not always. So i propably need zfail, but i cannot seem to be able to implement that.

Is there some good explanation on how to create an silhoutte? I looked at the nehe tutotial on the subject, but it seems that the tutorial is different from the supplied sourcecode?

Is not there a shadow volume tutorial for dummies or the likes?

10-11-2004, 03:53 PM
ive also got the nehe demo in front of me (delphi and c++) but ive got my mesh structure as vertex array, normal array, and the indexes to them in a face record. im stuck on the connectivity (doesnt help that all the comments in the delphi version arent english :( )

noeska, mabey we can work together to get both our codes working well :lol:

10-11-2004, 04:06 PM
yes, would be ok. But i cannot spend time on it in the next week. Also i still do not understand connectivity yet fully. Tomorow i will dig up my code so far on the subject. Be aware that it uses gl3ds.

10-11-2004, 04:14 PM
my mesh structure is based on TFile3DS (is ures similar?) so it shouldnt be too big a problem :)

10-11-2004, 04:33 PM
take a look at: http://www.noeska.com/dogl/gl3ds.aspx

10-11-2004, 06:06 PM
if you're interested, i found this tutorial very good:


10-11-2004, 06:10 PM
most of the nvidia sdk stuff doesnt run on my r 9700 :(

10-11-2004, 09:41 PM
whow how did you find that one the nvidia site? I totaly missed that one, i only seem to find slide shows on the nvidia site. This tutorial is going to my printer tomorow.

11-11-2004, 06:49 AM
whow how did you find that one the nvidia site? I totaly missed that one, i only seem to find slide shows on the nvidia site. This tutorial is going to my printer tomorow.

I't quite advanced isn't it ? There are many others on NVidia site. check them out :P
I found it on google :P

PS if you write some nice generic code to do stencil shadows, let us know :P

12-11-2004, 01:06 PM
this is the example in c that goes with it: http://www.opengl.org/resources/code/rendering/mjktips/rts/index.html
or to be more specific:
Maybe usefull?