Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Casting Shadows

Pat Murphy
The Wandering Wizard
Join date: 2 Dec 2002
Posts: 142
12-16-2002 21:30
How about shadows? I want to have a light that only illuminates a picture I have on my wall, so I created a light, and then a shade, but the shade has no effect, and neither do my walls. I know shadows are tough, but from a 3d perspective, this sucks. I don't see why this would add any difficulty on the simulation or bandwidth end. Couldn't this just be a client side thing (and also client side option, so people with slower computers could turn it off)?

-Pat Murphy
_____________________
That's how they showed their respect for Paddy Murphy
That's how they showed their honour and their pride;
They said it was a sin and shame and they winked at one another
And every drink in the place was full the night Pat Murphy died.
-Great Big Sea
Pat Murphy
The Wandering Wizard
Join date: 2 Dec 2002
Posts: 142
12-18-2002 12:03
Or maybe I'm the only one who cares about lighting and shadows? Oh well, I'll live.
_____________________
That's how they showed their respect for Paddy Murphy
That's how they showed their honour and their pride;
They said it was a sin and shame and they winked at one another
And every drink in the place was full the night Pat Murphy died.
-Great Big Sea
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
12-18-2002 14:38
I vote for directional lighting, otherwise the landscape just ends up looking bleached, having layers of light and dark against each other is what makes the outdoors really beautiful.
_____________________
i've got nothing. ;)
BuhBuhCuh Fairchild
Professional BuhBuhCuh
Join date: 9 Oct 2002
Posts: 503
12-18-2002 16:10
yah, shadows are cool, I would like them indoors too. I figure this is probably in the works, but yet to be implemented kinda thing.

BBC
_____________________

START!
Make your own movie in Second Life for
The Take 5 Machinima Festival
Films due Dec 4, screening Dec 7!
http://www.alt-zoom.com/take5.htm

Andrew Linden
Linden staff
Join date: 18 Nov 2002
Posts: 692
12-18-2002 17:06
Yes, shadows can be done better, and is a client side computation... but it is a CPU-resource problem. Shadows are nice, but usable frames-per-second is a _must_.

Who wants 0.5 frames a second on their P4 w/ GeForce_4_4600?

Well really... eventually graphics cards will have wonderful hardware acceleration for ray-tracing and volumetric occlusion. When that happens video games (and Second Life, of course) will be fast approaching photo-realism.
Pat Murphy
The Wandering Wizard
Join date: 2 Dec 2002
Posts: 142
12-18-2002 17:51
Don't most modern games have of some kind of shadowing where lights don't go through objects? What I mean is that if there is a light on one side of a wall, objects on the other side of the wall don't get illuminated. Maybe this isn't true "shadow casting," but as far as I can tell SL doesn't do this, the light in my house illuminates everything in the vicinity, including the ground outside. This seems kind of weird, but I'm not a 3d graphics programmer, just a 3d graphics artist.

-Pat Murphy
_____________________
That's how they showed their respect for Paddy Murphy
That's how they showed their honour and their pride;
They said it was a sin and shame and they winked at one another
And every drink in the place was full the night Pat Murphy died.
-Great Big Sea
James Linden
Linden Lab Developer
Join date: 20 Nov 2002
Posts: 115
12-19-2002 18:33
Yes, we don't do shadow casting like other games. This is because other games have the entire set of "level data" available during development. When each level is done, they run a very time consuming (days of CPU time) process to patch up all the textures with good looking lighting.

In Second Life, anybody can put an object anywhere at any time. So the client does the best it can. Currently there are some bugs in our shadow code, which we're working on. The lighting model is pretty simple -- big shapes are supposed to cast shadows on the ground (but may not, due to bugs), and lights brighten things up in a radius around themselves.

So, yup, boxes don't cast sharp shadows on other boxes. If you really want the effect, you can make a custom texture with the shadow "baked in" and apply it to the object.

Cheers,

James
Andrew Linden
Linden staff
Join date: 18 Nov 2002
Posts: 692
shadowed games
12-20-2002 10:16
Old style shadowed games used precomputed lighting and shadows baked into the textures as James mentioned. Other techniques are used for flickering lighting and such. There are a lot of clever tricks that can be employed when the level content is static or mostly static (for lighting and visibility culling) to make a game fast.

Some modern games are coming out with new shadow technology, however the level content is still mostly static, so they can use extra CPU cycles for better shadows on small subsets of the objects/content.

Ray-tracing is the way to go, but is still in the future. We do limited ray-tracing and occlusion culling for lights, but can't crank it up yet.
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
12-20-2002 11:04
some day, i will be able to walk through the valley of N7, and as the sun sets, the shadows will track me down, envelope me, and all that you will be able to see will be my hair and eyes...

seriously though, I don't know why I was worried about shadows, I live 20m beneath the sea, not much light gets down there you know :-)
_____________________
i've got nothing. ;)
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
12-29-2004 11:24
This would be cool.

I saw a demo of this in EQ2 and it looks freaking fantastic. Basically light coming in from the bars of a window which overlay on top of objects which lie in the shadow path.

I tried to get this to work in SL, but couldn't. Is it just my video card or can you do this in SL?
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper "Changing Realities: User Creation, Communication, and Innovation in Digital Worlds :

"User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
Alicia Eldritch
the greatest newbie ever.
Join date: 13 Nov 2004
Posts: 267
12-29-2004 11:44
When Radeon 9800s and geForce 6800s are $60 US, this will become feasible.

Or, it could be included as an option on the client side for 1.6/1.7....

In the mean time, Jimmy Thompson has done a sort of mini-tutorial in the texture forum on how to fake it... at least on your own property.
_____________________

<xNichG> anyone have a good way to visualize 3d vector fields and surfaces?
<Nap> LSD?


"Yeah, there's nothing like literal thirst to put metaphorical thirst into perspective"
- Get Your War On

"The political leader loves what you could become. It is only you he hates."
- Allan Thornton
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
12-29-2004 12:06
How does EQ2 do it? The machine I was on wasn't that advanced.. The shadows weren't 'baked in' as Andrew talks about above.. they really are casting against dynamic objects.
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper "Changing Realities: User Creation, Communication, and Innovation in Digital Worlds :

"User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
12-29-2004 12:08
Yeah, those tricks Jimmy comes up with... pretty tasty stuff. It's a workaround and not the same as having the features implemented from the getgo, but the results show themselves and look pretty awesome, i.e. in the art gallery he did and even in Sim Horror before that. :)

*looks at original date of thread... whoa!* :D
_____________________