Asset importing is one of the features in which Irrlicht shows a slower, yet steady, evolution, given that the engine must evolve first so the loaders may evolve accordingly. For this matter, a solution as this sibling project in source forge is really something worth.
http://assimp.sourceforge.net/
This library abstracts the process of loadinf scenes, because it loads not only meshes, but also cameras, lights, skinned meshes, materials, bones, animations, and so on, in an unified manner, so, the library provices a simple model to follow, and after it loads a scene, the library provides a series of tools to ease the conversion process so the imported data becomes useable for the engine.
list of characteristics:
-Written in portable, ISO-compliant C++
-Easily configurable and customizable
-Core interface / API is provided for both C++ and C
-Command-line interface to perform common operations (i.e. quick file stats, convert models, extract embedded textures) from the shell
-Imports bones, vertex weights and animations (i.e. skinning, skeletal animations)
-Loads multiple UV and vertex color channels (current limit is
-Works well with UNICODE input files
-Supports complex multi-layer materials
-Supports embedded textures, both compressed (e.g. PNG) or just raw color data
-No external dependencies except boost(external link) (zlib and irrxml are also needed, but they're included in the repository so you don't need to bother). And there's even a workaround to compile Assimp without boost - with some minor limitations.
-Due to its export interface, Assimp serves as general-purpose 3D model converter
-(Just because of its name: Assimp renders your program sexier)<- this last one isn't true, Irrlicht renders are EVEN sexier XDDD
And this is a list of model and scene formats that it loads.
An asterisk indicates limited support.
Common interchange formats
Collada ( .dae )
Blender 3D ( .blend )
3ds Max 3DS ( .3ds )
3ds Max ASE ( .ase )
Wavefront Object ( .obj )
Industry Foundation Classes (IFC/Step) ( .ifc )
XGL ( .xgl,.zgl )
Stanford Polygon Library ( .ply )
*AutoCAD DXF ( .dxf )
LightWave ( .lwo )
LightWave Scene ( .lws )
Modo ( .lxo )
Stereolithography ( .stl )
DirectX X ( .x )
AC3D ( .ac )
Milkshape 3D ( .ms3d )
* TrueSpace ( .cob,.scn )
Motion Capture Formats
Biovision BVH ( .bvh )
* CharacterStudio Motion ( .csm )
Graphics Engine Formats
Ogre XML ( .xml )
Irrlicht Mesh ( .irrmesh )
* Irrlicht Scene ( .irr )
Game file formats
Quake I ( .mdl )
Quake II ( .md2 )
Quake III Mesh ( .md3 )
Quake III Map/BSP ( .pk3 )
* Return to Castle Wolfenstein ( .mdc )
Doom 3 ( .md5* )
*Valve Model ( .smd,.vta )
*Starcraft II M3 ( .m3 )
*Unreal ( .3d )
Other file formats
BlitzBasic 3D ( .b3d )
Quick3D ( .q3d,.q3s )
Neutral File Format ( .nff )
Sense8 WorldToolKit ( .nff )
Object File Format ( .off )
PovRAY Raw ( .raw )
Terragen Terrain ( .ter )
3D GameStudio (3DGS) ( .mdl )
3D GameStudio (3DGS) Terrain ( .hmp )
Izware Nendo ( .ndo )
And more stuff. If it works as it says, it is indeed a great ally.
Assimp: The Open Asset Import library
Assimp: The Open Asset Import library
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: Assimp: The Open Asset Import library
Very nice indeed.
Yet again, though, another asset loader that doesn't load .mqo (Metasequoia).
You said it loads cameras and lighting. How's that?
Yet again, though, another asset loader that doesn't load .mqo (Metasequoia).
You said it loads cameras and lighting. How's that?
Re: Assimp: The Open Asset Import library
It simply abstracts the scenes into an unified structure. There is an object wich stores all the type of objects which composes the scene: a list of meshes, a list of lights, a list of animated meshes, a list of animations, a list of materials... The cameras are objects that described their position, horizontal FOV and near and far clip planes, and the same goes for the lights, they are spot lights, or omnidirectional lights, and they are described by their color, their falloff type, the falloff distance... and so. That data can then be translated into Irrlicht.
Take a look to their documentation, just looking at it is easy to understand how it works.
http://assimp.sourceforge.net/lib_html/index.html
What i also like is the list of features it presents under their postprocessing link...
Take a look to their documentation, just looking at it is easy to understand how it works.
http://assimp.sourceforge.net/lib_html/index.html
What i also like is the list of features it presents under their postprocessing link...
And they even call bitangents to the complement of the normal and the tangent XDReal time rendering
Improve vertex cache locality
Convert from right-handed to left-handed space
Limit weights affecting a single vertex
Split meshes to avoid exceeding bone count limits
Triangulate arbitrary polygons
Join identical vertices, optimize indexing
Find degenerate polygons
Split large meshes to overcome GPU limitations (i.e. vertex count)
Vertex data
Compute "hard" per-face normal vectors
Compute "smooth" per-vertex normal vectors
Compute tangents and bitangents
Scenegraph
Collapse the scene graph, transform everything to world coordinates
Optimize meshes & nodes for fewer drawcalls
Other
Validate the output structure to ensure maximum data integrity
Remove unrequired materials, effectively detect and merge duplicates
Try to correct face winding
Drop dummy bones introduced somewhere in your content pipeline
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Assimp: The Open Asset Import library
Happy to see other assimp users there certain features are really impressive. Just using assimp with something like sfml is like having a 3D engine on its own.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Re: Assimp: The Open Asset Import library
Just if more of the features of ASSIMP were really useful for Irrlicht, like splitting the bones, it would be even better. But when it comes to animated meshes, there are very few supported :/
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Assimp: The Open Asset Import library
I think CopperCube / IrrEdit also works with Assimp ( and e.g. the PixelLight-Engine ).
So MAYBE it would be a good idea to use it in Irrlicht ( "don't reinvent the wheel ..." )
and for some formats missing there still can be special importers.
I know the philosophy of Irrlicht is to not rely on external Libraries. That was a good
decision, because i know from other engines / libaries that they spend some time
fiddling it together again when one component changed ( see the Delta3D-Engine ).
But still ... you see - Irrklang is also an "external" library, but designed in such a way
that it easily fits into Irrlicht. So maybe it would be possible to write something like
a "wrapper" for Assimp. It would be a problem to get the data into SceneManger, but
there is probably a way "around" ( e.g. with 'ISceneManager::registerSceneNodeFactory(...)' ).
So MAYBE it would be a good idea to use it in Irrlicht ( "don't reinvent the wheel ..." )
and for some formats missing there still can be special importers.
I know the philosophy of Irrlicht is to not rely on external Libraries. That was a good
decision, because i know from other engines / libaries that they spend some time
fiddling it together again when one component changed ( see the Delta3D-Engine ).
But still ... you see - Irrklang is also an "external" library, but designed in such a way
that it easily fits into Irrlicht. So maybe it would be possible to write something like
a "wrapper" for Assimp. It would be a problem to get the data into SceneManger, but
there is probably a way "around" ( e.g. with 'ISceneManager::registerSceneNodeFactory(...)' ).
Re: Assimp: The Open Asset Import library
Or 'addExternalSceneLoader', 'addExternalMeshLoader' - i am not sure about it.