Facepunch / garrysmod-issues

Garry's Mod issue tracker
136 stars 56 forks source link

Weird props lighting #4649

Open VanderAGSN opened 3 years ago

VanderAGSN commented 3 years ago

I don't know if anyone noticed it. But it does look very weird. I give an example of 3 videos on how the explosion from a grenade or rpg / or light tool can affect the lighting of props. It's very unrealistic. The same goes for the flashlight. In multiplayer it's very easy to check if you watch as the second player flashlight on the prop - it is also all lit up. Especially large props are covered literally everything on them. I think this bug occurs with all types of lighting in the game

It's also quite easy to reproduce a bugs, especially with a flashlight. You need 2 players. One will look at the prop with flashlight, while the second player will watch over the first. The prop will be fully illuminated. Even easier - you can set thirdperson, and this bug will occur even in singleplayer I hope. The rest of the bug can be reproduced by watching the video

This bug occurs on all versions (dev/x86-64/none/chromium)

So, here are a few links to the video where bug is fully demonstrated on different maps:

https://www.youtube.com/watch?v=nD2dkMZ9tHI https://www.youtube.com/watch?v=DM9kVfT7gno https://www.youtube.com/watch?v=n6g-pZ9gC5o

ZakharYA commented 3 years ago

I will add: https://youtu.be/jXCvG8TWVDo

MeteorTheLizard commented 3 years ago

Not a bug. That's just how lighting works in the source engine. One of the maps was a CS:GO map which makes use of displacements which you could compare to a prop. Brushes are lighted differently than objects within the world. If I remember correctly then this was done to save computational power since dynamic lights used to be VERY expensive back in the day. They still are, but PCs can handle them much easier.

VanderAGSN commented 3 years ago

Have you figured out yet that in other Source Engine games props are not highlighted by a grenade explosion / rpg etc?

VanderAGSN commented 3 years ago

https://www.youtube.com/watch?v=bKN1_MZa1FU - gmod https://www.youtube.com/watch?v=lbi4RGME8X8 - hl2

UPD: Here's some more comparisons: https://www.youtube.com/watch?v=nD2dkMZ9tHI - gmod https://www.youtube.com/watch?v=Q1nsT0Bqxd0 - hl2

It is not normal when props are flashed by a explosion. The same applies to light. Props should not be highlighted completely. I don't remember exactly when this bug appeared in gmod, but it wasn't there until a certain time

VanderAGSN commented 3 years ago

Well, I probably found the reason.. For some reason props are highlighted by light / rpg etc if they don't have $bumpmap texture. When it's there - the prop behaves normally. https://www.youtube.com/watch?v=8vvUNpNhUY4

robotboy655 commented 3 years ago

They are not highlighted in other games because in other games grenade explosions do not produce actual dynamic light at all, which we can obviously make happen in GMod but it won't fix other sources of the issue. You can disable explosion dynamic light with explosion_dlight 0 command

VanderAGSN commented 3 years ago

Check this video please, https://www.youtube.com/watch?v=8vvUNpNhUY4 Is it possible to fix it based on fact that the prop with $bumpmap work with light normally?

robotboy655 commented 3 years ago

That makes it a lot harder to debug or fix.

MARK2580 commented 3 years ago

That makes it a lot harder to debug or fix.

The most interesting thing is that we found a build of gmod for 2011, there is the same error! It looks like it has been around for a very long time. But this is exactly a mistake because for example in hl2 this does not happen.

Protocol version 17
Exe version 1.0.25.0 (garrysmod)
Exe build: 11:27:17 Jun 30 2011 (4617) (4000)

unknown

Kefta commented 3 years ago

Have you tried old HL2 builds (off the release disk)? This may just be something that are fixed by new shaders in the post-Steampipe branch.

VanderAGSN commented 3 years ago

Technically that's difficult to verify, cause in half-life 2 there's no and was no dynamic lighting from the explosion of rpg / grenades and other things. Whatever it was - with $bumpmap in garrys mod this old bug does not appear. But the disadvantage of props with $bumpmap is that vertexlit lighting is disabled on them. Perhaps the easiest (or not) solution would be to add support for vertexlit with $bumpmap, which can be seen in CS:GO. There props can be vertexlit with $bumpmap simultaneously

robotboy655 commented 3 years ago

It probably happens in hl2 too, you should try it with light_dynamic in a map.

MARK2580 commented 3 years ago

It probably happens in hl2 too, you should try it with light_dynamic in a map.

it looks like it is, but you still need some kind of "crutch". dynamic lighting is used a lot in gmod. https://youtu.be/Qw1TA2jK4gk

Vuthakral commented 10 months ago

This issue has been bothering me for a long time, I just wanted to come in and bring up that it seems to be specific to hammer entities and not anything else. On the left side in the video below is a bush model which is a prop_static, on the right side is the same model spawned in via the ingame spawn menu. You can see the issue is present on the prop_static bush, but not the one spawned in. This is especially evident on maps such as gm_bigisland which employ many static props for greenery across the map.

https://github.com/Facepunch/garrysmod-issues/assets/4466200/d2848f3f-5c54-40dc-ba08-d1662318fc8a

I hope this is something that is fixable, because it makes my eyes bleed that having any kind of dlight at all will cause this to happen.