GLTF PBR import way too shinny

Hello,
I am running into an issue where models exported to gltf, from blender, maya, 3d max, mixamo (I have not tested anything else yet)

Example imported model into jme:

You can see the extreme amount of gloss/specular.

I printed out all the mat parameters from after the model was loaded:

Loading mat for LargeF_Bricks01
Mat param Float EmissivePower : 3.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.16583058
Mat param Float EmissiveIntensity : 2.0
Mat param Float Glossiness : 1.0
Mat param Vector4 BaseColor : 1.0 1.0 1.0 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image0.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Texture2D BaseColorMap : Texture2D[name=image1.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0
Loading mat for LargeF_Concrete
Mat param Float EmissivePower : 3.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.2848369
Mat param Float EmissiveIntensity : 2.0
Mat param Float Glossiness : 1.0
Mat param Vector4 BaseColor : 1.0 1.0 1.0 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image2.jpeg, image=Image[size=5000x3644, format=BGR8]]:returned null key
Mat param Texture2D BaseColorMap : Texture2D[name=image3.jpeg, image=Image[size=5000x3644, format=BGR8]]:returned null key
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0
Loading mat for LargeF_Glass
Mat param Float Glossiness : 1.0
Mat param Float EmissivePower : 3.0
Mat param Vector4 BaseColor : 0.015686275 0.015686275 0.015686275 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.17059876
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image4.jpeg, image=Image[size=2048x2048, format=Luminance8]]:returned null key
Mat param Float EmissiveIntensity : 2.0
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0
Loading mat for LargeF_Ground
Mat param Float EmissivePower : 3.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.17059876
Mat param Float EmissiveIntensity : 2.0
Mat param Float Glossiness : 1.0
Mat param Vector4 BaseColor : 1.0 1.0 1.0 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image5.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Texture2D BaseColorMap : Texture2D[name=image6.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0
Loading mat for LargeF_Metal
Mat param Float EmissivePower : 3.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.17059876
Mat param Float EmissiveIntensity : 2.0
Mat param Float Glossiness : 1.0
Mat param Vector4 BaseColor : 1.0 1.0 1.0 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image7.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Texture2D BaseColorMap : Texture2D[name=image8.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0
Loading mat for LargeF_Pipes
Mat param Float EmissivePower : 3.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.17059876
Mat param Float EmissiveIntensity : 2.0
Mat param Float Glossiness : 1.0
Mat param Vector4 BaseColor : 1.0 1.0 1.0 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image9.jpeg, image=Image[size=3355x3355, format=BGR8]]:returned null key
Mat param Texture2D BaseColorMap : Texture2D[name=image10.jpeg, image=Image[size=3355x3355, format=BGR8]]:returned null key
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0
Loading mat for LargeF_Plates
Mat param Float EmissivePower : 3.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.17059876
Mat param Float EmissiveIntensity : 2.0
Mat param Float Glossiness : 1.0
Mat param Vector4 BaseColor : 1.0 1.0 1.0 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image11.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Texture2D BaseColorMap : Texture2D[name=image12.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0
Loading mat for LargeF_Roof
Mat param Float EmissivePower : 3.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.17059876
Mat param Float EmissiveIntensity : 2.0
Mat param Float Glossiness : 1.0
Mat param Vector4 BaseColor : 1.0 1.0 1.0 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image13.jpeg, image=Image[size=4096x4096, format=BGR8]]:returned null key
Mat param Texture2D BaseColorMap : Texture2D[name=image14.jpeg, image=Image[size=4096x4096, format=BGR8]]:returned null key
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0
Loading mat for LargeF_Wood
Mat param Float EmissivePower : 3.0
Mat param Boolean BackfaceShadows : false
Mat param Float Roughness : 0.17059876
Mat param Float EmissiveIntensity : 2.0
Mat param Float Glossiness : 1.0
Mat param Vector4 BaseColor : 1.0 1.0 1.0 1.0
Mat param Float ParallaxHeight : 0.05
Mat param Float Metallic : 0.0
Mat param Float NormalType : 1.0
Mat param Vector4 Emissive : 0.0 0.0 0.0 1.0
Mat param Texture2D NormalMap : Texture2D[name=image15.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Texture2D BaseColorMap : Texture2D[name=image16.jpeg, image=Image[size=2048x2048, format=BGR8]]:returned null key
Mat param Vector4 Specular : 1.0 1.0 1.0 1.0

This is what is in the gltf file for the materials:

"materials" : [
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "Bricks01",
            "normalTexture" : {
                "index" : 0,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorTexture" : {
                    "index" : 1,
                    "texCoord" : 0
                },
                "metallicFactor" : 0,
                "roughnessFactor" : 0.1658305823802948
            }
        },
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "Concrete",
            "normalTexture" : {
                "index" : 2,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorTexture" : {
                    "index" : 3,
                    "texCoord" : 0
                },
                "metallicFactor" : 0,
                "roughnessFactor" : 0.28483688831329346
            }
        },
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "Glass",
            "normalTexture" : {
                "index" : 4,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorFactor" : [
                    0.01568627543747425,
                    0.01568627543747425,
                    0.01568627543747425,
                    1
                ],
                "metallicFactor" : 0,
                "roughnessFactor" : 0.17059876024723053
            }
        },
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "Ground",
            "normalTexture" : {
                "index" : 5,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorTexture" : {
                    "index" : 6,
                    "texCoord" : 0
                },
                "metallicFactor" : 0,
                "roughnessFactor" : 0.17059876024723053
            }
        },
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "Metal",
            "normalTexture" : {
                "index" : 7,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorTexture" : {
                    "index" : 8,
                    "texCoord" : 0
                },
                "metallicFactor" : 0,
                "roughnessFactor" : 0.17059876024723053
            }
        },
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "Pipes",
            "normalTexture" : {
                "index" : 9,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorTexture" : {
                    "index" : 10,
                    "texCoord" : 0
                },
                "metallicFactor" : 0,
                "roughnessFactor" : 0.17059876024723053
            }
        },
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "MetalPlates",
            "normalTexture" : {
                "index" : 11,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorTexture" : {
                    "index" : 12,
                    "texCoord" : 0
                },
                "metallicFactor" : 0,
                "roughnessFactor" : 0.17059876024723053
            }
        },
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "Roof",
            "normalTexture" : {
                "index" : 13,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorTexture" : {
                    "index" : 14,
                    "texCoord" : 0
                },
                "metallicFactor" : 0,
                "roughnessFactor" : 0.17059876024723053
            }
        },
        {
            "emissiveFactor" : [
                0,
                0,
                0
            ],
            "name" : "Wood",
            "normalTexture" : {
                "index" : 15,
                "scale" : 0.30000001192092896,
                "texCoord" : 0
            },
            "pbrMetallicRoughness" : {
                "baseColorTexture" : {
                    "index" : 16,
                    "texCoord" : 0
                },
                "metallicFactor" : 0,
                "roughnessFactor" : 0.17059876024723053
            }
        }
    ],

