ofx3DModelLoader - more 3D file formats!

Hey crew,

I just stumbled on this by chance - it is called the Open Asset Import Library.
http://assimp.sourceforge.net/index.html

It supports:
Collada ( *.dae )
3D Studio Max 3DS ( *.3ds )
3D Studio Max ASE ( *.ase )
Wavefront Object ( *.obj )
Stanford Polygon Library ( *.ply )
* AutoCAD DXF ( *.dxf )
LightWave ( *.lwo )
Stereolithography ( *.stl )
AC3D ( *.ac )

GAME FILE FORMATS
* Valve Model ( *.smd,*.vta )
Quake I ( *.mdl )
Quake II ( *.md2 )
Quake III ( *.md3 )
* Return to Castle Wolfenstein ( *.mdc )
Doom 3 ( *.md5 )

MOTION CAPTURE
Biovision BVH ( *.bvh )
* CharacterStudio Motion ( *.csm )

OTHER FILE FORMATS
DirectX X ( *.x ).
Quick3D ( *.q3d ).
Irrlicht Mesh ( *.irrmesh ).
* Irrlicht Scene ( *.irr ).
Neutral File Format ( *.nff )
Sense8 WorldToolKit ( *.nff )
Object File Format ( *.off )
PovRAY Raw ( *.raw )
Terragen Terrain ( *.ter )
3D GameStudio ( *.mdl )
3D GameStudio Terrain ( *.hmp )

Seems like it could be of great benefit to ofx3DModelLoader as it reads all formats into one common format. Also supports animations see: http://assimp.sourceforge.net/animVideos.html

It comes with an Xcode project which was quite easy to build and get running.

All I had to do is add the NO_BOOST #define to AiDefine.h

and
#define AI_BUILD_NO_3D_IMPORTER
#define AI_BUILD_NO_OPTIMIZEGRAPH_PROCESS
#define AI_BUILD_NO_OPTIMIZEMESHES_PROCESS
#define AI_BUILD_NO_LWS_IMPORTER
#define AI_BUILD_NO_CSM_IMPORTER

to the top of Importer.cpp - AI_BUILD_NO_3D_IMPORTER means no Unreal support but I think it is easy to get working.

**Update:
Also remove the two boost libs from the sidebar. **

Anyway would be good to see if anyone is interested in this and would like to help out.

Theo

Holly Crap what a killer find. I was trying to get FCollada running but no go. Im going to try this right now. Thanks Theo :slight_smile:

This is really great! :smiley:

I am having difficulty compiling assimp in xcode though. After following theo’s instructions, I get one error:

library not found for -lboost_date_time-xgcc40-mt

Any thoughts on this?

thanks!

![](http://forum.openframeworks.cc/uploads/default/308/Picture 1.png)

wow awesom theo, I actually finally got the Collada DOM to run and compile in xCode, I also was able to load all example files including animations morphing and so on. Didn’t have the time to make an OF version though. I will definately look into this one too!

[quote author=“5cameron”]This is really great! :smiley:

I am having difficulty compiling assimp in xcode though. After following theo’s instructions, I get one error:

library not found for -lboost_date_time-xgcc40-mt

Any thoughts on this?

thanks![/quote]

Oh sorry - forgot one other thing - remove the two boost libraries from the sidebar.
I can’t remember where they are exactly but maybe under libs?

Then it should compile fine.

Oh thats awesome!

You probably should check out the ColladaLoader Chris and Friedrich got working in OF.
She posts a link to it here: http://forum.openframeworks.cc/t/obj-loader-animations/1479/22

kool, I will definately check that out, seems to be nice in terms of complexity. Anyways having the whole DOM available from within OF would be awesome too!

Oh sorry - forgot one other thing - remove the two boost libraries from the sidebar.
I can’t remember where they are exactly but maybe under libs?

Then it should compile fine.

It did indeed. They popped up as red in the lefthand column

Thanks theo!

Now to make this do something… :mrgreen:

Hey, this library looks really interesting. I was wondering: has any progress been made to including it in ofx3dModelLoader?

Also, can this library create files? It would be really cool to use the new ofxOpenNI addon to create motion capture files that could then be used in other 3D workflow/animation apps…

– Greg

The 007 release will have an assimp model loader which supports a ton of 3D formats. Huge thanks to Vade for hooking it up.

woo such a big good news
thanks theo