Jump to content

Instantiate and animate objects along curves

Recommended Posts

I have a set of curves and one object. Can you give a starting point to end up with a sphere moving along each curve, with a time offset so that they don' t start at the same time ? I assume it' s some CHOP black magic, but I don' t really know where to start.




Share this post

Link to post
Share on other sites


You could do that in chop, but it is not necessary, there are plenty of ways to do that, with vex / vop, sop solver, or even only in sop. Here is one proposition:

- Create a line on x (length 2 for example)

- transform it on x by 1

- resample it to max segment length 0.02 to get enough points

- copyandtransform total number 8 for example and rotate by 45 on y. It gives you a circle of lines not touching but pointing to the center

- attributevop add a 3D turbnoise to the current position (amp 0.5). Randomizes a bit the shape of th curves.

- create a foreach primitive and create Meta Import Node

     place a carve, animate the firstu from 0.99 to 0 from f0 to f75 for example. This will animate the curve over 3 secs.

     blast 0 delete non selected to keep only pt0 that is the last point is this example.

     copytopoints, plug the point in second input and a sphere in first input (scale 0.1 for this example). This will copy a sphere on each pt0 of each curve, so on the last point of each curve

     timeshift $F-5*detail("../foreach_begin1_metadata1", "iteration",0). This will offset each animation of curve by X frames.

- merge your curves from before the foreach and the output of the foreach (so the spheres moving). So that you can see the sphere moving along the curves.


This is a cheap method because it would become heavy in big scenes and you don't have a huge control but it works for what you want to do.


To build a full system, I would probably have done a vex setup using primuv or curveu attributes to make the sphere move along the curve / geo.


I hope that helped, have a good day!

Share this post

Link to post
Share on other sites
Posted (edited)

Thit topic has several solutions:

Resulting hip: pathAnimation.hipl
Thomas setup is much much faster but I ended up using my (can't recall the reason).


Edited by kiryha

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