How to split geo on SOP-level into seperate baked meshes (in UE4 via hengine 3.0)

   2522   11   4
User Avatar
Member
350 posts
Joined: Feb. 2013
Offline
So as far as I understand, what I want to happen is this:
http://www.sidefx.com/docs/hengine/struct_h_a_p_i___cook_options.html#a47a4b358bd92d4de96d8799dee102728 [sidefx.com]
HAPI_CookOptions::splitGeosByGroup
I want splitGeosByGroup (or something like it) to be active in the UE4 version of Houdini Engine.

That does not seem to be the case.

According to the docs:
http://www.sidefx.com/docs/unreal16.0/_meshes.html#MeshGeneration [sidefx.com]
SplitGeosByGroup seems to only happen for collision groups.
- Why is that?

Can I make it easily work for all types of primitive groups? (With “it”, I mean the splitGeosByGroup behaviour.)
Can I make it easily work for specific primitive groups?
Can I make it work with a special attribute?


Can I somehow change such settings from within an HDA? (The idea would be, that no matter where I run the HDA, it uses my custom settings for bakes.)
Edited by DASD - March 12, 2017 14:13:43
User Avatar
Member
402 posts
Joined: March 2013
Offline
Splitting a mesh by group turned out be very much not ideal. That's because people tend to have other groups that have nothing to do with splitting, or overlapping groups, all of which will become their own static meshes.

The spliGeosByGroup option is off in UE4 because NOBODY should really be using that feature. It is pretty much deprecated and only there because some plugins still did not implement a better solution.

If you want a mesh in Houdini to be split in a specific way when coming into UE4 (or any other plugin), pack each individual “part” into a separate Packed Primitive and then merge them back into a single SOP. Each packed primitive, even if unique (not instanced), will become a separate StaticMesh in Unreal, with all the proper materials and attributes.

The benefit of using Packed Primitives to split is that even for plugins that don't support packed primitives, you will still get the splitting you desire because each packed primitive will be treated as a separate “primitive” when refining the whole thing to a triangle mesh.
User Avatar
Member
350 posts
Joined: Feb. 2013
Offline
Thanks a lot!
- Quick note to anybody else who might try this:
Use a pack SOP, turn on “Name Attribute”, enter a attribute name by which to separate geo, turn off “create packed fragments”. At least, that did it for me.
Edited by DASD - March 12, 2017 15:42:43
User Avatar
Member
63 posts
Joined: May 2016
Offline
Does this packed primitive splitting work in the Unity plugin? The real issue with unity is the 64K vertex limit, which is pretty easy to exceed. If I could split each piece out then that would solve the issue.
User Avatar
Member
118 posts
Joined: Feb. 2016
Offline
I'm working on the geometry displayed in the image.
Every arch module has its prims correctly assigned to the same name attribute.
What is the workflow to pack them correctly and have one single instanced static mesh component with all the instances?

I'm trying the pack sop, but it will create as many different instanced static mesh components as the amount of instances…



(sorry to the op for the side question…)
Edited by Andr1 - June 27, 2017 10:46:31

Attachments:
instances.JPG (142.5 KB)

User Avatar
Staff
270 posts
Joined: Sept. 2016
Offline
Try using a COPY sop and enable the option to pack geometry before copying

Attachments:
Capture.PNG (13.7 KB)

User Avatar
Member
118 posts
Joined: Feb. 2016
Offline
thanks!
I'll try to rework my setup then to create the arch module already extruded before copying it.
Right now the setup makes copies of the arch module facade only and then applies the extrusion, so that's why I was trying to create instances without the pack&instance option of the copy node, to avoid to instance only the facade…
Edited by Andr1 - June 29, 2017 07:19:07
User Avatar
Member
32 posts
Joined: Jan. 2017
Offline
When I do the pack method to get correct naming etc, it still misnames the meshes in the “instanced input” section but the generated meshes section is fine. Anyone know why?

It will list the rendered geo collision name of another mesh than the one pictured as part of the name and have no clue how to fix that.

See pics - top is correct (it's the generated mesh section on the top listing the steps and groundfloor meshes appropriately.

On the bottom is the instanced input section which has the meshes named by the WRONG mesh's geo collision group - and yes the groups are in order in the houdini graph.
Edited by GaryHanna - July 5, 2017 10:26:37

Attachments:
Screenshot (89).png (698.4 KB)
Screenshot (88).png (674.5 KB)

User Avatar
Staff
270 posts
Joined: Sept. 2016
Offline
This looks like it may be a bug, It would help if you could attach your HDA either here, or to a new bug report if you prefer.
User Avatar
Member
32 posts
Joined: Jan. 2017
Offline
chrisgreb
This looks like it may be a bug, It would help if you could attach your HDA either here, or to a new bug report if you prefer.
Edited by GaryHanna - July 5, 2017 17:23:25

Attachments:
StairwwellGen.hdalc (127.5 KB)
StairwayApt.hiplc (2.9 MB)

User Avatar
Member
2 posts
Joined: Aug. 2017
Offline
GaryHanna
When I do the pack method to get correct naming etc, it still misnames the meshes in the “instanced input” section but the generated meshes section is fine. Anyone know why?

It will list the rendered geo collision name of another mesh than the one pictured as part of the name and have no clue how to fix that.

See pics - top is correct (it's the generated mesh section on the top listing the steps and groundfloor meshes appropriately.

On the bottom is the instanced input section which has the meshes named by the WRONG mesh's geo collision group - and yes the groups are in order in the houdini graph.

Hy, GaryHanna,
how did you achieve multiple material assignment per instance? From the pic you sent, I can see three materials assigned to your stairs. I m trying to achieve at SOP level, a packed instance with 2 or more material assigned to the faces of my mesh, but might not be the ideal approach. Could you share an snapshot of your setup?




Thanks

Attachments:
Screenshot_1.jpg (61.8 KB)

User Avatar
Member
2 posts
Joined: Aug. 2017
Offline
Forget about it, I realized you already shared the files.

Thanks!
  • Quick Links