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
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

Re: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

wow... this feature is going to work a treat to bring the maps to life.
another question based on the issue i was having with the lighting on the sprites. are the sprites in the level able to use the lightmap info to adjust their color and brightness to sell the illusion or do they remain at the map sector brightness and color.
cheers
dpJudas
 
 
Posts: 3109
Joined: Sat May 28, 2016 1:01 pm

Re: Idea For Static dynamic Lighting In Maps

Post by dpJudas »

The sprites get light from the nearest light probe. ZDRay automatically fills the level with light probes in a grid, but you can place additional light probes yourself manually if there's some place where you feel the automatic probes aren't accurate enough.

Sector light gets added on top of the entire lightmap and probes. You can thus use the sector light as a minimum ambient light level, like how zoneinfo actors would be doing it in UE1.
Last edited by dpJudas on Sun Oct 31, 2021 6:31 pm, edited 1 time in total.
SanyaWaffles
Posts: 818
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields

Re: Idea For Static dynamic Lighting In Maps

Post by SanyaWaffles »

I'd be willing to test this out in WIGZDoom because Project Absentia makes extensive use of lighting, the only thing holding me back is UDB doesn't support it yet.
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

Re: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

dpJudas wrote:The sprites get light from the nearest light probe. ZDRay automatically fills the level with light probes in a grid, but you can place additional light probes yourself manually if there's some place where you feel the automatic probes aren't accurate enough.

Sector light gets added on top of the entire lightmap and probes. You can thus use the sector light as a minimum ambient light level, like how zoneinfo actors would be doing it in UE1.
thanks for clarifying all of the questions.
it defiantly sounds like you have all of the bases covered which is going to be a game changer for the visuals in doom maps in the coming future.
thanks again for your work.
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

Re: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

come to think of it i have another question.
with my fake lightmap shader idea, i was using a HD fake ambient occlusion texture to subtract lighting from the low resolution fake lightmap texture.
is it possible to use a ambient occlusion texture in the material shader (normal,spec etc) to subtract light levels from the lightmaps that your software will generate?
dpJudas
 
 
Posts: 3109
Joined: Sat May 28, 2016 1:01 pm

Re: Idea For Static dynamic Lighting In Maps

Post by dpJudas »

No, the tool only outputs a lightmap and probes. I had to draw the line at some point as you could in theory keep improving the feature forever until you'd eventually end up with a modern physically-based engine.

Honestly, I was only really doing this to help Nash out a bit and now I've spent months on it already. The feature should be good enough for something that can match UE1-UE2 era lighting (plus bounces) - it won't make GZDoom competitive visually with modern engines. :)
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

Re: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

understand where your coming from... and i agree, its still going to be awesome addition for gzdoom.
this is going to work really well for my old project called doom project remap that will be getting resurrected.
any goals on a date your aiming for to release ZDRay to the public.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Idea For Static dynamic Lighting In Maps

Post by Nash »

No deadline. We are taking our time to get it right.

The feature will first debut with a game I am currently making. We are intentionally limiting the scope of what this will be able to do, feature-wise* - like dpJudas said, otherwise, it will remain in development hell and run the risk of being abandoned again and therefore not be submitted to mainline GZDoom.

(seriously, it was a buttload of work trying to graft back 3-year-old code into the current GZDoom code base!)

* only initially. Any interested coders who want to improve the features in future are welcome to submit their work. For a v1.0, the feature-set will pretty much be Quake 1/Unreal Engine 1/2-tier
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

Re: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

roger that.
thanks for your hard work bringing this feature to life, your time and effort spent on this has saved me an insane amount of hours to manually bake lighting into the maps. (was going to be an absolute nightmare).
to use a program that will do all of this lighting and baking process automatically will be a real treat to use.

i wish i knew how to chip in and help with software programing like you guys can do. im just more of a hands on person working in a shed with metal fabricating / tig welding etc. then a computer programmer.
takes me along time just to do the basic doom coding stuff for actors.

