Houdini Engine: Figuring out how to use instancing and exposing those Parameters in Unity

   4445   4   2
User Avatar
Member
1 posts
Joined: March 2017
Offline
Hey Guys,

Im trying to figure out how to utilize Houdini Instancing within Unity using Houdini Engine. I have never attempted this before but the general idea is this.

I want to be able to create a building using prefabs I have authored in 3d max. I would rather not hard code these connections. I would rather the prefabs I provide it be independent of the Houdini frame work I created. By doint this I will have more flexibility and I can get more variation as I develop modular assets. I got the idea from the Instance Variations in Unity video
https://www.sidefx.com/tutorials/instance-variations-and-replacements-unity/ [sidefx.com] Unfortunately this video doesn't talk about what you need to do to expose the prefab variables for the starfish within Unity. He only talks about how he structured it for Houdini which I have a working example of but cannot replicate. I attached a screenshot from the video that shows the characteristics I would like to have access to in Unity along with a video showing my model and what I see in Unity.

Should also be pointed out I DONT want to embed the geo data. I would rather it be completely flexible where I can feed it any number of prefabs in Unity and have it create a new asset based off those assets.

Please let me know if anyone has suggests or feedback about how I should be approaching this
User Avatar
Staff
534 posts
Joined: Sept. 2016
Offline
Hi,

Hmm, can't see anything attached to your post!

Anyway, here's a video that should explain to you how the starfish asset was setup:
INSTANCING BY PARAMETER [www.sidefx.com]

Basically you just need to create an “instance” point attribute on the points where you want your instance to be, inside an instance node.

If you want to keep your building prefabs out of Houdini, what you can do is generate dummy instances in Houdini, using proxy geometry (for example, different colored boxes). And then override those with your building meshes in Unity.
(using the same method in the video you mentionned).
User Avatar
Member
194 posts
Joined: Aug. 2011
Offline
can i do this with the copytopoints node? it doesn't really seem to be working.. i mean it works, but i don't get an option to replace the instance with something from unity.
User Avatar
Member
571 posts
Joined: May 2017
Offline
Try the MeshDecorator HDA. It is found in <Houdini installation>/engine/unity/Assets/OTLs/Samples/MeshDecorator/MeshDecorator.otl

It will allow both a mesh with points as the target surface to copy objects on to (Mesh Object in Inspector UI), as well as an input object to instantiate on those points (Instance_Object in Inspector UI).
User Avatar
Member
2 posts
Joined: Jan. 2017
Offline
I have a similar issue with the instances, where I created a multiparm block(list) where different geometries can be plugged in and specific attributes can be changed on them(this is so that every object that needs to be instanced can have his own individual properties and never share points with other geometries). I have attached a file that seems to work(sometimes) in unity, but it always works in houdini. I'd like to know why it doesn't work in unity and how can I fix it.

Note: In the asset, when an element is plugged in at least one checkbox that defines it's placement must be checked.
Edited by renaissancemalk - Aug. 22, 2017 15:53:41

Attachments:
PlantGenerator.hdalc (85.7 KB)

  • Quick Links