Jump to content

How to get prim id to scattered points based on matching id attribute?


milstein.ben

Recommended Posts

Hey,

I have a bunch of moving curves that appear and disappear (meaning the prim id keeps changing), and I scatter points on them which I'm using a solver to kill at the right time but therefore they become static and I want to use an attributeInterpolate to track the point back to their curve.

The problem is that the attributeInterpolate is asking for a sourceprim id but as I said above the the prim id keeps changing.

I was able to create a unique integer attribute for the primitives which then is inherited by the scattered points. how can I now get the prim id from the curves to the scattered points based on a matching attribute?

I tried an attribute wrangle but I'm really new to vex and this is what I wrote which doesn't really work haha.

i@sourceprim = int idtoprim(1, id);

first input is the points, second input is the curves.

Thanks :)

Edited by milstein.ben
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...