Lighting problems in my Dif
by Aaron Moore · in Torque Game Engine · 05/30/2007 (11:01 pm) · 15 replies

This is an older screenshot, but it still shows my problem. I've got my model, my particles, and my light...
They look great in this picture, but if I go up to the 2nd floor I get light bleeding onto the 2nd floor wall. I've tried changing my lightmap resolution, and I've tried different setups of the actually walls themselves. This is a rough depiction of my walls:
wall 1
| |
| |
------------------
floor/ceiling
------------------
| |
| |
wall 2
Wall 2 is where the light is. Wall 2 ends at the ceiling, Wall 1 starts at the floor. But the light is bleeding through the ceiling, and onto the bottom of Wall 1.
This also happens for
| |wall
| |
| |
| |----------------
| | floor/ceiling
| |----------------
| |
| |
Where the floor/ceiling ends at the wall, and the wall is solid. Except for some strangeness on a couple pentagonal towers to my castle, all the walls/ceilings are in units of 8.
I've tried this in Quark, and in Contructor with even the lowest setting on the lightmap it changes nothing.
Got any insights?
#2
wall
| |
| |
|-+----------------
| | floor/ceiling
|-+----------------
| |
| |
I've had the best luck with cutting around whole section where the two meet. At the very least, having the walls extend above the ceiling works better than the ceilings going through the walls (like in your second illustration). IOW,
| |
| |
|-+---------------
| | floor/ceiling
| |---------------
| |
| |
... is better than:
| |
| |
|------------------
| floor/ceiling
|------------------
| |
| |
But ...
| |
| |
|-+----------------
| | floor/ceiling
|-+----------------
| |
| |
... is usually the best.
Of course, if those are dynamic lights all bets are off since they'll bleed no matter what.
As for your second problem: Yes, I've had that same trouble many times. I don't have an easy solution for you, though.
05/31/2007 (9:39 am)
Have you tried this?wall
| |
| |
|-+----------------
| | floor/ceiling
|-+----------------
| |
| |
I've had the best luck with cutting around whole section where the two meet. At the very least, having the walls extend above the ceiling works better than the ceilings going through the walls (like in your second illustration). IOW,
| |
| |
|-+---------------
| | floor/ceiling
| |---------------
| |
| |
... is better than:
| |
| |
|------------------
| floor/ceiling
|------------------
| |
| |
But ...
| |
| |
|-+----------------
| | floor/ceiling
|-+----------------
| |
| |
... is usually the best.
Of course, if those are dynamic lights all bets are off since they'll bleed no matter what.
As for your second problem: Yes, I've had that same trouble many times. I don't have an easy solution for you, though.
#3
UGH!...
no clue on the dead spot though? I've tried to see if it was a limit on the number of lights in a dif because I noticed that moving some of the dead lights into an area they'd turn on...would turn other lights off.
EDIT: Is having the light built into the dif the best way to go? I hate to lose the fire-effect of having the light attached with my particle, but as things are they look really bad if you pay any attention. I can do without the flickering dynamic light if possible, but I don't want to scrap it without first checking for a solution.
I can deal with the bleed if I have to by placing other lights near most of the bleeds, but having light-less torches looks less like an engine bug and more like a moron forgot to put some lights. I've tried adding more lights and moving around lights, trying to find a pattern. About the best I can tell is that as I add more lights, the lights within a certain radius of my 4 corners go out... this sometimes it happens, and sometimes it doesn't.
05/31/2007 (10:06 am)
SgLightObject will bleed no matter what?UGH!...
no clue on the dead spot though? I've tried to see if it was a limit on the number of lights in a dif because I noticed that moving some of the dead lights into an area they'd turn on...would turn other lights off.
EDIT: Is having the light built into the dif the best way to go? I hate to lose the fire-effect of having the light attached with my particle, but as things are they look really bad if you pay any attention. I can do without the flickering dynamic light if possible, but I don't want to scrap it without first checking for a solution.
I can deal with the bleed if I have to by placing other lights near most of the bleeds, but having light-less torches looks less like an engine bug and more like a moron forgot to put some lights. I've tried adding more lights and moving around lights, trying to find a pattern. About the best I can tell is that as I add more lights, the lights within a certain radius of my 4 corners go out... this sometimes it happens, and sometimes it doesn't.
#4
Well, only if you have the "static" checkbox turned off via the light editor.
As for your other problem (dead spot), you can try cutting the wall into smaller pieces and see if that does it. No promises. ;)
05/31/2007 (10:31 am)
Quote:SgLightObject will bleed no matter what?
Well, only if you have the "static" checkbox turned off via the light editor.
As for your other problem (dead spot), you can try cutting the wall into smaller pieces and see if that does it. No promises. ;)
#5
I tried chopping up the wall but quark keeps giving me problems since it's incredibly picky about the portals (very frustrating, but not as frustrating as the problems I have with constructor, so I keep using it). Also, I don't much see how it could be the wall. It's not just the light doesn't show up on the one wall, it doesn't show up on the floor, ceiling, or even if I move it in to the middle of the hall it still does nothing.
It seems to me like it's limiting the amount of lights...but it's also being selective. I went crazy at one point placing a dozen more lights in the keep of my castle...1 light went out.
05/31/2007 (11:23 am)
If I turn on static, all the lights go out.I tried chopping up the wall but quark keeps giving me problems since it's incredibly picky about the portals (very frustrating, but not as frustrating as the problems I have with constructor, so I keep using it). Also, I don't much see how it could be the wall. It's not just the light doesn't show up on the one wall, it doesn't show up on the floor, ceiling, or even if I move it in to the middle of the hall it still does nothing.
It seems to me like it's limiting the amount of lights...but it's also being selective. I went crazy at one point placing a dozen more lights in the keep of my castle...1 light went out.
#6
When you switch to static, do you relight the scene?
05/31/2007 (11:34 am)
I believe Torque only allows a certain number of dynamic lights. When you switch to static, do you relight the scene?
#7
05/31/2007 (1:21 pm)
Have you tried the latest version of Constructor (1.0.2)?
#8
05/31/2007 (7:07 pm)
Hmm...I just checked my version. It only says 1.0. I'll give the new one a shot.
#9
After about 100 times of constructor crashing, I went back to QuArK. Also, after these 100 times of constructor crashing, I realized the reason my lights from QuArK weren't showing up is because I had "GLLighting" turned on in my dif...I turned that off and all the lightmaps showed up.
I'm pretty certain the dead spots on the sgLightObjects had something to do with the number of the lights. I was about 1/3 of the way through the process of placing all my torches and I ended up with over 60 before this problem started happening. Is there any way to increase the limit? I've combed through the code a bit and didn't see anything. I really liked the look of the dynamic lights (even with a little bleed), but can't afford to have blackouts in parts of my dif.
06/01/2007 (9:56 am)
Okay, I just spent hours and hours trying to get constructor to work. I tried with my old dif, and starting from scratch.After about 100 times of constructor crashing, I went back to QuArK. Also, after these 100 times of constructor crashing, I realized the reason my lights from QuArK weren't showing up is because I had "GLLighting" turned on in my dif...I turned that off and all the lightmaps showed up.
I'm pretty certain the dead spots on the sgLightObjects had something to do with the number of the lights. I was about 1/3 of the way through the process of placing all my torches and I ended up with over 60 before this problem started happening. Is there any way to increase the limit? I've combed through the code a bit and didn't see anything. I really liked the look of the dynamic lights (even with a little bleed), but can't afford to have blackouts in parts of my dif.
#10
Btw: using zones allows you to gain better rendering performance and gain better control over lighting (using the Restrict X to Zone light settings) and relight performance.
06/01/2007 (10:23 am)
We had one other report of missing lights - it ended up being related to the number of mission objects or datablocks, the user hit a hard limit in Torque. I'll see if I can dig up the thread...Btw: using zones allows you to gain better rendering performance and gain better control over lighting (using the Restrict X to Zone light settings) and relight performance.
#11
06/01/2007 (10:24 am)
Here's the thread: www.garagegames.com/mg/forums/result.thread.php?qt=56726
#12
I am using zones, the dif that I've been spending most of my time on has 57 portals and 9 zones. However, restrict diffuse to zones is turned off, I'll change that.
I already deleted most of the torches I had while moving the dif over to lightmaps. However, with the system I put in place for parents lights and particles to the torch, all I have to do is uncomment the dynamic light in my script and every torch will have dynamic lights. We'll see later on whether they still disappear or not.
06/02/2007 (6:22 am)
Thanks John!I am using zones, the dif that I've been spending most of my time on has 57 portals and 9 zones. However, restrict diffuse to zones is turned off, I'll change that.
I already deleted most of the torches I had while moving the dif over to lightmaps. However, with the system I put in place for parents lights and particles to the torch, all I have to do is uncomment the dynamic light in my script and every torch will have dynamic lights. We'll see later on whether they still disappear or not.
#13
I'd been having so many problems that I went ahead and lightmapped my dif. But my object is written in such a way that it automatically adds lights so I figured if anything I could have it as an extra video option in my game. Light quality - High or Low (the static lightmaps, or the dynamic sgLightObjects that flicker with my torch's fire).
Unfortunately, changing the DataBlockObjectIdBitSize didn't work.
At first I bumped it up to 12 like what was suggested in the other forum post, then I bumped that sucker up to 24. Either way no go. The lights are doing very strange things.


