joschy3d Posted February 27, 2020 Share Posted February 27, 2020 Hi, I´m just have a deeper look at the nice folding objects example on the Houdini cgwiki: http://www.tokeru.com/cgwiki/index.php?title=Houdini#Folding_objects_.28the_transformers_cube_effect.29 The wrangle node which handles the animation makes me some headache. It´s a wrangle node running over Primitives: This part I understand so far... Quote vector start = primuv(0,"P",@primnum, (0,0)); vector bb = relbbox(0, start); float t = @Time+bb.x; t = @Time*2 + length(start)+rand(@primnum); t -= ch('time_offset'); // t *= fit(rand(@primnum),0,1,.7,1.3); here a new point position is set with the primuv function, as i understand... Quote vector newP = primuv(0,"P",@primnum, set(t,0)); a new point is generated at the new position and theattribute name is set , newP from above... Quote int newpt = addpoint(0,newP); setpointattrib(0,'name',newpt,s@name,'set'); but what the hell means this? The prim is removed with his points? When the prims are removed there are no prims left to run the code again over the prims, because there all deleted... what do i missunderstand? Quote removeprim(0,@primnum,1); Generates this code every frame new points on the prim and delete them afterwards? But why points are remain and travel over the prim, in this case a line? Can somebody give me some light on this? tia Quote Link to comment Share on other sites More sharing options...
Skybar Posted February 27, 2020 Share Posted February 27, 2020 Creation/deletion of geometry happens after the code is run. So it creates new points, and deletes the primitives. Since the newly created points isnt there until after the code is run, they wont be deleted. Quote Link to comment Share on other sites More sharing options...
joschy3d Posted February 27, 2020 Author Share Posted February 27, 2020 thank´s, got it. My fault was also, not to see the whole nodes flow. Everytime the complete node structure is evaluate, "new" prims are feeded into the code and the prims are only needed to get the new point position. 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.