dim3 Forum

Full Version: walls don't block light?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys, I've got a small bug/problem/glitch here. The dynamic lights in my game shine through walls! Usually, this isn't noticable. but in one particular part of a map, where I have a room around a corner from a staircase, This is a bit of a problem. the room, the staircase, the area in right outside the room, and the top of the stairs are all different portals. Neither room is connected to the other via sight path. Also I can't use the obj.model.light.confineToPortal function in the light's scripting, because I'm using it to illuminate the stairs, the landing at the top of the stairs, and a section of the hallway that connects to the room in question.

See for yourself in the screenshots below:

The room with the mysteriously lit corner:
[Image: Picture5-6.png]

A view of the offending light over the stairs and the room:
[Image: Picture6-5.png]

See? No hole in the wall! How is the light magically lighting it up on this side?
[Image: Picture7-6.png]

Any thoughts on how to make this not happen? the interior room wall and the wall of the stairway are separate and are in difference portals. This is driving me nuts!


That little bug aside, I'm running the game with the "Texture Compression" feature turned on in Setup. When I turn this option off, the game does this on any map loaded:
[Image: Picture3-7.png]

Is there any other way to avoid having this ugly problem? And for that matter, what causes it?
Turn on raytrace lighting and walls will block light. Until then you're going to have to attemp to position them so that it doesn't happen. For instance, instead of using one giant light use 4 or 5 tiny ones for a room. Also try checking 'confine light to portal' and making each room in its own portal. You can emulate it shining through the door with small lights or an ambient on the floor.
Thank you! But what is raytrace lighting? How do you turn it on?

I was wondering this back when I was actually working on Dim3!

Maybe I'll fool around once in a while soon . . .
Raytrace lighting takes the lights in a scene, and runs "ray tracers" out from the light source to as far as the light is supposed to reach. Whatever the rays hit is lit, and whatever the rays don't hit, is dark.
Dr. Infested Wrote:Raytrace lighting takes the lights in a scene, and runs "ray tracers" out from the light source to as far as the light is supposed to reach. Whatever the rays hit is lit, and whatever the rays don't hit, is dark.

I know what it is. How do I enable it?
Open up the dim3 Engine. Go to settings (options or whatever) go to Graphics, and click the checkbox next to "Ray-Trace Lighting" to enable it. Note, it's SLOW, and it's not very good right now, I imagine it will probably look better at a later time, but right now it's pretty Alpha.
Dr. Infested Wrote:Open up the dim3 Engine. Go to settings (options or whatever) go to Graphics, and click the checkbox next to "Ray-Trace Lighting" to enable it. Note, it's SLOW, and it's not very good right now, I imagine it will probably look better at a later time, but right now it's pretty Alpha.

I'm running the game with v2.2 of the game engine right now. I don't see that option in Setup.
Kieranator Wrote:
Dr. Infested Wrote:Open up the dim3 Engine. Go to settings (options or whatever) go to Graphics, and click the checkbox next to "Ray-Trace Lighting" to enable it. Note, it's SLOW, and it's not very good right now, I imagine it will probably look better at a later time, but right now it's pretty Alpha.

I'm running the game with v2.2 of the game engine right now. I don't see that option in Setup.

It's 2.3 only.
Bink Wrote:It's 2.3 only.

Well that figures. Rolleyes I'll give 2.3 a re-download. I've been sticking with the 2.2 release because I'm having several windows users playtest my game (it's multiplayer only, and most of the folks who i'm making it for are running XP).
Note that ray tracing is ALOT faster when you don't have any moving lights, infact, no speed hit possible if the lights don't change as it only has to render the lighting when the lights actually change.
Reference URL's