November 12, 2024, 11:31:24 AM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Forum rules
-
please read before posting, it can save you a lot of time.
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Problem with stencil shadows
« previous
next »
Pages: [
1
]
Print
Author
Topic: Problem with stencil shadows (Read 3830 times)
0 Members and 1 Guest are viewing this topic.
Derrek3D
Occasional poster
Karma: 0
Offline
Posts: 82
Problem with stencil shadows
«
on:
January 02, 2008, 12:06:14 PM »
I need some help in solving a problem I have with stencil shadows that is somehow hard to explain. In order to simplify the problem imagine a room with a floor and one big shadow-receiving wall. The actor steps near the wall and the shadow is correctly mapped on the floor and on the wall. Up until now everything is ok. Now place a small waist-high shadow-receiving object in front of the wall. Now when the actor steps near the wall, the shadow is mapped on the floor, on the wall (behind the object) and also on the object itself, creating a very unrealistic effect of two shadows with only one light source.
Any idea why this happens and any ways of overcoming the problem?
Logged
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Problem with stencil shadows
«
Reply #1 on:
January 02, 2008, 01:18:14 PM »
I'm not sure I understand the problem correctly, but I'm afraid that's by design. The stencil shadows project a shadow volume from the actor, and the shadow itself is painted wherever the shadow volume hits the geometry.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Derrek3D
Occasional poster
Karma: 0
Offline
Posts: 82
Re: Problem with stencil shadows
«
Reply #2 on:
January 02, 2008, 01:55:40 PM »
Well, I'm really not sure I managed to explain the problem very well... I'll try a different approach.
Let's say you have a road in the scene (the floor) and the road has a sidewalk next to it and both the road and the sidewalk receive shadows. Now when the actor casts its shadow on the road/sidewalk you see the actor's shadow on the road up until it reaches the sidewalk and then you see only the shadow that is cast on the sidewalk. The shadow that should have been there on the road below the sidewalk is correctly hidden. Now what happens when it's not the floor vs. an object but instead it's an object vs. another object? What happens when one shadow-receiving object should have (realistically) obstructed another shadow-receiving object from receiving a shadow? As it is now, I can see both shadows at the same time - the correct shadow on the obstructing object and also the incorrect shadow on the obstructed object. Is this by design or am I reporting a bug here?
Logged
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Problem with stencil shadows
«
Reply #3 on:
January 02, 2008, 02:12:38 PM »
Well, the shadow will be "cast through" the object, that's indeed by design. To get precise results one would have to use raycasting, to simulate the light occlusion, and that would be extremely computationally expensive.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Problem with stencil shadows