Jump to content

Question: how to increase max number of light sources?


burpleronnie

Recommended Posts

I'm having a problem with my torch turning off every now and then when running through dungeons.

 

Currently using Enhanced lighting and effects and dynamic shadowed torch and magelight mods.

So i'm guessing the EL mod is adding too many light sources and its hitting a cap.

 

I have heard somewhere there is cap on the number of either light sources or dynamicly shadowed light sources.

 

My assumption is that if there is a cap then it should be easy to change the value it is capped at.

 

 

if anyone could point me in the right direction of what this value is that would be awesome. thanks.

Link to comment
Share on other sites

It's not easy to change the max lights cap. I'm not aware of anyone who has managed to do it.

 

As far as I'm aware you can only have 4 lights affecting a single nif (object) and only 4 shadow lights total, in a single cell.

 

These caps are hard coded in the engine I think.

Edited by mrpdean
Link to comment
Share on other sites

sounds like changing it is a bit beyond my level of expertise then. cheers for the info.

 

any idea if you can set priority for which lights to keep running?

 

so for example, if i enter a scene with four dynamic lights and whip out my torch, one of the other lights in the room goes out and the torch is always lit.

 

it seems also that when there are too many dynamic lights, instead of just turning off the shadows they cast, the engine turns the lights off altogether. Could it not just replace those lights with non shadow casting ones whilst the conflict has occurred?

 

Edit: what about determining which lights are dynamic based on light radius or brightness?

 

or is that just too much coding here for one amateur to do?

Edited by burpleronnie
Link to comment
Share on other sites

The engine isn't really turning off the lights. It's more that the shaders bethesda made were only written to calculate lighting from a maximum of 4 light sources. Some say its a max of 3, but I think its 4. Anyway, it's one of those.

 

So if there are more then 4 lights affecting an object (meaning the radius of the light overlaps the object) then the engine has to choose which 4 lights to pass into the shader and it appears to select the 4 lights that are closest to the player. At least that's how I think it's choosing, from my own observations.

 

So whilst it's possible to write new shaders which could calculate lighting from more light source, the problem is that the engine would still only pass in a max of 4 lights to the shader. You would also need to "hack" the engine to pass in more lights, which is not allowed, not to mention it would be very difficult.

 

No way of prioritising lights either I'm afraid. At least not globally. You would have to mod each dungeon that needed fixing, using a similar method to this: http://www.nexusmods.com/skyrim/mods/10361/?

 

Unfortunately there doesn't seem to be any light properties exposed in Papyrus so all you can do via scripts is enable/disable them. Can't adjust (or even read) colours, radius, intensity etc. Would be great if we could though. Not sure it it's something that the SKSE guys could implement. Maybe.

Edited by mrpdean
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...