Animate points on an open curve.

   3034   4   4
User Avatar
Member
9 posts
Joined: Sept. 2018
Offline
Hello

Attached Is a scene I am working on where I have animated points to move around a closed curve, and then I have copied geo to those points.

What I really want to be able to do though, is this same thing on using an open curve. I want the points to move along the curve, and when they reach the end, snap around to the beginning of the curve again. What is happening at the moment when I plug in the open curve, is the endpoint is moving along the curve, and the curve is getting smaller.

This would be a similar result to animating along a curve using MASH for Maya.


Any insight into this would be much appreciated


Edited by MostlyBees - May 25, 2021 06:06:37

Attachments:
PointsOnCurveProto.hipnc (237.0 KB)
Graph.JPG (27.0 KB)

User Avatar
Member
2658 posts
Joined: June 2008
Offline
Drop down the chain node and read the help card. It might be what you're looking for?

You could also try submitting the first point of the curve to a popnet and then use the supplied curve as a guide. In this setup, match the life of the particle to the length of the curve. The space between the spheres is determined by the activation trigger on the pop source.
$SF%9==1
Every nine frames.
Edited by Enivob - May 25, 2021 09:39:29

Attachments:
pop_curve.gif (760.6 KB)
ap_point_looop_on_curve.hipnc (466.6 KB)

Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
9 posts
Joined: Sept. 2018
Offline
Enivob
Drop down the chain node and read the help card. It might be what you're looking for?

You could also try submitting the first point of the curve to a popnet and then use the supplied curve as a guide. In this setup, match the life of the particle to the length of the curve. The space between the spheres is determined by the activation trigger on the pop source.
$SF%9==1
Every nine frames.

Thank you so much I have been playing around with this, and it gets me really close to where I want to be.
But I do want to be able to have really specific control over the number of points and the speed. A popnet may be the way to go
User Avatar
Member
9 posts
Joined: Sept. 2018
Offline
Dante Never Cry
Found it in houdini Hive Events .
 

int ptcount_min = chi("Min_Point");
int ptcount_max = chi("Max_Point");



float seed = chf("seed")+1;
float rand_count = rand(@primnum*seed+3);
float count_dist = chramp("Point_per_distri",rand_count);
int count = int(fit01(count_dist,ptcount_min,ptcount_max));



float rev = fit01(float(ch("reverse")),1,-1);
float rate_min = chf("Follow_rate_min")*rev;
float rate_max = chf("Follow_rate_max")*rev;
float rand = rand(@primnum*433+1);
float rate = fit01(rand,rate_min,rate_max)*@Frame;



float rate_pp_min = chf("Rate_pp_min")*rev;
float rate_pp_max = chf("Rate_pp_max")*rev;



for(int i=1 ; i<count ; i++){
int id = @primnum * ptcount_max + i;
float rate_pp = fit01(rand(id*456),rate_pp_min,rate_pp_max)*@Frame;
vector uv = (rand(id)+rate+rate_pp)%1;
vector p = primuv(0,"P",@primnum,uv);
int pt = addpoint(0,p);
setpointattrib(0,"id",pt,id,"set");
setpointattrib(0,"curveu",pt,uv.x,"set");
}
removeprim(0,@primnum,1);[/quote]


Help me out just a little, where does this go haha. Would this be in a wrangle that is controlling the curve?
Edited by MostlyBees - May 26, 2021 07:54:24
User Avatar
Member
9380 posts
Joined: July 2007
Offline
something like this should work for uniformly resampled curves, with some additional control for variable speed

float speed = chf("speed");
float speedvar = chf("speedvar");
int speedvarseed = chi("peedvarseed");
speed *= lerp(1.0, rand(speedvarseed, @ptnum), speedvar);
float uspeed = speed / primintrinsic(1, "measuredperimeter", i@sourceprim);
float u = f@u + uspeed * @Time;
v@P = primuv(1, "P", i@sourceprim, set(u%1, 0, 0));

Attachments:
PointsOnCurveProto_mod.hipnc (323.2 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links