[SUGGESTION] Environment Maps for PBR Materials

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: [SUGGESTION] Environment Maps for PBR Materials

Re: [SUGGESTION] Environment Maps for PBR Materials

by dpJudas » Thu Jul 12, 2018 6:10 pm

Thanks! That would be really helpful as I currently can't really do any tests that realistically shows me how the light appears. Mixing PBR textures with non-PBR will always look horrible, so i.e. a PBR gun shown in E1M1 won't really tell me much whether the light model is working properly or not.

Re: [SUGGESTION] Environment Maps for PBR Materials

by HAL9000 » Thu Jul 12, 2018 5:39 pm

dpJudas wrote:Thanks, but what I really need is a map fully populated with PBR textures and lit using mainly light levels.
Ok, I'll create something next week. With example materials from substance (gold, copper, steel, brass, stone, plastic etc etc etc)
with differnt PBR rough/metal settings for testing
Image

Re: [SUGGESTION] Environment Maps for PBR Materials

by dpJudas » Thu Jul 12, 2018 5:35 pm

Thanks, but what I really need is a map fully populated with PBR textures and lit using mainly light levels.

Re: [SUGGESTION] Environment Maps for PBR Materials

by HAL9000 » Thu Jul 12, 2018 5:27 pm

dpJudas wrote: I'm not 100% sure that last statement is true since the wall itself would only be probing from directions facing away from itself - that is, the wall wouldn't be seeing its own light. In any case, would have to try it out with a working fully pbr map and an environment map to be sure.
Ok, thanks for the info.
If you wish to play with it in the future I can send you all my pbr shotgun files for testing on pm
Thanks, and Cheers!

P.S here is the 3d preview of the shotgun: :)
https://sketchfab.com/models/2fec5ea4c7 ... 4a0dfc27d4

Re: [SUGGESTION] Environment Maps for PBR Materials

by dpJudas » Thu Jul 12, 2018 5:10 pm

There's no doubt that env maps would greatly improve PBR textures in GZDoom. In fact, had I known at the time they were this influential to the look I probably wouldn't have supported specifying them until there was a working solution. At the time I figured it could be faked by using the light level as placeholder.

It gets a little bit complicated because in true PBR the environment map replaces the light level - that is, the environment map IS the light that hits the walls in a sector. This means that if you correctly probe the light (i.e. by rendering a cubemap of the scene with its light levels) and generate the environment map, then you HAVE to render the wall afterwards without taking the light level into account. Otherwise you'd be applying the light level twice.

Edit: I'm not 100% sure that last statement is true since the wall itself would only be probing from directions facing away from itself - that is, the wall wouldn't be seeing its own light. In any case, would have to try it out with a working fully pbr map and an environment map to be sure.

Re: [SUGGESTION] Environment Maps for PBR Materials

by HAL9000 » Thu Jul 12, 2018 4:51 pm

Yes , I was thinking about Env maps created/supplied by the modders, and defined (something like) in the Example/idea Envmap code in the OP
Imo, Env Probes would be a great feature, and it would vastly improve the look of PBR textures, especially for materials created with modern tools like Substance painter.

Re: [SUGGESTION] Environment Maps for PBR Materials

by dpJudas » Thu Jul 12, 2018 4:48 pm

Part of the problem here is how to generate the environment map in the first place. If it is supplied by the modder then using sectors would work just fine, but on the other hand if the environment map is sampled from the actual light in the scene it won't - because then it needs to know where to render a environment map of the level.

Re: [SUGGESTION] Environment Maps for PBR Materials

by HAL9000 » Thu Jul 12, 2018 4:37 pm

dpJudas wrote:I don't think you'll get the right effect if it is just any random environment map - at least not if it is a single map for the entire map.
Thanks for the reply!
Is it possible to load env maps on specific sectors?
If it's not possible to achieve the envPBR, I'll stick to Baked Albedo+PBR

Re: [SUGGESTION] Environment Maps for PBR Materials

by dpJudas » Thu Jul 12, 2018 4:34 pm

I played with this on the pbr_environment branch a few months ago, but sort of lost the motivation. The idea on that branch was to place environment map probes as things in each map and it would choose the closest map for each rendered face. I only got as far as loading a single environment map for the level as a test.

I don't think you'll get the right effect if it is just any random environment map - at least not if it is a single map for the entire map.

[SUGGESTION] Environment Maps for PBR Materials

by HAL9000 » Thu Jul 12, 2018 3:48 pm

Now, that the PBR is supportd by the engine, and its activated under dynamic lights, Is it possible to add Environment maps to the PBR workflow in future GZD Builds?
Image

Current PBR looks good, but it have several issues,
Albedo looks ok, but only if directly close to dynamic lights, and materials look "washed out" especially from the 1st person view, if you are not close to dynamic light source.
Using Environment maps (In Addition to existing Dynamic lights) could fix that issue and vastly improved the PBR shader.
I had to bake fake light into albedo to replace it in addition to Metalness/Roughness to mimic the PBR look I would get for example in substance.
This could be improved by adding Environment maps and Light point to those Environment maps.

Idea:
Users could define the Environment map image in the GLDEFS (or in some new definition file) for map you want to use it
Users could define the intensity(brightness) of the Environment map
Users could define extra X/Y points on that map (it will use the pixel color from that point) and the light intensity with maximum of 10 Light points.

Comparison between Albedo and Albedo with fake baked Light (both are PBR)
Image
Fake/Baked Albedo looks better than Classic Albedo in GZDoom (NOTE*** PBR with fake albedo still uses Roughness/Metallness/AO/Normal Map)
Model Textures were directly exported from Substance painter for PBR (metal/rough workflow), They were prepared correctly.
Spoiler:
For Comparison here is the Original Model I made with Loaded Environment/Sky Map and 3 Lights
(Normal Albedo, Metalness, Roughness, Normalmap, AO)
Spoiler:
Code Example /Idea
Spoiler:

PM me for Example MOD files, models and textures , to see/test what I'm talking about.
Thanks

Top