Error importing MMD animation #302

Closed
opened 2025-03-20 02:31:00 +00:00 by Ghost · 13 comments
Ghost commented 2025-03-20 02:31:00 +00:00 (Migrated from git.disroot.org)

Description of Issue:
When attempting to import an MMD animation, it just throws an error attempting to. Tried on blender 4.2.8, 4.3.2, and 4.4.0, both before an after using Fix MMD Model. The model is the same that was used to edit and export the animation in MMD, both in standard MMD format. Importing the animation directly by mmd_tools, whether on the model imported by cats or mmd_tools works perfectly. Also when using Fix MMD Model after an animation has been imported via mmd_tools directly it completely breaks the animation, but I'm guessing that may not be an issue if the animation imports via cats.

Blender Version:
4.2.8, 4.3.2, and 4.4.0

Cats Version:
most recent release for each blender:
Blender 4.2.8: 4.2.2.5
Blender 4.3.2: 4.3.1.5
Blender 4.4.0: 4.4.0.0 Beta

Operating System:
Windows 11

Steps to Reproduce:

  1. Install blender version
  2. Install cats for version
  3. Import mmd model via cats
  4. Attempt to import mmd animation via cats

If it doesn't error I can provide the mmd model and animation that is erroring for me to try

Screenshots or Error Messages:
Python: RuntimeError: class CATS_IMPORTER_OT_import_mmd_animation, function execute: incompatible return value , , Function.result expected a set, not a NoneType
Image

Additional Context:
Mostly just trying to get the animation transferred from MMD to Unity. The model is converted manually from a VRChat avatar to MMD format for animation, and now trying to use it to convert the animation into VRChat

