-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AssImp to model loading pipeline #14
Comments
assimp sounds like some kind of hybrid donkey vs monkey - so it naturally has my approval 👍 |
also this is based off assimp: https://github.com/acgessler/open3mod |
Nice, and I've been making pretty good progress on converting .mdl -> obj |
animated models as seen here: ftp://azbuildslave.cloudapp.net:2121/pod.wmv make me tingle |
and here ftp://azbuildslave.cloudapp.net:2121/bom07.wmv |
Check out the XFile parser - TRef ImportXFile(Modeler* pmodeler, ZFile* pfile, Number* pnumberFrame, bool& bAnimation) |
Was just browsing along and saw this todo. I had a need for *.obj Allegiance models, so I went and converted them. I don't know if you finished your conversion, or if the way I converted will be useful at all - but feel free to check them out. https://github.com/brianmxwll/AllegianceModels I'm open to further modifications (or fork away obv) if they make them more broadly usable. Lemme know. I'm not a model expert so may have missed a detail somewhere along the line :) |
That's sweet @brianmxwll I never did finish the mdl -> obj converter, and had never even thought of doing x->obj. |
Here is the .net lib I created for loading .mdl files into memory so they could be converted. https://github.com/AllegianceZone/MDLReaderWriter |
Awesome. Let me know if you run into any issues using the obj files. They may work for one purpose but not others, so definitely open to tweaking them to work for everyone. The only thing I haven't focused on so far is creating a material (*.obj.mtl) file for the derivative models like *_static.obj. Those ones I just stripped all material reference from since I can't necessarily guarantee that the standard model and standard_static model are identical. |
I'm seeing some mtl's in there. https://github.com/brianmxwll/AllegianceModels/blob/master/Models/cap300/obj/cap300.obj.mtl
to the _static.obj file so they use the same .mtl as the non static .obj? Also what is the difference between the _static.obj and the other. No animation data? |
Btw. looking in https://github.com/brianmxwll/AllegianceModels/blob/master/Models/cap300/cap300.x#L4673 Maybe it would be better to convert to Collada ( .dae ). ** edit **
and from inside cap500.x
|
I don't think just adding a reference to the .mtl will be sufficient - there are materials referenced in the .obj file for each mesh/submesh. See: https://github.com/brianmxwll/AllegianceModels/blob/master/Models/cap300/obj/cap300.obj#L1445 I'll look into the animation stuff when I have some time. I structured the repo to support different file formats, so a "dae" folder for each model would be just fine. Since obj files don't support animation, that's gonna be a hard stop if animation is required. Kind of a mixed bag, IMO, is there any animation in the models that's actually worthwhile? Besides bomber missile bays opening... kinda meh. Open to being wrong though haha |
To tack on about the _static.obj files (ignoring animation for now), it wouldn't be too hard to add in the material references to match the standard .obj file. The obj file is broken up by meshes and Assimp outputs them into clean blocks - easy enough to parse through and add the appropriate material references. The only unknown for me is the difference between *.obj and *_static.obj. Are -all- of those models |
Well we have never had the animation so we don't know what we are missing really. :P But games like Eve do a pretty good job making ships with animation. That doesn't mean we need to carry over the animations from the existing models if it is a pain. I was hoping it was the export format not supporting it that was the issue, but I think It has more to do with the .x files being imported. |
Eh, it may or may not. Obj just doesn't support anims... so it might be worth checking out a diff format to see how it fares. |
Open Asset Import Library is a Open Source library designed to load various 3d file formats and convert them into a shared, in-memory format. It supports more than 40 file formats for import and a growing selection of file formats for export.
This will let us start using standard model formats
https://github.com/assimp/assimp
The text was updated successfully, but these errors were encountered: