Jump to content

How do I separate an imported mesh?


Gurbo

Recommended Posts

Hello

Newb alert. I want to try a personal project in Houdini and I've learnt how to import foreign models. Yippee!

How can I separate the different elements? Such as the ring pull from a soft drink can. In Maya it is the combine and separate tools and in Max it is the attach and detach buttons. I look but cannot see.

This Houdini thing is becoming addictive.

Thanks in advance to any respondants

Gurbo

BTW Has anyone played with the frame blocking feature in Mplay?

Sounds pretty flash.

  • Like 1
Link to comment
Share on other sites

Hi and welcome!

Seperating meshes in Houdini is a much more conscious task than it is in Maya. If you wish to seperate connected meshes then look into the Connectivity SOP -> Partition SOP -> DeleteSOP.

I'll write more in and hour or two - just need to run an errand...

:rolleyes:

Link to comment
Share on other sites

Thanks for getting back to me so soon Jason.

I tried the workflow that you suggested and I must confess I don't quite get what the connectivity SOP does.

Couldn't I do this by importing a mesh, duplicating it several times and blasting the bits I don't need?

Not an elegant solution but sufficient for one ignorant in the ways of Houdini.

Gurbo

Link to comment
Share on other sites

The methods I have always done is to first take the File SOP and pass it to a "Reverse" SOP if it is from a .obj from Maya. This reverses normals and such so that it displays correctly in Houdini. If the model still looks messed up, you may need to connect it to a "Facet" SOP to consolidate points, cusp (harden edges based on angle), and/or recompute normals, etc., but be careful of this if you need to rely on the different meshes being seperate like in my second method below.

Now for this first method to work, the input geometry needs to have seperate groups in it that are generally created based on material assignments in Maya or whatever. You can middle mouse click (and hold) on the File SOP to see if these exist.

If there are seperate groups I connect the node to a "Delete" SOP in the network pane. I select a Group at the top of the "Delete" SOP and switch to "Delete Non-Selected". This will delete everything except the group you picked. Then I copy this Delete SOP (make sure it is at the same level and not a child of the last Delete SOP) and switch the Group at the top (don't just add another group- make sure you delete the previous one and add a new one). Keep doing this until you have a bunch of Group SOPs with different geometry in each. This will seperate your model into different parts.

You can then operate on all of these seperately and then combine them later with a "Merge" SOP. Remember that you don't have to give each one a "Shader" SOP- you can add a "Shader" SOP below the merge and link each seperate group to a SHOP there. Likewise, each SOP can operate on only one group, so you may not need to seperate them at all.

Now, if you don't have seperate groups in your File SOP, but the meshes are actually seperate and not connected, you can go into the Viewer pane and use a "Delete" SOP there, but change your selection option to "Select Connected Primitives" (8th icon down on the left) and select a part of your model. Then change the Delete SOP to "Delete Non-Selected" and continue with a similar method to above, but picking in the Viewer Pane. Make sure your Delete SOPs are not children of each other, but of the initial mesh.

Hope this helps.

Craig

Link to comment
Share on other sites

Basically, it's a way of identifying parts of a geometry that are disconnected. Er, let me try that again. It figures out the pieces of separate geoemetry. Er, how about a contrived example:

- Put down two box sops and merge them together. Move one box sop aside so that they're not intersecting.

- Append a Connectivity SOP. This creates a point attribute (by default, called "class") which uniquely identifies each piece by giving it a number.

- One way to see what it did is to right-click on the Connectivity SOP and choose "Spreadsheet". Look at the column named "class". Scroll about, notice how all the points belonging originally to the first box has a value of 0, while the points from the second box has a value of 1.

- A better way to see the results is to use the result in some way. For ease of use, first append an AttribCreate SOP. Set Name to "class", Type to "integer", and the first Value to "$CLASS".

- Append a Point SOP. Change Keep Color to Add Color. Replace $CR with "$CLASS!=0". This will colour the first box cyan and all the other pieces white. Change the 0 to 1 instead and see the other box be cyan instead.

Link to comment
Share on other sites

  • 5 months later...
Basically, it's a way of identifying parts of a geometry that are disconnected. Er, let me try that again. It figures out the pieces of separate geoemetry.

Hey Edward,

Thanks for the explanation. It's taken me awhile but the penny finally dropped. I find your mini tuts really helpful in trying op tiles I'd never think to have a look at.

Cheers :D

Gurbo

Link to comment
Share on other sites

Eventually you may find this SOP incredibly useful. We find that it becomes most handy if you follow the Connectivity SOP with a Partition SOP to put the connected pieces together into their own groups. Now you can use the Group field in most SOPs to operate on individual "chunks".

We do this so often that we very seldom use the ConnectivitySOP just as is, we rather use our own (very simple) HDA which group pieces off automatically.

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...