How to link an object to a vertex in 3ds max

We often use morph technique for facial expressions. When we animate morph targets if for example we have to move the mouth if teeth modeled separately we have to animate them individually which is a tedious and inaccurate job. The other example is eyelashes.

For solving this problem we can link this objects to the specific vertex of head object. Here is a way to doing this with a little script

First of all we have to fine the number of vertex that we want to like our object to.
This can be derived by this script:


The equal script for Editable Poly is:


We have to go to the vertex subobject level and select the specified vertex and then use this script in the Maxsript Listener (F11) to get the vertex number.

For example if our object name is "Obj2" the script must be:

getVertSelection $Obj2

Now we are going to use position script controller.

Select your object(the object that you want to link to the vertex) then go to the motion panel and from the assign controller rollout select position then click the assign control button , select position script from the list , script controller window appears.

First of all we must define the objects that we are going to use in the script we will do that by this script:

dependsOn $

Now we have to find the position of the vertex.
It'll come with this script:


And for poly objects:


For example if we want to like an object which named obj1(a poly object) to the vertex number 59(that obtain before with getvertselection method) of another object which named obj2 we must do the following steps:

1 - Before linking object to vertex we have to align pivot point of object to pivot of vertex.

2 - Now go to the motion panel then from the assign controller rollout select position and click assign controller button then from the list select position controller.

3 - In the position controller window type following script:

dependsOn $obj2;
Pos = polyop.getvert $obj2 59;

Fetching comments...

Post a comment