caesar
2015年8月30日 21:53:12
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
bonsak
2015年8月31日 03:18:49
If you insert an Object Merge and a Transform that references the original sphere, will that work in Unity?
-b
caesar
2015年8月31日 08:44:50
I will try it when I get back home - thank you.
caesar
2015年8月31日 16:56:24
Works great - thank you so much.
caesar
2015年8月31日 17:05:14
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}
caesar
2015年8月31日 17:37:34
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.
damian
2015年9月3日 11:01:11
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.