Efficient animation caching from SOPs

   1676   5   1
User Avatar
Member
75 posts
Joined: July 2006
Offline
Hi,

We've been using alembic animation referenced into LOPs up to now but having tested a bit with USD caches there are some interactivity improvements. However I've run into some fundamental problems even in the simplest of scenes. Perhaps my understanding of the possibilities is flawed here.

When I export a USD from SOPs (which appears to just be a wrapper for a LOPs SOP import anyway) with packed prims I seem to get the static mesh with time sampled position and vertex attribs and then a transform primitive with the animation of the packed prim. The whole point of this exercise is to avoid caching anything other than the transform. I'm also not sure what the use case for such output would be. I can obviously post fix this by deleting the mesh prim and exporting again but that can't be a good workflow.



Related to this; I know I can reference the xform over the mesh directly without too much issue but I'm guessing any transforming geo/mesh really should have an appropriate hierarchy with a parent xform.

Image Not Found
Edited by protean - April 17, 2023 13:30:29

Attachments:
vertexpointtimesaples.PNG (385.4 KB)
sops_to_lops_v002.hip (107.5 KB)

john @ goodbyekansas
User Avatar
Member
8104 posts
Joined: Sept. 2011
Offline
The sop import LOP has settings that control which attributes write time samples. An equivalent node in SOPs is USDconfigure which records the values of the import settings as detail attributes.
User Avatar
Member
75 posts
Joined: July 2006
Offline
Hi! Yeah in my haste to make the simplest file possible I forgot to se the 'topology attributes' to static. Nevertheless I still get time sampled point positions of the static mesh.. where it's defined in the usda.

I was thinking I only need to author the transforms... a bit like how its described here: https://openusd.org/release/tut_xforms.html [openusd.org]

.. but I'm obviously trying to do it and understand it with vanilla Houdini tools

Surely all I would need authored is the xform
def Xform "myasset" (
    kind = "component"
)
{
    def Xform "sphere"
    {
        token visibility.timeSamples = {
            1: "inherited",
            2: "inherited",
            3: "inherited",
            4: "inherited",
        }
        matrix4d xformOp:transform.timeSamples = {
            1: ( (1, 0, 0, 0), (0, 0.9848077297210693, 0.1736481785774231, 0), (0, -0.1736481785774231, 0.9848077297210693, 0), (-1, 0.06979899335956041, 0, 1) ),
            2: ( (1, 0, 0, 0), (0, 0.9396926164627075, 0.3420201539993286, 0), (0, -0.3420201539993286, 0.9396926164627075, 0), (-1, 0.13951294594943064, 0, 1) ),
            3: ( (1, 0, 0, 0), (0, 0.8660253882408142, 0.5, 0), (0, -0.5, 0.8660253882408142, 0), (-1, 0.20905692875385284, 0, 1) ),
            4: ( (1, 0, 0, 0), (0, 0.7660444378852844, 0.6427876353263855, 0), (0, -0.6427876353263855, 0.7660444378852844, 0), (-1, 0.27834622136391296, 0, 1) ),
        }
        uniform token[] xformOpOrder = ["xformOp:transform"]
    }
}
Edited by protean - April 17, 2023 14:08:59
john @ goodbyekansas
User Avatar
Member
8104 posts
Joined: Sept. 2011
Offline
The 'default values' field lists attributes which skip writing time samples and only write a default value.
User Avatar
Member
75 posts
Joined: July 2006
Offline
Cool.

I also discovered a difference if I set the path attrib after packing vs. before the pack. This gives me something to noodle with for a while, thank you!

J
john @ goodbyekansas
User Avatar
Member
75 posts
Joined: July 2006
Offline
After all that I discovered that while removing unnecessary time sampling (by setting default attribs) when saving usda files naturally saves a lot of storage, when saving binary it makes little/no difference. At least in my current asset test.
john @ goodbyekansas
  • Quick Links