Matching renders in Blender and Hubs #5602
Replies: 2 comments
-
Your observation and reasoning i'm pretty sure is correct, I think I cam to the same conclusion at some point: https://discord.com/channels/498741086295031808/535638871392649226/897564844444749914 I think I tested setting this to 0 and that made them look the same https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js#L45 Not 100% sure why this fudge factor exists which makes me a bit reluctant to just remove it. I need to look into options.
This I am definitely aware of, its basically impossible right now to create a lightmap that looks the same in low/high quality mode. The ThreeJS patch (which I proposed) made it so that they are at least both the same (which we inverted again in Hubs in #5566 to retain backwards compat with existing scenes). What we actually want now after this ThreeJS patch is for both to be multiplied by pi for the lighmaps we get out of Blender. I think my planned fix is still going to be to only automatically apply pi to PBR materials exported after some particular (new) release of the Blender addon, so that old scenes don't suddenly become blown out after the artist already compensated for it.
Not following this one can you explain a bit further? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to match Blender Cycles renders in Hubs as closely as possible and specifically to make sure that lightmaps are being applied correctly and consistently between material types. To this end I thought it might be useful to establish a "ground-truth" Blender project to compare so we can decide what we would expect to see in Hubs vs what we currently see.
Assumptions
Consider a simple scene where the light source is an environment map of a band of light at the horizon:
There is a stack of eight cubes with different material combinations of lightmaps, lit vs unlit, and gray vs white. You can sort of see the arrangement here:
A black bar is positioned in front of the lower row to provide a shadow and some contrast for the lightmap.
The intensity of the pixels in the environment map has been adjusted carefully in Blender such that the lit cube faces are nearly exactly the same color as the the unlit ones, i.e. the env map is providing a unit level of irradiance to the cube faces. This is corroborated by the lightmap, which has a value of 1.0 anywhere outside of the shadow.
Expectations
We would expect all the gray cubes to be the same color and all the white cubes to be the same color. What we see when using the master branch (at time of writing) is this:
Observations
Source Files
Blender and GLB files
Hubs Scene
Beta Was this translation helpful? Give feedback.
All reactions