neokovago 2 Posted February 22, 2018 Hello magicians! I'm doing a project where I have to loop textures on multiple goes. Basically a sprite randomization with textures, but I can not figure out a way how to loop the texture sequence like padzero does. I have to do it in VOP or vex, since the shader expects a specific filename as a map on the geo. Sadly, I can not upload a scene file, but hopefully my problem is understandable. Thanks for reading it. Cheers Share this post Link to post Share on other sites
jkunz07 207 Posted February 22, 2018 Probably have a look at the modulo and sprintf functions/vops modulo is useful for looping time like: $F % 3 give you 1, 2, 3, 1, 2, 3, 1, 2, 3.... instead of the straight count. So in vex just do @Frame%3 or in vop there is a modulo node. sprintf allows for string formatting kind of C style: sprintf('%04d', @Frame) is like padzero(4, $F) expression. In vop there's the print node that allows similar string formatting. 3 Share this post Link to post Share on other sites
neokovago 2 Posted February 22, 2018 1 minute ago, jkunz07 said: Probably have a look at the modulo and sprintf functions/vops modulo is useful for looping time like: $F % 3 give you 1, 2, 3, 1, 2, 3, 1, 2, 3.... instead of the straight count. So in vex just do @Frame%3 or in vop there is a modulo node. sprintf allows for string formatting kind of C style: sprintf('%04d', @Frame) is like padzero(4, $F) expression. In vop there's the print node that allows similar string formatting. thank you! just what i needed. so simple (as always). thanks again! Share this post Link to post Share on other sites