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

[UsdSkel Docs] A few issues / inconsistencies #1370

Closed
rlei-weta opened this issue Oct 23, 2020 · 10 comments
Closed

[UsdSkel Docs] A few issues / inconsistencies #1370

rlei-weta opened this issue Oct 23, 2020 · 10 comments

Comments

@rlei-weta
Copy link

Description of Issue

The </Model/Arm> Mesh prim in the "Skinning an Arm" example is missing an applied UsdSkelBindingAPI.

Steps to Reproduce

  1. Open usdview with the skinning an arm example.
  2. See the following deprecation warnings:
Warning: in _DeprecatedBindingCheck at line 200 of /code/USD/pxr/usd/usdSkel/cacheImpl.cpp -- Found binding property </Model/Arm.primvars:skel:jointIndices>, but the SkelBindingAPI was not applied on the owning prim. In the future, binding properties will be ignored unless the SkelBindingAPI is applied (see UsdSkelBindingAPI::Apply)
Warning: in _DeprecatedBindingCheck at line 200 of /code/USD/pxr/usd/usdSkel/cacheImpl.cpp -- Found binding property </Model/Arm.primvars:skel:jointWeights>, but the SkelBindingAPI was not applied on the owning prim. In the future, binding properties will be ignored unless the SkelBindingAPI is applied (see UsdSkelBindingAPI::Apply)
Warning: in _DeprecatedBindingCheck at line 200 of /code/USD/pxr/usd/usdSkel/cacheImpl.cpp -- Found binding property </Model/Arm.primvars:skel:geomBindTransform>, but the SkelBindingAPI was not applied on the owning prim. In the future, binding properties will be ignored unless the SkelBindingAPI is applied (see UsdSkelBindingAPI::Apply)
Warning: in _DeprecatedBindingCheck at line 200 of /code/USD/pxr/usd/usdSkel/cacheImpl.cpp -- Found binding property </Model/Arm.primvars:skel:jointIndices>, but the SkelBindingAPI was not applied on the owning prim. In the future, binding properties will be ignored unless the SkelBindingAPI is applied (see UsdSkelBindingAPI::Apply)
Warning: in _DeprecatedBindingCheck at line 200 of /code/USD/pxr/usd/usdSkel/cacheImpl.cpp -- Found binding property </Model/Arm.primvars:skel:jointWeights>, but the SkelBindingAPI was not applied on the owning prim. In the future, binding properties will be ignored unless the SkelBindingAPI is applied (see UsdSkelBindingAPI::Apply)
Warning: in _DeprecatedBindingCheck at line 200 of /code/USD/pxr/usd/usdSkel/cacheImpl.cpp -- Found binding property </Model/Arm.primvars:skel:geomBindTransform>, but the SkelBindingAPI was not applied on the owning prim. In the future, binding properties will be ignored unless the SkelBindingAPI is applied (see UsdSkelBindingAPI::Apply)

Package Versions

20.11

@rlei-weta rlei-weta changed the title [UsdSkel Docs] Mesh in "Skinning an Arm" example missing applied BindingAPI [UsdSkel Docs] A few issues / inconsistencies Oct 23, 2020
@rlei-weta
Copy link
Author

Small nitpick of the UsdSkelBindingAPI's primvars:skel:geomBindTransform doc:
"Encodes the bind-time world space transforms of the prim..."
Should be singular "transform".

@rlei-weta
Copy link
Author

In this section:
https://graphics.pixar.com/usd/docs/api/_usd_skel__schemas.html#UsdSkel_SkelAnimation_Binding

Should </Model/Anim> mentioned in:

... will be affected by the SkelAnimation at </Model/Anim>.

be </Anim> instead?

@rlei-weta
Copy link
Author

rlei-weta commented Oct 23, 2020

Was also hoping get some clarification in this section:
https://graphics.pixar.com/usd/docs/api/_usd_skel__intro.html#UsdSkel_TransformSpaces

Where the parentJointSkelSpaceTransform is an identity matrix for root joints, or ...

Is skeleton space the object space of the Skeleton prim itself? If so, couldn't root joints (especially in the case of multiple root joints) have a non-identity skeleton space transform?

.. Or - is skeleton space referring to the object space of individual, per-root skeletal hierarchies encoded by the Skeleton prim - in which the quoted sentence makes sense!

@spiffmon
Copy link
Member

spiffmon commented Oct 23, 2020 via email

@rlei-weta
Copy link
Author

Cheers @spiffmon

One more for you guys 😛
https://graphics.pixar.com/usd/docs/api/_usd_skel__schemas.html#UsdSkel_BlendShape_Inbetweens

In-between shapes can be created via UsdSkelBlend::CreateInbetween(),

Looks like it should be UsdSkelBlendShape::CreateInbetween()

@jilliene
Copy link

Filed as internal issue #USD-6448

@MikeWise2718
Copy link

I would like to know how to remove the warning, but it is not clear to me what a "missing applied UsdSkelBindingAPI" statement actually looks like. I have a huge number of these warnings, and found the example in the repo, but was dismayed to see that it has the same issue, and it is an open issue for over a year.

I don't need actually need the examplet fixed, but could someone tell me what I need to add to the file to suppress the warning?

It seems the "bindingAPI" was changed to "SkelBindingApi", but I don't see anything that looks like a statement that effect in the example or in the generated file I am working with.

@spiffmon
Copy link
Member

spiffmon commented Dec 19, 2021

Hi @MikeWise2718 , and apologies, UsdSkel has been a little neglected for awhile. We will get this ticket resolved soon. But to your question:
a) You can look at the UsdSkelExamples downloadable from our website, which is properly formed.
b) Any prim that has UsdSkel data authored via the UsdSkelBindingsAPI, which will likely be every Mesh/Gprim, plus the prims at which you have bound a Skeleton or Animation, must have the SkelBindingAPI applied. In usda, it will look something like this:

def "HumanFemale_Group" (
    prepend apiSchemas = ["SkelBindingAPI"]
    prepend references = @./HumanFemale.usd@
)
{
    rel skel:animationSource = </HumanFemale_Group/SkelAnim>
    # etc.
}

The very easy way to ensure this, which is a general rule for working with applied API schemas, is that at any codesite at which you are using SkelBindingAPI to author data, create the schema object by calling bindingAPI = UsdSKel.BindingAPI.Apply(prim) rather than just using the schema constructor. This will ensure that the schema gets added to the apiSchemas metadata, and it's fine if two different, overlapping layers both apply it.

Does that give you what you need?

@MikeWise2718
Copy link

Yeah, that helps a lot. In my case I only had to add the prepend apiSchemas part to the Mesh prims that were under my SkelRoot prim. I have a script that fixes up output from the buggy Unity USD exporter so this meets my needs. But I will report it on as a bug to the Unity USD github project too and reference this to help them to fix it at the root cause.

@gitamohr
Copy link
Contributor

gitamohr commented Dec 20, 2021 via email

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

6 participants