Any benefit in Open Assit Importer?

Started by
2 comments, last by MJP 11 years, 4 months ago

Hey, I just wanna know if there are any benefits I don't see in the use of http://assimp.sourceforge.net/ ?

It's often recommended but I don't know why. Could someone give a reason therefor?

Until now I'm pretty satisfied loading .obj files into my own format and right because it works that good I'm even more confused why someone would need something that complex? Maybe for big projects but is it necessary or does it have any benefits for me as a small guy?

Regards

from time to time i find time

Advertisement

obj is a rather trivial format (tough i doubt you have a full spec implementation), but what if you need support for .dae (collada) .blend (blender) .3ds (3ds max) or some other more complicated formats? You can write your own importer for all of these, but if you just want a mesh in your project so you can move on link to asset importer and call it a day. I don't want to waste a day or two understanding the .blend format, so i just use an existing solution.

I recently wrote a chapter on this for my upcoming book and in comparing the pros and cons between different formats and the tools used to load them I realized there is one very important pro for the Autodesk® FBX® SDK: Animation processing.

You can stick with .OBJ if you like—if it meets your needs and your importer works then there is no reason to use Assimp.

But soon you will discover that there is no support for animations in .OBJ files (and very limited support via .ANM companion files), and while there are some projects in which this is no problem, this is not acceptable for most other projects.

When are ready to move on, I would suggest .FBX because of its SDK.

The SDK makes loading .FBX files trivial and as mentioned it has some very important scene-processing properties as well.

The most valuable is the ability for the SDK to process/evaluate animation tracks.

Firstly each key frame on a single track can have one of several interpolation type: Linear, quadratic, or step.

Then each of these have different parameters. For example stepping means you just use the value at the key frame until the next key frame (no interpolation), but a flag might indicate that instead you are not to use the current key frame’s value but actually the next key-frame’s value.

If you were emulate the entire animation system, with all the types of curves and parameters for those curves, it would be non-trivial.

Instead the SDK can do this for you and all you have to do is store all the values along the track, and at run-time just use linear interpolation.

It sounds complex and advanced, but if you are going to do animation at all it will never be any less complex/advanced than this. Linear interpolation his is the bare necessity for any 3D animation, and this is exactly what you get.

With other loaders such as OpenCOLLADA and Assimp, all you get is access to the 3D data (Assimp has a few extra features but nothing quite as useful). The Autodesk® FBX® SDK allows you not only to load the 3D data but also to process and evaluate the 3D scene at any time along an animation, and this is one of the hardest features to handle by yourself, making this the biggest pro of any other loader for any other format.

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

It's not really that complicated...if for whatever reason you need to load lots of model formats, it's a library that makes it easier to do so. It's pretty much the same as image formats: if you needed to load JPEG, PNG, and BMP files it would be much simpler to use a library as opposed to integrating 3 separate libraries or writing your own loader for each.

Bigger games often don't deal with model formats at all, since you can just write an exporter for Maya or MAX and directly extract the raw data and process it however you'd like. But some studios like to support multiple modeling packages (for various reasons), in which case working with an interchange format like FBX might make more sense. Usually though there's not much of a reason to support multiple file formats, unless you want to be able to load user-generated content.

This topic is closed to new replies.

Advertisement