Change Dynamic Light Source Radius Size

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Change Dynamic Light Source Radius Size

Post by Steve5563 »

hi there,
Is it possible to add the option to change the light source radius size and intensity for dynamic lights this would be a nice addition for levels being built with dynamic lights combined with PBR textures for fine tuning the look of the area in the map.
here is an example of what i am referring to @ 10:25min in the video linked here: https://www.youtube.com/watch?v=2UowdJetXwA&t=1405s
Last edited by Steve5563 on Fri Oct 30, 2020 10:14 am, edited 1 time in total.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Change Dynamic Light Source Radius Size

Post by Caligari87 »

Dynamic lights have a radius size already. It's sometimes called "intensity" in the editor but it's really the radius of the light influence.

(If you're asking for an engine feature to change the radius of existing lights, then no. Such a feature once existed, but was removed because the light intensity/brightness/etc is controlled by the mapper to best fit their artistic vision.)

8-)
User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Re: Change Dynamic Light Source Radius Size

Post by Steve5563 »

im referring to the specular reflection size and intensity when using PBR materials not the area that the light covers that your referring to.
User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Re: Change Dynamic Light Source Radius Size

Post by Steve5563 »

please pay attention to the video i have linked, i see this feature request has already been added to the "already in the engine" which it is not.
User avatar
Redneckerz
Spotlight Team
Posts: 1052
Joined: Mon Nov 25, 2019 8:54 am
Graphics Processor: Intel (Modern GZDoom)

Re: Change Dynamic Light Source Radius Size

Post by Redneckerz »

Steve5563 wrote:please pay attention to the video i have linked, i see this feature request has already been added to the "already in the engine" which it is not.
You also saw this from Cali?
''(If you're asking for an engine feature to change the radius of existing lights, then no. Such a feature once existed, but was removed because the light intensity/brightness/etc is controlled by the mapper to best fit their artistic vision.)''
User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Re: Change Dynamic Light Source Radius Size

Post by Steve5563 »

when building maps such as doom 2 project remap , hells playground and making a liquid texture pack for doom with normal and specular maps the one thing that is a problem is when you make a map designed to use dynamic lights is you can go into the lights setting and change the intensity of the light which changes the total size of what that light covers in game, the brightness of that light is done through the color values i am aware of those settings but what i cant change is the light source diameter this is the part of the light that creates the reflection in PBR materials and currently it's set to a pin point size no matter how big you scale up the light size.
currently the "light source size" is not adjustable only the intensity is ( gzdoom builder) . in the video you will see that guy can change the "light source size" which changes the light size reflection on the texture that uses specular reflection. this adjustment happens without changing the total light coverage ( light intensity ) on the texture, only the reflection size is changed and that's what i am asking for.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Change Dynamic Light Source Radius Size

Post by Graf Zahl »

Steve5563 wrote:when building maps such as doom 2 project remap , hells playground and making a liquid texture pack for doom with normal and specular maps the one thing that is a problem is when you make a map designed to use dynamic lights is you can go into the lights setting and change the intensity of the light which changes the total size of what that light covers in game,
No, you can't, that function has been removed a long time ago.
User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Re: Change Dynamic Light Source Radius Size

Post by Steve5563 »

sorry graf, i should have explain that part more clear it was early in the morning,
the comment you have highlighted is actually talking about when your making a map in gzdoom builder and your defining the type of dynamic light that you are placing in the map. im not referring to the slider setting that used to be in the gzdoom options menu when playing the game.
i want to be able to place a light in gzdoom builder or spawn in game using scripting, and have the option to define the light "source" size, so the light reflection size you see in the specular maps can be scaled larger or smaller, i am not referring to the light intensity here.
currently in the zdoom wiki to define a dynamic light, these are the values that you currently have.
"A point light takes four arguments:
1: Red value of the light
2: Green value of the light
3: Blue value of the light
4: Intensity value of the light"
i would like to see the option to add a "light source size" with a number value that can adjust the reflection size of the light that you see in specular maps when using PBR materials.
in the video i have linked in my first post, watch from the 10:25min mark to the 10:50min mark,
you can see how the user can change the " light source radius " and when doing so, you can see that only the specular reflection in the texture changes size, and not the intensity of the light itself.
i hope that clear things up.
User avatar
Chris
Posts: 2942
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Change Dynamic Light Source Radius Size

Post by Chris »

Caligari87 wrote:(If you're asking for an engine feature to change the radius of existing lights, then no. Such a feature once existed, but was removed because the light intensity/brightness/etc is controlled by the mapper to best fit their artistic vision.)
From the sounds of it, they mean defining the size of the light in the map (either the object data, or set through scripting) to affect it's apparent size on reflective/shiny materials. Like if you have a big ball of fire flying over a metallic PBR material floor and a small candle light source, the ball of fire should have a bigger specular reflection than the small candle.

At this point in the video: https://youtu.be/2UowdJetXwA?t=628 The radius of the light source as it lights the wall doesn't change, but the light emitter's reflection on the surface grows and shrinks.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Change Dynamic Light Source Radius Size

Post by Nash »

What OP wants is separate falloff settings for a dynamic light. A legitimate, and something I sometimes run into as well - sometimes I'd want the dynamic light to "fill" a larger area, but without increasing the actual radius. This would have been achieved by setting the light to have an intense "inner strength" with a very fast falloff.

This would probably need a new dynamic light actor type, in addition to main.fp supporting it.

EDIT: it's called "source radius" in Unreal Engine 4 (see Chris' link in the post before mine)
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Change Dynamic Light Source Radius Size

Post by Caligari87 »

Now that I understand more correctly, I'm having a strong sense of deja vu, as if this has already been discussed in relation to the current state of PBR / specular material definitions. Moving back to Feature Suggestions so this doesn't get lost, but I have a feeling it'll probably end up [Duplicate] or [No] because the material system would need significant additional work to enable this kind of thing and I'm sure that's been hashed over already.

Somewhat relatedly, I think Indecom was working on a PR for more robust light falloff definition, which might have some bearing here. Unfortunately it seems that was abandoned unfinished.

8-)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Change Dynamic Light Source Radius Size

