Eric_He
November 17, 2024, 2:08am
1
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
hofk
November 17, 2024, 5:28pm
3
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
Eric_He
November 17, 2024, 8:00pm
5
Thanks @Chaser_Code , this code works for me and it displayed now. Very appreciated with it.
Eric_He
November 17, 2024, 8:06pm
6
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.
Eric_He
November 17, 2024, 8:08pm
7
will try your code later, it is good for me to learn more.