Jump to content

Mod Idea for solving Skyrim notorius number of light source limitation in the engine aka flickering/poping lights issue


papachasama

Recommended Posts

Hey all,

First of all:

I have been messing around to make my heavily modded skyrim even look better for some time.

I am good at modifying mods through TES5Edit, Creation Kit, Photoshop etc.

But never created a MCM menu enabled script base mod.

 

(Well once actually, but modified the original script of a existing mod)

So I am passing this idea to community.


In-game light issue:

It is all about fShadowDistance.

 

This determines the radius that shadows drawn from light sources outside.

 

fInteriorShadowDistance, determines indoors.

 

You can keep fInteriorShadowDistance and fShadowDistance low to prevent the issue from happening.

 

Lowering fInteriorShadowDistance does not have much disadvantages.

 

However when you lower fShadowDistance, you have a trade-off, during night-time it solves flickering lights issue but during day-time you end up lower the radius that shadows drawn from trees and other objects.

 

Which breaks immersion since it will make distant trees, objects look unrealistic.

 

For example, you are in a forest and ground at distant tree areas (not lods but closer ones) are light due to no shadows drawn, which makes them look like lods.

 

 

The idea:

 

Script mod that changes the value depending on the time of the day.

 

During daytime where there is only one light source, sun:

 

setting the fShadowDistance high and also fFlickeringLightDistance (I am not sure it is necessary but I think it is, this has to be a little bit higher than fShadowDistance from my experience)

 

The number depends on the rig of the user, therefore user should input it in-game from MCM, doing trials and errors for best setting for their rig.

 

During night time where there are many light sources:

 

setting the fShadowDistance to low and also fFlickeringLightDistance

 

The function to set ini variables in-game through Papyrus is I guess:

Utility.SetINIFloat("fRandomSetting:CoolSettings", 10.0)

at http://www.creationkit.com/SetINIFloat_-_Utility

 

Well I do not know if it will work, meaning will the engine pass the new setting to the mechanism that draws shadows live ? and therefore we see the update ingame,

 

but I think it will worth a try considering this is a very easy to make mod.

 

I will try to do a non MCM version just for my self, but anybody up for the challenge, good luck, just let me know if you do it.

 

Cheers

Edited by papachasama
Link to comment
Share on other sites

Actually it kinda works,

 

the only problem is when the ini change happens, on dusk and dawn, you need to go into another cell that requires loading, like going into whiterun or going into a house and out, for shadow engine to take into account the new value set by script

 

Here is the script if anyone is interested, it sets it to 7700 during day, 3400 during night:

Scriptname FixShadows extends Quest
Actor Property PlayerRef  Auto

Event OnInit()
    RegisterForUpdate(14.0)
EndEvent

Event OnUpdate()
    float Time = Utility.GetCurrentGameTime()
    Time -= Math.Floor(Time)
    Time *= 24
    Int Hour = (Time as Int)
    if Hour > 7
        if Hour < 17
            Utility.SetINIFloat("fShadowDistance:Display", 7700.0)
        Else
            Utility.SetINIFloat("fShadowDistance:Display", 3400.0)
        endif
    else
        Utility.SetINIFloat("fShadowDistance:Display", 3400.0)
    endif
EndEvent
Edited by papachasama
Link to comment
Share on other sites

I dont think so, unless you modify the engine,

 

But your problem is different than this, indoor flicking/poping lights can be solved by reducing fInteriorShadowDistance, or just opening the mod and remove unnecessary light sources.

 

This is for outdoors

Link to comment
Share on other sites

  • Recently Browsing   0 members

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