I want to make a rig to rotate a bicycle chain, but my brain doesn't seem very smart, and I've almost lost all my hair thinking about it! The curve's CU can't be greater than 1 either. Guys, give me some constructive advice.
Thanks, wish you all great wealth and promotions with salary increases.
Thanks, this method is also very good and creative. But it doesn't seem to be Apex, yet it's still impressive. Great rig, this technique is a light of humanity. You are the best.
This is cool! Fantastic use of copernicus sdf's and the trace sop. Time to study this wrangle.
Glad you like it. Here is a breakdown of the wrangle:
// PARAMETERfloatspeed = chf('speed');
//A multiplier float parameter to adjust the speed of the movement.// UVWintnum = nuniqueval(0, 'prim', 'copynum');
// The total number of individual integer values of the copynum-attribute.floatu = i@copynum / (num - 1.0);
// Division of the copy number by the total number of copies, effectively creating a float ranging from 0.0 to 1.0 across all copies so each copy gets offset along the curve later.v@Cd = set(u, 1.0 - u, 0.0);
// Visualization of u ranging from green to red.// OFFSETu = (u + @Time * speed) % 1.0;
// offsets u by the current time multiplied by speed. the modulo operator sets values above 1.0 back to its remainder. eg. 1.05 turns into 0.05// CURVE ATTRIBUTESvectoruvw = set(u, 0.0, 0.0);
vectorpos = primuv(1, 'P', 0, uvw);
vectornml = primuv(1, 'N', 0, uvw);
vectorup = primuv(1, 'up', 0, uvw);
//The u float value becomes part of the vector uvw to look up position, normals, and up vectors from the curve on the second input.// TRANSFORMATIONmatrixxform = maketransform(up, nml, pos);
setpackedtransform(0, i@primnum, xform);
// Converting these three vectors into a transformation matrix that gets applied to the packed chain elements.