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

Hey ! Thanks for putting your fixe here, I have the exact same issue I tried it but it did not work for me.
I have a lot of grains and nearpoint got a bit buggy when trying to use a retime node, several points ended up with the same "id" during the interpolation.

Anyone who has that issue in the future, please read below, I think I figured out why and it's an even simpler fix.

So I digged and it turns out, if you're using the Vellum Solver Minimal it automatically ticks the "Spatial Sort Interval" in the Advanced > Fluids Tab of the solver. And the default interval is 20 frames =)
So every 20 frame the ids are re-evaluated so that numbers stay clustered together. I just unticked that and had no issues retiming afterward.

Screenshot 2025-01-20 142347.jpg

Edited by jola.works
Link to comment
Share on other sites

19 hours ago, jola.works said:

Hey ! Thanks for putting your fixe here, I have the exact same issue I tried it but it did not work for me.
I have a lot of grains and nearpoint got a bit buggy when trying to use a retime node, several points ended up with the same "id" during the interpolation.

Anyone who has that issue in the future, please read below, I think I figured out why and it's an even simpler fix.

So I digged and it turns out, if you're using the Vellum Solver Minimal it automatically ticks the "Spatial Sort Interval" in the Advanced > Fluids Tab of the solver. And the default interval is 20 frames =)
So every 20 frame the ids are re-evaluated so that numbers stay clustered together. I just unticked that and had no issues retiming afterward.

Screenshot 2025-01-20 142347.jpg

Alright! That’s a much better fix for sure. 

Will check this out! Thanks a lot for sharing. 

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