Jump to content

Point alonge curve, vex understanding help


joschy3d

Recommended Posts

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

 

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