Problems With Lights

Post » Mon Jun 18, 2012 1:34 pm

Trying out the new editor, one of the first things I've attempted to do is put together a dungeon/cave system. While a lot of it has been relatively straightforward (and some bits have been hair-pullingly frustrating) the one thing I haven't been able to figure out is lighting.

After adding about sixteen lights into the scene, give or take (at this point only about three of them cast shadows at all), it routinely suffers from flickering as the game turns both nearby and distant lights on and off, seemingly at random. While I get that the engine can't cope with an awful lot of lights all at the same time, I'm not trying to do anything that's even remotely close to pushing the limit here. The few rooms that there are generally only have two to three lights at most. In trying to keep a more or less realistically dark environment, you have to mostly rely on a fair amount of static light sources to make things mostly visible.

At first I thought that the fact that I was having too many shadowed lights was responsible, but switching most of those to non-shadowed hasn't helped much. Reducing radii seems to minimise the flickering somewhat, but doesn't reduce it entirely.

What troubles/annoys me is that I can't see any reasonable way of determining what amount of light sources screw up the engine and what in particular I can do about it. Everything can seem fine until I run through it in the game itself, wander around a corner and suddenly a light behind me will turn off, then turn back on again a few steps later. Whipping a torch out inevitably screws with all of the lights at once.

Clearly, I'm doing something wrong as it's impossible to light up environments properly in this manner or check the lighting system for consistency, but I can't find any sort of advice or guidelines for keeping the lights in check, either.

Surely I'm not the only one bashing my head against the wall here - has anyone else had luck with this?
User avatar
trisha punch
 
Posts: 3410
Joined: Thu Jul 13, 2006 5:38 am

Post » Mon Jun 18, 2012 12:03 pm

i cant see any lights in the render window when i drag them in.. they just shed a little light on clutter objects, but they dont light the cell for some reason.
User avatar
Lily
 
Posts: 3357
Joined: Mon Aug 28, 2006 10:32 am

Post » Mon Jun 18, 2012 6:34 am

i cant see any lights in the render window when i drag them in.. they just shed a little light on clutter objects, but they dont light the cell for some reason.

Have you tried altering the radius? Which lights are you using?

In my case, the thing is that editor is clearly tracking what lights it can't draw: the lights that turn off when you're standing at a certain point actually have their markers turn red to signify that they're not being rendered. But at the same time, it's bizarre that I can't find anything in the wikie about why it's doing this and how to prevent it.

It would be so much better if you could see some level info perhaps, along the lines of 'this object is affected by too many light sources' so you could debug and optimise, but as it is I'm kind of just flailing around blindly.
User avatar
carla
 
Posts: 3345
Joined: Wed Aug 23, 2006 8:36 am

Post » Mon Jun 18, 2012 1:43 am

Have you tried altering the radius? Which lights are you using?

In my case, the thing is that editor is clearly tracking what lights it can't draw: the lights that turn off when you're standing at a certain point actually have their markers turn red to signify that they're not being rendered. But at the same time, it's bizarre that I can't find anything in the wikie about why it's doing this and how to prevent it.

It would be so much better if you could see some level info perhaps, along the lines of 'this object is affected by too many light sources' so you could debug and optimise, but as it is I'm kind of just flailing around blindly.

messing with the ambient lights and all the different kinds of light objects, I'm now starting to see the lights... kinda wish more details were covered in the wiki...

right now im trying to remove that glow your character automatically has, that they dont tell you about... whats that called anyway?
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Mon Jun 18, 2012 2:45 am

I'm having a problem with lights too. I think I added too many lights with shadow because didn't know it was limited to four. All my lights with shadow won't work and show up red.

I've tried removing all but four lights with shadow, reloading the CK. I've tried removing all lights with shadow, reloading. Even after that any new lights with shadow that I add are still red. I've looked in the wiki for an answer but can't find one.
User avatar
flora
 
Posts: 3479
Joined: Fri Jun 23, 2006 1:48 am

Post » Mon Jun 18, 2012 2:52 am

I ran into this problem too, almost immediately. The solution? Room primatives and portals. Once I did this everything worked without a problem. If you follow the directions in the tutorial, it isn't very complicated. Shadowed lights render line of sight, it doesn't matter if there's a whole dungeon between you and the light. I actually got the feeling that they dont even render line of sight, but the game tries to render all of them at once. I don't know. I hope this fixes your problem.
User avatar
carley moss
 
