Jump to content

Combining Boxes


Recommended Posts

Its been a while but now i am a REAL houdini operator (i have a real job).

So on to my question... how would you combine boxes together and remove the faces that are on top of each other.

I am making a chopper for a dops job and i want to lay out small boxes on to points. Group them into random groups of 1 to 12 boxes and then take those clumps of cubes and remove primitives that are on the inside then fuse the lot for each chunk. this is done for each chunk then noise is applyed.

In writing this out i find i have a major clue alredy i will have primitives that are on top of each other so i need to group any primitives that have the same position as any other prim. then delete them.

so any ideas on that one?

Link to comment
Share on other sites

If you are using H9 have a look at the "Remove Overlapping Faces" SOP.

This is funny! I've just told my self: "It wouldn't be very difficult to write such a tool in python SOP..."

Then I checked a tool you advised and... realized that this is a python based tool with a nice and simple solution. Although not terrible fast for big meshes I think.

I only wonder if:

- calculating a centroid of primitive in python is faster/slower then getting it from Houdini via expression or even geometry attribute.

- the same issue for calculating vectors comparison

- also sorting procedure could be slow in python


Edited by SYmek
Link to comment
Share on other sites

I did a quick test, created a box, removed all except top and bottom faces, scale it down on Y axis to make them overlap. Could someone explain me why the tool doesn't work in that case? Both faces have the same centroid, and are exactly the same, isn't it enough?


Link to comment
Share on other sites


This node doesn't care about Normals. It takes into account only prims vertices position.

Hey Kuba,

this has something to do with the fact the doing it you way you're trying to remove *all* prims in geo. I don't have a time right now to debug this code but maybe you just found a bug (or a limitation more).

I made test as follows:

took a box and copied it over its self with its height distance (I put one box onto another). Than I applied our sop and it works as expected. Previously I used it on more then a 1000-polygon geometry with overlapping prims and it worked fine also!



Edited by SYmek
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.

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