Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTL and OBJ and JPG problems with OBJLoader2 #16395

alexs7 opened this issue May 6, 2019 · 2 comments


None yet
2 participants
Copy link

commented May 6, 2019

There seems to be a problem when loading .obj files that have a .jpg, and a .mtl texture. I am using the example "webgl_loader_obj2" and I just changed these lines of code:

var onLoadMtl = function ( materials ) {
  objLoader.setModelName( modelName );
  objLoader.setMaterials( materials );
  objLoader.setLogging( true, true );
  objLoader.load( 'models/obj/my_scans/Model.obj', callbackOnLoad, null, null, null, false );
 objLoader.loadMtl( 'models/obj/my_scans/Model.mtl', null, onLoadMtl );

as you can see to load "Model".

Now this renders fine in Meshlab, but on a browser it shows nothing.

The console shows no errors:

Screenshot 2019-05-06 at 17 58 59


This comment has been minimized.

Copy link

commented May 7, 2019

Please use the forum for help requests.
Does the network tab show the loading of your model files? Perhaps it is not finding them.
Also, a complete fiddle helps people helping you.

@yomboprime yomboprime closed this May 7, 2019


This comment has been minimized.

Copy link

commented May 7, 2019

Network seems to be showing that everything is fetched. I will post the question over to the forums that you mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.