raprapbautista10 / webgl-loader

Automatically exported from code.google.com/p/webgl-loader
0 stars 1 forks source link

Unable to convert OBJ with normals (VN) made by IMOD #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The attached file (and many others like it) cannot be loaded, the output to 
stderr (on Windows 7 x64 compiled with MinGW) is:

terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

The file is created with IMOD. If exporting from IMOD without normals then the 
file converts fine (although I am having problems getting it to render with a 
material).

Original issue reported on code.google.com by j...@coderforlife.com on 28 Feb 2012 at 4:48

Attachments:

GoogleCodeExporter commented 8 years ago
This turned out to be a bug in the IMOD OBJ converter not this compressor. 
There should have been // instead of / in the face specifications (since it was 
lacking the vt index). I have contacted that author to fix the issue and in the 
mean time will simply use a regexp to correct the problem.

Reference: http://en.wikipedia.org/wiki/Wavefront_.obj_file#Vertex.2Fnormal

Materials are now working (since there are normals, also fixed by copying 
walt's computeNormals loading function).

Original comment by j...@coderforlife.com on 1 Mar 2012 at 1:21

GoogleCodeExporter commented 8 years ago
Sounds like this wasn't a bug, then. Whew!

Original comment by wonchun on 4 Apr 2012 at 2:34