swaping animations

Post » Sat May 28, 2011 8:25 am

okay, i have a left strafing animation, but now i need to do the right strafe, anyone have some suggestions one what i should do to make them look similar
User avatar
Steve Bates
 
Posts: 3447
Joined: Sun Aug 26, 2007 2:51 pm

Post » Sat May 28, 2011 1:35 am

okay, i have a left strafing animation, but now i need to do the right strafe, anyone have some suggestions one what i should do to make them look similar


If your left strafing animation is exported in kf form (as in for Nifskope and use in the game), use PYFFI's "modifiy_reverseanimation" function:

I borrowed this text from the PYFFI thread here on Beth forums:

modify_reverseanimations: as usual real quick and easy method to do something... in this case reverse an animation - ie make a close animation from an open animation for a door etc.
CODE
cd C:\Python26
python.exe Scripts/niftoaster.py modify_reverseanimation "C:\meshes"
(unteste for bspline type animations so far)

The "C:\meshes" folderpath is where you want to put the animation you want reversed, I believe. I think the output animation - aka the reversed animation - also pops up in this folder. I use the words "I think" and "I believe", because I only ever used this function once, so I don't really remember exactly...but I'm pretty sure that's how it works.

Overall, I don't know if the right straf animation will come out looking weird if you use this method..it might cause reverse rotations on certain axis and bones that you didn't want to have happen, but I really don't know.

Koniption
User avatar
Lakyn Ellery
 
Posts: 3447
Joined: Sat Jan 27, 2007 1:02 pm

Post » Sat May 28, 2011 2:31 am

If your left strafing animation is exported in kf form (as in for Nifskope and use in the game), use PYFFI's "modifiy_reverseanimation" function:

I borrowed this text from the PYFFI thread here on Beth forums:

modify_reverseanimations: as usual real quick and easy method to do something... in this case reverse an animation - ie make a close animation from an open animation for a door etc.
CODE
cd C:\Python26
python.exe Scripts/niftoaster.py modify_reverseanimation "C:\meshes"
(unteste for bspline type animations so far)

The "C:\meshes" folderpath is where you want to put the animation you want reversed, I believe. I think the output animation - aka the reversed animation - also pops up in this folder. I use the words "I think" and "I believe", because I only ever used this function once, so I don't really remember exactly...but I'm pretty sure that's how it works.

Overall, I don't know if the right straf animation will come out looking weird if you use this method..it might cause reverse rotations on certain axis and bones that you didn't want to have happen, but I really don't know.

Koniption


heh, in fact i was the one who requested that. What it does is make the animation go backwards. Ive have some ideas that might work, i think hex editing the animation might be able ot do some of the work, then i'd have to fine tune it to be right in blender.
User avatar
K J S
 
Posts: 3326
Joined: Thu Apr 05, 2007 11:50 am

Post » Fri May 27, 2011 6:03 pm

It should be procedurally possible (i.e it can be done with code) if you remember two items. The animation is made up of rotations of bones, they have to be applied to the opposite bone, which means you have to be able to determine which one that is, and the values have to be inverted (positive to negative values and vice versa) ONLY for the appropriate axes. I.e. a rotation from right to left becomes left to right, but upward and downward movement of an arm, for example, remains the same on the other side. You can't just flip all the signs. I don't recall if the rotations use world axes or local ones, the latter make the math more complex for a transform like this.

One thing that doesn't work is using the mesh mirror operation in the modeling tool. That flips the bones to the opposite side as well as the movements and you end up exporting an identical copy of the animation! If you're lucky there may be a script to do it there. I think there's one for MAX, but it may only work on a Biped.
User avatar
Nice one
 
Posts: 3473
Joined: Thu Jun 21, 2007 5:30 am


Return to IV - Oblivion