Idea For Static dynamic Lighting In Maps

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

Moderator: GZDoom Developers

Re: Idea For Static dynamic Lighting In Maps

Postby Steve5563 » Sun Oct 31, 2021 6:22 pm

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
User avatar
Steve5563
 
Joined: 27 Jan 2019
Location: Australia

Re: Idea For Static dynamic Lighting In Maps

Postby dpJudas » Sun Oct 31, 2021 6:27 pm

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.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Idea For Static dynamic Lighting In Maps

Postby SanyaWaffles » Sun Oct 31, 2021 6:30 pm

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
SanyaWaffles
Certified Heretic and Grill Champion
 
Joined: 25 Apr 2013
Location: Disappointment Island
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 11
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Idea For Static dynamic Lighting In Maps

Postby Steve5563 » Sun Oct 31, 2021 6:52 pm

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
 
Joined: 27 Jan 2019
Location: Australia

Re: Idea For Static dynamic Lighting In Maps

Postby Steve5563 » Sun Oct 31, 2021 7:19 pm

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?
User avatar
Steve5563
 
Joined: 27 Jan 2019
Location: Australia

Re: Idea For Static dynamic Lighting In Maps

Postby dpJudas » Sun Oct 31, 2021 7:31 pm

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. :)
dpJudas
 
 
 
Joined: 28 May 2016

Re: Idea For Static dynamic Lighting In Maps

Postby Steve5563 » Sun Oct 31, 2021 7:48 pm

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
Steve5563
 
Joined: 27 Jan 2019
Location: Australia

Re: Idea For Static dynamic Lighting In Maps

Postby Nash » Sun Oct 31, 2021 9:39 pm

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
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Idea For Static dynamic Lighting In Maps

Postby Steve5563 » Sun Oct 31, 2021 10:30 pm

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
User avatar
Steve5563
 
Joined: 27 Jan 2019
Location: Australia

Re: Idea For Static dynamic Lighting In Maps

Postby dpJudas » Sun Oct 31, 2021 10:40 pm

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. :)
dpJudas
 
 
 
Joined: 28 May 2016

Re: Idea For Static dynamic Lighting In Maps

Postby Nash » Sun Oct 31, 2021 10:51 pm

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
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Idea For Static dynamic Lighting In Maps

Postby Steve5563 » Sun Oct 31, 2021 11:59 pm

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
 
Joined: 27 Jan 2019
Location: Australia

Re: Idea For Static dynamic Lighting In Maps

Postby Steve5563 » Fri Nov 05, 2021 12:27 am

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 :)
User avatar
Steve5563
 
Joined: 27 Jan 2019
Location: Australia

Re: Idea For Static dynamic Lighting In Maps

Postby dpJudas » Fri Nov 05, 2021 4:18 am

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.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Idea For Static dynamic Lighting In Maps

Postby Steve5563 » Fri Nov 05, 2021 6:18 am

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. :)
User avatar
Steve5563
 
Joined: 27 Jan 2019
Location: Australia

PreviousNext

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests