Jump to content

Creating individual parts of a model and keep them separated in UE4?


ron2812

Recommended Posts

Hello everyone!

Maybe this is a noob question, but i can't really get my head around this.
I made a simple room with 4 individual walls in Houdini, used a Merge SOP and created an HDA.

Back in Unreal i use the HDA and get one "Houdini Generated Mesh".
Is there a way to keep the 4 walls separated? So i have 4 Houdini Generated Meshes?

I know when I use a Copy to Points Node I get individual meshes, but this is not an option for this particular case.

Thanks in advance!
best, Ron

Link to comment
Share on other sites

With Houdini Engine, you used to be able to use groups and enable an option on the Houdini Interface in Unreal to separate them based on groups. So depending on how old your version is you could do that.

I'm not sure when they made the change, but now you just put your geometry into separate object nodes. The simplest way to do this is to create a object level subnet and inside create all your geometry in one geometry node called data or something, and shut of the the object level display parameter. Then create a new object for each element you want to separate and place object merge nodes in there. If you think of this in context to how Maya and Max works it will make more sense, one object equals one mesh. 

Link to comment
Share on other sites

Hey Ben!

Thanks for the reply! This works nicely!

But in my case I need to split up procedurally generated geometry in separate parts.
To be more specific - I generate a wall along a curve and need to split them into separate wall elements (on every curve point).
I need this to be able to toggle visibility. When the 3d person character walks behind a wall I need to fade out that wall element to make sure the character is always visible.

I have no problems splitting the wall elements, but can't access them individually since the room is one big mesh.
On obj-level I can't generate the wall and inside the geo node i can't have individual meshes.

Is there a way to add an attribute to the walls or something to let the engine know to generate a separate mesh?
Or how would you approach this?

Thanks for your help!
best,
Ron
 

Link to comment
Share on other sites

So there are a few options to do this.

The method I described above can be done via python. The GameDev RBD exporter can do this separating based on name attribute. If you want I have my own version you can use too.

In general instances will be your best bet. By standardizing your part library you can supply a point cloud to copy stance or an instance obj node. Unity will then treat these instances as prefabs. The latter instance object node will be more production friendly. Also this instance method will be faster to process and more runtime friendly than unique geo.

You can't do what your intending via attribute that way. However, you can use vertex color, the extra UV layers, and custom attributes to be processed by Houdini engine by the shader and C#. These would be custom tricks to make it do what you want. Look at the Vertex Animation set up to see how this works as far as shaders.

The fading out of the wall elements is done entirely in Unity. The best method is for each element to be a unique prefab like the instance, or rbd export method. As when the camera ray to your target intersect a prefab it can then fade it out. 

Hope that makes more sense.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...