Jump to content

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 ?

 

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
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.

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