Jump to content

unique ids in a continuous vellum simulation


suesssebastian

Recommended Posts

Hi. 

I'm new to vex and have a problem i can't get my head around. 

I created a little simulation where paper gets blown away every 6th frame.
Now i want to give every page an unique id, but counting upwards. 

so my code is: 

f@idpage;

if(@Frame%6 == 1){

   @idpage+=1;

}

I@ know its not counting because every frame, the attrib is set back to 0.
But how can i count my IDs in dops or on a global level?

Paper_Wind_02.hiplc

Link to comment
Share on other sites

SOPs re-evaluates the node tree every frame so there is no history, just whatever the nodes evaluate to at that frame.  Check out the Solver SOP for accumulating values ( https://www.tokeru.com/cgwiki/index.php?title=The_solver_sop  is a great resource).

In this particular case, if you just need a unique name you can use the "patchname" attribute already output by vellum with a slight tweak to the name you had set in geo1_vellum

patchname.thumb.jpg.b12c4a809a4d3c4291051fe4cfd9294b.jpg

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