SeparatingConnectedMeshes

From Odwiki

Jump to: navigation, search

How To Separate Connected Meshes In Houdini

Selecting and separating a single connected mesh

The Manual method involves using the GroupSOP add interactively selecting the connected meshes (the "7" key in the viewport in Select mode). This Group can be DeleteSOP'd out in the current object and ObjectMergeSOP'd in the destination object.

Automating separation of all meshes

In order to separate all connected meshes in an object, you have to first make sure that every connected mesh is sorted into a primitive or point group. For this you can use the ConnectivitySOP followed by a PartitionSOP - please look at their helpcards for an example of how to do this: it's quite easy. Now you are ready to utilize the ObjectMergeSOP to pull each group into a seperate object.

Writing a very simple script to iterate through every group and create individual Objects with these ObjectMergeSOPs is easy and here is a very simple implementation hosted on the SESI Exchange: [[1]]

Please remember that this is a two-step process and if you've previously grouped the geometry in a sensible or desired way, you can run just the script portion to create the objects from these predefined groups only. This script might need a simple change to adapt to whichever situation you throw at it.

© 2009 od[force].net | advertise