This may be more of a UnityGLTF question but here goes: When using UnityGLTF/PBRGraph, does the Roughness-Metallic map slot use the alpha of the imported texture or the Green/Blue channel of the texture as in either case the roughness doesn’t appear to be working. In the screenshot attached, the bottom most mesh is using a Unity URP Lit material with the metallic/roughness texture in the metallic map slot, Roughness source set to Metallic alpha.
The other 2 meshes above it are from UnityGLTF and GLTFast imports with that same texture, one is using a custom applied material of UnityGLTF/PBRGraph with that same metallicroughness texture applied. I verified the roughness isn’t working by changing the URP/Lit>Metallic Map - roughness source to ‘albedo alpha’ in the screenshot with the red arrow in
I noticed this as the model in Needle is using roughness correctly when exported in a local or production build, just the Unity viewport/scene view is not using roughness which produces inconsistency
Note that when you have a roughness map and put the roughnessFactor to 0 that means you want the map to be ignored. Make sure roughnessFactor is 1 when you use a map.
And when using Don McCurdy GLTF Viewer it looks fine just in UnityGLTF/GLTFast the roughness isn’t used so I’m trying to diagnose why it is inconsistent in Unity Loaders vs Three.js and Blender where it pulls in fine
I just meant if the imported GLTF file with UnityGLTF with its embedded PBR material has roughnessFactor at 0 by default despite there being a roughness defined in the GLTF file, do I have to always create and assign a new material just in Unity to fix that?
Nothing strange happening in the nodes in Blender either, I matched the layout and spec of the shader nodes in the Damaged Helmet GLTF sample file to be sure
UnityGLTF PBR-Graph Shader Roughness-metallic map supports the alpha channel of the metallic map having the roughness but that isn’t what Blender exports to a GLTF, you can see here if I swap in this .Tif file in the repro project which is the Metallic with Roughness in alpha channel, the roughness works (Video: https://drive.google.com/file/d/1qqCuIKS9BobG-xtJkY33Yr2sYuVDqrVO/view?usp=sharing), whereas the Blender exported Metallic map that uses the RGB Green channel of the Metallic map for Roughness and the Blue channel for Metallic doesn’t work correctly. Is there a reason for this and why other GLTF loaders like Blender/Three.js/gltf.report support the Green and Blue channel for Roughness and Metallic on the metallic map?