Creating instances with Engine

   3723   5   1
User Avatar
Member
517 posts
Joined: Dec. 2013
Offline
Hi there,

Just new to Engine since it recently go changed to work while in iOS editor mode (That's Awesome!) Just wondering How I get it to copy Unity prefab instances to a path?
I just did a simple test but it seems to have baked them all to one mesh…




Any ideas?
Thanks!
Pete
User Avatar
Member
571 posts
Joined: May 2017
Offline
Try out the CurveDecorator in <Houdini Install Path>/engine/unity/Assets/OTLs/Samples/CurveDecorator. It takes in a curve and an instance object. When you bake it out (optionally don't have to bake), it produces individual meshes under the instancer child gameobject in the prefab.
Edited by seelan - July 11, 2017 11:51:20
User Avatar
Member
517 posts
Joined: Dec. 2013
Offline
Thanks seelanv but I'm having a bit of trouble reverse engineering that scene
If I create my own curve in the instancer it doesn't work, also how does the instancer know to use the xyz instance geo? I cant seem to figure that out.

P.
User Avatar
Member
571 posts
Joined: May 2017
Offline
Try the following steps in Unity:

1. Place the CurveDecorator.otl in the Assets folder in your project.

2. Drag & drop the CurveDecorator into the scene. It should automatically create a curve, along with transform handles for each point on the curve.

3. Create a sphere or bring in your own mesh into the scene.

4. Drag & drop that sphere into the Instance_Object field on the Houdini Instancer Manager component that is part of the CurveDecorator game object. See screenshot red box.

5. Optionally, create your own curve from Houdini Engine -> Create Curve. Then place that as the reference curve on the Path Object field in the Houdini Parms component on the Curve Decorator game object. See screenshot green box.

Attachments:
curve_instancer.png (538.7 KB)

User Avatar
Member
517 posts
Joined: Dec. 2013
Offline
Thanks seelanv,
I can use the asset fine in Unity but I cant seem to create my own HDA in Houdini that will instance objects to the path. I just cant seem to figure out the instance node.
It doesn't seem to work if I use my own curve (in Houdini).
Also, how does it know to copy that instance object to the curve? I cant see any reference in the instance node parameters.



Thanks,
Pete
User Avatar
Member
571 posts
Joined: May 2017
Offline
This might be a question better suited for the general Houdini forum.

Have you imported the Curve Decorator into Houdini and checked out the graph?

In the Curve Decorator, the path node network has an Object Merge Sop that references the mesh_obj parameter on the HDA (see first screenshot).

To get the path itself, it's specified on the Object Merge Sop inside the instancer node (see second screenshot with red outline).
Edited by seelan - July 13, 2017 09:01:38

Attachments:
curve_decorator_houdini.png (941.9 KB)
path_input.png (63.3 KB)

  • Quick Links