jAssimp

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

jAssimp

elect
Hi,

several times I needed something like Assimp, but unfortunately the java support is crap

therefore today I decided to start porting it to java, I am starting by adding the MD2 format since I am following a tutorial that is using it

But of course the effort is huge, so I strongly ask for help

http://www.reddit.com/r/opengl/comments/2xafhb/alternative_to_assimp_for_java/

https://github.com/assimp/assimp/issues/331

https://github.com/elect86/jAssimp
Reply | Threaded
Open this post in threaded view
|

Re: jAssimp

gouessej
Administrator
Hi

Which formats do you need to use? There are already numerous loaders in several major engines but I admit that Assimp supports tons of formats.

In my humble opinion, creating an API independent of any engine to import and export meshes is a bad idea, this is the job of an engine. Moreover, porting Assimp is a huge task and you should wonder whether it's worth it. I mean that a common mistake consists in trying to support formats that aren't interchange formats. I would rather focus on a very few stable and known formats instead of porting Assimp. Anyway, any developer who would like to use your API will have to write some boilerplate code to interface it with the engine.

Finally, I ported an MD2 importer from JMonkeyEngine to JogAmp's Ardor3D Continuation, some bugs have remained in the former for several years, the maintenance of lots of importers is very time consuming. Good luck.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jAssimp

elect
gouessej wrote
Hi

Which formats do you need to use? There are already numerous loaders in several major engines but I admit that Assimp supports tons of formats.
At the moment only MD2 and STL.

gouessej wrote
In my humble opinion, creating an API independent of any engine to import and export meshes is a bad idea, this is the job of an engine.
My targets is essentially promoting and supporting the java graphic dev, since I like Java, especially its clearity and readability on contrary on C. That said, I agree with the Assimp description

assimp is a library to load and process geometric scenes from various data formats. It is tailored at typical game scenarios by supporting a node hierarchy, static or skinned meshes, materials, bone animations and potential texture data. The library is not designed for speed, it is primarily useful for importing assets from various sources once and storing it in a engine-specific format for easy and fast every-day-loading. assimp is also able to apply various post processing steps to the imported data such as conversion to indexed meshes, calculation of normals or tangents/bitangents or conversion from right-handed to left-handed coordinate systems.


gouessej wrote
Moreover, porting Assimp is a huge task and you should wonder whether it's worth it.
I know and I also think that. Anyway I had that need many many times in the past, and everytime I googled hoping that something useful came out and everytime I ended up discovering that there was nothing useful and usable.

So that's why I decided to start write it by myself. Why waiting for some else doing what you need? This at the end is somehow a selfish and too much convenient behaviour. Start by yourself and maybe someone like me would see the positive intent and will help and then maybe one day we all will benefit from it.

Honesty I dont know if this will be ever going to be useful to someone else other than me, but at least I can said I tried and in the worst case scenario I will be the one using it :)

gouessej wrote
I mean that a common mistake consists in trying to support formats that aren't interchange formats.

I would rather focus on a very few stable and known formats instead of porting Assimp. Anyway, any developer who would like to use your API will have to write some boilerplate code to interface it with the engine.
As the Assimp description says, the goal is to have a lib that let you load different format in the format of your own engine.

Any dev who would like to use and is already used to Assimp, will recognize the structure and classes on the fly.
Let's be clear, some code to interface this import lib to your own engine *must* be written in any case, I think this is obvious. The critical question is how much and how much complicate.. I studied the Assimp structure and seems pretty clear to me, so I am not going to change it

gouessej wrote
Finally, I ported an MD2 importer from JMonkeyEngine to JogAmp's Ardor3D Continuation, some bugs have remained in the former for several years, the maintenance of lots of importers is very time consuming. Good luck.
I will be satisfied if I can load the majority of model belonging to a format without issues

Anyway thanks :)
Reply | Threaded
Open this post in threaded view
|

Re: jAssimp

gouessej
Administrator
elect wrote
At the moment only MD2 and STL.
JogAmp's Ardor3D Continuation already supports MD2. Its STL importer is still experimental and untested (by me). It can be used with OpenCTM via jOpenCTM which already allows to support numerous formats.

The previous maintainers of Ardor3D, the current maintainers of LibGDX and JMonkeyEngine don't want to support tons of formats, they focus on Collada, FBX and Ogre. I understand the philosophy of jAssimp and I consider it as an excellent source of inspiration to write importers but porting it to Java rather than using it to create the importers of an engine will lead to you to an higher memory footprint. Your project will be really interesting only if you support non trivial known formats whereas OBJ, MD2 and STL are particularly easy to support.

David Henry wrote some excellent tutorials about MD2 and I highly encourage you to look at my source code.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jAssimp

elect
gouessej wrote
David Henry wrote some excellent tutorials about MD2 and I highly encourage you to look at my source code.
Do you mean this one http://tfc.duke.free.fr/old/models/md2.htm?

There is a link at the end of the md2 wiki page, thanks anyway :)
Reply | Threaded
Open this post in threaded view
|

Re: jAssimp

gouessej
Administrator
Yes I meant this one and "our" MD2 importer is here:
https://github.com/gouessej/Ardor3D/tree/master/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2

Take care of the degenerated triangles. Sometimes, they are used as separators of subsection within meshes:
https://github.com/gouessej/Ardor3D/issues/10
Julien Gouesse | Personal blog | Website