PDA

View Full Version : Shadow volumes



vofka
04-15-2002, 07:05 AM
Hi everyone.

I need to make a shadows on the scene using shadow volumes algorythm.
As I searched for tutorials, all of them explains how to make shadows, casted by polygones.
And is it possible to make a shadow from a shpere (created as a primitive), for example?
It would be if I could access the vertices of my sphere...
but I don't know how.

Halp me please...

Vofka

SirKnight
04-15-2002, 08:43 AM
So if your saying you cant access your vertices, does that mean your using gluSphere and the like? If so forget about using those functions. Generate the shapes yourself with either a model editing program and load the model in or by using some math to generate a sphere or something when the program loads.

-SirKnight

vofka
04-15-2002, 08:51 AM
Yes, I use suck functions.

Thanx!

jwatte
04-15-2002, 06:50 PM
Use a vertex shader which extrudes all vertices with normals facing away from the light, WAY away from the light.

If you can't use vertex shaders (nVIDIA or ATI extensions) then you can't use "unknown" primitives for shadow volumes.

ToolTech
04-15-2002, 10:40 PM
YES you can ! You could render the object as seen from the light into a depth buffer and generate a shadow volume out of the depth map. This can be done in real time at 50 fps per second on a 600 MHz PIII with GForce 3 HW.

Have a look at the screenshots on http://www.tooltech-software.com. This might inspire you. Using this technique you can use any primitives such as bezier patches, skinning with vertex weighting etc.

rIO
04-16-2002, 03:26 AM
Tooltech, this isn't called shadow volumes.. or am I wrong ??

SirKnight
04-16-2002, 03:33 AM
Tool, your web page wont let me in. It wants a username and pass. Also what you talk about is not shadow volumes but a shadow map. The geforce 3's (and 4ti) does this in hardware in its shadow buffer hardware part.

-SirKnight

Michael Steinberg
04-16-2002, 04:43 AM
The page wont let you in because of the point at the end of the URL.

AdrianD
04-16-2002, 06:22 AM
> Tooltech, this isn't called shadow volumes.. or am I wrong ??

I think what ToolTech means is:

- render your object into a bitmap.
- get the shape of the rendered object using some kind of 2D Shape vectorization (ie.: in Graphics Gems V, there are 2 solution for this problem)
- construct a shadow volume out of this shape

i am not sure, how fast it can be done in realtime. but it is possible.

PH
04-16-2002, 07:25 AM
Michael McCool developed an approach called 'shadow volume reconstruction from depth maps'. I haven't tried it myself but if I remember correctly, it has some of the same limitations as shadow maps ( such as no point lights unless you use 6 maps ). Also, the are times when valid edges are not detected ( I think he actually said that the method is not guaranteed robust ).

I guess ToolTech is talking about this method ?