Multiple mesh in a single HDA - Unity

   3243   4   0
User Avatar
Member
5 posts
Joined: Oct. 2018
Offline
Hi,

I was wondering how can I have multiple meshes in one digital asset in Unity ?

For example, I made an asset with 4 planes (see attachment). I'd like to have them separated (2 groups of 2) once in Unity but Unity merges them into one single mesh.
I tried putting them into groups, having different UVs or different materials but that doesn't work. So what's the logic to separate those meshes ?

Maybe this is a stupid question, but I've been looking for days without finding an answer on SideFx or on any other website.


Thanks in advance if anyone has an idea
Edited by Statikomelon - Feb. 20, 2019 10:31:13

Attachments:
Screen_4planes.PNG (553.0 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
Make the HDA a subnet, and create a geometry object for each separate mesh, then place an object merge inside each one, and use group to filter out the mesh you want.
User Avatar
Member
5 posts
Joined: Oct. 2018
Offline
Thank you so much ! It worked !
I get the logic now. As long as there are two seperate geometry nodes in the subnet, it will create two geometry in Unity.

However, I don't really get the purpose of the object merge. I tried with it first, and then without it. It worked perfectly fine without it. (I added pictures to explain better )
(I tried reading the SideFX doc about the object merge node but it's not very clear yet. Sorry, I'm really trying to understand to be sure !)

Attachments:
with_objectMerge.PNG (559.9 KB)
Wo_objectMerge1.PNG (626.6 KB)
Wo_objectMerge2.PNG (554.1 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
The purpose of the object merge, in this case, is to import geometry from another object into current object. In your case, I meant that you might have a master object (geo1) containing all your geometry with geometry groups (e.g geogroup1, geogroup2). Then you could have 2 other geo objects (geo2, and geo3) that could each have an object merge that imports from geo1, but specify the group they want (geogroup1 in geo2, and geogroup2 in geo3).
User Avatar
Member
5 posts
Joined: Oct. 2018
Offline
Oh, great !
I get it now.
Thank you for your answers !
  • Quick Links