OldUnreal / UnrealTournamentPatches

Other
941 stars 27 forks source link

[469a] Bug or not? Coronas behavior in editor is different from in game #100

Open zero-khan opened 3 years ago

zero-khan commented 3 years ago

There is no way to set max corona size. in Unreal 2 there is such option, but in UT there isn't.

If I set lightradius to 8 in editor, I can see that the corona is rendered within the radius of 8 units. Move farther than 8 units and the corona isn't rendered anymore. But in game this is not what happens. In game the corona is rendered at any distance unless you move behind a wall. If you get close to the corona and then move away from it, it's still rendered beyond 8 units. Move behind a wall and the corona fades and you have to move close to it again to see it.

Doesn't seem to depend on what render you are using.

stijn-volckaert commented 3 years ago

Could you check if this still happens in 469b? For me, the corona behavior in UEd seems consistent with the in-game behavior. There are two caveats, however:

1) In UEd, coronas will only render/update when the viewport is set to realtime rendering (i.e., joystick enabled) 2) In UEd, coronas start with an initial brightness of 100%, whereas in game, they fade in from 5% brightness to 100% brightness over ~300ms.

SteadZ commented 3 years ago

I have been experiencing this same issue recently whilst working on a level in the 469b editor.

(in-game) regardless of the set lightradius, the corona is still shown until the view is cut off by geometry, but doesn't reappear until it is within range of the lightradius - as stated in the OP.

(in-editor) the rendering of coronas also seems to be a little buggy, the corona is also shown beyond the set radius here too, but seems to randomly flicker in and out of view as you move further away.

Also as stated in OP, this behaviour seems to be the same across renderers.

For reference, my specs:

OS: Windows 10, 64-bit Processor: Intel Core i5-8250u CPU @ 1.60GHz RAM: 32GB Graphics: Intel UHD Graphics 620 (integrated)

SeriousBuggie commented 2 months ago

Not see any dependency between lightradius and how drawn corona in game or editor. However corona drawn not consistent, and depends from camera position. It not related to distance, more likely related to level geometry and how constructed BSP . I use for test CTF-Face. If I change lightradius - it not change anything.

In editor (d3d11):

https://github.com/OldUnreal/UnrealTournamentPatches/assets/70026933/897c481e-a704-4352-8259-2cf728dc0078

In game (d3d11):

https://github.com/OldUnreal/UnrealTournamentPatches/assets/70026933/a5c669a2-2da5-43f5-8407-350646c163a0

Difference between editor and game:

SeriousBuggie commented 2 months ago

I be wrong. It affected by lightradious, but for see changes, need full rebuild.

For corona added into coronas list, camera must be in permeating leaf. If this leaf not marked as permeating, there no any checks for coronas, so no any coronas added into the list. This done for performance reasons, for avoid trace corona for determine visibility.

In game coronas list preserved and managed. When in editor it build from scratch each time. It is desired behavior explicitly added in the code.

SeriousBuggie commented 2 months ago

So for answer OP - it by design, at least partially. Game add coronas into the list and manage same list in time, for make it fade. But as side effect, coronas goes be visible outside lightradius, until not hide behind geometry. When in editor this list wipe out on each frame, and every new frame start from scratch. So only you out from lightradus - it gone.

However not sure about distance part. possible corona must fade out if camera out of lightradius too.