Idea For Static dynamic Lighting In Maps

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

Moderator: GZDoom Developers

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: Idea For Static dynamic Lighting In Maps

Post by Graf Zahl »

You need to rebuild nodes already when doing that so the answer would be 'no' anyway.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Idea For Static dynamic Lighting In Maps

Post by Nash »

Generally the lightmaps will remain validated as long as the map nodes don't get rebuilt. So texture changes, changing sector fog or lighting, even adding or deleting new items/monsters, is fine.

But anything involving geometrical changes (changing a floor or ceiling height, moving a vertex, adding new sectors) will invalidate the lightmap.
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: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

Nash wrote:Generally the lightmaps will remain validated as long as the map nodes don't get rebuilt. So texture changes, changing sector fog or lighting, even adding or deleting new items/monsters, is fine.

But anything involving geometrical changes (changing a floor or ceiling height, moving a vertex, adding new sectors) will invalidate the lightmap.
thanks nash,
that's what i was thinking as a 3d floor / 3d water sector only requires a tag from a separate sector outside of the map that can be placed before the light baking process.
i could just add the tag number to the sectors after the baking process is done and then save the map, as no geometry changes would be needed. :)
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: Idea For Static dynamic Lighting In Maps

Post by Graf Zahl »

Not really. Adding a 3D floor alters geometry, so your lightmap will not be correct anymore afterward.
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: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

Graf Zahl wrote:Not really. Adding a 3D floor alters geometry, so your lightmap will not be correct anymore afterward.
sorry for any confusion, ill explain it a little better.

with the test map built and before any light baking is to be done.
i would have a empty pond (hole in the ground) and then i would make a sector outside of the playable area of the map to be my 3d water sector that you can swim in with the water textures applied to it.
once this is done i can then set up the tag numbers for the sectors so the 3d water appears and plays correct.
once that stage is done i can then remove the 3d floor tag number so the 3d water disappears.
then i would let ZDray render the lightmaps to the level's geometry and after the lightmaps have been completed. i would then add that 3d sector floor tag number back in so the 3d water would appear again in the pond.

so no vertices on the map will be adjusted prior to and after baking the lighting. only a tag number

i know it wont look 100% correct but i was just checking to see if the 3d transparent water sectors can actually be added back into the level after the light baking stage by re-applying the tag number to the 3d sector.
by the sounds of what nash has described i can apply the 3d water as no map geometry / vertices will need to be altered as everything is setup prior to lightmap baking.
unless there is something else that i am missing as i don't know anything when it comes to how node building works. :)
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: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

Question,
i watched the new video that Nash made on his you tube channel explaining the lightmap baking process which is at the 13:20 mark in the video
Spoiler:
and Nash mentioned that the ray tracer will use and benefit from rtx cards,
but if you don't have an rtx card the program will fall back and still work using a standard gpu.
and this is where i have gotten confused Nash mentioned that if you don't have vulkan enabled hardware, zdray can fall back to cpu rendering.
so since i only have a gtx1080 (non vulkan hardware) my question is will the zdray still use my gpu to bake lightmaps or will it revert to cpu rendering?
or will i be able to install the vulkan driver support from nvidia so zdray can use my gpu? https://developer.nvidia.com/vulkan-driver
cheers.
dpJudas
 
 
Posts: 3040
Joined: Sat May 28, 2016 1:01 pm

Re: Idea For Static dynamic Lighting In Maps

Post by dpJudas »

The gtx1080 supports vulkan, including the ray tracing extensions. So it will use your GPU for the tracing - it will just be slower due to not having any RTX cores.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Idea For Static dynamic Lighting In Maps

Post by Nash »

Moreover, I've generally underestimated CPU baking, after some actual tests, it's not really that slow, at least for normally-made maps (no abuse of sectors or amount of lights).

However there were some bugs with it the last time I tested (disco lights) - maybe it has already been fixed? I haven't kept up to date with development stuff myself as right after I uploaded that video, I have been busy with IRL stuff and haven't been able to put too much time into game development. Should have more free time by January.
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: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

thanks for the reply's dpjudas and nash.
sounds good :)
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: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

Question - will it be possible for a custom fragment shader to have access to the lightmap texture so i can alter it's values in game / real time?
cheers.
Post Reply

Return to “Feature Suggestions [GZDoom]”