How to reference an alembic object´s transforms?

   8303   2   1
User Avatar
Member
2 posts
Joined: Aug. 2011
Offline
Hello!

It would be really helpful to get this to work on my current project!
I am importing an extremely simple alembic file. Basically, a few animated objects (transform only, no deformation), and an animated camera. I need to link the transform of the animated objects inside of the alembic file to static objects in Houdini, in effect transferring their animation. This would allow me to have a “reference” system in Houdini: if I change the alembic file, all animation and effects update instantly, so I can set up many different shots easily.

When I import the file as FBX, it works - all animation is at the surface, available for me to link. Unfortunately, the file becomes part of my Houdini file, so there is no way to quickly change the original animations after I establish the correct links.

When I import the alembic file, I get an “active” link to the file, and its contents. If I change the file, but maintain all the naming structure, I can theoretically access different animations, and maintain the links. Unfortunately, the translate data is all “pretransform”, which means that, when I look at the individual objects from the alembic file (extracted with either an alembic Archive node, or an alembic_xform node), all of their transform data is zeroed.

So, onto the question: how to transfer the pretransform data of an object inside of an alembic file to an object in the Houdini file?

Different paths that I have tried so far (but have no idea how to implement):

http://www.sidefx.com/docs/houdini/hom/abc_extensions [www.sidefx.com]


fetch node


The HOU node, as in:
cam = hou.node(“/obj/cam1”).worldTransform().extractTranslates()


This last one (the HOU node) seems particularly promissing.

Any help will be greatly appreciated!

cheers,


Diego
User Avatar
Member
8177 posts
Joined: Sept. 2011
Offline
_alembic_hom_extensions.getWorldXform() is essentially what I'm using in an HDA I created for reading in alembic cameras. I'm not sure what your purposes are, but is the alembic xform object not able to meet your needs? Do you specifically need to ‘see’ the transform values? If you only need the movement, you can parent your object to the abcxform node. You can also use chops to get at the transform with an object chop. Point it at the alembic xform node or any other object and it will build TRS channels from the objects transform. The object chop also allows specifying a reference object so that a local transform or other relative transformation can be computed. When you have the transform computed, set the export path on the chop and toggle the export flag to override the TRS parameters of the desired object.
User Avatar
Member
2 posts
Joined: Aug. 2011
Offline
Hi Jsmack, thank you very much for your reply! I got it to work using

origin("", "/obj/fetch1",TX)

to reference the translation (and scale, and rotation, changing the “TX” part to “RX”, and “SX”)directly. So, I used a fetch node to grab the values that I needed, and then the missing piece was the origin command, to calculate the worldspace values. Seems like it is working well! Will change up the alembic a few times in production, and report back if it doesn´t, for some reason.

I knew what I wanted to do, I just didn´t know what “button to press”. Hopefully in the near future I´ll be able to just concentrate on the higher concepts, like in your answer, without stumbling in the “how” so much!

cheers,


Diego
Edited by Dvelasco - June 27, 2019 03:01:00
  • Quick Links