Questions about Animating attributes with TsSpline and TsKnot

I’m looking ahead trying to implement support for spline and animation curves in usd for when it’s released in a future update. I’m using the OpenUsd dev branch which already contain part of that implementation and tests that I can use to give it a try.

Having said that, I’m having issues understanding a few things and would love to get some help here:

on the proposal it says:

Floating-point scalars - double, float, and half - are the attribute value types that USD splines will support.

With the current system, we would export something like:

float3 xformOp:rotateXYZ.timeSamples = {
        1: (0, 0, 0),
        ...
    }
    uniform token[] xformOpOrder = ["xformOp:rotateXYZ"]

1. Is it expected that we have to break down every xform transform into its own components in order to use the spline animation?
meaning that the example above would have to become:

float3 xformOp:rotateX.spline = {
        0: 1; pre ws(0, 0); post held,
        ...
}
float3 xformOp:rotateY.spline = {
        0: 1; pre ws(0, 0); post held,
        ...
}
float3 xformOp:rotateZ.spline = {
        0: 1; pre ws(0, 0); post held,
        ...
}
uniform token[] xformOpOrder = ["xformOp:rotateX, xformOp:rotateY, xformOp:rotateZ"]

And regarding joints animations, it doesn’t seem that it would be possible. What would be the solution for that case? I saw this other topic here, but its been a while and I figured I would as again.

Thanks for the help,
Talis

Yes, you’re correct. The proposal is to support spline animation on scalar attributes. Although it might seem inconvenient, the reason for it is that although simulations and motion capture will densely write all the channels, the use case for splines is focused on ease of animation. With independent scalars, an artist can focus on putting keyframes exactly in the right spot in the right channel, for the animation, rather than having to artificially put keyframes on all the channels.

If you imagine a bouncing ball that only bounces up and down, it’s only necessary to put a few keys on the vertical axis. If later you want to deviate the ball in another axis, it’s easy to do so, without influencing the up and down motion.

Another consideration is that for this sort of motion, there will be less data, since you only recorded the channel with the motion, rather than also for the unused channels.

I don’t think there’s anything new to report today about spline animation and UsdSkel, since that topic you linked.

Hope this helps!

1 Like

@barbalt , for direct transform animations, a part of the spline project that we have not tackled yet is adding scalar xformOp types for translation and scales (there are already individual rotate{X,Y,Z} ops). That will allow direct spline animation for any Xformable.

Thanks Nick and Spiff,

I’ll start with support for the rotation and tackle the rest as they come.

Thank you for the clarification

@spiff Do you know if the scalar xformOp types for translation and scale will be a part of the next USD release or come in a later one?

It will be a later release, not 24.11. Also note that some changes to the TsSpline encoding in USD files will be coming in 24.11, to simplify things.