Help with Attaching Animated Object to Deforming Mesh
-
Hello,
I’m trying to attach a hand animated object to the surface of a deforming mesh.
The goal is to have the object stick to the surface while still being able to animate it freely.I’ve set up a null hierarchy and tried using the Constraint > Clamp, but the result is jittery and unpredictable.
Maybe I’m missing something, but I can’t seem to get it working properly.Does anyone know a solid workflow for this type of setup?
Thanks in advance!
-
Hi thorsnuts,
Based on your question, please have a look here:
CV4_2025_drs_25_XPtn_01.c4dIt takes three points from the mesh: position, target, and up-vector.
Like a three-leg table, it is always stable if the points in question do not line up (straight single line).The Position Null is the parent of the Animated object. Typically, animation relates to the World Origin; using a Null placed on this "Zero" point is often advised when animations are moved to a different place in a hierarchy.
You can dial that in with the Index value of the Point Node.
The Point Node must be set for "Use Deformed Points."
The Priority is set to higher and higher for the Target Tag.
The deformed Surface is always above the Setup in the Object Manager.If needed, explore if the Priority settings can be lower; I placed them high, as your question indicates a complex scene.
All the best
-
Thank for the help Dr. Sassi.... It worked perfectly!!!
I just wish there an easier way to do this. I'm surprised no one has created a script for this process yet.
Thanks again!
-
Thank you for your reply, thorsnuts.
There are many ways; it always depends on what is given.
As mentioned, this is a technique I have shared for around two decades, often used for rollercoaster simulation (parks) or racetracks. With User Data and relative referencing, this tag can be used in many cases without even opening the XPresso editor. To reply to your script idea.Here is an Alternative
CV4_2025_drs_25_MGtn_01.c4dSometimes, the Surface Deformer works best.
Enjoy your weekend