In other renderers, it is not shinny, except blender which defaults the specular level to 0.5 on everything PBR for some reason…

Increasing the Roughness factor should fix that I think.

AFAIK this is specific to Blender Principled BSDF material and is not exported to Gltf.

(Specular is only intensity of light in that [roughness/glosiness] area, so it dont matter here imo)
I dont understand something.

Generally i seen on Sketchfab, there were no Glosiness + Roughness.

There were only one chosen, since Glosiness = 1 - Roughness, and Roughness = 1 - Glosiness.

When in skechfab they have

  • PBR: Specular, they use Glosiness,
  • when PBR: Metalness they use Roughness and Metallic

So looks like your print is wrong, since it contains Both Glosiness and Roughness?

and even if its intended, then:

Mat param Float Roughness : 0.16583058
Mat param Float Glossiness : 1.0

here Glosiness should be like 0.834 not 1.0

Odd that i didnt seen issues like this myself. Maybe its related to new GLTF exporter version? (but well, looking at GLTF file i dont even see Glosiness, so idk if its JME related that it add there)

1 Like

The glossiness in the material is the default values, I think… but as I recall it’s basically ignored unless you specify the flag to use the spec-gloss pipeline.

…which is different than metallic+roughness.

1 Like

Yes it looks like your roughness value of ~ 0.17 is in the shiny range - I would go with a Roughness value closer to 0.96 or 0.9 at the lowest for normal red bricks.

UseSpecGloss is also the boolean matParam that would be defined true if the shader were using the glosiness value - but it appears to not be defined in your print out, so your material is using the metallic-roughness pipeline

1 Like

Thank you for the info, I learned a lot in this short thread.
This model in the photo is from: Steampunk – KitBash3D
I exported that gltf from 3ds max from file that kitbash3d provides. I will check the material settings in there.

I just got up, I will do some tests today and report back.

EDIT: FYI, kitbash3d has a huge sale right now

1 Like

well, myself i would not think that KitBash3D made something wrong.

i would rather think that some exporter mismatch params.

Do Kitbash3d provide only 3ds?

@tlf30 try export to Blender other way, and then export to GLTF via Blender.

Yes you would expect it to be unlikely since they have some big and pricey packages and seem to be quite legitimate, but I’ve found lots of monetized software / products to still contain bugs or mistakes so it never hurts to entertain the possibility.

But you’re probably right that it is more likely an exporter error, and hopefully the source model from their site was created with the proper material params.

I have never used KitBash3D, mainly because it’s out of my price range currently, but I also did not like that there isn’t a way to inspect the materials ahead of time.

I am also curious if the model in your original post came with a roughness map? It wasn’t printed out in your matParams debug, so I assume it either doesn’t exist or was also lost in the export process.
But I am curious if they also included a roughness and ambient occlusion map. It’s common for pbr materials to not have a metallic map depending on the material, but I’d be surprised if their packs don’t contain Ambient Occlusion or Roughness textures for most models.

1 Like