Topic: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

I'm starting working on a solution to load more 3d formats, like collada or obj
and thanks to Assimp (Open Asset Import Library) it should be faster than I taught !

Assimp can read a (really) large variety of 3d formats : http://assimp.sourceforge.net/main_feat … rmats.html
Some are more or less suitable, but the nice thing is from Maratis side there is only one reader to code in c++.

The import will be only used by Maratis editor, all the files will be automatically converted to Maratis binary mesh during the publishing, so the engine will stay as light as before.

After 3 hours of work, the reading of static (untextured) mesh is working :

http://www.maratis3d.org/wp-content/uploads/2013/01/AssimpImport.jpg
(left is a obj file, right a collada file)

Still work to do but thank you Assimp.

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

Great Job! big_smile

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

With materials and textures :

http://www.maratis3d.org/wp-content/uploads/2013/01/Assimp02.jpg
here reading from a blend file

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

blend file support ? just amazing !!

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

So we can use objects ditrectly from blender files without exporting them to maratis meshes?

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

yes, but it's in fact a bit limited, for blend files assimp doesn't support animation yet,
so it's always better to use the exporter. But if it evolves it can be interesting to import a full scene with lights and cameras.

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

yessss ... This is great news for me ... so many formats, just wonderful

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

This is very cool. Any projected release dates? smile

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

Hi, there is also the script binding to finish before doing a release so I'm not sure, maybe february,
but I'll commit the code soon.

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

I just finished the animation import ! all the code is on svn.

The only thing now is that all this formats are not always using compatible materials or textures and need to be edited.
There is two options I'm thinking about :

- adding a material editor in Maratis (complex and long to code but easy of use)
- converting the mesh in Maratis xml mesh file and editing the file by hand (easy to code but not easy of use)

The third option (maybe more realistic) is to start by doing option 2, then do option 1 in the future.

What do you think ?

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

As for me I like option 3. It makes more sense to me. Thank you very much for all of this. I think, I speak for us all when I say   We truly do appreciate all of the work you have put into this engine. It is a masterful piece of work.

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

Well, the third option seems fine for now.
Of course a material editor would be a giant step forward for maratis,
but if we can use the new formats right now, even with a minor annoyance, that'll be great too smile

And as Ender say, thanks for your amazing work & efforts you put in maratis

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

Option 3 is a good start for me. Maratis is very attractive for programmers,as my code leader says. This is a further step to make it interesting for artists. Maybe you could also evaluate to proceed with the goal of achieving real-time editing of materials and provide an environment to make artists' portfolio screenshots . This approach is what ensured a large use of marmoset toolbag
http://www.marmoset.co/

Great work!

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

I started the work on the xml mesh conversion, only the animation part is missing.

There will be two ways for using files from the Assimp reader :
- by reading the file directly from the mesh/ folder, if you don't need to modify the mesh
- by using a new menu in File > Import external models (not sure how to call it), this will detect if the file contains multiple meshs and will convert them in xml and copy in the mesh/ folder ; so it will be possible to modify the meshs with a text editor


For both ways the meshs will be always converted in binary during publishing.

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

"For both ways the meshs will be always converted in binary during publishing"

if i publish my game before this,the .blend is exposed?
anyone can easily open my character.blend file in blender and play with it?

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

when you publish your project using "File > publish project"
all the game data are packed into a npk file so your data are first hidden by that,
and additionally all the meshs (.mesh or collada or blend or anything) are converted in maratis binary mesh format
to make the loading faster.

With a bit of code it's even possible to encrypt the npk package.

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

i have tried file > import 3d model
to import a colada animated mesh exported from blender
but during the game the mesh just starts to animate
it seems that there are no export options or commands to animate collada yet,right?

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

marval wrote:

i have tried file > import 3d model
to import a colada animated mesh exported from blender
but during the game the mesh just starts to animate
it seems that there are no export options or commands to animate collada yet,right?

WHen you are in Blender, its just a 'blender' animation. When you export it from blender, as a collada file, then IMPORT it into
the editor via the import 3d model menu item, it is then a collada animation.

Cheers wink
hs

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

collada animation yes,but isthe commands to edit and play collada animation?

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

IM not sure what you are asking HM,,,you play the animation( to see it in action inside maratis that is ) with the icon in maratis editor called 'pacman',

Re: Reading more 3d formats : Assimp integration (Collada, obj, blend...)

marval :
the file > import command convert the collada mesh as-it and save it as Maratis mesh in your-project/meshs/.

There is no tools yet to edit the animation inside Maratis, so you need to open the maratis mesh file (*.mesh) and modify the animation table using a text editor (it's XML).

Look at Jules.mesh in the exemples to see how multi-animation are written.