Exporting ROP Framerange from Maya

   3958   3   3
User Avatar
Member
6 posts
Joined: 5月 2009
Offline
So I am using an input curve and animated attributes in Maya to drive a pseudo-particle animation inside of my OTL. I would like to bake that animation from inside of my OTL to bgeo files for use in other aspects of our pipeline.

I promoted the Framerange controls and “Render” button of an internal ROP output driver to my top level controls, so that I can control them inside of Maya. The problem is it doesn't look like the Maya timeline is updated if the timeline is controlled by one of Houdini's internal iterators (like a ROP or cache node).

As an example - If I set my framerange from 1 to 48, and hit “Render”, then I will get 48 frames of bgeo files - unfortunately, they're all exactly the same - ie if the timeline was on frame 24 in Maya, then I'll get 48 duplicate bgeo files of frame 24. Houdini iterates through the frames specified, but the Maya timeline isn't updated or moved to reflect that change, so the geometry isn't re-evaluated before export. It's almost as though there's a Timeshift at the end of my network that's set to whatever the current Maya frame is.

Is there a way to get Maya/Houdini to sync up when exporting from ROP's?
User Avatar
Member
818 posts
Joined: 9月 2013
Offline
Unfortunately, this is a limitation of Houdini Engine at the moment. It's as you have described. In the “Houdini world”, only one point-in-time snapshot of the “Maya world” is available at each cook.

The current workaround is to put a Cache SOP right after the input. This will cache the input geometries as it's being evaluated by the asset over time. However, this means you have to play through the entire frame range once to make sure the cache SOP has cached the geometry from all times. This is quite cumbersome though. :?

I suppose another workaround is to cache the geometry using something like Alembic. Then use the Alembic file as the “input” to your asset.
Andrew / アンドリュー
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
What about making the render button in your digital asset instead run a python module command which switches the frame in maya then triggers a rop render internally in houdini? Seems like it could be trivial to write
-G
User Avatar
Member
818 posts
Joined: 9月 2013
Offline
For a second, I thought that might work, but now I'm not too sure. In order for Houdini to receive the updated input geometry, Maya's DG have to compute the “houdiniAsset” node, so that the “houdiniAsset” node will marshal the geometry into the Houdini world. However, the node is already in the middle of a compute. This feels like it'd lead to deadlock or infinite recursion.

However, if the script is on Maya side, this might work. The Maya script would advance a frame, and then activate the Render button. And the Render button would then write out only the current frame.
Andrew / アンドリュー
  • Quick Links