Showing posts with label blend. Show all posts
Showing posts with label blend. Show all posts

Thursday 27 October 2022

"shrinkwrap" push faces from one object towards another

More Julian scripting
Use case - an object lying on the floor is not quite touching the surface - so lets pull points of the floor toward the surface. The floor object would go into the first input and the object to "wrap" to goes into the 2nd input. Put this code into a point wrangle -

 i@prim;

v@uvw;

@dist = xyzdist(1, @P, @prim, @uvw);

@bias = fit(@dist, 0, .01, .79, 0);

@P = lerp(@P, primuv(1, "P", @prim, @uvw), @bias);


It might be necessary to play with the "fit" values & ensure the objects are kinda close to each other to begin with! This is good for bodge fixing stuff!


Wednesday 3 November 2021

switch node or blending transforms at object level

If you need to switch or blend between two (or more) null transforms, eg to parent an object use the BLEND OBJECT. Kinda simple, goes to show how much I work at SOP level ha.

You'll probably want to use the Sequence mode, with "Shortest Path Rotation Blending" ticked, to avoid weird flipping (depending on what and how you're blending stuff)