one last question about zdray, with the ray tracer and the light bounce, does the light bounce pickup the pixel color of the applied texture in the map or is it just going to bounce light in its own texture channel using like a flat white lightmap type of texture? i don't know what quake or unreal 1/2 used.

i guess there is no need for this feature request to be present here anymore as you are doing what i originally requested, so if you want to discard this gzdoom feature request now or when zdray is officially released. go right ahead.
when zdray is released will their be a detailed user guide thread that you can create on the forums explaining on how mappers can use the new features that you have implemented kinda like a step by step guide for beginners.

thanks again nash,dpjuads.
zdray is going to be a game changer :D
dpJudas
 
 
Posts: 3109
Joined: Sat May 28, 2016 1:01 pm

Re: Idea For Static dynamic Lighting In Maps

Post by dpJudas »

It does not pick up the pixel color of the applied texture (when bouncing). It does pick up the color of the light though.

In general there's a lot of improvements that could be done to the ray tracer down the lines. For example it could even theoretically take mid textures into account like in some of those k8vavoom screenshots. That's all out of scope for my initial zdray contribution though. For such things to be possible it would require someone to contribute loading the map textures and calculate the texture coordinates for all the level mesh surfaces.

I'm sure someone will create some sort of tutorial once all the pieces are in place. :)
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Idea For Static dynamic Lighting In Maps

Post by Nash »

I do plan to do some basic tutorials to get people started, when the feature is ready to debut.

One thing to keep in mind (I've said this plenty of times on Discord, so I'll just repeat this here): ZDRay is, when you boil it down, just a really, really fancy version of ZDBSP. People have asked about things like whether it could bake transparent mid textures, or bake 3D models - the answer is, if ZDRay is modified to load in external data from mods, then, sure, in theory it could be done. But remember, ZDRay is based on ZDBSP, and you know ZDBSP is a very basic program - it knows nothing about files and resources from mods. It only recognizes the map WAD.

All of these extra features would mean someone would have to basically turn ZDRay into a mini mod resource loader itself - it'd have to have the ability to load in textures (and there are a million ways to read textures - textures folder, TEXTURES lump, TEXTUREx/PNAMES... etc etc etc oh and also don't forget, textures can be scaled and panned!!!)... and in the case of models, it would have to parse actor definitions (DECORATE/ZScript) and then MODELDEF... that is a LOT of work... something a simple node builder wasn't designed to do in the first place, at all...

EDIT:

A preview of what will be possible. As has been said before, early Quake/UE1/UE2 era visuals. Don't expect it to match Unity or Unreal Engine 4 :P




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

Re: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

thanks for reply's guys,
i don't use discord so i don't know what has been discussed on that platform so i have probably missed a lot of content.
those pic's look sweet :)
by the looks of it you got 3d floors and slopes working as well which is a treat, these were 2 things that would be missing for me if i export the map as an obj file into blender.
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

Re: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

something i have just thought of, will ZDray work with semi transparent 3d floors to be used as deep water areas in a map just curious if your tackling that as well?
if your not, just curious if the lightmap on the water texture (transparent 3d floor surface) will become transparent as well.
cheers :)
dpJudas
 
 
Posts: 3109
Joined: Sat May 28, 2016 1:01 pm

Re: Idea For Static dynamic Lighting In Maps

Post by dpJudas »

No, currently it does not support translucency. Once the base ray tracing tool is there it wouldn't surprise me if someone contributed stuff like that to the ray tracer one day though.
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

Re: Idea For Static dynamic Lighting In Maps

Post by Steve5563 »

dpJudas wrote:No, currently it does not support translucency. Once the base ray tracing tool is there it wouldn't surprise me if someone contributed stuff like that to the ray tracer one day though.
ok, just wondering if i have a small test map with a empty pond in the middle of the map.
can i bake the lightmaps to the level as it currently sits, and then after the lightmap baking is complete, can i then add the 3d water sector to the pond and save the map like that?
i am wondering if changes to the map can be made after the light baking process is done.
cheers. :)

Return to “Feature Suggestions [GZDoom]”