Andy_Ireland Posted June 25, 2018 Share Posted June 25, 2018 Was messing around with something and got stuck trying to figure out a way to proceduraly animate the visibility of an object, by animating the visibility of each face or maybe deleting faces in reverse. So ideally you would see one face of the object on the first frame and the rest would be revealed over say 200 frames. I used a sort node to arrange the faces in the order I would like to see them revealed but cant figure out a way to do this, Im sure there is an easy way to do it and I cant figure it out, any suggestions would be gratefully accepted Quote Link to comment Share on other sites More sharing options...
3dome Posted June 25, 2018 Share Posted June 25, 2018 maybe like this: //primwrangle if(@primnum > @Frame) removeprim(0, @primnum, 1); Quote Link to comment Share on other sites More sharing options...
Andy_Ireland Posted June 25, 2018 Author Share Posted June 25, 2018 11 minutes ago, 3dome said: maybe like this: //primwrangle if(@primnum > @Frame) removeprim(0, @primnum, 1); Excellent, works a treat, so simple, thank you Quote Link to comment Share on other sites More sharing options...
3dome Posted June 25, 2018 Share Posted June 25, 2018 (edited) in case you wanna be more fancy and have the prims appear in a growing fashion, drop down a fuse SOP in unique mode before that code //primwrangle vector center = @P; int primpts[] = primpoints(0, @primnum); foreach(int i; primpts) { vector dir = center - point(0, “P”, i); float fit = fit(@primnum+1+@Frame, @primnum+1+(@Frame*(@primnum > @Frame)), (@primnum+1)*2.05, 1, 0); float ramp = chramp(“scale_ramp”, fit); vector set = dir*ramp; setpointattrib(0, “P”, i, set, “add”); } play with the ramp (i found moving right point closer to left side looks nice) and with the 2.05 in the code (make it parameter or so, jsut make sure its always > 2) to adjust "trail length" and falloff also pretty cool if you reverse the fit to (x,y, 0, 1) and have the ramp zero all the way then close to right side make it go to 1. gives a nice trail when disintegrating Edited June 25, 2018 by 3dome Quote Link to comment Share on other sites More sharing options...
Andy_Ireland Posted June 25, 2018 Author Share Posted June 25, 2018 2 hours ago, 3dome said: in case you wanna be more fancy and have the prims appear in a growing fashion, drop down a fuse SOP in unique mode before that code //primwrangle vector center = @P; int primpts[] = primpoints(0, @primnum); foreach(int i; primpts) { vector dir = center - point(0, “P”, i); float fit = fit(@primnum+1+@Frame, @primnum+1+(@Frame*(@primnum > @Frame)), (@primnum+1)*2.05, 1, 0); float ramp = chramp(“scale_ramp”, fit); vector set = dir*ramp; setpointattrib(0, “P”, i, set, “add”); } play with the ramp (i found moving right point closer to left side looks nice) and with the 2.05 in the code (make it parameter or so, jsut make sure its always > 2) to adjust "trail length" and falloff also pretty cool if you reverse the fit to (x,y, 0, 1) and have the ramp zero all the way then close to right side make it go to 1. gives a nice trail when disintegrating Thanks 3dome, trying this now but its crashing Houdini Quote Link to comment Share on other sites More sharing options...
3dome Posted June 27, 2018 Share Posted June 27, 2018 using 16.5.323 dm_animPrims_wrangle.hipnc 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.