TSorcerer
11-14-2008, 02:02 PM
Hi,
I'm currently (re)starting on OpenGL. I got some stuff working, but because watching "handmade" Pyramids and Cubes isn't very interesting I got myself a doc on the .3ds fileformat and tried myself loading the mesh from it.
It was rather easy implementing the algorithm, however I encountered some strange problem. The mesh is loaded, however, it's positioning is absolutely off. It's a) lying on the side b) not even close to the origin (where I draw the mesh).
I got the LocalAxis and Center Coordinates from the 3ds file but they're not set to any values I could use to place my mesh properly: center is (0,0,0) and Local Axis is (1,0,0),(0,1,0),(0,0,1)
My question now is: Am I screwing up or are my meshes just off? Would I need to manually calculate the meshes center and relocate it? I loaded one of the meshes in a third party mesh viewer and there it seemed to be positioned well... I'm confused.
Greets,
Daniel
PS: I'm using this mesh (http://www.createandshare.com/3dobjects%5C96frig3ds.zip).
I'm currently (re)starting on OpenGL. I got some stuff working, but because watching "handmade" Pyramids and Cubes isn't very interesting I got myself a doc on the .3ds fileformat and tried myself loading the mesh from it.
It was rather easy implementing the algorithm, however I encountered some strange problem. The mesh is loaded, however, it's positioning is absolutely off. It's a) lying on the side b) not even close to the origin (where I draw the mesh).
I got the LocalAxis and Center Coordinates from the 3ds file but they're not set to any values I could use to place my mesh properly: center is (0,0,0) and Local Axis is (1,0,0),(0,1,0),(0,0,1)
My question now is: Am I screwing up or are my meshes just off? Would I need to manually calculate the meshes center and relocate it? I loaded one of the meshes in a third party mesh viewer and there it seemed to be positioned well... I'm confused.
Greets,
Daniel
PS: I'm using this mesh (http://www.createandshare.com/3dobjects%5C96frig3ds.zip).