In the first one you can see some of my objects have the dynamic light (the ones on the left are brighter because there is another light over the top of the lightmap). However, the ones on the right are merely the lightmap. If the light blinking out problem isn't quite explained enough previously, check out the first image.
Image 1: The crossbow is shot, and the bolt goes flying through the air along with the light underneath it.
Image 2: ... The bolt is still in the air, hasn't hit anything yet. So where'd the light go?
I'm all sorts of confused.
06/02/2007 (10:00 am)
Hmm...Actually that didn't quite work.I'd been having so many problems that I went ahead and lightmapped my dif. But my object is written in such a way that it automatically adds lights so I figured if anything I could have it as an extra video option in my game. Light quality - High or Low (the static lightmaps, or the dynamic sgLightObjects that flicker with my torch's fire).
Unfortunately, changing the DataBlockObjectIdBitSize didn't work.
At first I bumped it up to 12 like what was suggested in the other forum post, then I bumped that sucker up to 24. Either way no go. The lights are doing very strange things.


In the first one you can see some of my objects have the dynamic light (the ones on the left are brighter because there is another light over the top of the lightmap). However, the ones on the right are merely the lightmap. If the light blinking out problem isn't quite explained enough previously, check out the first image.
Image 1: The crossbow is shot, and the bolt goes flying through the air along with the light underneath it.
Image 2: ... The bolt is still in the air, hasn't hit anything yet. So where'd the light go?
I'm all sorts of confused.
#14
You can increase the light count by going into interiorInstance.cc line 977 and editing the following:
06/06/2007 (4:16 pm)
Hmm, it looks like the LightManager expects a max light count when setting up the lights, and the interior dynamic lighting is set to 32 lights.You can increase the light count by going into interiorInstance.cc line 977 and editing the following:
gClientSceneGraph->getLightManager()->sgSetupLights(this, this->getWorldBox(), [b]<max dynamic light count>[/b]);
#15
However, I'm not sure I can use it...framerate plummets. I think I'm going to have to find some way of optimizing the lights or turning them off if I'm the zone they reside in isn't visible (which should also eliminate some of the bleeding?).
06/06/2007 (8:35 pm)
Awesome! I had the feeling it was some sort of limit like this, but I couldn't find it for the life of me. This fixed the problem completely (although all the lights bleed).However, I'm not sure I can use it...framerate plummets. I think I'm going to have to find some way of optimizing the lights or turning them off if I'm the zone they reside in isn't visible (which should also eliminate some of the bleeding?).
Torque Owner Aaron Moore
Dead spots. No lighting.
The light at the end of the hallway is no different from the ones you see around it. If I move that light away from the tower, it works fine...I put it in a certain radius of the tower and it blinks out. This happens anywhere near the tower, or in the tower(there's 4 lights in the tower that previously worked, that now don't.
I'm at a loss. I've tried removing the tower completely and closing the wall off and it's still the 4 corners of my dif no longer likes lights. So it seems right now I trash my dif and start over...I don't want to do this.
STATISTICS
- Total brushes: 611
+ structural: 557
+ detail: 0
+ portal: 54
- Number of zones: 9
- Number of surfaces: 4342
This is the output from the map2dif I'm using.
Anybody run into this? I'm really confused as to why the heck this is happening. It WAS working previously and nothing was done between it working and it not working except adding more lights inside my dif.