Loading and displaying Blitz3D models

BlitzMax Forums/OpenGL Module/Loading and displaying Blitz3D models

JonasL(Posted 2006) [#1]
I need to load and display BlitzMax3D models (.b3d) in BlitzMax using opengl. Have anyone out there written such code?

I know that there are full 3D engines that have been wrapped etc. for use with BlitzMax, but quite frankly I don't get most of them to work/compile on both Win and Mac. Anyway, I just need code to load and display a model, so having to haul around a full 3D engine is too much waste of resources.

The milkshape loader written by Chris C is just what I'm looking for, except it should have loaded b3d files! ;)


Chris C(Posted 2006) [#2]
I didnt write the milkshape loader I just modified it very slightly, it came from the nehe tutorials

I think there was a b3d loader in the engine test that TeraBit did

You can always convert b3d files to ms3d with something like ultimate unwrap (its rather good and worth the price) thats what I do after exporting obj's from blender


AdrianT(Posted 2006) [#3]
there are b3d loaders around, but none of them transpose the left handed .B3D files to GL's right handed system correctly with proper local child rotations.

Thats the problem were having with Bmax at the moment. copying and rotating meshes and nodes ends up with wonky transforms that don't appear in blitz3D.


Chris C(Posted 2006) [#4]
what happens if you scale it -1,1,1 (could have the wrong axis there)


AdrianT(Posted 2006) [#5]
if you do a simple scale then a static mesh looks ok, but the rotations are off, left and right hand have opposite rotations, and are often rotated 90 degrees too.

I always get this stuff confused, but anything thats relies on a heirarchy like child local transforms get messed up.

Thats what I have seen so far in the last 3 or 4 attempts I've worked at B3D with various people. Same with torque.


Chris C(Posted 2006) [#6]
the the only alternitave is to manually transform each vertex after loading i guess, whats the best code you have available?