HDA for importing alembic Maya camera with scaling

   3042   2   1
User Avatar
Member
2 posts
Joined: Oct. 2016
Offline
Hey there!
I’m having a small problem with creating an HDA to automatically import an animated camera from Maya. If I do it manually it works fine. Manually I take the following steps:

- File > Import > Alembic Scene > Select the exported alembic camera from Maya.
- I add a Null to the Alembic Archive and change the Uniform Scale to 0.01.
- I create a CHOP network and inside I create: Object (Import), Fetch, Merge and Export nodes.
- I create an camera in /obj and name it RENDERCAM.

Then inside the CHOP network I set the following settings:
Object - Object tab - Object (Import) - Target Object = shape of the imported alembic camera.
Object - Object tab - Compute: Position and Rotation
Object - Channel tab – Channel Range: Use Full Animation Range
Fetch – Source tab – Node: shape of the imported alembic camera.
Fetch – Source tab – Channels: focal aperture
Export – Export tab – Channels: t r focal aperture
Export – Export tab – Node: /obj/RENDERCAM
Export – Export tab – Path: t r focal aperture

If I then click on the export flag it Exports all the correct information to the RENDERCAM.

Now the way I thought of building the HDA is by creating a subnet of the Alembic Archive, Null and Chopnet. In the Chopnet I create a switch before the export where with 1 the export flag is off and the other export the flag is on. Also, on every common tab of these nodes I remove adjust the Export Prefix to ../.. so there are no references outside subnet. I really don’t know for sure if this is correct.

So the problem I’m encountering is that when I select the Alembic Camera from the Subnet where I created a “File” link, it doesn’t build the hierarchy and thuis I cannot select the shape and so forth.

Please see attached my setup and the alembic camera. Anyone have any ideas of how to fix this or how to set this up better?

Thanks!

Danny
Image Not Found

Image Not Found

Image Not Found
Edited by DannyCT - June 19, 2018 02:57:20

Attachments:
alembic_camera1_v001.abc (9.7 KB)
maya_cam_to_houdini_v002.hip (147.7 KB)

User Avatar
Member
7759 posts
Joined: Sept. 2011
Offline
For my alembic camera asset, I use python expressions on the transform channels that reference the alembic through the _alembic_hom_extentions module directly. This allows me to get the world transform and apply the scale after cracking the transform. this way the asset is self-contained, and doesn't require any embedded, editable, or hidden nodes.
User Avatar
Member
2 posts
Joined: Oct. 2016
Offline
Thanks man but unfortunately I'm not good at python expressions or scripting. I'm relatively new to Houdini and working with these kinds of setups where I use the CHOPs to import the channels and export them to a new camera is a little bit more clear/tangible for me. Is there maybe a way you can help me with VOPS or some other way?

Thanks again.

Danny
  • Quick Links