Exposing geometry parameters upstream

   4016   6   0
User Avatar
Member
143 posts
Joined: March 2014
Offline
Hello,

I have a DA that needs to have the positions of its internal geo components exposed to Unity.

In the image attached, the lattice is one object and the sphere is another. I need to let unity know the position of this sphere relative to the grid. Is this possible? I tried creating a vector float parameter and then pasting the relative reference of the sphere into that parameter, but it just comes out as zeros when I import the DA into unity.

Or is there a way to expose the sphere as a child of the DA once it is in unity so that I could place unity objects as children under the sphere such that they would be at the same position as the sphere if set to {0,0,0}?

I hope that made sense!

Thank you,
Caesar

Attachments:
chart.PNG (115.7 KB)

User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
If you insert an Object Merge and a Transform that references the original sphere, will that work in Unity?

-b

Attachments:
exspose_sphere.hipnc (53.5 KB)

http://www.racecar.no [www.racecar.no]
User Avatar
Member
143 posts
Joined: March 2014
Offline
I will try it when I get back home - thank you.
User Avatar
Member
143 posts
Joined: March 2014
Offline
Works great - thank you so much.
User Avatar
Member
143 posts
Joined: March 2014
Offline
I spoke too soon. The transform controls are there and I can transform the uninitialized_geo, but the values that were set in Houdini do not come over, they are initialized to {0,0,0}
User Avatar
Member
143 posts
Joined: March 2014
Offline
My workaround is to attach a script from houdini so that at runtime the values are pushed to the exposed object. So far this is working.
User Avatar
Member
402 posts
Joined: March 2013
Offline
This should work. I attached an example of an asset that exposes underlying OBJ transforms (and they do not get reset to 0,0,0).

An added bonus is that this asset exposes transform handles that show up in Unity and allow you to transform those subobjects and have the transforms persist across cooks. Otherwise, if you move subobjects manually in Unity the transforms will be reset when the asset cooks.

Attachments:
HAPI_Test_Handles_Transformer.otl (13.3 KB)

  • Quick Links