Material assignment to imported mesh

So I have a mesh exported from MAYA, gltf format. When I import it into BJS and try to assign a material that I created in BJS to it with a baked image in the DIFFUSE slot, the UV’s do not match up like I expect.

When I use the material that comes in with the mesh, it works as expected.

Both materials are using the same baked image file (png).

What am I doing wrong? I would provide a PG example, but I have not learned how to make that yet.

This might definitely help you : Using External Assets In the Playground | Babylon.js Documentation

The PG would be awesome to help troubleshooting

1 Like

In order to create some example in PG with your own assets this article will be definitely helpful: Using External Assets In the Playground | Babylon.js Documentation

As for your problem, it seems that you may need to apply uScale and/or vScale parameters to -1 to flip your texture properly. You can load your model to Sandbox, open the Inspector, find your texture and adjust it as you need, then do the same in the code.

1 Like

Bingo! It was a flipped V parameter. I should have thought of this since my models are coming in flipped in the X direction. I’m using the exporter for Maya (very nice, BTW). Still feeling my way through the power of BJS.

Thanks for the help. I’ll school myself on making a Playground example since I intend to be here a bunch.

1 Like