Potential SDK Lighting/Shadow Bug?

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

SpoolsOfWar

FNG / Fresh Meat
Mar 31, 2016
32
0
0
Hey all, I've noticed something strange cropping up regarding lighting/shadows on some objects when viewed from certain distances in the SDK/Editor Preview. Everything was working perfectly fine before the 5GB release update, so none of my settings have been changed to cause this as far as I know. Would be interested to see if this is affecting anyone else before I submit a report.

Basically this is how the scene should be lit, pay attention to the barrels, boxes on the right and top ventilation pipe at the back.
https://postimg.org/image/ts3pw7aex/

Now, if you move back a couple of steps, the lighting on said objects sort of fades away and they lose their shine, even though the lights have not been culled and everything should be just as it was.
https://postimg.org/image/gp83cxk6x/

It's much easier and more blatant in real time, so please check it out for yourselves if these screenshots aren't doing it for you! It happens in every map I've checked so far, Biotics Lab was just one of the most noticeable. The strange thing is, everything works fine running the official maps in-game, so this just seems to be an SDK issue.
 
Last edited:

LiquidArrow

Member
Apr 20, 2015
554
8
18
I am seeing weird lighting issues as well with shadows making zeds appearing to "pop in" at distances. This is very noticeable on my HorzineExpress map because of the distance change with the moving spotlights.

There is definitely something going on with this update and the lighting.

Here is an example of it in action: https://gfycat.com/DeadlyUnfoldedCrocodileskink
 
Last edited:

SpoolsOfWar

FNG / Fresh Meat
Mar 31, 2016
32
0
0
LiquidArrow;n2278632 said:
I am seeing weird lighting issues as well with shadows making zeds appearing to "pop in" at distances. This is very noticeable on my HorzineExpress map because of the distance change with the moving spotlights.

There is definitely something going on with this update and the lighting.

Here is an example of it in action: https://gfycat.com/DeadlyUnfoldedCrocodileskink
Glad it's not just me!
Does it still happen for you if you run the map outside of the SDK in the main game? That seems to make everything function like normal on my end, so I'm thinking some values on the SDK side of things got tweaked by accident.
 

KillMaster

Member
Jun 16, 2014
175
21
18
26
Saskatchewan, Canada
@ SpoolsOfWar

From what I can gather from your examples it looks to me like it has to do with the meshes LOD's. By that I mean the meshes UV's aren't lining up perfectly with the lower resolution model and are skewing the shadow map

Fixing such a problem would likely involve redoing the objects UV's and/or tweaking the LOD models/s in order to reduce UV stretching as much as possible. However with how aggressively TW drops poly count on their meshes there may be little they can do to address the issue.

@ LiquidArrow

What you're seeing looks to be related to LOD's as well (although I'm not totally sure on this one).
What could be happening is when the model drops to a lower LOD the material is also swapped for a much simpler one with less instructions (TW does this with foliage most notably grass), and as a result the new material may have some issues interacting with different lighting conditions thus the complete lack of lighting after a certain distance.
 
Last edited:

SpoolsOfWar

FNG / Fresh Meat
Mar 31, 2016
32
0
0
KillMaster;n2278730 said:
@ SpoolsOfWar

From what I can gather from your examples it looks to me like it has to do with the meshes LOD's. By that I mean the meshes UV's aren't lining up perfectly with the lower resolution model and are skewing the shadow map

Fixing such a problem would likely involve redoing the objects UV's and/or tweaking the LOD models/s in order to reduce UV stretching as much as possible. However with how aggressively TW drops poly count on their meshes there may be little they can do to address the issue.

@ LiquidArrow

What you're seeing looks to be related to LOD's as well (although I'm not totally sure on this one).
What could be happening is when the model drops to a lower LOD the material is also swapped for a much simpler one with less instructions (TW does this with foliage most notably grass), and as a result the new material may have some issues interacting with different lighting conditions thus the complete lack of lighting after a certain distance.
That sounds plausible. The real strange thing is this only affects the maps when loaded in the SDK/Preview. When running in game, these problems vanish. Have you tried loading BioticsLab and going to that same spot from my posts? Would love to hear if you are seeing the same stuff.

I've also checked this on 2 different PC's with differing hardware so I don't think this is just localized to me. That last patch definitely seems to have done something funky.
 

KillMaster

Member
Jun 16, 2014
175
21
18
26
Saskatchewan, Canada
The editor has a tendency to render things differently in certain cases (it doesn't happen often).
Another instance of there being a difference between Editor and Game would be when you have a lot of "Spot Lights" in the same area; on occasion your entire level can go completely white until you look away from the spot in question.
However this phenomenon is restricted to the editor and had no visual bearing on the final product.

So as long as you don't see these oddities in game I wouldn't worry too much about them.
 

SpoolsOfWar

FNG / Fresh Meat
Mar 31, 2016
32
0
0
KillMaster;n2278755 said:
The editor has a tendency to render things differently in certain cases (it doesn't happen often).
Another instance of there being a difference between Editor and Game would be when you have a lot of "Spot Lights" in the same area; on occasion your entire level can go completely white until you look away from the spot in question.
However this phenomenon is restricted to the editor and had no visual bearing on the final product.

So as long as you don't see these oddities in game I wouldn't worry too much about them.

No doubt, this one kind of sticks out to me though, kind of makes lighting a scene and judging cull distances tricky as everything flickers and such when it shouldn't. It's a real eyesore. I'd rather not have to render everything out and run it in game just to judge whether it looks as it should, when the in editor preview used to look just fine a few days ago.

I'm gonna try and gather up some more examples and submit a report, see if they are even aware of this!
 

LiquidArrow

Member
Apr 20, 2015
554
8
18
My issue is seen ingame and not only within the editor. The zeds will be blacked out at a certain distance. This is most notable on horzineexpress when they can be a good distance away.
 

LiquidArrow

Member
Apr 20, 2015
554
8
18
I want to add an update to this. It is the transparency of objects/zeds that is causing this issue.

If at a certain distance said zed/object will become transparent and if there is no light/black material behind them then the said object will seem to dissapear. This is why all the lighting issues with what seems to be weird occlusion is happening:

I have made test maps showing this issue without and with fog so its very apperent and clear as to what is happening both ingame and in the SDK:
https://dl.dropboxusercontent.com/u/9933676/KF-Issue_LODUnlit_Transparency_FOG.kfm
https://dl.dropboxusercontent.com/u/9933676/KF-Issue_LODUnlit_Transparency_NOFOG.kfm