Naming of instanced objects
4430 7 2- v_chernobay
- Member
- 17 posts
- Joined: Jan. 2013
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
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)
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)
Edited by seelan - July 9, 2018 14:28:04
- winkel
- Member
- 217 posts
- Joined: March 2006
- Offline
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
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
- Member
- 571 posts
- Joined: May 2017
- Offline
- winkel
- Member
- 217 posts
- Joined: March 2006
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
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”)
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”)
Edited by seelan - Aug. 22, 2018 15:41:29
- winkel
- Member
- 217 posts
- Joined: March 2006
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
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]
-
- Quick Links