[ODE] Tip for loading trimesh data from OBJ files

Tyler Streeter tylerstreeter at gmail.com
Sat Jun 18 09:09:38 MST 2005


A friend of mine was recently having trouble loading trimesh data from
an OBJ file.  His app would compile/link/run, and sometimes the
collisions between trimeshes and other primitives would appear to
work, but sometimes they wouldn't.

We eventually figured out that the problem was with the index array
returned by his OBJ loader.  It looks like the OBJ format standard is
to have the indices start at 1.  Then, of course, OPCODE assumes the
first index is 0, so all the indices in the index array were off by 1.

For anyone else having problems loading trimesh data from OBJ files,
make sure the values in your index array start at 0, not 1 (e.g. by
decrementing each value in the index array by 1).

Tyler



More information about the ODE mailing list