ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.69k stars 1.99k forks source link

Direct light from light_environment not reaching #523

Closed crystallize1 closed 2 years ago

crystallize1 commented 2 years ago

There is a strange case in HL2 on coast03 map when sunlight is supposed to reach right through the window (house at the very beginning of the map) and light up the wall inside but for some reason it does not. Valve even put light entity in there to sorta make it look like it does. Last year Unkle Mike (Xash3D coder) said that there is definitely a bug in areaportal processing in VBSP: map leaves are being grouped by various conditions but grouping by areaportal-defined areas is not done at the very last moment (as it is supposed to be because of areaportal nature) but accidentally, whenever map parser encounter areaportal entity in a map file. Uncle Mike said that this bug would cause visibility flicker and it is also possible to be the cause for a bug with direct light.

Pinsplash commented 2 years ago

That is evidently not the case. I'm going to assume you're talking about the hole in the roof, because even though you called it a window, it's the only opening in the building to have an extra light entity. (Aside from the completely standard func_illusionary's with light-emitting textures.)

In that case, VRAD is working exactly as intended. The sunlight is indeed there in the room, it's just that the hole is relatively small. You can spot the place on the wall where the actual sunlight hits - it's practically the brightest spot in the room. The reason it doesn't spread out like how the light_spot does is because sunlight is basically emitted orthographically and all other light in the world comes from actual tangible points.

image

crystallize1 commented 2 years ago

@Pinsplash My concern was a spot of light to the left. In HL2: Update it's broken and don't show up so creator put a light there instead, I thought it was faithful representation.

crystallize1 commented 2 years ago

So this issue can be specific for Source 2007.