Notifications
Clear all

[Closed] vertex position diference between 2 objects

hi guys
im trying to make corrective shapes for a morph based setup
and im trying to get the difference between 2 morph targets so i can add it later
as a correction shape.
so my question is , is there a way with maxscript to get the difference in vertex position
between 2 objects ( same topology and everything)
and then apply that data on a neutral object to get what im looking for ?

4 Replies

Hey man!

Have you tried this?

[left]<Point3>WM3_MC_GetMorphPoint <Morpher_Class>Morpher <integer>channel_index <integer>index
[/left]
[left]Returns the position of the indexed morph point (vertex) of the specified channel in the specified morpher modifier.
[/left]

Set up an array to go through the number of verts (.count) of your morph objects and compare the positions. Just return the verts whose positions have a difference and apply those to your base mesh, so only the differences will be registered. The only tricky part is that the mesh’s vert array is 0-based and the morph’s vert array is 1-based I think. So you’ll need to account for that when applying the offsets to your base mesh or everything will be one vert off.

you can also do this without the use of a script:
in the morpher modifier’s channel settings set the minimum value to -100
now add both objects as targets to an object in the relaxed state.
set target A to 100 and target B to -100.
what you get is the target that you need to apply to turn target B into target A.

for more information and other uses of this idea you can check out these tutorials on my site:
http://cargocollective.com/matan#933677/Normal
http://cargocollective.com/matan#694784/Velocity

Matan.

That’s genius! You’re good! :bowdown:

thanks!
as always very helpful