[SOLVED] Transparent Areas When Using GLTF Model

Hello Guys,
I’m trying to import the below model from SketchFab.com

It looks fine except some hair in the head and the moustache which for some reason renderes as transparent.
I tried importing the FBX file into blender and export it as GLTF but it turned out totally black… so no luck.
I tried testing it in: https://gltf-viewer.donmccurdy.com/ and it looks even worse there.
I suspect it has something to do with the key color… is there a way to select the key color when rendering a given model?

Before I give up on using this model - do you have any ideas how to fix this transparency issue?

Thanks!

1 Like

Might save folks time if you showed a picture of it in JME illustrating the problem.

Sure :slight_smile:

The issue is related to this:

Could be that setting the alpha discard threshold fixes it… but it’s basically a sorting problem. If the whiskers are a separate mesh then they should be in the transparent bucket and the rest of the tiger in the opaque bucket. That would be the best solution, semi-transparent stuff in the transparent bucket and everything else in the opaque bucket if possible.

If it’s all one mesh, alpha discard is the only thing you can do really.

It’s something I can set in the GLTF loader? (discarding alpha)

No, you set it on the material after you’ve loaded it. Or once you’ve loaded it then you can export the material and set it in there. Or if you use jmec you can do it in a script.

or or or… I need more information.

1 Like

OK I think I have enough information to start trying to cope with this issue. I’ll search how to modify the material after loading the GLTF file

Or you can do it by setting “alphaCutoff” > 0 and “alphaMode” = “MASK” in “materials” property on .gltf file.

Like this:

or if you want to do it in Blender 2.8
Go to Material properties → settings → set “Blend Mode” to “Alpha Clip” and set “Clip Threshold” to something > 0, (for example 0.5).

4 Likes

I learned something new today. Now I can take off the rest of the day! :slight_smile:

3 Likes

If I’m downloading the FBX sources from sketchfab then load it into Blender 2.8 and export it as GLTF the Tiger is rendered totally black - probably can’t find any materials but I’ll try going the Blender’s path anyway. Thanks

Download it as Gltf file not FBX, else you are going to have HUGE troubles.

1 Like

Excellent! this solved the problem!

Modifying inside Blender also fixed the material issue but introduced problems with the model’s animations so editing the GLTF was the easiest and worked just fine! Amazing! thanks

2 Likes