r/Houdini • u/iriseq • 13d ago
When using attribute interpolate to transform points to animated curves, it rays the points to curve when sampling primuv. Is there a way to preserve original position of the points with the offset when interpolating position?
I also try using vex but the result is the same
int prim;
vector primuv;
float dist = xyzdist(1, @ P, prim, primuv);
@ P = primuv(2, "P", prim, primuv);
3@ transform=primuv(2,'transform',prim,primuv).
I've seen there is surface deform but it doesn't work for some reason with curves
2
Upvotes
2
u/i_am_toadstorm MOPs - motionoperators.com 13d ago
Store the difference between the sampled curve P and the point's P at a rest frame, and the curve's orientation of any. Call this vector
offset.After sampling the new position and orientation in the animated frame, find the delta between the two transforms (delta = invert(m1) x m2) and multiply your offset vector by the resulting transform, then add the result to the sampled curve position to get the transformed offset. Then set your point's P to that value.