Posts: 3331
Joined: Tue Jun 20, 2006 5:05 pm

Post » Mon Jun 18, 2012 8:30 am

What I'm working with is just the Honeyside home so it's fairly small and doesn't need many lights. I've tested the mod and it seemed to be fine without the room primitives and portals. The only problem now is I can't get any light with shadows to work in the CK, making it very hard to light the place correctly.

Is there any way to fix the red light problem after it's happened? I'm almost done with the mod after four days of work, I'd really hate to have to start over again. I'm going go and try adding the room primitives and portals and see if that will fix my lighting problem.

On another note I really should read the more of the wiki, since I've modded for Morrowind and Oblivion, I kinda jumped right in and started building my house.
User avatar
Brandon Bernardi
 
Posts: 3481
Joined: Tue Sep 25, 2007 9:06 am

Post » Mon Jun 18, 2012 10:34 am

After adding room boxes and portals I'm still having the problem. I went back to an older version of the mod before I added the boxes and portals and now I can get some lights with shadows working. However the light I wanted to use FarmInteriorFireLight01 is still RED. I've tried everything I can think of but I still can not get that one light to work.

So now I'm thinking I've somehow bugged out that one light since I can get others with shadow to work.

Hopefully someone will find a fix for this soon. Till then If you can't get lights with shadows to work try removing them all from your cell, save, reload. Then try to add a different light that has shadows instead. Not the best solution but hopefully it'll help someone.

Edit: Now it seems that it's back to all shadow lights not working. GRRR
User avatar
Erich Lendermon
 
Posts: 3322
Joined: Sat Nov 03, 2007 4:20 pm

Post » Mon Jun 18, 2012 9:47 am

God, topics get lost fast on this forum. Mostly for archive and FYI purposes, I'll quote what I posted on another similar thread, since it's useful:

Something I realised on closer reading of the Optimization article is that there's actually a very good way of debugging the number of lights you have:

The number of lights in a space affects performance as well. Try not let any object be lit my more than two lights. You can get a feel for how many references a light affects by toggling the "L" hotkey. You can also look for lighting issues in a space by right clicking in the render window and selecting "Render Window Properties". Go to the "Shaders" tab and check the box that says "# of lights". Fig 7.3 shows an example space that has too many lights. The colors represent the number of lights hitting a each reference. Green represents an unlit piece and red means there are too many lights on a piece and performance issues are likely. It is good practice to make sure nothing shows up red when lighting your dungeon.


The thing is that the problem isn't just the number of lights in a room, but it's also compounded by large objects - in the case of a large cave, or a large castle etc. you run the trouble of having one object receiving too many lights, which is the main part of the problem. The game doesn't actually care how many lights there are in a given room - merely how many lights each object is lit by (which are added up by the shader during the draw call). That would normally be a pain in the neck, but the debug shader actually works really well :wink:

Of course, don't forget that shadowed lights are a special case (I'm guessing there's only a fixed amount of buffers for drawing shadows, which get distributed amidst the visible shadowed omnis. Those you do actually need to hide, so you can't see more than four at a time.

Hope that helps!
User avatar
FoReVeR_Me_N
 
Posts: 3556
Joined: Wed Sep 05, 2007 8:25 pm

Post » Mon Jun 18, 2012 12:24 pm

Thanks for the information. Sadly it doesn't help the red light problem. I don't have too many lights in my cell now, in fact I've tried removing every light from the cell saving the mod closing the kit and reloading it. I STILL can't get any lights with shadows to work.

I've finished everything else for the mod and spent almost the entire day yesterday searching for any possible fix for the lights. I think I'm just going to give up and release it as is, hopefully I'll be able to go back later and fix the lights.

At least I've learned something for my future mods from all the problems I've had with this. TI'm so glad I decided to do a small house mod to get a feel for the new CK. I would have hated to find this out after I'd gotten a lot of work done on a big quest mod. :wallbash:
User avatar
Timara White
 
Posts: 3464
Joined: Mon Aug 27, 2007 7:39 am


Return to V - Skyrim