SE2Dev / io_anim_seanim

SEAnim Plugin for Blender
MIT License
84 stars 30 forks source link

Weird bone rotations #7

Open itspacchu opened 6 years ago

itspacchu commented 6 years ago

https://gfycat.com/GiddyOrnateGeese that explains everything

SE2Dev commented 6 years ago

Can you send me the original model and seanim files?

Faithfullfaun commented 5 years ago

I know this is old but I have an issue when applying an animation on characters with facial bones Then the jaw and brows make a weird rotation Where the rest still looks normal dafuq Models and seanim used: head_hero_yuri_a.xmodel body_juggernaut_nogear.xmodel dubai_finale_showdown_yuri.seanim

SE2Dev commented 5 years ago

Which game / map are those models from?

Faithfullfaun commented 5 years ago

Game is MW3 And it’s the last mission But you Can try it with every model and anim for characters Beacuse it happens with the ones i have tried so far Wich is around 8 characters

SE2Dev commented 5 years ago

I don't have MW3 installed at the moment, can you send me those files?

SE2Dev commented 5 years ago

@Sinfulprashant I believe that the issue in your screenshot is a result of transformations that are automatically applied to the model on import (this is specific to whatever file format you used). Certain model formats appear to automatically apply Y-Up to Z-Up transformations on import, which essentially invalidates the skeleton for seanim import.

Faithfullfaun commented 5 years ago

Sorry for late reply Busy week Well here there are (Head,Body,seanim) https://mega.nz/#!WJRkEKwC!m-_C1HqwJA2QNfHB9qDc_7Gion-uuUJGDdHcPIeKuE4

RQWorldblender commented 5 years ago

I feel that I'm running into this same problem, only that I'm working with completely different models and animations. All of them originate from Super Smash Bros. Ultimate for the Nintendo Switch. My post about this at https://www.vg-resource.com/thread-34836-post-652235.html#pid652235 A post containing the model and animation files is at https://www.vg-resource.com/thread-34836-post-650714.html#pid650714

First, the original files are in new formats beginning with .nu*, so a intermediary program must be used for exporting the models and animations, tow of which are listed below:

I already solved the scaling problem by reverting the g_scale factor to 1.0, so I'm not too concerned about that. What I am concerned about is that I end up with different results depending on the format I export models to, which currently are .dae (Collada) and .smd (Source Engine data). Animation files work flawlessly on the latter format, but not on the former format, where in that case, the skeleton deforms correctly, but not the meshes. My version of exported models, located at https://gitlab.com/Worldblender/smash-ultimate-models-exported, uses the .dae versions as the base, and I want to avoid redoing all my work if I can.

SE2Dev commented 5 years ago

@RQWorldblender I believe that Collada models may have their axes modified when imported into Blender, but I haven't had the chance to check yet.

RQWorldblender commented 5 years ago

@SE2Dev packun-jumpf This is for one of my .dae exported models, showing Piranha Plant in its turn animation.

pacman-wait1 This is for an imported .smd model, showing Pac-Man in its 1st wait animation.

I'm trying to reach the point where meshes will deform correctly for my models, like in the second screenshot, and I know what has to happen: convert the bones so that they use the z-axis as the up axis. I tried almost everything I can to fix this problem myself, but nothing good besides the scaling issue has been solved by my efforts... I can't find any options to disable axis conversions for .dae import, and now I'm stuck, unless I want to create new animations from scratch that I lack enough experience to make. I can't even do a simple walk cycle for any character, that's how inexperienced I am right now.

Again, I really don't want to redo all the models I finished so far, but if it must happen, I can start over with .smd models as a base. It will just consume much more time to have them redone before I reach anymore future projects utilizing them.

P.S. I saw that there isn't a license file in this repository; I can't tell if this addon is actually open-source or not without one.

SE2Dev commented 5 years ago

@RQWorldblender I'll look into it some more this weekend. Also nice catch on the license thing - I didn't even notice that I forgot to add one.

Edit: I added the missing license file in 21b5755 - the plugin is MIT licensed.

Edit2: It definitely looks like Blender automatically rotates Collada objects on import / export - but may not properly recalculate the bone matrices - resulting in the broken animations you're seeing.

SE2Dev commented 5 years ago

@Faithfullfaun This issue appears to affect Black Ops as well, however it seems to be an issue with Blender-CoD's skeleton merging algorithm rather than io_anim_seanim. So I recommend creating an issue there instead.

As you can see below, with a merged skeleton the issue does exist: image

However, importing the animation on the head only appears to function correctly: image

RQWorldblender commented 5 years ago

@SE2Dev Oh dear, I didn't know that the bone matrices would never be recalculated, and that really looks like it's out of my control. Is there something I can do to workaround this problem, or there's no way? If the only option left is to start over my models with .smd files as the base, I will have no choice but to spend additional time with them. Edit: I wonder if the info in the manual at https://docs.blender.org/manual/en/2.79/rigging/armatures/bones/editing/transform.html?highlight=recalculate%20roll#bone-roll would help me. It may help me, but I don't know where I should go from here. I can do trial-and-error to find out what will solve my problem, but it might be somewhat time-consuming.

For reference, I am planning on using the animation files (once they are converted from .nuanmb to .seanim) for these projects of mine (there is no deadline for both, so there's no need to feel pushed or rushed):

Jessomadic commented 5 years ago

I am having the same issue that the first person was having. image image It does this with all Animations tried

RQWorldblender commented 5 years ago

I've been busy with my own set of scripts, found at https://gitlab.com/Worldblender/io_scene_numdlb to solve this problem I had earlier. Eventually, I learned that the way that bones point that can also cause meshes to deform incorrectly, if their bone roll (head-tail axis) does not match the direction the bone points towards. This is actually more of a bones problem, as it is possible for them to not be setup correctly. The workaround (for bone matrices set in global space) is to transform them first, set the bones to their matrices, and then resize their length based on armature dimensions. The SMD importer does this, and I implemented this functionality in my NUMDLB scripts.

SE2Dev commented 5 years ago

@Hackerknownas4 What format was the model you imported?

Jessomadic commented 5 years ago

@SE2Dev .Owmdl