Page 1 of 1

Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Fri Oct 07, 2016 12:42
by Batandy
Hey guys,

I've recently updated to the newest dev build, and i've noticed that dynamic lights are now different, they look better, but there are some problems with wads that heavily relied on them

In my case, i'm using tons of dynamic lights in Golden Souls 2
Image
This is what it looked like before 2.3 builds
Image
This is what it looks like now, small light spots instead of the whole area being lit

Image
2.3 also totally broke how subtractive lights worked in some of my maps, i used them to create pitch black death pits

Is there any way i can fix this?

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Fri Oct 07, 2016 14:09
by dpJudas
Hmm, that's a problem. Maybe we need some parameter on lights controlling if they should use point light math instead of plain attenuation, and then specify that for all the lights in lights.pk3?

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Fri Oct 07, 2016 14:43
by Graf Zahl
This was to be expected. It really needs to be a property of the actual lights, not of the user settings. I let it out as it is for the sole reason to see if a report like this came back.

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Fri Oct 07, 2016 14:49
by Batandy
Wouldn't it be possible to revert them back and then add an actor flag to enable the new version so the mapper can control how the dynamic light actually works?

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Fri Oct 07, 2016 15:13
by dpJudas
Graf Zahl wrote:This was to be expected. It really needs to be a property of the actual lights, not of the user settings. I let it out as it is for the sole reason to see if a report like this came back.
I meant a property of the light source, not an user setting. Likewise, for later on, the specular part should be a property of the material.

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Mon Oct 10, 2016 19:25
by Nash
If all the vanilla lights in lights.pk3 are set to use the old attenuation in their properties, then wouldn't that mean the new point light math will never be seen, even if new light rendering has been activated? Unless a separate "lights (point light math).pk3" is provided (and guaranteed to break the light design of existing maps)? :S

I really like the new point lights though, it really does look more "physically" correct (I checked the lighting effects in other game engines, in Blender, and also in real-life in my dark room at night ;D). Just have to remember to not position my light sources too close to surfaces to get the correct illumination I need.

It is unfortunate that maps for the past decade have been designed with lights that are technically completely wrong in how they illuminate the scene, in the first place...

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Mon Oct 10, 2016 19:53
by Graf Zahl
The main problem is not the attached lights in lights.pk3 but map placed lights which are often used to define a map's lighting.
These need two types: Classic and Attenuated.

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Mon Oct 10, 2016 21:05
by Gez
There are already three flags that affect the behavior of dynamic lights, a fourth could easily be added. I guess they should be classic by default, for backward compatibility, so presence of the flag would make them attenuated.

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Mon Oct 10, 2016 22:47
by Graf Zahl
I do not think that any special handling for attached light is needed. They should always be attenuated.
Like I said, it only becomes a problem if dynamic light objects are used to create the actual lighting of the map. For those things are different and attenuation may actually look worse because it severely changes how these affect the map.

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Fri Mar 17, 2017 14:36
by Batandy
Uh, sorry if i bump this thread, but i think the issue is relevant again, since i the lights were reverted to the old ones for a while and now the new dynamic lights are back in the gzdoom-x64-2.5pre-73-g309d086 build.
Like before, that totally breaks them in my stuff, has there been a update regarding being able to choose how the light gets rendered? Cause at the moment i'm forced to work with older builds because of this

Re: Question about dynamic lights in gzdoom-g2.3pre-176-gfc246be

Posted: Fri Mar 17, 2017 15:38
by Graf Zahl
There shouldn't be any change. I copied some code around in the last few days maybe something went wrong while doing that.