#### Archived

This topic is now archived and is closed to further replies.

This topic is 5354 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

For simple objects (with only the sun as a light source): What are the cons of using precalculated/loaded shadow volumes? I would just calculate it as if the sun was shining straight down, get a list of the verticies that make up the bottom of the volume, and then just shift those on the xz plane as the sun/object moves/rotates.

##### Share on other sites
this is ok, but it works only on planes.

##### Share on other sites

But if you really precalculate the shadow volume, you cannot move the object relative to the light source, because then your silhouette would get wrong

##### Share on other sites
well, since he is probably modelling the sun by a directional light source he *can* precalc the shadow volume and translate the object and even rotate it around light direction.

##### Share on other sites

Yes I forgot to mention that these would only be precalculated for either static objects, or objects that can only be rotated about the Y axis. Why would it only work on planes?, the "top" of the volume would be at the model, the "bottom" of the volume would be far below, shouldn''t that be ok for stencil shadows, on all types of receiving objects.

##### Share on other sites
quote:
Original post by honayboyz
For simple objects (with only the sun as a light source): What are the cons of using precalculated/loaded shadow volumes? I would just calculate it as if the sun was shining straight down, get a list of the verticies that make up the bottom of the volume, and then just shift those on the xz plane as the sun/object moves/rotates.

If I understand you correctly you are precalculating the volume using the sun as the lightsource at midday? In this case you would be able to translate the object, and rotate it on the Y-axis as you mentioned.

However you mention in the original post that the sun would be moving, if this is the case then your volumes will be incorrect.

If you need a more indepth explanation:

Imagine a cube floating above the middle of an empty field with the sun shining directly down on it. Your precalculated volume would cast on the flooor in a square shape, as the only face of the cube that is used in the volume is the top.

Now, as the day goes on and the sun moves away from the midday position the shadow is all wrong, it should also show one or two of the side faces of the cube but your precalculated volume only uses the top face of the cube.

Quite a poor explanation now that I read it again, but try it and you'll see

[edited by - MrP on February 21, 2004 5:44:13 AM]

[edited by - MrP on February 21, 2004 5:55:29 AM]

##### Share on other sites
quote:
Original post by Anonymous Poster
well, since he is probably modelling the sun by a directional light source he *can* precalc the shadow volume and translate the object and even rotate it around light direction.

##### Share on other sites
quote:
Original post by honayboyz

Don''t let it get you down, it was something I thought of myself at one point

1. 1
Rutin
29
2. 2
3. 3
4. 4
5. 5

• 12
• 13
• 11
• 10
• 13
• ### Forum Statistics

• Total Topics
632954
• Total Posts
3009442
• ### Who's Online (See full list)

There are no registered users currently online

×