input a maya mesh and output it as transform instances

   8053   7   2
User Avatar
Member
6 posts
Joined: Oct. 2019
Offline
I have managed to use a mesh as a Maya input and output geometry from that (as a single mesh) and I have managed to output transformed instances from geometry that is generated within the Houdini asset, however I am stuck when I try to combine the two.

I want to be able to input a mesh in Maya, use the Houdini asset to instance it and place it (based on another input mesh), then output transformed instances of the original mesh.

I am having trouble with this because the Houdini instance object requires geometry as an input and I don't know how to build an asset that can use a Houdini geometry object as an input in Maya

Could you let me know if there is a way around this? or perhaps a better solution.
thanks
User Avatar
Member
6 posts
Joined: Oct. 2019
Offline
I found a solution myself using op: with a relative path. I have attached the asset in case anyone else is looking for this.

I would still welcome any other solutions as it seems there are many ways to do things, and this area isn't very documented yet

Susie

Attachments:
Maya_Instance.otl (4.2 KB)

User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
The instance SOP node that you use creates packed geometries. This is great for Houdini itself, but at the moment, Houdini Engine doesn't support packed geometries yet. So geometries are outputted into Maya as completely separate meshes. Houdini Engine does support instancing, but it has to be done using the Instance OBJ node. With this, the Maya plug-in can actually use Maya's own instancer to create instances, which would be more efficient. See the attached files for an example.

Attachments:
maya_instancer2.ma (12.1 KB)
maya_instance2.hda (12.4 KB)

Andrew / アンドリュー
User Avatar
Member
6 posts
Joined: Oct. 2019
Offline
Thanks, That is good to know
User Avatar
Member
6 posts
Joined: Oct. 2019
Offline
I am having trouble passing attributes to my instances in Maya using the setup above. If I scale the geometry objects in Houdini using fit01(rand(instancepoint()+234.567), 0.2, 1.5)
They behave as expected in Houdini, but the scale is completely ignored in Maya. Is this a bug? (in which case I am happy to report it) or is there a different method I should be using? I have attached the updated Digital Asset.
thanks
Susie

Attachments:
maya_instance2.hda (12.5 KB)
instancing.jpg (108.8 KB)

User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Ah, Engine only supports fast point instancing at the moment. I'm not sure if we'll have support for full point instance in the future. So you need to switch to using pscale point attribute in the instance OBJ. See the attached HDA file.

Attachments:
maya_instance3.hda (12.6 KB)

Andrew / アンドリュー
User Avatar
Member
6 posts
Joined: Oct. 2019
Offline
Thanks, that is equally useful.
I managed to get it working yesterday using scale and orient point attributes in the same way. Would it be fair to say that the supported attributes are the same as for the copy sop as described here?
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=6679 [sidefx.com]

It is quite an old post so I expect it might be out of date?
thanks
Susie
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Yup, scale and orient would work too. There's a good list here too:
http://www.sidefx.com/docs/houdini14.0/copy/instanceattrs [sidefx.com]
Andrew / アンドリュー
  • Quick Links