Post by Graf Zahl »

Nash wrote:What OP wants is separate falloff settings for a dynamic light. A legitimate, and something I sometimes run into as well - sometimes I'd want the dynamic light to "fill" a larger area, but without increasing the actual radius. This would have been achieved by setting the light to have an intense "inner strength" with a very fast falloff.

This would probably need a new dynamic light actor type, in addition to main.fp supporting it.

EDIT: it's called "source radius" in Unreal Engine 4 (see Chris' link in the post before mine)

The reason this isn't done is performance. Large radius light sources can be very costly to handle so a light with a strong falloff but a large radius will contribute very little for a rather large cost.
User avatar
phantombeta
Posts: 2088
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Change Dynamic Light Source Radius Size

Post by phantombeta »

I think you're all misunderstanding what the OP wants. Here's the important bit:
Steve5563 wrote:but what i cant change is the light source diameter this is the part of the light that creates the reflection in PBR materials and currently it's set to a pin point size no matter how big you scale up the light size.
currently the "light source size" is not adjustable only the intensity is ( gzdoom builder) . in the video you will see that guy can change the "light source size" which changes the light size reflection on the texture that uses specular reflection. this adjustment happens without changing the total light coverage ( light intensity ) on the texture, only the reflection size is changed and that's what i am asking for.
In clearer words: They want to use sphere lights with adjustable light source size instead of point lights. The shape and falloff of the specular reflections is different with those, and depends on that size.
This wouldn't affect radius calculations at all, and would only affect how the light proper is calculated in the shader.
Graf Zahl wrote:The reason this isn't done is performance. Large radius light sources can be very costly to handle so a light with a strong falloff but a large radius will contribute very little for a rather large cost.
If only we used something like clustered shading...
User avatar
Steve5563
Posts: 82
Joined: Sun Jan 27, 2019 11:18 pm
Operating System Version (Optional): windows 10
Graphics Processor: nVidia with Vulkan support
Location: Australia
Contact:

Re: Change Dynamic Light Source Radius Size

Post by Steve5563 »

with these lights i would expect to see a performance hit anyways so it's my job as a mapper to use these lights correctly and not to flood the players field of view with them,
i understand this as for the maps that i will be building in the near future that i will be using map geometry to my advantage to block the players line of sight for these type of reasons so the player will only see so many lights / objects on the screen at any given time for performance reasons.
the reason for this request is to correctly create the size of the specular reflection in the PBR materials.
for example,

currently a liquid type texture that uses pbr materials, you have to set the glossiness pretty low to get a decent more realistic looking size specular reflection the problem is by doing this,
the liquid texture now doesn't look wet and polished like it should, it looks very flat and unrealistic.

if you turn the glossiness up to where it should be in real life the " light source size " for the dynamic lights currently in doom are so small that you can barley see the light reflection in the water when nearby the light it self.

if you are able to make these new types of dynamic lights with the scalable "light source size" can we also have the ability to turn the "light source" off, so this particular dynamic light in the level wont create any specular reflection on the PBR materials,
this would be extremely handy for placing lights in certain areas of the map to fake diffuse bounce lighting. ( fake what ray tracing does to a certain degree ).

for example if you have sunlight coming through a window i would use a spotlight for its concentrated angled light projection coming through the window into the room, with this type of light and where it's supposed to be coming from ( the sun ) i would set a rather large "light source radius" to make the specular reflection on the PBR texture appear to be roughly the size as to what you would expect to see in real life.

from here with the light making it into the room from the spotlight that i have set up, i would then like to use "point light" or even better i would use a "attenuated sector light" to create a bounce light type of effect in this small area of the map,
the "attenuated sector light" would be placed near the surface to the texture that the spot light is illuminating from outside through the window. with this "attenuated sector light" i would actually like to have the option turn off the "light source size" or at least reduce the "light source size" so small that the specular reflection wont be visible from this particular light.

so from the players perspective the only correctly sized specular reflection that the player will see is going to be coming from the spotlight / sunlight coming through the window and not the "attenuated sector light" to create a fake bounce light effect in the given area.
this type of light would be beneficial for using them next to lava ponds and falls and even glowing green toxic textures. by having the ability to adjust this "light source radius" to create a specular reflection that appear correct in size in relation to where the light maybe coming from.
this dynamic light option would look so much better then what we have currently have to use,
it's just up to the map builder to be smart on how to use them to balance performance and visuals,
as we all know doom is still basically running on 1 cpu core so we can only work with what we have. but if we have the extra performance available in certain areas of the map why not take advantage of these types of features, might as well treat ourselves when we can. :)
Post Reply

Return to “Feature Suggestions [GZDoom]”