Getting object level transforms into my OTL

   3441   6   2
User Avatar
Member
7 posts
Joined:
Offline
Trying to get object transforms from Maya objects (cameras/lights/locators/objects) into my asset.

Fetch does not seem to work. In Object Merge– the “transform into this object” does not promote to the UI in Maya…

Parenting an OTL to an object in Maya– then in the otl, obj-merging “into this object” does not work…

I need a way to select an object in maya and have access to its transforms/inverse transforms…

What am I missing? This needs to be core functionality.
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
That should be possible with 13.0.469 and up. See the attached asset. The asset basically promotes a path parameter, and uses the path in the Fetch Object node. In order for Engine to recognize the path parameter as an input, you need to set the “Op Filter” to “Any SOP”.

Attachments:
fetch_parent.otl (8.1 KB)

Andrew / アンドリュー
User Avatar
Member
7 posts
Joined:
Offline
Ah! Thanks very much!

The OP filter was what I was missing.

Hopefully this functionality will improve to support Maya Objects like Locators, Lights, and Cameras.

There are a number of tools I'd like to re-work and port over to maya–and currently it seems that I'll need the user to constrain some hidden dummy geo to a camera in order to get the cam transforms into my asset. (as my asset will error if I set the input to a locator or camera…)

Alternatively:
Allowing obj-level assets to be parented (in maya), and treating the parent as a Houdini obj input connection—–in conjunction with Houdini-like object merge behavior inside the asset would be very, very nice!

Cheers

-matt
User Avatar
Member
1 posts
Joined: Aug. 2006
Offline
It doesn't seem to be working for me either if I link a locator or geometry in maya?
Engine 3.2 and maya 2018.5

Any clue?
from hou import *
User Avatar
Staff
146 posts
Joined: Oct. 2017
Offline
Locators come in using the houdiniInputTransform node, so the transform of the locator should be encoded as particle attributes on a single particle, so you should be able to look at P, orient and scale on the particle to extract the transform. If you want to connect some other transform node, as opposed to input geo, you can use a locator to set up the input transform and then reconnect the desired transform node in place of the locator.

If you want your input geo to be transformed, you should be able to put an objectMerge in your asset directly, with transformIntoThisObject, to capture the the transform of your input geo.
User Avatar
Member
7 posts
Joined: Feb. 2019
Offline
would there be a way to set this up to be compatible with a houdiniEngine history asset? from what I understand, history assets only work with native hda inputs, not object merges.
User Avatar
Staff
146 posts
Joined: Oct. 2017
Offline
The intent of the history asset was to work the same way as Maya mesh construction history would. So we assume it has at least one geometry input, and the the first geometry output is the one we are interested in. So that the asset is connected into the shape's construction history, the first geo output is connected to the shape. The shape remains parented wherever it was in the DAG, so there's no reason to bake down the input world transform onto the output shape. So it's mostly meant for SOP assets: you can still use an object hda but the transform won't be connected.

If you want the object space output, but you still need the input transform somewhere in the hda … The history asset can still have multiple inputs that you can connect through the attribute editor afterwards. only the first input is the designated history input. So you can have another input to to bring in the transformed object or to bring in a locator.

Just make sure that you don't turn on SyncWhenInputConnects or AutoSyncOutputs when connecting in the secondary inputs, or you'll end up with a new set of output objects rather than just the history.
  • Quick Links