Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0

staggering a carve by primnum

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. 


Share this post

Link to post
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. 

1 person likes this

Share this post

Link to post
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;





Edited by konstantin magnus

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0