General Category > ASL Scripts

Mesh to Mesh Morphing Hack


Mesh to Mesh Morphing Hack:

The idea behind this technique for mesh to mesh morphing is to have an intermediate shape "between" the starting and ending mesh rather than flowing smoothly from the starting to the ending mesh.  Direct morphing is prohibitive in Anim8or because it would require that one "map" specific areas of one mesh to the other mesh ahead of time.  Theoretically, the mapping could be done with textures, but it would be very slow and laborious.

When I first started playing with this technique, I wrote a script that would convert any mesh into a simple shape like a sphere, cylinder, cube, or any other easily definable shape.  Taking a mesh in Object Mode, creating a new "Morph Target" (Build->Morph Target->New...), then running the script, the points of the mesh are transformed to the desired shape.  In Scene Mode, you can watch the original mesh change into the simple shape and back by adjusting the scene morph target keys.

The next logical extension to this is to take two different meshes and convert each of them to the same sized intermediate shape.  In Scene Mode, you make the first mesh visible and unmorphed, the second mesh invisible and fully morphed, perfectly superimposed.  When the first mesh is fully morphed, make it invisible, make the second mesh visible and proceed to unmorph it back to its original shape.  You get the illusion that the first mesh flowed to the intermediate shape and then flowed into the second mesh.  This looks pretty cool and has many possibilities on its own.

The next logical extension is to try to get the illusion of flowing somewhat more smoothly from the starting mesh to the ending mesh by using scripting that allows the starting mesh to be transformed so that it "shrink wraps" the ending mesh.  Then, the ending mesh is transformed so that it "shrink wraps" the morph of the starting mesh.  After that, the same visibility tricks in Scene Mode are used.  That is how the video in,5165.msg38573.html is done.

A further note on "shrink wrapping" one mesh around another:  I convert the mesh that will be the "wrapper" to a sphere (To_Sphere.txt)that is larger than the target before applying the "shrink wrapping" script (ShrinkWrap_Target.txt).

thanks for the scripts NickE .having a go but i'm struggling to implement just yet. :o
Could you put up an .an8 example with some simple objects for those interested to sort of backward engineer.

I am sorry I did not explain the process very clearly.  I will post a step-by-step tutorial soon.

Until then, attached is the an8 file used to do the video.

Cool Nicke! i try works!!

Looks like I'm late to the party.
My method is to use a a couple of tools for merging meshes.  Script to dump points and faces into text files. Then, copy data into spreadsheets.  Merging points is the easy one.  Merging faces requires using an offset counter. 
Script title 'Mesh_Face_Dump.a8s'  excel file is Merge_MeshFace.xls (97-03) version.  I've been putting instructions in Column A of the spreadsheets.   
You can have unconnected meshes merged into one big mesh in the object workspace.

Yes. Assembly is required for merging faces in the spreadsheet.  Formulas are included in the instructions.


[0] Message Index

Go to full version