suesssebastian Posted June 24, 2020 Share Posted June 24, 2020 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 Quote Link to comment Share on other sites More sharing options...
ryew Posted June 24, 2020 Share Posted June 24, 2020 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 1 Quote Link to comment Share on other sites More sharing options...
suesssebastian Posted June 24, 2020 Author Share Posted June 24, 2020 Thx, now i can use some math to calculate which paper is which iteration. My idea is that i assign every sheet a specific book page starting from one. I'll post the result when i'm done. Quote Link to comment Share on other sites More sharing options...
suesssebastian Posted June 24, 2020 Author Share Posted June 24, 2020 Found another way. I added a solver i the geo node and put the counter in there, now i don't have to convert strings and do math and stuff (; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.