Replies: 6 comments
-
Setting specular is not supported by gltf without extensions (Filament does not support that extension ). Metalness by itself does not affect reflectivity. Non-metallic objects have a specular component. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_specular Note that I would argue setting specular to 0 is not physically plausible. |
Beta Was this translation helpful? Give feedback.
-
Problem is not in GLTF at all. I modified GLTF exporter in blender. It exports every material attribute now. I'm talking about reflectance part of the material (which is specular factor of blender Principled BSDF): Here I even hardcoded f0 to zero. It still shiny like christmass tree. I cannot control specular at all, cannot remove it: |
Beta Was this translation helpful? Give feedback.
-
For now I'm using specular color to control reflectness in indirect lighting. But this is hacky way:
|
Beta Was this translation helpful? Give feedback.
-
Check out the materials documentation. Setting You can use the specularGlossiness material model instead to kill the specular component by setting the |
Beta Was this translation helpful? Give feedback.
-
The thing is I need PBR shader model, but with specular control. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm exporting GLB from Blender. Blender Principled BSDF shader doesn't show any reflections if specular and metalsess are 0.
But in filament specular is very strong if both parameters are 0, because of DFG lookup which depends only on roughness and view angle.
In my material roughness is 0.4. But both metalness and reflectivity are 0.
In this case lookup from DFG gives value 0.2 if F0 == 0.0 and NoV == 0.0;
vec3 dfg = textureLod(light_iblDFG, vec2(NoV, lod), 0.0).rgb;
return mix(dfg.xxx, dfg.yyy, pixel.f0);
For roughness 1.0 it gives almost 1.0 regardless of F0 value because both dfg.x and dfg.y == 1 on DFG UV's == 0.0 .
Question is why reflectivity and metalness almost do not affect IBL specular? Why is material so shiny when both parameters are 0?
So I cannot make filament PBR materials compatible with blender PBR GLB export ?
Beta Was this translation helpful? Give feedback.
All reactions