blinkseb
30-07-2006 02:06:03
Hello,
I'm using oFusion and 3dsmax to set up a simple interior map, but i've got a problem with the lights. When i put a spot somewhere in the map, the light pass through the wall, and light any walls behind it...
An exemple :
http://sebastienbro.free.fr/scene.rar
The spot lights the large wall, but, just behind it, the small wall is also enlightened.
How can I "stop" the light when an object is met ?
Thanks a lot, and I hope you have understood what i'm trying to tell you
Chris
30-07-2006 09:49:20
Heh, it is called shadows

Make sure the light is set to cast shadows and then change shadow settings in oFusion Scene setup (texture modulative ones are bugged and probably do not work)
blinkseb
30-07-2006 12:40:41
Hey, thanks a lot, it works !
blinkseb
01-08-2006 11:58:24
The shadows work well. But, if I put a light in a box, and a wall outside the box, then the wall will have a shadow, and it's impossible since the spot is in the box, the light should not pass through !
Again, a scene to show you an exemple :
http://sebastienbro.free.fr/scene.rar
And I've got a problem with oFusion. When I active shadows with the scene properties, it works well. But if i switch from ofusion view to the perspective view, and go back to the ofusion view, the shadows disappeared. I have to go to the scene properties, select shadows to "none" and then select shadow to "stencil modulative" and the shadows are here !
Anyway, thanks !
Lioric
01-08-2006 16:51:04
Lights in interactive applications are handled different from off line renderers, for performance reasons
If you want your light to dont affect after a certain range, you can use far attenuation settings
To do what you describe in your posts, you need to implement your own advanced system, to detect objects that are light occluders and model your scene in a closed mode with no leaks and post process it to produce a scene tree that you can use to determine your light calcuations faster in your application
But the easier solution if your lights are not dynamic, its to use lightmaps, with this you will get the most accurate light model, including shadows and advanced lighting, but its static
If you need dynamic lights and still benefit from lightmaps, you can use decals on top of the lightmaps using projection mapping and the same blend mode
Xavier
02-08-2006 04:10:51
The shadows work well. But, if I put a light in a box, and a wall outside the box, then the wall will have a shadow, and it's impossible since the spot is in the box, the light should not pass through !
I am guessing you are using shadow volumes (stencil shadows) which do not respect occluding geometry. You really should not do what you are doing with a point light; use a spot light instead, and use texture shadows.