I am trying to load a .obj into Three.js using there objLoader.
var loader = new THREE.OBJLoader( manager );
loader.load( 'obj/gate-2.obj', function ( object ) {
object.traverse( function ( child ) {
if ( child instanceof THREE.Mesh ) {
child.material.map = texture;
}
} );
All works fine using blender models however whenever I try to use my own custom 3Ds Max models, the .obj won't load within the browser and gives out an error. Am I exporting wrong or does Three.js not support 3Ds Max .obj exporter?
Error Message
Error: Unexpected line: s 2
parseOBJLoader.js:339
(anonymous function)OBJLoader.js:24
(anonymous function)three.min.js:376:387
s 2would be a smoothing setting. Does the loader support smoothing? I would assume that it would just skip over lines that it doesn't understand. I think it's for smoothing groups. - zero298