Description of Issue: When attempting to import an MMD animation, it just throws an error attempting to. Tried on blender 4.2.8, 4.3.2, and 4.4.0, both before an after using Fix MMD Model. The model is the same that was used to edit and export the animation in MMD, both in standard MMD format. Importing the animation directly by mmd_tools, whether on the model imported by cats or mmd_tools works perfectly. Also when using Fix MMD Model after an animation has been imported via mmd_tools directly it completely breaks the animation, but I'm guessing that may not be an issue if the animation imports via cats. Blender Version: 4.2.8, 4.3.2, and 4.4.0 Cats Version: most recent release for each blender: Blender 4.2.8: 4.2.2.5 Blender 4.3.2: 4.3.1.5 Blender 4.4.0: 4.4.0.0 Beta Operating System: Windows 11 Steps to Reproduce: 1. Install blender version 2. Install cats for version 3. Import mmd model via cats 4. Attempt to import mmd animation via cats If it doesn't error I can provide the mmd model and animation that is erroring for me to try Screenshots or Error Messages: ```Python: RuntimeError: class CATS_IMPORTER_OT_import_mmd_animation, function execute: incompatible return value , , Function.result expected a set, not a NoneType``` ![Image](https://github.com/user-attachments/assets/d1581a08-8f95-4d74-9649-cb2c9d4554db) Additional Context: Mostly just trying to get the animation transferred from MMD to Unity. The model is converted manually from a VRChat avatar to MMD format for animation, and now trying to use it to convert the animation into VRChat
Ghost commented 2025-03-20 04:10:07 +00:00 (Migrated from git.disroot.org)

Adding on, after importing the animation via mmd_tools again after hitting Fix MMD Model, most of the animation is good again, but it doesn't move around (Root bone movement), and the feet aren't animated anymore because no more IK, but the feet IK can be baked right? I'll look into that, and also see about the root motion too ig

Adding on, after importing the animation via mmd_tools again *after* hitting Fix MMD Model, most of the animation is good again, but it doesn't move around (Root bone movement), and the feet aren't animated anymore because no more IK, but the feet IK can be baked right? I'll look into that, and also see about the root motion too ig
Ghost commented 2025-03-20 13:56:56 +00:00 (Migrated from git.disroot.org)

Hi there,

It's a very high possibility this might be bug with MMD Tools as cats doesn't do much when importing animations it self however I would have to look into it to make sure. When it comes to the Fix MMD Model system well, that could either be MMD Tools or Cats, that's a pain to fix as the code for Cats is a complete mess (Hence why I getting rid of this system in Avatar Toolkit for a more maintainable system).

I don't have any MMD anims myself so if at all possible could you provide the one you where using and the model and etc. If you don't want to post it publicly you can send it to us at hello@neoneko.xyz instead.

I know MMD Tools got an update recently (Seems the community has been trying to maintain it as the current maintainer doesn't seem to be around much) so I will at looking at updating Cats version of MMD Tools soon.

Also thanks for using the issue template, it helps me alot xD.

Thanks!

Hi there, It's a very high possibility this might be bug with MMD Tools as cats doesn't do much when importing animations it self however I would have to look into it to make sure. When it comes to the Fix MMD Model system well, that could either be MMD Tools or Cats, that's a pain to fix as the code for Cats is a complete mess (Hence why I getting rid of this system in Avatar Toolkit for a more maintainable system). I don't have any MMD anims myself so if at all possible could you provide the one you where using and the model and etc. If you don't want to post it publicly you can send it to us at hello@neoneko.xyz instead. I know MMD Tools got an update recently (Seems the community has been trying to maintain it as the current maintainer doesn't seem to be around much) so I will at looking at updating Cats version of MMD Tools soon. Also thanks for using the issue template, it helps me alot xD. Thanks!
Ghost commented 2025-03-20 15:53:38 +00:00 (Migrated from git.disroot.org)

Hi there,

I just pushed the MMD Tools update to the dev's branches for 4.2, 4.3 and 4.4 please give this the dev branch ago before we continue, if the issue continues I will investigate the bug further. I don't think it will fix your issue, but worth a shot.

Thanks!

Hi there, I just pushed the MMD Tools update to the dev's branches for 4.2, 4.3 and 4.4 please give this the dev branch ago before we continue, if the issue continues I will investigate the bug further. I don't think it will fix your issue, but worth a shot. Thanks!
Ghost commented 2025-03-20 16:15:35 +00:00 (Migrated from git.disroot.org)

Hi there,

turns out return {'FINISHED'} was missing at the end of the class (I was just being blind originally) I pushed the fix to the dev branches hopefully this fixes the import issue.

Also to answer re the animation, Unity does have IK systems, but the MMD-specific IK constraints aren't compatible with them. The Fix MMD Model function removes these incompatible constraints so you can later set up proper Unity IK after importing. I believe you can bake the bake IK influence into direct bone rotations before importing to Unity, but I not 100% sure how that works as I never done it before personally.

Thanks!

Hi there, turns out return {'FINISHED'} was missing at the end of the class (I was just being blind originally) I pushed the fix to the dev branches hopefully this fixes the import issue. Also to answer re the animation, Unity does have IK systems, but the MMD-specific IK constraints aren't compatible with them. The Fix MMD Model function removes these incompatible constraints so you can later set up proper Unity IK after importing. I believe you can bake the bake IK influence into direct bone rotations before importing to Unity, but I not 100% sure how that works as I never done it before personally. Thanks!
Ghost commented 2025-03-20 23:11:36 +00:00 (Migrated from git.disroot.org)

Now on blender 4.2 and 4.3, it gives this error when importing either the regular or baked ik versions of the animation

Python: Traceback (most recent call last):
  File "C:\Users\awsom\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\cats_blender_plugin\tools\importer.py", line 511, in execute
    bpy.ops.mmd_tools_local.import_vmd(filepath=self.filepath,bone_mapper='RENAMED_BONES',use_underscore=True, dictionary='INTERNAL')
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Users\awsom\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\cats_blender_plugin\extern_tools\mmd_tools_local\operators\fileio.py", line 316, in execute
    root = FnModel.find_root_object(i)
           ^^^^^^^
NameError: name 'FnModel' is not defined
Location: C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py:109

Image

And on blender 4.4 it says to install blender 4.3 to use it.
Cats 4.2.4.1-dev and 4.3.3.1-dev for each, tested again both before and after using Fix MMD model. It does add the proxy armature before giving that error and going no further.

I'll send you the model and animations for testing it. But quick question, when using Fix MMD Model after importing an animation, or when importing an animation on one already fixed, does it bake the センター or "center" bone motion onto either the base armature or Hips bone to keep root movement? Because it would take forever to manually tweak either the armature or Hips bone animations for about 6700 frames so it moves the exact same.

If you want to see what I mean, import the model twice, use Fix MMD Model on one, use mmd_tools directly to import the NO_IK version onto both, and you'll see the difference right away. You can also select the camera, and use mmd_tools to import the camera animation, and view it through the camera, it's even more obvious what's off watching it that way.
I'll also send the song wav if you want to import that so the animation is actually moving to something

Now on blender 4.2 and 4.3, it gives this error when importing either the regular or baked ik versions of the animation ``` Python: Traceback (most recent call last): File "C:\Users\awsom\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\cats_blender_plugin\tools\importer.py", line 511, in execute bpy.ops.mmd_tools_local.import_vmd(filepath=self.filepath,bone_mapper='RENAMED_BONES',use_underscore=True, dictionary='INTERNAL') File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Error: Python: Traceback (most recent call last): File "C:\Users\awsom\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\cats_blender_plugin\extern_tools\mmd_tools_local\operators\fileio.py", line 316, in execute root = FnModel.find_root_object(i) ^^^^^^^ NameError: name 'FnModel' is not defined Location: C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py:109 ``` ![Image](https://github.com/user-attachments/assets/96234f91-c0e3-47a5-a6b5-c515ee4ca03b) And on blender 4.4 it says to install blender 4.3 to use it. Cats 4.2.4.1-dev and 4.3.3.1-dev for each, tested again both before and after using Fix MMD model. It does add the proxy armature before giving that error and going no further. I'll send you the model and animations for testing it. But quick question, when using Fix MMD Model after importing an animation, or when importing an animation on one already fixed, does it bake the センター or "center" bone motion onto either the base armature or Hips bone to keep root movement? Because it would take forever to manually tweak either the armature or Hips bone animations for about 6700 frames so it moves the exact same. If you want to see what I mean, import the model twice, use Fix MMD Model on one, use mmd_tools directly to import the NO_IK version onto both, and you'll see the difference right away. You can also select the camera, and use mmd_tools to import the camera animation, and view it through the camera, it's even more obvious what's off watching it that way. I'll also send the song wav if you want to import that so the animation is actually moving *to* something
Ghost commented 2025-03-20 23:17:40 +00:00 (Migrated from git.disroot.org)

Hi there,

it looks like i just missed an import which was needed. The new MMD Tools changed quite alot and have changed names of some important classes. I just updated Blender 4.2 dev to fix that error so if you try Blender 4.2 dev this should be fixed.

I will just port the fix over to Blender 4.3 and 4.4 later.

Now i not sure why it doesn't work on Blender 4.4 maybe there put a limit on which blender versions you can use certain things with, i will have to look into MMD Tools code further to see what is going on here.

Hi there, it looks like i just missed an import which was needed. The new MMD Tools changed quite alot and have changed names of some important classes. I just updated Blender 4.2 dev to fix that error so if you try Blender 4.2 dev this should be fixed. I will just port the fix over to Blender 4.3 and 4.4 later. Now i not sure why it doesn't work on Blender 4.4 maybe there put a limit on which blender versions you can use certain things with, i will have to look into MMD Tools code further to see what is going on here.
Ghost commented 2025-03-20 23:42:56 +00:00 (Migrated from git.disroot.org)

To also answer your other question the fix model button doesn't "bake" animations in the technical sense or bake the bones (which is not a thing). What it actually does is restructure the armature by:

  • Re-parenting bones to create a proper hierarchy
  • Renaming bones to follow standardized conventions
  • Mixing weight paints between bones
  • Making the Hips bone the root of the hierarchy (This is most likely what you after).
  • Converts Morphs to Shapekeys
  • Bunch of other mmd related fixes.

The term "baking" is more appropriate for processes like texture baking or animation baking not for this.

This means when you use Cats' "Fix MMD Model" function, your animations will look different because Cats extensively modifies your model for VRChat compatibility. The plugin renames bones, changes the bone hierarchy, converts bone morphs to shape keys, and adjusts bone orientations - all of which can affect animations. This is especially noticeable with camera animations since they were precisely timed for the original model structure. It's a trade-off: you get better VRChat compatibility at the cost of accurate MMD animation playback. The Fix Model button was never made to preserve anything to do with animations hence why you may need to adjust.

I hope this answers your question, i wasn't 100% sure what you were asking though.

To also answer your other question the fix model button doesn't "bake" animations in the technical sense or bake the bones (which is not a thing). What it actually does is restructure the armature by: - Re-parenting bones to create a proper hierarchy - Renaming bones to follow standardized conventions - Mixing weight paints between bones - Making the Hips bone the root of the hierarchy (This is most likely what you after). - Converts Morphs to Shapekeys - Bunch of other mmd related fixes. The term "baking" is more appropriate for processes like texture baking or animation baking not for this. This means when you use Cats' "Fix MMD Model" function, your animations will look different because Cats extensively modifies your model for VRChat compatibility. The plugin renames bones, changes the bone hierarchy, converts bone morphs to shape keys, and adjusts bone orientations - all of which can affect animations. This is especially noticeable with camera animations since they were precisely timed for the original model structure. It's a trade-off: you get better VRChat compatibility at the cost of accurate MMD animation playback. The Fix Model button was never made to preserve anything to do with animations hence why you may need to adjust. I hope this answers your question, i wasn't 100% sure what you were asking though.
Ghost commented 2025-03-21 01:12:54 +00:00 (Migrated from git.disroot.org)

Well when the animation is imported, the new root Hips bone gets the animation from the previous 下半身 or "Lower Body" bone. This leaves out the previous root bone センター or "center" animation, which completely messes it up, not just looking a little different. Other than loosing that one bone's animation, it works and looks the exact same, and manually tweaking some frames on just the Hips bone put's it back the exact same. Maybe there would be a way to map the animation of the old center bone to the armature? Sone that part of the animation that gets lost has to be applied to a part that rotates it around 0,0,0, and rotating the whole armature does that. I'll be messing with some stuff manually to see how the animation can be applid to the fixed armature to get it closer. Directly applying the animation from the old center bone to the armature get's some parts pretty close, like the legs and tail, but the body and up isn't quite in place right.
I did switch back to release tho, since the dev update hadn't gotten to me yet, so I'll try importing via Cats after updating back to dev. Unless Cats doesn't do anything to tweak how an animation is imported, but if it does do some tweaking to fix things I'll recheck and not bother with manual tweaking until after

And I am using the mmd_tools included with Cats when importing via mmd_tools. I saw that having it installed sperately can break things

As for camera animation, I can import that onto the camera directly through mmd_tools, and export the camera as fbx and it works perfectly in Unity with the right set up.

Well when the animation is imported, the new root Hips bone gets the animation from the previous 下半身 or "Lower Body" bone. This leaves out the previous root bone センター or "center" animation, which completely messes it up, not just looking a little different. Other than loosing that one bone's animation, it works and looks the exact same, and manually tweaking some frames on just the Hips bone put's it back the exact same. Maybe there would be a way to map the animation of the old center bone to the armature? Sone that part of the animation that gets lost has to be applied to a part that rotates it around 0,0,0, and rotating the whole armature does that. I'll be messing with some stuff manually to see how the animation can be applid to the fixed armature to get it closer. Directly applying the animation from the old center bone to the armature get's some parts pretty close, like the legs and tail, but the body and up isn't quite in place right. I did switch back to release tho, since the dev update hadn't gotten to me yet, so I'll try importing via Cats after updating back to dev. Unless Cats doesn't do anything to tweak how an animation is imported, but if it does do some tweaking to fix things I'll recheck and not bother with manual tweaking until after And I am using the mmd_tools included with Cats when importing via mmd_tools. I saw that having it installed sperately can break things As for camera animation, I can import that onto the camera directly through mmd_tools, and export the camera as fbx and it works perfectly in Unity with the right set up.
Ghost commented 2025-03-21 14:33:09 +00:00 (Migrated from git.disroot.org)

Hi there,

Can you confirm that when importing MMD animations, the "Hips" bone gets animation from "Lower Body" (下半身) instead of "Center" (センター), causing animation issues? Is this what your trying to say?

If so I might have a solution, but it is possible MMD Tools is overriding what Cats is trying to do.

I just been sent the files you were talking about so I can also test this now, thanks.

Hi there, Can you confirm that when importing MMD animations, the "Hips" bone gets animation from "Lower Body" (下半身) instead of "Center" (センター), causing animation issues? Is this what your trying to say? If so I might have a solution, but it is possible MMD Tools is overriding what Cats is trying to do. I just been sent the files you were talking about so I can also test this now, thanks.
Ghost commented 2025-03-21 15:39:19 +00:00 (Migrated from git.disroot.org)

Hi there,

I've done some testing and fixed some issues with importing MMD Animations. I've created a new button with "(New)" in its name which is on the Blender 4.2 dev branch only for now.

However, when it comes to animations after using the Fix MMD Model, this is more complicated due to the code being quite messy. To fix it properly, I'll need to thoroughly examine what it's doing and how it interacts with MMD Tools elements, which may take some time. I think the issue might be that Fix Model isn't assigning the root bone correctly (And maybe some other bones), but that's just a theory for now.

I'll try to fix that issue when I can, but can't promise anything this week. I'm also getting different results than what you described, could you send a video of both playing side by side? Thanks!

Thanks!

Hi there, I've done some testing and fixed some issues with importing MMD Animations. I've created a new button with "(New)" in its name which is on the Blender 4.2 dev branch only for now. However, when it comes to animations after using the Fix MMD Model, this is more complicated due to the code being quite messy. To fix it properly, I'll need to thoroughly examine what it's doing and how it interacts with MMD Tools elements, which may take some time. I think the issue might be that Fix Model isn't assigning the root bone correctly (And maybe some other bones), but that's just a theory for now. I'll try to fix that issue when I can, but can't promise anything this week. I'm also getting different results than what you described, could you send a video of both playing side by side? Thanks! Thanks!
Ghost commented 2025-03-22 07:16:10 +00:00 (Migrated from git.disroot.org)

In this recording it's easy to see the issues with different parts. Front three are the animation imported via Cats, and back three are directly via mmd_tools. Left is using Fix MMD Model, then importing animation onto the fixed model. Center is importing animation onto an MMD model, then fixing it. And right is just importing animation on an MMD model without fixing it.

As you can see, the right two that haven't had Fix MMD Model used on them animate fine, moving around and everything. While the left two which have been fixed before animation import, don't move about the scene or anything. As well, the legs are animated fine as they should be, other than issues caused by the model not moving about as it should. But the upper body is completely messed up in some parts. It seems the rotation on Spine is totally wrong. As for the center two which were fixed after animation import, they just get completely messed up. Almost every part of the center two get's messed up in the fix. But getting the center two to work isn't really an issue, most of the time I'd be importing animations onto a fixed model anyways. They are just there to show how things break in that very specific case.

Another thing of note however, blendshape animation. The two of three in the back which had animations imported onto an MMD model directly via mmd_tools, they have all their blendshapes animated properly. While those with animations imported after fixing, or via Cats at all, don't have any blendshape animations on them.

Perhaps importing the animations onto an empty that the armature is parented to could fix some issues, but it would also introduce even more due to the changed structure of the armature. So probably being able to change what parts of an animation are imported onto what parts of a model could fix some of the issues. As well of course as doing a bit of extra processing on some parts to look correct, since directly importing the values onto bones breaks some parts.

https://github.com/user-attachments/assets/faba6d48-0311-406b-9a32-194c92fdd6aa
My CPU was not happy trying to keep up the framerate to record it lol, had to render it out, then compression go brr for github upload. I know it's absolute pain to watch sry, it's compressed so far my god
(And yes the awkward spin about halfway through is part of the animation, that's not broken there for the two on the right)

You can also see here that the values of "Lower Body" (下半身) on this frame are applied to Hips on the same frame. Though Y is flipped (Obviously because the "Lower Body" bone is upside down on MMD models), and Z isn't applied. It's definitely not just as simple as just fixing the armature and importing the animation, since on MMD models the lower body and upper body are totally separated, but on standard models upper body is a child of lower body. So structural differences definitely make it a lot more complex to import animation onto a fixed model.
Image Image

I'm gonna do a bunch more testing and tweaking to see what can be done. And maybe even help with some of the code that'll need to be changed. Properly importing MMD animations into Unity for use in things like VRChat is a very unknown, "mess around and see if you figure it out" kind of field. So if importing them through Cats can be fixed properly, so they look the same as they should without manual tweaking, I'll do a video series about working through the whole pipeline from MMD animation in MMD, all the way to having a simple finished MMD world. There's tons of info about doing MMD animation and all that out there. And some things here and there about transferring MMD animations to others. But there's very little about how to get them into Unity and working in a world. One of the only things I founf about making an MMD world was a set of paid assets. So along with better resources on transferring animations (Cats hopefully being a key part of the process), I'll also release a set of MMD world assets for free for people to use.
So if the issues of importing animations via Cats get fixed, it'll be a key tool for getting MMD animations into Unity. (Also definitely gonna use Cats to get my VRChat avatars into resonite, since I saw that as an export) But thank you for taking the time to look into and fix these issues. As I said, I'll also be doing what I can to help get things fixed, since Cats is so useful in multiple ways

In this recording it's easy to see the issues with different parts. Front three are the animation imported via Cats, and back three are directly via mmd_tools. Left is using Fix MMD Model, then importing animation onto the fixed model. Center is importing animation onto an MMD model, then fixing it. And right is just importing animation on an MMD model without fixing it. As you can see, the right two that haven't had Fix MMD Model used on them animate fine, moving around and everything. While the left two which have been fixed before animation import, don't move about the scene or anything. As well, the legs are animated fine as they should be, other than issues caused by the model not moving about as it should. But the upper body is completely messed up in some parts. It seems the rotation on Spine is totally wrong. As for the center two which were fixed after animation import, they just get completely messed up. Almost every part of the center two get's messed up in the fix. But getting the center two to work isn't really an issue, most of the time I'd be importing animations onto a fixed model anyways. They are just there to show how things break in that very specific case. Another thing of note however, blendshape animation. The two of three in the back which had animations imported onto an MMD model directly via mmd_tools, they have all their blendshapes animated properly. While those with animations imported after fixing, or via Cats at all, don't have any blendshape animations on them. Perhaps importing the animations onto an empty that the armature is parented to could fix some issues, but it would also introduce even more due to the changed structure of the armature. So probably being able to change what parts of an animation are imported onto what parts of a model could fix some of the issues. As well of course as doing a bit of extra processing on some parts to look correct, since directly importing the values onto bones breaks some parts. https://github.com/user-attachments/assets/faba6d48-0311-406b-9a32-194c92fdd6aa My CPU was ***not*** happy trying to keep up the framerate to record it lol, had to render it out, then compression go brr for github upload. I know it's absolute pain to watch sry, it's compressed so far my god (And yes the awkward spin about halfway through is part of the animation, that's not broken there for the two on the right) You can also see here that the values of "Lower Body" (下半身) on this frame are applied to Hips on the same frame. Though Y is flipped (Obviously because the "Lower Body" bone is upside down on MMD models), and Z isn't applied. It's definitely not just as simple as just fixing the armature and importing the animation, since on MMD models the lower body and upper body are totally separated, but on standard models upper body is a child of lower body. So structural differences definitely make it a lot more complex to import animation onto a fixed model. ![Image](https://github.com/user-attachments/assets/a349a651-2150-4b41-b191-9e1284b51b46) ![Image](https://github.com/user-attachments/assets/13da2051-bc6a-4653-be90-055684101aec) I'm gonna do a bunch more testing and tweaking to see what can be done. And maybe even help with some of the code that'll need to be changed. Properly importing MMD animations into Unity for use in things like VRChat is a very unknown, "mess around and see if you figure it out" kind of field. So if importing them through Cats can be fixed properly, so they look the same as they should without manual tweaking, I'll do a video series about working through the whole pipeline from MMD animation in MMD, all the way to having a simple finished MMD world. There's tons of info about doing MMD animation and all that out there. And some things here and there about transferring MMD animations to others. But there's very little about how to get them into Unity and working in a world. One of the only things I founf about making an MMD world was a set of paid assets. So along with better resources on transferring animations (Cats hopefully being a key part of the process), I'll also release a set of MMD world assets for free for people to use. So if the issues of importing animations via Cats get fixed, it'll be a key tool for getting MMD animations into Unity. (Also definitely gonna use Cats to get my VRChat avatars into resonite, since I saw that as an export) But thank you for taking the time to look into and fix these issues. As I said, I'll also be doing what I can to help get things fixed, since Cats is so useful in multiple ways
Ghost commented 2025-03-23 01:13:52 +00:00 (Migrated from git.disroot.org)

Hi there from my testing using cats to import the model and animation works just fine. The problem happens once we use Fix MMD Model either before or after (As you saw).

This has nothing to do with the MMD Importer (I fixed the issue on the dev branch on 4.2 and the importer seems to work fine now).

From what I can see from the old code base and from what one of the developers have told me, MMD Animation import was basically an afterthought and keeping MMD Animations compatible with the Fix MMD Model which converts an MMD Model into a Unity ready model (Basically) was never on their mind.

I had a few ideas on how this could be done, however I'm not sure if any of them are viable until I look at current code again for Fix Model, which to be honest I hate looking at because it's such a spaghetti mess the previous developers left it in. But based on my understanding, one or multiple the following things could be done (again not sure if any of these ideas are viable though):

  1. Create an animation retargeting system that stores the original animation data before fixing the model, then intelligently remaps it to the new structure.
  2. Build a bone mapping dictionary that tracks not just name changes but also transformation differences between MMD bones and Unity-compatible bones.
  3. Implement a two-phase fix process that handles structural changes and animation data separately
  4. Make the Fix MMD Model function "animation-aware" so it preserves animation compatibility when animations are present
  5. Create a separate animation fixing pass that runs after the model is fixed to adjust all the animation curves

The core issue is that Fix MMD Model fundamentally changes the skeletal structure that the animation was designed for, so we need a way to transform the animation data to match these structural changes. It's not a simple fix and currently due to real life events i announced on the discord I have basically no time to do this at the moment.

Hi there from my testing using cats to import the model and animation works just fine. The problem happens once we use Fix MMD Model either before or after (As you saw). This has nothing to do with the MMD Importer (I fixed the issue on the dev branch on 4.2 and the importer seems to work fine now). From what I can see from the old code base and from what one of the developers have told me, MMD Animation import was basically an afterthought and keeping MMD Animations compatible with the Fix MMD Model which converts an MMD Model into a Unity ready model (Basically) was never on their mind. I had a few ideas on how this could be done, however I'm not sure if any of them are viable until I look at current code again for Fix Model, which to be honest I hate looking at because it's such a spaghetti mess the previous developers left it in. But based on my understanding, one or multiple the following things could be done (again not sure if any of these ideas are viable though): 1. Create an animation retargeting system that stores the original animation data before fixing the model, then intelligently remaps it to the new structure. 2. Build a bone mapping dictionary that tracks not just name changes but also transformation differences between MMD bones and Unity-compatible bones. 3. Implement a two-phase fix process that handles structural changes and animation data separately 4. Make the Fix MMD Model function "animation-aware" so it preserves animation compatibility when animations are present 5. Create a separate animation fixing pass that runs after the model is fixed to adjust all the animation curves The core issue is that Fix MMD Model fundamentally changes the skeletal structure that the animation was designed for, so we need a way to transform the animation data to match these structural changes. It's not a simple fix and currently due to real life events i announced on the discord I have basically no time to do this at the moment.
Ghost commented 2025-03-24 14:37:00 +00:00 (Migrated from git.disroot.org)

After some thinking this would be a larger overhaul then it's worth for Cats, this kind of new feature would be better with Avatar Toolkit which will replace cats unofficial in the future, if you still want something like this it maybe better to request it on the Avatar Toolkit tracker instead: https://github.com/teamneoneko/Avatar-Toolkit/issues/65

As the MMD Animation Importer has been fixed in the new one, this issue will now be close, if your still having issues with that please let me know.

After some thinking this would be a larger overhaul then it's worth for Cats, this kind of new feature would be better with Avatar Toolkit which will replace cats unofficial in the future, if you still want something like this it maybe better to request it on the Avatar Toolkit tracker instead: https://github.com/teamneoneko/Avatar-Toolkit/issues/65 As the MMD Animation Importer has been fixed in the new one, this issue will now be close, if your still having issues with that please let me know.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Kneelawk/Cats-Blender-Plugin#302
No description provided.