[x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Issue

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Issue

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by _mental_ » Tue Apr 24, 2018 1:29 pm

Yes, something like that. Radii are integers internally though.

There is a better solution: 'lightsizefactor 0.667' on top of GLDEFS.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Nash » Tue Apr 24, 2018 1:11 pm

_mental_ wrote:Multiply size and secondarySize by 2/3. This should be done for all lights that have no attenuate property or it is set to non-zero value.
Care to clarify? Does that mean a size of 64 should be edited to be 38.4? (64 * (2 / 3))

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Graf Zahl » Wed Apr 18, 2018 11:32 pm

We cannot test and debug screenshots. If you want something checked, post a map or a link to a map.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Xane123 » Wed Apr 18, 2018 4:17 pm

Not to add a potential second dynamic light bug, but is this related to this oddity where dynamic lights only light linedefs facing directly west or east but not diagonal or any other orientation?
inconsistent_lights.jpg
This was taken on commit 35596dbbc44713c9ab9521f0d044f1d9b0cb0397 and many commits are after this, so I don't know if this bug still exists, whether it is related to this or not.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Graf Zahl » Wed Apr 18, 2018 1:48 pm

To ease transition I'll add a LightSizeFactor that will apply to all following lights in a definition file. That'll mean you will only have to add one line at the top instead of changing every single light.

My reason for not keeping the bogus code is that it creates inconsistencies. It's only attached attenuated lights that are affected so it won't behave properly if the light was manipulated externally. The past has clearly shown that every bit of inconsistent behavior will inevitably cause problems and in the end still need a workaround so that it can be used in a reliable fashion.
Not again!

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by _mental_ » Wed Apr 18, 2018 9:33 am

Multiply size and secondarySize by 2/3. This should be done for all lights that have no attenuate property or it is set to non-zero value.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Xaser » Wed Apr 18, 2018 8:38 am

For people who have in-progress maps that rely on the broken method, what exactly are the steps required to preserve the look after the fix is made (e.g. the OP)?

[Before someone asks: I don't have any said maps myself. Just advocating.]

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Graf Zahl » Wed Apr 18, 2018 7:19 am

One year or not, I am not willing to keep the broken setting as a default. I'll do what I can to keep this stuff working, but as it stands, the lights worked differently on GL2 and GL3 so in many cases it's hard to tell what was wanted.

But like I said, every time when it was decided to keep the broken way as a default, the problems just kept piling up. You can go back to 1998 and see many of such things. It was the same story repeated all over each time. And the longer the bug was retained the harder it got in the end to sanitize it. No, thank you!

I'm on vacation for the next 4 days but I'll see that I can get something working this evening to help mitigate the issue without retaining the bug. That said, I think we really need a MAPINFO versioning system for the future so that mods that target a version with some broken feature can be auto-corrected later, if things need to change.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Rachael » Wed Apr 18, 2018 6:46 am

A whole year of stuff is a lot to account for... especially given that this is one of the more active development years considering dpJudas's numerous contributions over that time span, which I am sure has spurred a lot of work on mod author's sides.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Graf Zahl » Wed Apr 18, 2018 6:43 am

Well, every single time that a bug was retained because 'that's how things worked for too long' in the end the problems far outweighed the benefits.
Additionally, all the internal lights have been done with the proper handling.

So no, I will not keep this stuff in. What we can do is to provide an automatic compatibility handling based on a lump's hash and an optional per-lump scaling factor, so that fixing a broken setup amounts to only adding one line to the definitions.
Moreover, the bug manifests itself only as a bug on GL3 and GL4, but on GL2 worked as intended. So we cannot even assume that anything made over the last year wants this.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Rachael » Wed Apr 18, 2018 6:05 am

Well - considering the light shrinking has been around in official releases since attenuated lights were first introduced (AFAIK no release ever had it without the shrinking)... wouldn't it make sense to have them work as much as possible "how they used to" from an end-user's point of view?

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by _mental_ » Wed Apr 18, 2018 5:41 am

What should we do then? With exception of leaving everything as is, a compatibility setting can be added to handle this.
It will be solely on user's discretion to enable it though. I see no means to detect oversized light definitions reliably.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by Graf Zahl » Wed Apr 18, 2018 4:11 am

Shit!

As it is very obvious, that commit forgot to finalize its changes. The CanAttenuate function was simply forgotten.
So this means we have a gigantic problem now with some light definitions using proper sizes and others using the bad ones starting from that commit.

The code as it is now is the correct version, like it should have been - and like it had been working before that change, where the light shrinking was only done for GL 2.

Re: [x64-g3.4pre-236-gc1ce6c90ca] Another Dynamic Lights Iss

by _mental_ » Wed Apr 18, 2018 4:00 am

I have no idea how it should work indeed. All I know, it's being like that for a while.

Top