Tuesday, 23 February 2016

Copy a TRLE animation frame to an XNALara pose

Run animation

In this tutorial I will be using XNALara Posing Studio (XPS) 11.4 by XNAaraL from http://xnalaraitalia.deviantart.com/ and replicate a pose from a Tomb Raider Level Editor (TRLE) wad animation.

The first step is to change the model’s bind pose in XNALara to match the “No animating” pose as shown in Wadmerger’s Animation Editor.
Usually this will mean changing the position of the arms so they are beside the model’s body and not in a T-pose.

No animation pose

For best results you must use an XNALara model that is similar to the TRLE model such as the “too_lara_1996” model included with XPS which I use here.


Position the arms beside the body.

Arms beside body

Now go to the Modify menu and click Save Generic_Item and select “modify armature according to the current pose”.

Modify the armature

Click OK and the confirm you want to modify the armature and then save the model into a new folder inside the “data” folder.

Reset the scene and load the model you just saved.

In Wadmerger’s Animation Editor select an animation and export it from the Animation menu as a .TRW file.

Open the animation in my TRW Editor program which displays the rotation values for all the meshes for each keyframe of the animation.

TRW Editor

Now what you do is match a mesh to a bone in XPS, select that bone and enter –1 x RotX for the X axis value, –1 x RotY for the Y axis value and RotZ for the Z axis value.

The angles in TRW Editor are from 0 to 1024 representing 0 to 360 degrees but if you right click on an angle the value in degrees will be shown.

Convert the angles in degrees between 360 and 180 to a value between 0 and –180. Not necessary!

I matched the bones as follows.
  • Mesh 0 – root hips
  • Mesh 1 – leg left thigh
  • Mesh 2 – leg left knee
  • Mesh 3 – leg left ankle
  • Mesh 4 – leg right thigh
  • Mesh 5 – leg right knee
  • Mesh 6 – leg right ankle
  • Mesh 7 – spine lower
  • Mesh 8 – arm right shoulder 2
  • Mesh 9 – arm right elbow
  • Mesh10 – arm right wrist
  • Mesh11 – arm left shoulder 2
  • Mesh12 – arm left elbow
  • Mesh13 – arm left wrist
  • Mesh14 – head neck upper
Once you have made your pose, save the pose with File>Save selected pose.

You can load the pose for other models to see how it looks but if the proportions of the model do not match the TRLE model the pose may not be perfect.

Pose used for other model

Karlito modified the script to include root translation and to use filenames suitable for XPS animation. [link]

TRLE -> ms3d: Negate RotY and RotZ and convert from yxzr order to xyzs.

No comments:

Post a Comment