Alembic camera transform data?

   10071   9   2
User Avatar
Member
433 posts
Joined: April 2018
Offline
I'm messing around with camera tracking in Blender and exporting to Houdini as Alembic. It's working well, but I do have one question: where is the camera transform data actually stored? I can't find a single keyframe anywhere, yet somehow the camera is magically moving. Thanks!

Attachments:
Blender Motion Tracking.abc (44.5 KB)
Blender Motion Tracking.hiplc (1.3 MB)

Subscribe to my Patreon for the best CG tips, tricks and tutorials! https://patreon.com/bhgc [patreon.com]

Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
BrianHanke
It's working well, but I do have one question: where is the camera transform data actually stored?

It's stored in the alembic.
User Avatar
Member
433 posts
Joined: April 2018
Offline
jsmack
It's stored in the alembic.

Obviously. How do I access it in Houdini?
Subscribe to my Patreon for the best CG tips, tricks and tutorials! https://patreon.com/bhgc [patreon.com]

Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
User Avatar
Member
433 posts
Joined: April 2018
Offline
Update for anyone who runs into this issue in the future:

Still no clue how to access Alembic camera transform data in Houdini, but it's possible to export it via FBX from Blender. You need to select the tracked camera, go to Object Constraint Properties and click on Constraint to F-Curve. Then, export to FBX using the default settings. Houdini will bring that in as a camera with all the keyframes you'd expect.
Subscribe to my Patreon for the best CG tips, tricks and tutorials! https://patreon.com/bhgc [patreon.com]

Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
First let's talk /obj based Houdini:

To “see” the camera transform value at the current frame, add an Alembic Xform node pointed to the .abc file and point it to your camera at question. Feed in the correct frame and fps and it returns the transform data.
To see the actual values, you can use the following hscript commands:

vorigin(“”,“/obj/cam1”)
vtorigin(“”,“/obj/cam1”)
vrorigin(“”,“/obj/cam1”)
or
origin(“”,“/obj/cam1”, “TX”) where “TX” can be (“TX”, “TY”, “TZ”, “RX”, “RY”, “RZ”, “SX”, “SY” or “SZ” )

If you want, you can add a Null Object and feed it in these expressions as a visualizer if you wish.

The fast reading of alembic and the fact that there is no parameter updates is one of the built-in features that makes Alembic so fast.
Alembic is a baked format that does not support keyframes or any spline type animation curve. Anything time based is baked as samples. Camera transforms are captured at frame rate defined in the export as transform samples in the .abc file.

Houdini uses the Alembic Xform Object to fetch a specific Alembic Primitives transform sample at the given frame with the correct FPS set.

Alembic is a heavily optimized file format that is designed to read very fast from disk and Houdini's Alembic support is utilizing the best that Houdini has in /obj space to support the format as fast as possible w/o having parameter dependency updates, etc.



For Solaris, to see the camera transform values at the current fraome, you can use the USD framework with it's Alembic schema to bring in the Alembic Camera and inspect the values on the primitives properties.

You can use a SubLayer LOP to load in the .abc file and directly inspect the camera transform data at the current fraome in the Scene Graph Details.
Look at the xformOp:transform subdata on the camera to see the values update as you increment the framerange.

See the attached hip file and don't forget to write out the Alembic from /out/alembic ROP.

Attachments:
test_alembic_cam.hip (264.6 KB)

There's at least one school like the old school!
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Alembic and USD only support raw values and not keyframes with segments btw.
Not every application interpolates keyframe functions the same so that is why it is all raw values.
The fact you are adding keyframes and segments and perhaps fitting the animation data which FBX can certainly do is you manufacturing data that wasn't there.

All fine as long as you don't use this as Alembic/USD truth, cause it isn't. It would be an FBX bake on top of Alembic/USD.
There's at least one school like the old school!
User Avatar
Member
433 posts
Joined: April 2018
Offline
old_school
To “see” the camera transform value at the current frame, add an Alembic Xform node pointed to the .abc file and point it to your camera at question. Feed in the correct frame and fps and it returns the transform data.

Thanks for much for the detailed explanation. I gave it a test run in my original setup and it's working great. Always glad to learn something new!
Subscribe to my Patreon for the best CG tips, tricks and tutorials! https://patreon.com/bhgc [patreon.com]

Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
BrianHanke
Obviously. How do I access it in Houdini?

As Jeff said, use an alembic xform node to use a transform stored in an alembic. If you need access to the exploded TRS channels, either use chops/constraints referencing an alembic xform node, or use the hom alembic extensions in python to read the matrix directly–then feed the matrix to the desired explode matrix function to extract the required channels: t, r, s.
User Avatar
Member
7 posts
Joined: Sept. 2020
Offline
Hello. Does this camera track export out of Blender to Houdini workflow still work? Is ABC the best file format to do this in? thx
Thanks for the help!
User Avatar
Member
2 posts
Joined: July 2022
Offline
I second the question of if this still works well or not? Been trying to import camera alembic from blender into houdini and it isn't lining up very well even though I have the same frame range / framerate settings.
  • Quick Links