tackor
tackor

Reputation: 21

substance painter export gltf in webgl(three.js) is totally black

When I import my model (.fbx) to draw a texture in the substance painter and export it to the .gltf format, I find that the metal I paint is gone and replaced by the shiny black, and then when I put the exported model in the three.js/examples/webgl_load_gltf.html case, I found that my model was dark and needed to be added a directLight can only see a point, the effect is not very good, but the case of importing the painter painter does not have any problems.

It looks as good as the model in the original example.

I would like to know what causes this two problems.

Upvotes: 2

Views: 2321

Answers (2)

Josh
Josh

Reputation: 1

DUDE I JUST WENT THROUGH THIS, it was a nightmare. I had a very shiny gold car with windows and all types of shit going on. Looked great as a USDZ! Then tried to export GLTF. Black. Turned off all channels except normal and base color, looked fine.

Then went and turned on metallic and again black.

Then i realized "Oh, I didn't bake my mesh maps" like an idiot. Boom, metallic, roughness and opacity all suddenly worked.

Always ALWAYS bake your mesh maps. Substance is pointless without it.

I know this is 2 years old but apparently all the early adopters of Substance figured this out long ago, so this is for you, random person just learning this stuff. AR is only going to become more in demand, thank god I know how to make it cross-platform now.

Upvotes: 0

Mugen87
Mugen87

Reputation: 31026

The problem is that your demo has only a single instance of HemisphereLight. The materials of your meshes are instances of MeshStandardMaterial with metalness values of 1.0. Since hemisphere lights are sources of indirect diffuse light, they are not reflected by pure metals. More information about this topic in: https://github.com/mrdoob/three.js/issues/9228

You should use a different light setting e.g. add a directional light. Or try to fix the material settings in your model.

Upvotes: 2

Related Questions