Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency regarding skel:animationSource relationship directly on the Skeleton prim #3532

Open
1danielcoelho opened this issue Feb 15, 2025 · 2 comments

Comments

@1danielcoelho
Copy link

1danielcoelho commented Feb 15, 2025

This follows from the discussion on https://forum.aousd.org/t/skel-animationsource-relationship-directly-on-the-skeleton-prim/2209

We’ve recently ran into some USD like this:

#usda 1.0

def SkelRoot "Model"
{
    def Skeleton "Skel" ( apiSchemas = ["SkelBindingAPI"] )
    {
        rel skel:animationSource = </Anim>

        ...
    }

    def Mesh "Arm" ( apiSchemas = ["SkelBindingAPI"] )
    {
        rel skel:skeleton = </Model/Skel>

        ...
    }
}

def SkelAnimation "Anim" {
    ...
}

According to the Binding Skeletons part of the documentation, this should not animate. You can deduce this from the examples, and also from this statement:

a skel:animationSource binding is not considered to have any effect until the next skel:skeleton binding at or beneath the binding location in namespace.

In the USD above, the rel skel:animationSource cannot inherit down to where rel skel:skeleton is, so I think it shouldn’t animate, right?

And yet, it does animate in usdview… and in fact if you construct an AnimQuery for that skeleton, it will be valid and point at the “Anim” prim. Additionally, the setup shown at the top of this doc page has the same pattern, suggesting this is supported.

Furthermore, as Spiff suggested it seems that the rel skel:animationSource binding on the Skeleton wins over any binding done at the point where rel skel:skeleton is authored...

For example, this:

def SkelRoot "Model"
{
    def Skeleton "Skel" ( apiSchemas = ["SkelBindingAPI"] )
    {
        rel skel:animationSource = </NoAnim>
        ...
    }

    def Mesh "Arm" ( apiSchemas = ["SkelBindingAPI"] )
    {
        rel skel:animationSource = </SomeAnim>
        rel skel:skeleton = </Model/Skel>
        ...
    }
}

def SkelAnimation "NoAnim" {
    uniform token[] joints = ["Shoulder/Elbow"]

    float3[] translations = [(0,0,2)]
    quatf[] rotations.timeSamples = {
        0: [(1,0,0,0)]
    }
    half3[] scales = [(1,1,1)]
}

def SkelAnimation "SomeAnim" {
    uniform token[] joints = ["Shoulder/Elbow"]

    float3[] translations = [(0,0,2)]
    quatf[] rotations.timeSamples = {
        5: [(1,0,0,0)],
        10: [(0.7071, 0.7071, 0, 0)]
    }
    half3[] scales = [(1,1,1)]
}

Does not animate, when I believe it should.

It doesn't seem like I can attach USD files here but there are some sample files in the AOUSD thread link above, with those exact setups.

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10677

(This is an automated message. See here for more information.)

@spiffmon
Copy link
Member

Thanks, @1danielcoelho ! We don't yet have a timeline for addressing this, but please advise if this becomes a workflow impediment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants