Move multiple 'copied' objects along a spline

   1625   13   3
User Avatar
Member
165 posts
Joined: Nov. 2015
Offline
Hi,

I have a spline that I've copied a bunch of spheres to, but I want to ‘move’ the sphere's along the spline.
I know how to set up a single object to follow a spline, but have no clue how to make this work.

For those who know Cinema 4D, what I'm trying to do is ‘clone’ a bunch of objects to a spline, then use the ‘offset’ to animate them along the spline.

Thanks!

Jim

Attachments:
move_along_spline.hiplc (62.3 KB)

Reel Inpsirations
Houdini Work in Progress [vimeo.com]
User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi Jim,

is something like this right?

P.S. The parm that does the moving is the ‘Offset’ in the wrangle SOP
Edited by friedasparagus - May 25, 2017 15:08:39

Attachments:
move_along_spline_try.hiplc (73.9 KB)

Henry Dean
User Avatar
Member
165 posts
Joined: Nov. 2015
Offline
Wow, thanks so much!

That is exactly what I needed. Houdini rocks, if you know what you're doing LOL!
Edited by reelinspirations - May 25, 2017 15:26:54
Reel Inpsirations
Houdini Work in Progress [vimeo.com]
User Avatar
Member
22 posts
Joined: Dec. 2014
Offline
That is pretty awesome but I don't really understand how you did it. Is there a tutorial out there that would cover something like this. I am also from C4D so I'm not sure how this works in Houdini.
User Avatar
Member
38 posts
Joined: May 2006
Offline
Hi friedasparagus, thanks for your example. I was looking for something like this.

I have a next question you or someone else can maybe help me with: would it be possible to introduce a randomness to the amount each point is offset?

Thanks,
Jasper
User Avatar
Member
161 posts
Joined: Feb. 2012
Offline
you can use a same @curveu attrb and randomize that and if you want more control use a fit function.
User Avatar
Member
602 posts
Joined: May 2006
Offline
same but different, using the attribute interpolate sop, plus a slider for randomness.

Attachments:
move_along_spline_attribinterpolate.hiplc (83.6 KB)

http://www.tokeru.com/cgwiki [tokeru.com]
User Avatar
Member
38 posts
Joined: May 2006
Offline
Thanks both, works like a charm!

- Jasper
User Avatar
Member
27 posts
Joined: June 2016
Offline
mestela
same but different, using the attribute interpolate sop, plus a slider for randomness.


If I take this example and use copy to points to have many splines, Attribute Interpolate brings all objects to 1 spline even though I have many copies. How can duplicate it, keep the points and position of the splines?
Edited by plazadelmar - Dec. 12, 2018 10:00:11

Attachments:
move_along_spline_attribinterpolateCOPY.hipnc (92.2 KB)

User Avatar
Member
3787 posts
Joined: July 2007
Offline
line 9 in your animate_curveu_add_random
change:
@sourceprim = 0;
to
@sourceprim = @primnum;
or
i@sourceprim = @primnum;
to be explicit
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
27 posts
Joined: June 2016
Offline
tamte
line 9 in your animate_curveu_add_random
change:
@sourceprim = 0;
to
@sourceprim = @primnum;
or
i@sourceprim = @primnum;
to be explicit

Amazing, it works. Thanks.
Edited by plazadelmar - Dec. 12, 2018 14:19:52
User Avatar
Member
27 posts
Joined: June 2016
Offline
One more noob question. If I would like to each spline to produce random speed for the spheres I could probably solve it with forEach. Unfortunately, I have not been able to create this effect. How could I solve it?
Edited by plazadelmar - Dec. 12, 2018 14:22:39
User Avatar
Member
3787 posts
Joined: July 2007
Offline
plazadelmar
I would like to each spline to produce random speed for the spheres I
line 3, change
t = @Time * ch('speed');
to
t = @Time * ch('speed') * fit01(rand(@primnum), .5, 1);
which will multiply the speed of each sphere by random number between 0.5 and 1 per curve
Edited by tamte - Dec. 12, 2018 14:33:09
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
27 posts
Joined: June 2016
Offline
tamte
plazadelmar
I would like to each spline to produce random speed for the spheres I
line 3, change
t = @Time * ch('speed');
to
t = @Time * ch('speed') * fit01(rand(@primnum), .5, 1);
which will multiply the speed of each sphere by random number between 0.5 and 1 per curve


Awesome. Thank you
Edited by plazadelmar - Dec. 18, 2018 12:55:10
  • Quick Links