Jump to content

staggering a carve by primnum


Recommended Posts

I'm wondering if someone can help me out. I have a bunch of line primitives and i want use a carve sop to make them appear to grow. But I would like to stagger the effect so that prim 0 starts to animate with the carve and when its 50% prim 1 starts to animate and so on. I can't think of how to do it. I put them in a foreach loop but still not sure how to stagger the effect. help would be appreciated. 

Capture.jpg

Link to comment
Share on other sites

Hit "create meta import node" on "foreach begin" to allow access to the iteration attribute. 

Then add the following in to the second u parameter of the carve sop: 

clamp((1-$T)+(detail("../foreach_begin1_metadata1/", "iteration", 0)/2), 0, 1)

Should be good, providing your metadata node is named the same. 

  • Like 1
Link to comment
Share on other sites

You can also set a vertical grid to rows and put a code like this into a wrangle:

float rad  = chf('radius');
float rot  = chf('rotation');
float time = chf('speed') * @Time;
float prim = chf('offset') * @primnum;

float surp = clamp(time - prim, 0, 1);
float side = fit01(@ptnum % 2, -1, 0.2);
float bbox = relbbox(0, @P).y * rot;
float grow = rad * side * surp;

@P.x = sin(bbox) * grow;
@P.z = cos(bbox) * grow;

 

 

 

helix_line_growth.hipnc

Edited by konstantin magnus
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...