Custom Paatru Race for Blackmarsh – Some type of Anim Blender Script Needed...(read on..)
I've come across a problem, in animating my Paatru race:
I took the vanilla Oblivion “skeletonbeast.nif” , and repositioned the bones to align to the Paatru's body. I only deleted some tail bones on the end of the tail, but otherwise kept the other tail bones.
Two of the screenshots show the Paatru before I tried to apply the vanilla walkforward.kf to it's mesh/skeleton. I basically want the Paatru to keep the body shape and dimensions shown in those two pics. I have included a Blender scene named “_01jbTEST.blend”, that shows the Paatru in this pose, with the skeleton.
The other two pics show a badly deformed Paatru, after I had applied the vanilla Oblivion “walkforward.kf” to it in Blender. Notice how the walkforward animation forces the skeleton pose and Paatru's body mesh to instantly conform to a vanilla Oblivion human pose and dimensions. It even animates in such a distorted pose like it was human race. I have included a Blender scene named “01jbAnimTest.blend” that has the animation already applied to the Paatru.
However, since my Paatru's skeleton is basically in human shape and position (with just repositioned bones), I had an idea for a Blender nifscript, that could make animating the Paatru possible, and quicker/easier, by being able to use vanilla Oblivion race animations.
It kind of goes like this (I think):
1) You go to import a vanilla animation, after selecting your skeleton in the Blender scene (But you somehow copy the “base pose,” or other ending/start pose needed, of the Paatru before the animation is imported).
2) In import menu, you select the vanilla animation to import, then click a button in same menu that says something like “Translate Kf Data to Match Selected Skeleton & Copied Pose”. You then click “OK” to import the anim.
3) What Blender should then be calculating and doing in the background, is this: it'd take the NiTransformInterpolators of the same-named bones in the KF, and convert the “Translation” and “Rotation” values to match those of same-named bones in the Paatru's skeleton. When it comes to the NiTransformDatas, it'd calculate the difference between the values in the related NiTransformInterpolators and the starting timeframe value in the Translation and Rotation of the NiTransformDatas, OF THE VANILLA ANIMATION BEFORE ANY DATA IS CONVERTED...it'd then turn this difference into a percentage value. Then, Blender would take that same vanilla animation, before it's data is converted, and in the NiTransformDatas, in the Translation and Rotation fields, it'd calculate the differences between all the keyframe values from start/end timeframes, then turn all those keyframe differences into percentage values also.
4) Then, Blender would apply those percentage differences from the vanilla animation, but this time based on the values of the NiTransformInterpolator that were copied from the Translation and Rotation values of the copied pose of the Paatru skeleton, to make the animation fit the Paatru skeleton/mesh. The resulting converted animation might still need some tweaking, but that's be minor work compared to what Blender had just done for me.
For further explanation:
Vanilla Animation -
NiTransformInterpolator (of a random bone)
Translation: 5, 10, 45
Translation: start/ 0
value/ 20, 40, 75 ..(400%, 400%, 167% > from the values in the Interpolator)
value/ 10, 50, 35 ..(50%, 125%, 47% > from start/0 values)
value/ 30, 30, 55 ..(300%, 60%, 157% > from start/1.3 values)
Paatru Skeleton (same-named random bone, as above)
Translation: 20, 33, 67
Converted Animation, to fit Paatru Skeleton Pose (for same bone) -
NiTransformInterpolator (of same-named, random bone)
Translation: 20, 33, 67
Translation: start/ 0
value/ 80, 132, 112 ..(400%, 400%, 167% > from the values in the Interpolator)
value/ 40, 165, 52.6 ..(50%, 125%, 47% > from start/0 values)
value/ 120, 99, 82.58 ..(300%, 60%, 157% > from start/1.3 values)
Of course, I could be wrong, and it might need to be actual numerical value of the differences that is needed, and not a percentage. But you'd be more apt to figure this out, than me.
Lastly, the reason I mentioned “copying the pose” of the skeleton, before importing/converting an animation, is because of the needed transition from animation group to another animation group...like when you go from handtohandEquip.kf, to handtohandIdle.kf. You need the ending pose of the handtohandEquip.kf, to be the starting and ending pose of the handtohandIdle.kf.
A lot of the vanilla animations use “Spline” animations, so Blender will need to convert the spline data for each bone, into “NiTransformInterpolators” and “NiTransformDatas”, before you can get the numerical differences or percentages you need, to convert said vanilla animation to what I need. I think Blender already does this, if you import and then export a vanilla animation, but I forget.
I hope you can help with this nifscript request. It'd save me a lot of time. I've PM'd you the files.