Hi,
I am verifying the import of glTF files.
When importing a glTF, the translucent representation of the material does not look right.
The glTF file for verification was created in Blender.
Leaf.glb (318.5 KB)
The glTF Viewer ( https://gltf-viewer.donmccurdy.com/ ) displays the following.
From left to right, the following materials were specified.
“leaf_none_alpha” Opaque, RGB png,
“leaf_mat” No Alpha specified, RGBA png (glTF : “alphaMode” = “OPAQUE”, default),
“leaf_with_alpha_mat”, Alpha specified, RGBA png (glTF : “alphaMode” = “MASK”).
When converted to a glTF file, it looks like this.
"materials": [
{
"doubleSided": true,
"name": "leaf_none_alpha",
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 2
},
"metallicFactor": 0,
"roughnessFactor": 0.5
}
},
{
"doubleSided": true,
"name": "leaf_mat",
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
},
"metallicFactor": 0,
"roughnessFactor": 0.5
}
},
{
"alphaCutoff": 0.5,
"alphaMode": "MASK",
"doubleSided": true,
"name": "leaf_with_alpha_mat",
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 1
},
"metallicFactor": 0,
"roughnessFactor": 0.7047244310379028
}
}
],
“Convert to USD” was used to convert to USD and imported into Stage.
“Import Materials” On
“Import Materials as UsdPreviewSurface” Off
“Import Animation” On
“Import Cameras” On
“Import Lights” On
“Generate Smooth Normals” On
“Use Meter as World Unit (cm by default)” Off
“Create /World as Default Root Prim” On
“Merge Static Meshes” Off
In this case, “gltf/pbr.mdl” was assigned to the material.
Set DomeLight in Environments and Shadows only in Ground.
All the Mesh seemed to become translucent.
If you cannot reproduce the problem, try changing the background in Environments several times.
Also, the “Roughness Factor” parameter does not seem to be reflected and is always set to 0.0.
Parameter is specified, but always appears to have a roughness of 0.0 on the Viewport.
Next, I turned on “Import Materials as UsdPreviewSurface” during the USD conversion.
In this case, “UsdPreviewSurface” was assigned to the material.
However, despite the AlphaMode specification being Opaque, it was expressed as Mask.
Otherwise, I have data for verification of glTF and will try to report any other cases.
Check Environment
OS : Windows 10
Mem : 64 GB
GPU : NVIDIA RTX A5000 (VRAM 24GB)
Omniverse : Omniverse Create 2022.1.3
Reproduction procedures
- Convert Leaf.glb (318.5 KB) to USD with “Convert to USD”
- Import usd into stage (Add Reference)
- Specify DomeLight from Environments
- Set Ground to “Shadows Only” in Environments
I checked both by switching the “Import Materials as UsdPreviewSurface” option in the “Convert to USD” option.