Jump to content
Sign in to follow this  
AntoineSfx

Which node breaks a geometry into primitives using an attribute ?

Recommended Posts

Posted (edited)

I'm trying to do: grid -> cluster ->  create one primitive per group of points with the same cluster value

It must be trivial but I can't find the node / checkbox somewhere that does this thing..

Edited by AntoineSfx

Share this post


Link to post
Share on other sites

you could promote the cluster attrib to prims (mode max or min), then use a primwrangle with s@name = sprintf("cluster_%d", i@cluster); and then assemble (tick off create name)

  • Like 1

Share this post


Link to post
Share on other sites

I'm probably misunderstanding the question...but is it this simple ? You can turn divide on/off if you want...

ClusterPrims.hipnc

Share this post


Link to post
Share on other sites

you may also try promoting the attributes to vertex attribs, and then applying a vertexSplit node, if you actually need to split the primiitives (so you could use a connectivity sop later for instance)

also continuing from 3Dome, you could also do both in one node:

string grp = sprintf("cluster_%d", i@cluster);
setprimgroup(0, grp, @primnum, 1);

Share this post


Link to post
Share on other sites
On 04/06/2018 at 5:10 PM, pusat said:

Primitive Split SOP

Yes, that solved my problem

I did this:

cluster -> attribpromote (points primitives) -> primitive Split -> divide (Remove shared edges)

Share this post


Link to post
Share on other sites
Posted (edited)

And now there is a MOPs solution as well.

 

Edited by Atom

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×