Babylon.js: Textures not showing

Created on 9 Oct 2018  路  7Comments  路  Source: BabylonJS/Babylon.js

I'm loading an object with the SceneLoader.ImportMesh, but it does not show the texture.
I see the texture loading in Chrome dev tools but they dont show up in the scene.
image

bug loaders

All 7 comments

The texture on your server is almost fully white:
image

And it seems to be correctly loaded:
image

Thank you a lot for your response.

The .mtl consists of 3 materials:
https://raw.githubusercontent.com/madika/babylon-test/2b867c0fd20217c7a907ebffed1e686dc7b97aee/01310-020.obj.mtl

Texture/01310-020-Boden.png, Texture/madika.png and Texture/01310-020-Deckel.png

I just did some testing and replaced another material (playground) and it seems to load the texture now, but it applies only one material (the last?) to everything. Is there some sort of restriction or some setting I need to set for every texture to be applied (I see all 3 materials loading in Chrome console) ?

Let me ping @kcoley who will be able to check the problem

Hi @madika I'll take a look

@madika sorry for the delay. Looking at your obj file, it looks like you are assigning per-face materials in your obj file which Babylon.js does not support. You can either pack all your textures into one and use texture coordinates to map to your mesh, or you can split your mesh into multiple meshes and assign materials to each mesh. Let me know if this makes sense.

@madika sorry for the delay. Looking at your obj file, it looks like you are assigning per-face materials in your obj file which Babylon.js does not support. You can either pack all your textures into one and use texture coordinates to map to your mesh, or you can split your mesh into multiple meshes and assign materials to each mesh. Let me know if this makes sense.

Thank you, I will give it a try.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phuein picture phuein  路  3Comments

CadsoftBrianW picture CadsoftBrianW  路  3Comments

Bloadrick picture Bloadrick  路  5Comments

azukaar picture azukaar  路  5Comments

CadsoftBrianW picture CadsoftBrianW  路  3Comments