Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

how are shadows calculated?

paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
05-05-2006 15:32
I imagine that lighting is done first, then shadows are calculated in a seperate pass. Shadows seem to be semi-realtime. What formula is used for shadow calculation? Are they baked shadow maps or shadow volumes?

Can shadowing be improved so we can have "dark" rooms?
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
Runitai Linden
Linden Lab Employee
Join date: 29 Aug 2005
Posts: 52
05-05-2006 16:13
Shadows are baked into vertex colors. Only light from the sun is effected by shadows. The updating of shadows happens gradually, updating only a handful of objects per frame, and an object will lose its shadows whenever it changes level of detail, moves, or something between it and the sun moves.

Shadows for moving objects and avatars are rough approximations based on a 5 point sample around the object. Attachments take the shadow value of the avatar they are attached to.

The shadow an object casts is based on its bounding box. To see the bounding box, turn on the octree info display from the debug menu.