Jump to content

cookie output grouping / fuse normal problems


Recommended Posts

o.k., here's a bonus question for all you guys with the big foreheads: So I'm using a cookie to chop chunks out of some complex input geo. The cutting geometry is changing (I'm looping over several cutting objects with a Copy). The output of the cookie is generally one or more chunks, each of which is made of an arbitrary number of "Inside A" and "Inside B" surfaces. (So imagine taking a bite out of an apple - you get one chunk, made of a red surface "Inside Apple" and a white surface "Inside Mouth". Now imagine that I'm missing some number of my teeth, and that the apple is shaped like a donut... you get the point, the output isn't predictable.)

What I want to do is to group this random collection of InA and InB surfaces by which chunks they belong to. One way to do this is a Fuse in Consolidate mode, followed by a Connectivity and a Partition. This works, but it screws up the normals along the adjoining edges, because there are no longer duplicate vertices with separate normals for each surface. I can't fix it with a Facet to cusp the polys, because the input geo is arbitrary, and there's no way of getting a cusp angle that works for all cases.

So, given that I've got the correct groupings, how can I apply these *back* to the original output of the cookie, which has the correct (unique) vertices? (Alternate solutions welcome.)

See the attached file. Go down into the "fracture" node. The output of the cookie (GOOD_GEO) is how I want the geo to look, and GOOD_GROUPS is how I want it to be grouped.

EDIT: a simpler way of saying it is that I want a network that does what a fuse(consolidate)-connectivity-partition does, but which doesn't actually fuse anything.

cookie_v4_example.zip

Edited by Mitch Deoudes
Link to comment
Share on other sites

In the end, I don't think the Assemble does what I want. Drilling down into it, it looks like it achieves the grouping with a Connectivity and a Partition - which works in the case of the Shatter SOP, because things are already connected properly. However, in my case the Cookie is outputting surfaces that have coincident edges, but aren't actually connected - hence the need for a Fuse.

I did get it working, though, with a GroupTransfer - just transferred the groups calculated by the Fuse-Connectivity-Partition chain back to the output of the Cookie. Bingo! The toughest part was wrapping the whole thing up in a Copy and looping over all parts of both input geometries.

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