Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Mesh to Mesh Morphing Hack  (Read 13880 times)

NickE

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Mesh to Mesh Morphing Hack
« on: May 30, 2015, 10:29:50 am »

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 http://www.anim8or.com/smf/index.php/topic,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).

« Last Edit: May 30, 2015, 12:47:08 pm by NickE »
Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 490
  • errm...errr?
    • View Profile
Re: Mesh to Mesh Morphing Hack
« Reply #1 on: May 30, 2015, 11:33:08 am »

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.
Logged
!

NickE

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Re: Mesh to Mesh Morphing Hack
« Reply #2 on: May 30, 2015, 11:51:28 am »

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.
« Last Edit: May 30, 2015, 12:48:24 pm by NickE »
Logged

neirao

  • Sr. Member
  • ****
  • Posts: 624
  • Neirao
    • View Profile
Re: Mesh to Mesh Morphing Hack
« Reply #3 on: May 31, 2015, 07:37:35 pm »

Cool Nicke! i try works!!
Logged

B_twist

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Mesh to Mesh Morphing Hack
« Reply #4 on: March 30, 2016, 02:45:14 pm »

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.
Logged