Jump to content

Clustering without fracturing?


mstarktv

Recommended Posts

I may be missing something in the voronoi fracturing SOP, but I can't figure out a way to create clustering without causing fracturing on the geo. For instance. A standard brick will or just group of geo that clusters into groups using the scattering method so I could make the cluster groups bigger or smaller.

I feel like I'm overlooking something so obvious, or maybe I have to create proxy geo that is clustered and test if the brick particles are inside of it to group them? Ah, now I've just confused myself. 

I hope a few of you have run into this problem and have some incite. Thank you :D!

Link to comment
Share on other sites

You should check out the 'cluster' and 'clusterpoints' SOP nodes. They preform pretty much the same functionality as what happens inside the voronoi fracture node. I tend to use this method for clustering even when using the voronoi fracture node, to assign clusters to the points before feeding them into the fracture.

 

Cheers Jake.

  • Like 1
Link to comment
Share on other sites

i'll give it a look. I'm still new to Houdini, so it's not so much that I know you can do everything, I just aren't sure about the capable nodes that exist already. I agree with your method, though. I know it's convenient to have them in 1 node, but how I work, I like everything sort of self-contained into it's own step; even if it adds more to a tree. It's easier to get to at glance too. 

Thanks for the help! I'll give it a look and see what happens.

Link to comment
Share on other sites

Okay, I tried the method you mentioned but it doesn't seem to be working out. I am obviously doing something wrong. I added a color node and colored them by the new attribute I made. I just need each of those boxes to be a part of the cluster they are assigned to. Then have each cluster be treated as it's own piece. hmm? I attached a quick file I made. 

cluster.hipnc

Link to comment
Share on other sites

I'm not really clear about what you want to do - like in, what is the behaviour you desire? If you are talking about clustering like in keeping groups of fragment together in a sim or what? I just need a frame of reference for what the heck you are doing with this thing... ;)

  • Like 1
Link to comment
Share on other sites

On 7/9/2016 at 8:43 PM, Malf said:

You should check out the 'cluster' and 'clusterpoints' SOP nodes. They preform pretty much the same functionality as what happens inside the voronoi fracture node. I tend to use this method for clustering even when using the voronoi fracture node, to assign clusters to the points before feeding them into the fracture.

 

Cheers Jake.

Okay, so here is what I got. I managed to figure out how to take the points and cluster them. However, when I put them into DOPs I want each cluster to behave as its own single object. Right now when they collide they all just act as individual boxes. I tried looking for a way to merge objects by an attribute, but I don't know if that's even the correct method. I attached my file again. Any help is appreciated :)

 

cluster_2.hiplc

Link to comment
Share on other sites

Michael, you're confusing the functions here. The clustering is for grouping points you use to fracture an object, if you want to "cluster" objects/fracture pieces to hold together in a RBD sim, you use constraints. They are basically lines with attributes so they are amazingly easy to control, you can do stuff like feeding a noise onto them as a multiplier for strength if you want random clustering of fragments in your sim, etc... :)

Edited by Farmfield
  • Like 1
Link to comment
Share on other sites

There is actually a way to set it up so each cluster acts as it's own object without creating constraints.  I'll have to find my example file when I get home,but you can essentially use each 'name' to define a compound object. It acts more like an implicit glue constraint.  You need to make each cluster have it's own unique 'name' (all in cluster 1 have the same name), and have "Create Convex Hull per Set of Connected Primitives" checked on.  This is how I've done some more complex 'concave' geometry while having it be made up of voronoi pieces -- but without the hassle of setting up the constraint network.

  • Like 1
Link to comment
Share on other sites

43 minutes ago, Solitude said:

There is actually a way to set it up so each cluster acts as it's own object without creating constraints.  I'll have to find my example file when I get home,but you can essentially use each 'name' to define a compound object. It acts more like an implicit glue constraint.  You need to make each cluster have it's own unique 'name' (all in cluster 1 have the same name), and have "Create Convex Hull per Set of Connected Primitives" checked on.  This is how I've done some more complex 'concave' geometry while having it be made up of voronoi pieces -- but without the hassle of setting up the constraint network.

This is exactly what I was trying to acheieve. @Farmfield, the problem with constraints is that I don't want them to break or have to worry about figuring out how to constrain between common attributes. Plus, I feel like that is one step removed from what @Solitude is saying. It's not that I want them to be "connected" as much as I want them to be considered a single piece of many. It's kind of funny how you can add a Vornoi Fracture and just click "Cluster" and problem solved.

