Search - User list
Full Version: Naming of instanced objects
Root » Houdini Engine for Unity » Naming of instanced objects
v_chernobay
By default instancer in unity take names from output node in instancer in Houdini. Do we have any solution to name every instance object the same name as prefab?
seelan
Not really sure what you mean by “name every instance object the same name as prefab”? Do you mean that when baking it out to a prefab, to have a way to change the name of the instances?

The name of the instances are made by combining the name of the output node in the instancer with “Instance_” and an integer to uniquely identify the instance. An example would be “object_merge_Instance1” for the first instance.

If you do want to change the names, you can either change the name of the output node in the instancer, or in Unity, have an Event callback when Cooking or Baking to change the name of the generated gameobjects (see https://www.sidefx.com/docs/unity/_assets.html#Assets_AssetInspectorUI_Events)
winkel
Hi,
interesting!
I have the same problem. A Sop tree with some instances:

Instance-Sops
- attribcreateMetal
- attribcreateBrick
- and so on…
- attribcreateStand

in Unity
- attribcreateStand_0_Instance0
- attribcreateStand_0_Instance1
- and so on…
- attribcreateStand_0_Instance60

.. but how can I get the name of the instance to identify the object?
I replace the instances in Unity with fbx animations - works fine!

The instance and the “TRANSFORM NODE” have no parameter to identify, only the pieces (DOP result) have the material from the fbx.


Thanks
Detlef
seelan
Are you asking how to label your instance outputs with the material name? Not really sure what you're asking for exactly. Perhaps an HDA or an expected output diagram would help.
winkel
Sorry,
yes. Houdinis instance name is the latest sop name and I have some instance-Sops with different names after each other in a chain.. I need the names inside circles in Unity…
seelan
The output name is based on the display node's name + “Instance”. The one way to work around it for now would be to use multiple instancers with each one having an object merge and set name that you'd want on the display node inside the instancer.

I've created an RFE to investigate how to allow for more control over this. One way would be to add a field in Unity instancer section to specify output name.
Another option is to add support for another attribute to specify output name (e.g. unity_output_name=“name to use”)
winkel
Hi seelan,
thanks this will be a good idea. For now I use “child-material name” and “parent.parent-name” in Unity to get what I need.

Detlef
seelan
In Houdini 16.5.592 and newer, you can now specify the instance name's prefix via a detail or point attribute with name “instance_prefix”. See docs for further info: https://www.sidefx.com/docs/unity/_instancing.html#Instancing_Names [www.sidefx.com]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB