Need help for obj & mtl loader display

Hi, I have tried to load obj & mtl with texture image file and followed example page html code here: three.js webgl - OBJLoader + MTLLoader but it doesn’t show the object. I tried to rescale or reset the center and camera, lights, but still cannot see the object which is a pair of shoes. pls help, many many thanks.

Eric

You should in general try switching to and using GLB format instead since it would be only 1 file to load.

The code of the page you posted appears to be working fine locally with one of my OBJ + MTL models.

Maybe try loading your model files locally in my OBJ+MTL Viewer to see if anything shows there.

Also try increasing the PointLight intensity to 500.

1 Like

A very old example, but maybe it helps anyway?

loadOBJ

from the Collection of examples from discourse.threejs.org

1 Like

object.children[0].material.transparent=false;


2 Likes

Thanks @Chaser_Code, this code works for me and it displayed now. Very appreciated with it. :slightly_smiling_face:

I have tried intensity 500, but still can’t see it. thanks and @Chaser_Code found the object need to set transparent false to see it.

will try your code later, it is good for me to learn more.