PredatorCZ / RevilMax

Revil plugin for 3ds Max
GNU General Public License v3.0
49 stars 15 forks source link

Last frame is not imported (and other issues) #11

Open alphazolam opened 3 years ago

alphazolam commented 3 years ago

Hello, I am excited to say I have been using RevilMax as the main way to import animations for modding RE Engine animations with the the Motlist Tool ! I love your work! However, in working with it I have noticed a few bugs:

  1. The last frame of any motlist animation is not being imported by RevilMax 1.6.3, I check it in the original file using the Motlist template and the data for the final frame in Max is always from the frame before the last frame in the original file. This is the most important thing to fix, IMO

  2. Animations imported with Revilmax are often rotated around in strange ways at first. I have made a quick-fix for this as a button in my Motlist Tool where the anim is rotated to its original transform and then rotated forwards and it always seems to work; maybe you could just implement it so this is automatically done to every animation on import

  3. When importing any character's facial animations, one or two bones are very often broken, with their keyframes telling them to drift slowly across the whole face during the length of the animation

  4. This is not a bug but more of a request - do you think it would be possible to import only the keyframes specified in the source motlist file, instead of making a new keyframe for every single frame in Max?

Thanks again for your work, this wouldnt be possible without RevilMax!

PredatorCZ commented 3 years ago

Hi.

  1. I dunno about that, need to look at it.
  2. They are rotated to fit scene axis (front should be front, left should be left, etc...), only root nodes are transformed. You can see in code what martix I'm using to correct them, if that's any use for you.
  3. Can you provide anim names that behave that way?
  4. It's not possible, 3ds max uses out-dated animation system, that causes a lot of problems, mainly gimbal lock glitches, so basically importing rotations from non euler angles are most likely bugged. However keyframe reducing is easy.
alphazolam commented 3 years ago

Hey thanks for the speedy reply!

2. How does it decide which direction to rotate? Because all of my modded animations are imported back by it as upside down and flipped, like a reflection (still moving in the right directions though). I tested the exporter by taking original mots imported with RevilMax and injecting them into themselves, and the translation and rotation data for these modded / rebuilt anims I tested was generally the same as in the original Capcom motlists (just uncompressed and with way more keyframes), so I don't think it's getting saved with the wrong rotation or anything (but I may be wrong). Also when I use "Reset Transform" on them, the anims become rotated on their backs exactly like when I do it to their original Capcom animations that I used to make them.

  1. I know that these facial animations have the drifting bone issues with 1.6.3: RE2: Basic_Idle from sectionroot\animation\player\pl10\list\fce\cmn_fce_fin.motlist.85 RE3: Basic_Idle from escape\character\player\pl0000\animation\list\fce\cmn_fce_fin.motlist.99 pl2001_09 from escape\cutscene\ev\ev350\ev350_s00\chara\pl2000\pl2001.motlist

  2. I'm not sure if this is what you mean, but also encountered issues with what I thought was gimbal lock when saving custom non-RevilMax animations to motlist and seeing them in-game or re-importing them back into Revilmax; the bones were being flipped backwards when their rotations reached certain acute angles with their parents. But it turned out that the issue was actually caused by the quaternions always being saved as three-component XYZ, with the 4th / W component being calculated from the other three. The solution was to check whenever the 4th / W-component was negative and make the whole quat be inverse if it was. Maybe this can help with the issue of having to make every frame a keyframe

PredatorCZ commented 3 years ago

3rd issue should be fixed in v1.7 I won't address 4th issue, I've dealt with this issue for as long as I can remember, 3ds max does not use quaternion sampler, so sampling animations directly in plugin is by far the best way to avoid gimbals. For 2nd issue, plugin rotates only root bone, so the model can face correct directions, Capcom uses different up/left axes. For 99% of plugins I make, I must rotate stuff, because 3ds max likes to be weird.