# The Industry's Foundation for High Performance Graphics

#### from games to virtual reality, mobile phones to supercomputers

Hi, how to compute the silhouette of a triangle for shadow volumes ?
I've projected the triangle to the surface(not the way shadow volumes work but whatever, it was just to practise) where the shadow will appear but if the light is closer to the triangle the shape of the shadow stills the same which is wrong. If the light is closer to the triangle, the shadow volume should be bigger than if the light isn't so closer to the triangler. Anyone please ?

Thanks, bye.

2. ## Re: Shadow Volumes Silhouettes

Shadow volumes are done by CREATING the shadow volume, not just projecting the occluder silouette.
By creating the shadow volume means to create a new volume face for every silouette edge, from the light source to infinity (ok, not always).
This way you "automatically" get a volume shadow changing according to the light/occluder position.

3. ## Re: Shadow Volumes Silhouettes

I don't think you projected the triangle the right way, plus this isn't exactly shadow volumes. You are doing projection calculations, which comes down to ray-plane or ray-polygon intersection tests.

vector1=vertex1 - lightposition
vector2=vertex2 - lightposition
vector3=vertex3 - lightposition

vector1 2 3 are the direction for your ray and the starting position is vertex1 2 and 3 respectively. Then plug them into the intersection algorithm.
Doing shadow volumes starts off like this too, but not the same method!

V-man

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•