I'm happy my that I started moving into the direction of trying to combine the primitives that had the "clusternum" attribute I created. I just got stuck there not knowing how to make them compound. Thanks guys! Both ideas helped a lot and I can't wait to see the setup when you get time. This has been bothering me for a good week.

Link to comment
Share on other sites

@Solitude - Ian, that sounds really efficient. though if you do I guess you can't constraint the clusters, or perhaps you have functions in DOPs you can use for that? Would love to se an example setup - though I'll look into it here see if I can figure it out.

Edit 1: I did figure it out, pretty simple. Tnx for the tip, Ian.

cluster_2-FF.v1.hiplc

Edit 2: And as constraints are created from the name attribute, not the actual pieces, you can use constraints as usual even clustering pieces in the solver like this. :)

cluster_2-FF.v2.constraints.hiplc

Really cool and efficient - and good timing, I'm just about to start working on a complex dynamics setup, so this might come in handy! :D

@mstarktv - And doing it with just constraints, you'd do it like this... :)

miclustark.hiplc

If you are going to use constraints anyway, and if it's not a huge setup, I would keep the clustering in constraints rather than using Ian's method, the reason being it's easier to have the constraints thing in one place - if you cluster using the name setup, then use constraints, it going to be messy to tweak. Oh, this piece is to big, or doesn't break like I want, but is it due to the name clustering or the constraints? Like that... But doing more complex setups, clustering using the name thingie is of course way more efficient as it creates way less collision hulls. :)

Edited by Farmfield
  • Like 2
Link to comment
Share on other sites

This is EXACTLY what I was trying to figure out. It was more a general curiosity for things that may not end up fracturing but i want to control the sticking. Constraints are fine, but something like this is super useful for things things that can appear more complex than they really are. I love that I was racking my brain so hard, and it just turned out to be 1 node of turning the strings into attributes. Or the other way around. 

I can't wait to put this to use ASAP! Thanks guys!!!

  • Like 1
Link to comment
Share on other sites

Okay, so in the natural effort to make everything complex, I got an idea to use this concept but on something that is probably more typical in an everyday situation. @Farmfield I moved some nodes around and uploaded the file. What I'm trying to do is the same exact thing now. EXCEPT, this time it's using primitives that exist already instead of clustering the points AND THEN copying in geometry. 

In the file you'll see the issue when you hit play. What is happening is the cluster is treating every single primitive(face) as it's own, instead of the object as a whole. I understand why it's doing what it is doing, but I'm trying to figure out a way around that. So just to distinguish the difference between the old snd the new files:
 

The original file you posted used scattering to cluster points and then "meshed" them with boxes.

This file has boxes that I'm trying to cluster as combined pieces. For instance, if someone passed me along a file that had a bunch of unique objects, and I wanted to use scattering to section ares off into their own clusters.

Sorry if I'm being confusing as always. I just think that this scenario is more likely than the former.

cluster_geo.hipnc

Link to comment
Share on other sites

7.30 am here and I just came into the thread when you posted this - I'll check it directly. :)

Edit: Oh, what's happening is you're clustering primitives (as in polygons) and not pieces. I'll see if I can sort it out in an easy way. Gimme a couple of minutes.

Edited by Farmfield
  • Like 1
Link to comment
Share on other sites

Also I attached a quick file. It works off the voronoi clustering. You basically pack each individual piece, then repack each cluster. TA-DA!!  You just have to get the naming right, but it's all automagical from the cellpt attribute and the name attributes generated by the voronoi node. 

dop_bullet_compound_voronoi.hiplc

Link to comment
Share on other sites

I did it like this, using a foreach - but Ian's way is a tad more efficient. :)

cluster_geo.FF.v1.hipnc

Edit: Looking at Ian's solution, note that packing the pieces in the copy and then in the assemble SOP will mean you pack them twice - and you'll have to unpack them twice - so here I set it up to unpack and colorize the pieces before repacking them in the assemble SOP.

cluster_geo.FF.v2.hipnc

 

Edited by Farmfield
Link to comment
Share on other sites

Ian, just gotta ask - in your last file, in the wrangle, aren't you trying to convert a string to a string? :P

Edit 1: I'm probably wrong, I thought the cells attribute was a string already...

Edit 2: I was wrong, because of course. :D 

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