zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
114 stars 22 forks source link

Adding a Group to an existing, frame animated MD3 model #137

Closed quakemmo closed 4 years ago

quakemmo commented 4 years ago

Hello and thank you for your continued work on ioq3 and mm3d.

I have an old md3 player model, nothing fancy, just your run-of-the-mill upper/lower/head.md3 thing, animation.cfg for the usual Q3 anims and a bunch of image files. It has a few groups such as u_upper, l_legs, u_hands and such.

I'd like to add a new group, let's say, u_elbow, and be able to skin it separately.

However, when I fire up Maverick M3D (or Misfit M3D for that matter), select a bunch of faces and try to create a new group, it says it cannot do that because I have frame animations.

What would be the proper way of getting it done, if any?

Thanks in advance.

zturtleman commented 4 years ago

It might be possible to save a new .mm3d model with just a group and then load frame animated model and use menubar -> Model -> Merge... to import the dummy group model.

It looks safe to enable adding / deleting groups from frame animated models. I'll check it and it may be in the next release later this year.

quakemmo commented 4 years ago

Thank you, Zack. Is it a simple if condition to change (that I could patch myself while waiting on your release), or does it involve code base knowledge ? Again, your work is appreciated by the q3 community! Thanks.

zturtleman commented 4 years ago

I'm looking at deleting this section of code from Model::addGroup, and from Model::deleteGroup function below it. I haven't tested it so no guarantees.

https://github.com/zturtleman/mm3d/blob/d89ab5104aeca890ee46321720a5266dbf80b45a/src/libmm3d/model_group.cc#L43-L47

quakemmo commented 4 years ago

Seems to work. You rock.

zturtleman commented 4 years ago

This is fixed by 6515b2016530cf48c49be0827b76eb64a582ec90. Thanks for bring this to my attention.

m-7761 commented 3 years ago

FWIW I've removed all of these arbitrary blocks from my fork (in my github repos here) but my MD3 features are largely unmodified outside of maintenance and refactors.