More flags for Dynamic Lights

Like feature suggestions, but you've actually written code to make it happen. More likely to make it into the game than some random request in feature suggestions.

Moderator: GZDoom Developers

Forum rules
Please see Code submission guidelines

GZDoom Status:
Image

Legacy Status:
Image Image

QZDoom Status:
Image

More flags for Dynamic Lights

Postby Major Cooke » Tue Dec 08, 2020 3:56 pm

I'm implementing better built models in my next mod that's soon to be announced, and I'd like to give them a dynamic light that doesn't light up the world, and in some cases, only affects the owner of the light itself. This way it can show off the different details without lighting up the world or other actors around it. But having a flag that affects actors without goemetry would be nice too.

EDIT:

Pull Request

- DontLightOthers: The inverse of DontLightSelf.
- DontLightMap: Doesn't light map terrain, but still allows for actors to be lit.
Last edited by Major Cooke on Sat Dec 19, 2020 11:59 am, edited 2 times in total.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Actors/Owner Only flag for Dynamic Lights

Postby Caligari87 » Tue Dec 08, 2020 4:14 pm

+1, this seems like a useful case. Models especially often require dynlights to look good, but adding too many can negatively affect level rendering performance. Seems that lights which only light the actor could save a lot of cycles if they don't need to link to level geometry.

Relatedly gonna signal-boost an old feature request of my own since it would fulfill both this use case (excluding all level geometry) and others (fake shadows, wall bleedthrough, un-light certain actors, etc).

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: Actors/Owner Only flag for Dynamic Lights

Postby Marisa Kirisame » Thu Dec 10, 2020 8:53 am

Hm, this kind of thing reminds me of the bSpecialLit flag UE1 had for stuff like this. Most of its uses were to have individual pieces of world geometry lit only by certain lights. It would be very useful for some effects, yeah.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Actors/Owner Only flag for Dynamic Lights

Postby Major Cooke » Thu Dec 17, 2020 11:50 am

Added a PR to the first post. It was surprisingly easy to implement.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Actors/Owner Only flag for Dynamic Lights

Postby Major Cooke » Thu Dec 17, 2020 3:30 pm

Caligari87 wrote:Seems that lights which only light the actor could save a lot of cycles if they don't need to link to level geometry.


It still has to link to the map's light node list. Without that, it cannot light up actors at all, or appropriately clip behind level geometry. But the processing of lights skips any of the lights with DontLightMap so hopefully lights like these will have a greatly reduced impact.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Code Submissions

Who is online

Users browsing this forum: No registered users and 0 guests