Code Monkey home page Code Monkey logo

Comments (13)

turanszkij avatar turanszkij commented on May 24, 2024 3

Seems like a plain Schlick is being used for IBL reflection, instead of DFG term.

F = F_Schlick(f0, f90, NdotV);

I suggest to bake DFG lookup table for IBL, or use approximations (ie. https://www.unrealengine.com/en-US/blog/physically-based-shading-on-mobile).

After replacing the Schlick with the EnvBRDFApprox in the article you linked:

Wicked Roughness 1:
sc_25-08-2023 20-20-59

Blender roughness 1:
image

Wicked Rougness 0:
sc_25-08-2023 20-20-53

Blender roughness 0:
image

from wickedengine.

brakhane avatar brakhane commented on May 24, 2024 1

I'm having problems with Blender, I couldn't really find a way to adjust roughness easily. But I agree that Blender renders it differently, as if it doesn't have fresnel effect.

The model has a roughness map, if you go on the material settings, and click on the dot at roughness ("separate color") you can then choose "remove link" in the menu. After that you can modify the roughness value globally. Wicked and Blender are close for low values, but begin to differ after 0.4 or so.

from wickedengine.

Nolram12345 avatar Nolram12345 commented on May 24, 2024

Here is another white furnace example with the tree model illustrating the issue.
https://github.com/turanszkij/WickedEngine/assets/37701550/f8d5de59-0e4b-4ff6-919b-b5cf7857c24c

from wickedengine.

turanszkij avatar turanszkij commented on May 24, 2024

Right now it mostly matches Windows 3D Viewer result

Windows 10 3D Viewer:
image

Wicked Engine:
sc_25-08-2023 06-58-59

(I had to remove vertex colors from the model, otherwise it's mostly balck)

from wickedengine.

turanszkij avatar turanszkij commented on May 24, 2024

I'm having problems with Blender, I couldn't really find a way to adjust roughness easily. But I agree that Blender renders it differently, as if it doesn't have fresnel effect.

from wickedengine.

turanszkij avatar turanszkij commented on May 24, 2024

Gestaltor reference GLTF viewer:
image

Wicked Engine:
sc_25-08-2023 08-22-14

I think it's pretty close.

from wickedengine.

LVutner avatar LVutner commented on May 24, 2024

Seems like a plain Schlick is being used for IBL reflection, instead of DFG term.

F = F_Schlick(f0, f90, NdotV);

I suggest to bake DFG lookup table for IBL, or use approximations (ie. https://www.unrealengine.com/en-US/blog/physically-based-shading-on-mobile).

from wickedengine.

Nolram12345 avatar Nolram12345 commented on May 24, 2024

Right now it mostly matches Windows 3D Viewer result

Windows 10 3D Viewer: image

Wicked Engine: sc_25-08-2023 06-58-59

(I had to remove vertex colors from the model, otherwise it's mostly balck)

I see that, however the visual output here is definitely wrong. A bark material with those rough properties should have that metallic sheen. Therefore I would say that the PBR model in the windows 3D viewer is probably flawed as well (which isn't terribly surprising considering its a very basic viewer that isn't designed for accuracy or production rendering).
I therefore think taking orientation against both other renderers who don't exude this behaviour and real-life reference is probably better.

LVutner may be onto something with the usage of Schlick for IBL reflection.

from wickedengine.

LVutner avatar LVutner commented on May 24, 2024

Cool. The minor differences comes from DFG itself.

from wickedengine.

Nolram12345 avatar Nolram12345 commented on May 24, 2024

That looks a lot better! Can't wait to try it and see if it improves things :)

from wickedengine.

turanszkij avatar turanszkij commented on May 24, 2024

Some more notes on IBL DFG terms:
https://knarkowicz.wordpress.com/2014/12/27/analytical-dfg-term-for-ibl/
https://github.com/TheRealMJP/DXRPathTracer/blob/master/SampleFramework12/v1.02/Shaders/BRDF.hlsl#L209

from wickedengine.

turanszkij avatar turanszkij commented on May 24, 2024

Added this in the PR: #737
Let me know if this is matching expectations.

from wickedengine.

turanszkij avatar turanszkij commented on May 24, 2024

The following fixes were made since this issue was opened:

  • applying Unreal Engine's Environment BRDF approximation for surface.F value in PBR shaders
  • environment map prefiltering improvements: NdotL normalization, dynamic miplod determination
  • environment map filtering only goes down to 16x16 mip level as recommended by some graphics people, also as in EXT_lights_image_based GLTF sample

from wickedengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.