Loading .obj file with OBJMTLLoader.js

1k Views Asked by At

In Three.js I'm using OBJMTLLoader.js to load my 3D model.

After Chrome has loaded the scene, the model is not shown. In the console I have >60'000 warnings. They all look like:

THREE.OBJMTLLoader: Unhandled line f -215//-215 -202//-202 -212//-212

When I use OBJLoader.js to load the model (without the .mtl file), the model gets loaded successfully (of course without materials)

What is the problem with the OBJMTLLoader.js loader?

This is how I load the model:

<script src="scripts/objmtlloader.js"></script>
<script src="scripts/DDSLoader.js"></script>
<script src="scripts/MTLLoader.js"></script>

...

THREE.Loader.Handlers.add(/\.dds$/i, new THREE.DDSLoader());
var loader = new THREE.OBJMTLLoader();    
loader.load(objFileName, mtlFileName, function(object) {
    scene.add(object);
});
0

There are 0 best solutions below