Jump to content

Non consistent point numbers after Vellum Grains Sim


juangoretex

Recommended Posts

I've got a Vellum Grains sim where all the @ptnum's change every 20th frame.
Tried to set my own i@id = @ptnum attribute but it ends up changing with the point number too. Even if I timeshift freeze it and reference it afterwards.

The amount of points stay consistent, there are no keyframes or anything special on each 20th frame, I've tried both the Minimal and the Full solver to no avail.

It's not possible to export @id attributes from the solver right?
How does one get consistent point numbers from a Vellum sim? I'm happy to share the project file too if that helps.

Thanks in advance! :)

Link to comment
Share on other sites

13 minutes ago, Librarian said:

@juangoretex Share that File Please.

 

Hey thanks! I actually figured it out.

For future reference:

Ended up creating my own @id based on position.
Added a i@id = @ptnum; attribute on the cached points, then I ran this inside a SOP Solver with the previous frame connected to the #1 input and current to #0.

vector pos = @P;
int near = nearpoint(1, pos);
if (near != -1)
{
  i@id = point(1, "id", near);
}
else
{
  i@id = -1;
}
 

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