Idea For Static dynamic Lighting In Maps

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Idea For Static dynamic Lighting In Maps

Re: Idea For Static dynamic Lighting In Maps

by Steve5563 » Fri Jul 29, 2022 10:12 am

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.

Re: Idea For Static dynamic Lighting In Maps

by Steve5563 » Sat Dec 11, 2021 7:53 am

thanks for the reply's dpjudas and nash.
sounds good :)

Re: Idea For Static dynamic Lighting In Maps

by Nash » Sat Dec 11, 2021 1:54 am

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.

Re: Idea For Static dynamic Lighting In Maps

by dpJudas » Fri Dec 10, 2021 9:46 pm

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.

Re: Idea For Static dynamic Lighting In Maps

by Steve5563 » Fri Dec 10, 2021 8:43 pm

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.

Re: Idea For Static dynamic Lighting In Maps

by Steve5563 » Fri Nov 05, 2021 11:20 am

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. :)

Re: Idea For Static dynamic Lighting In Maps

by Graf Zahl » Fri Nov 05, 2021 9:05 am

Not really. Adding a 3D floor alters geometry, so your lightmap will not be correct anymore afterward.

Re: Idea For Static dynamic Lighting In Maps

by Steve5563 » Fri Nov 05, 2021 7:28 am

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. :)

Re: Idea For Static dynamic Lighting In Maps

by Nash » Fri Nov 05, 2021 7:01 am

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.

Re: Idea For Static dynamic Lighting In Maps

by Graf Zahl » Fri Nov 05, 2021 6:56 am

You need to rebuild nodes already when doing that so the answer would be 'no' anyway.

Re: Idea For Static dynamic Lighting In Maps

by 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. :)

Re: Idea For Static dynamic Lighting In Maps

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

Re: Idea For Static dynamic Lighting In Maps

by 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 :)

Re: Idea For Static dynamic Lighting In Maps

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

Re: Idea For Static dynamic Lighting In Maps

by 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





Top