0
votes

I have a face mesh which a friend had send over. I am trying to load it in the browser using Three.js with the standard OBJLoader but it is unable to do so. Following is the code I am using.

loader.load( 'models/'+modelname+'.obj', function ( object ) {
    object.scale.x=object.scale.y=object.scale.z=scale;
    scene.add( object );
});

You can access the obj file at http://determinantstudios.com/myImage.obj As you can see that the vertices defined are in higher numbers than other normal obj files, I am unable to load it. Should I use conventional WebGL methods to load or this can be done using Three.js?

My Obj File Excerpt: v -59978.6 38906.3 79699.7 v -60006.3 36128.8 79443.6 v -59754.6 32279.6 78834.5 v -59209.6 28217.3 78279.8 v -60077.3 23917.6 76814.3 v -61499.7 18685.8 76209.7

If I have to load it, should I normalize it to lesser number? If yes, how do I do it?

Edit: I noticed one more thing. The obj has no normals.

1

1 Answers

1
votes

Solved the problem. Scaled down the image by 1000 and was able to render it appropriately.