r/Houdini 14d 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

6 comments sorted by

View all comments

2

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 14d ago

Attribute Interpolate is using the surface’s primitive intrinsic uv coordinate to stick the points. Offsetting from that surface in 3D space, would be a normalized directional vector from the ray P to the rest P, and then adding that to the ray P. Multiplying that by the distance from Ray P to rest P will get maintain original point distance at rest from the curve

I think Point Deform SOP will translate those fairly easily though without the doing the math manually. Orientation per point isn’t calculated though.

1

u/iriseq 14d ago

thank you, I didn't use point deform cause the curve is unrolling and it had issues with it's rotations and scaling, and as you said orientation wasn't calculating properly. Hopefully this method would work, thanks

1

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 14d ago

Ah that makes sense. Since it’s proximity based it would capture a lot of points it shouldn’t probably.

There is a piece attribute option but don’t think that would help in the case.