Using recorded rotation values to create keyframed anim curve

I have a realtime, physics driven object. I recorded its position and rotation to
a text file. I want to use this data to create an animation curve for offline
rendering.

The realtime entity does not count full turnarounds, so when it is turned
beyond +180 degrees, its value snaps down to -180.

I was testing stuff with a cube and looked perfect. Then I realized that the
perfect solid gray cube shape hid the fact that the orientation is totally
screwed: in certain pitch/yaw/roll combinations the object is rotated 180
degrees off. I have no idea how to fix it without breaking it in the rest of the
time.

Have anyone tried something similar?

Have you tried working with quaternion rotation values instead of euler angles?

Modo, the 3D app I’m working with, doesn’t support quaternion rotation unfortunately. :\

Okay here is a clue:

Unreal on the left and modo on the right.
The arrows have their pivots at their tip.
Both left arrows are rotated to [60,0,0] (pitch, yaw, roll)
Both right arrows are rotated to [60, -180, -180]

My first idea was that the rotation order might be different in modo. I changed
it from ZYX to XYZ, YZX, etc but everything looks exactly the same. o_O

Okay, I was setting the default rotation order and not the one already associated with the
object. After I changed it in the item properties it works alright. :slight_smile:
For future reference: Unreal’s rotation order is ZXY.

I see you’re talking about Unreal and animation curves, what is it you’re trying to achieve? Mostly curious. :D:

The project I’m working on required the capability of recording in game
properties like the motion and rotation of a physics driven object. This data is
mostly used back in Unreal, but implementing an importer for modo seemed
rather straightforward. It might take a few years before modo gets its native
rigid body solver, so until then, using Unreal for physics simulations could be
helpful.

It’s also possible to recreate a whole play session in some form, because
camera movements and bone locations/rotations are also recorded.
Your 0wnage headshot would look even better rendered with monte carlo GI. :wink:

Sounds interesting. :slight_smile: