Jump to content
CinnamonMetal

Group from Points Array ?

Recommended Posts

How can I create a group using an attribute for which I want the group to be created from, setPointGroup() doesn't accept attributes as an argument ?

I tried looping over all the points in an attribute array using the ForEach loop then appending them to a new group, but that doesn't work as the new group just contains all the points for the mesh, rather then the points from the attribute array for one point.  I

n other words, take one point from the mesh which contains an attribute array and for that one point create a group for all the points for that point in that points attribute array ?

 

Share this post


Link to post
Share on other sites

Hello!
I added a file, the question seemed a little confusing to me, but I think I got it.
A point cannot contain multiple points, instead you have integers that corresponds as point numbers. That is how I understood it at least.

I'm not sure why it's saved on a specific point, if it's a single array, it could be saved on detail as well.
But I tried to recreate what you described.

What I basically did, was make an attribute wrangle, which would get the array you need. And using a foreach() loop to get each index and put that in setpointgroup().

I hope this helps

groupPointArray.hip

Share this post


Link to post
Share on other sites

This is good, except; if I blast the group, I'm still getting primitives, rather then only points ?

Share this post


Link to post
Share on other sites
On 1/5/2021 at 9:43 AM, laurups said:

I'm not sure why it's saved on a specific point, if it's a single array, it could be saved on detail as well.

One question, from the way I understand, this can be run on points; rather then detail ?

Share this post


Link to post
Share on other sites
On 12/26/2020 at 1:13 PM, CinnamonMetal said:

n other words, take one point from the mesh which contains an attribute array and for that one point create a group for all the points for that point in that points attribute array ?

Well from how I understood how it was working, which I tried to simulate in the file I send.
That a point contains an array. Obviously I don't know what kind of system you were working with, so maybe you have multiple points with different arrays, who knows!

But if it's only 1 array, what I like to do is store it in detail, as I don't have to think about the point that contains the info I need.
In This_Is_A_Setup < AttribWrangle in my file.
I made a pointattrib for the array. But I could have easily created a detail attrib array instead.
image.png.9dc070c7ed33df5110a11c3000e2577b.png

Left are points and right is detail. It would be easier to grab the detail one.
image.thumb.png.1f2f2129578445f9f370b4bc93a25961.png


------------

It's just something I like to do. Sometimes you need 1 value, but it's stored in every point/prim. Which I think is not needed. Then I like to use detail instead.
Does this make sense? I can be bad at explaining.

Share this post


Link to post
Share on other sites

Actually, I do have multiple points with different arrays.  Are you saying, rather then a detail attribute, I use a pointattrib; since I want to get the attribute array for multiple points ?

Share this post


Link to post
Share on other sites

Well you're the one who created the attribute right? You probably stored it per point yes.
If you don't know where your attribute is stored at, you can check it in Geometry Spreadsheet.
image.png.5322193cee4ec50f0223b5a87e8f0d15.png

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

×