Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: Morph targets  (Read 2710 times)

Boywonda1

  • Jr. Member
  • **
  • Posts: 83
  • “Imagination is everything."
    • View Profile
Morph targets
« on: December 30, 2008, 12:19:53 pm »

Hey anybody out there that can help me further with morphing targets.I already did the flag tutorial but i need more explanation on exactly how it works and i wanted to ask if morphing works with face editing.
Logged
"When I examine myself and my methods of thought, I come to the conclusion that the gift of fantasy has meant more to me than any talent for abstract, positive thinking.” -Albert Einstein

Bobert

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: Morph targets
« Reply #1 on: December 30, 2008, 08:38:39 pm »

Yes morphing does work with face editting. Although it can get a little tedious you can use it to make your character look like its talking.

You create morph targets in the object editor mode by going to Build > Morph Targets > New...
After that you move the verts of your model to form the morph you want. Go back to "Morph Targets" and click "--None--". This saves your morph and reverts your model back to its original form. You can repeat this to create multiple morphs for one model.

To use your morphs in a scene, simply put your model in the scene and select your morph in the time track (if you don't see your morph just go to object mode and back to scene mode; it should appear under your model's name in the time track.)

I hope this helped. Have fun!  ;)
Logged
If a squirel had lips...could it whistle?

Dreadkb

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: Morph targets
« Reply #2 on: December 30, 2008, 09:02:31 pm »

I've done a lot of work with morphs, and I do have a few lessons learned that I think will help.


First, a morph target saves only where each vertex moves and how far. Things like edge properties, smooth angle, and textures cannot be changed in a morph target. Also, you can't add/remove vertexes, edges, or faces.

Second, each vertex will move from the base position, to where the morph places it, in a straight line only. If you want a bending effect, you need to set multiple morphs and then transition from one to another in sequence.

Third, in Anim8or, each vertex is numbered dynamically. If you add/remove vertexes, edges, or faces, convert to mesh, convert to subdivided, join solids, group, ungroup, or loop cut, you risk changing the number of that vertex. The morph target saves data like this (roughly):

vertex 4638 (x+4, y-2.76554, z+0)

The vertex's number can dynamically change in the model, but not the morph target, so finish modifying your mesh/subdivided object before morphing.

Fourthly, since a morph is saved as a change in position in vertexes, changing the position of the point in the base model changes the result of the morph.

Finally, a morph target sets the line vertexes will follow and sets the rate of movement. You are not limited the the values of "1" and "0" for morphs. You can use practically any number you want. Beyond 0 and 1, the vertexes continue to move along the same straight lines set by the morph.  

This example helps to explain some of my points.


Make a basic cylinder parametric, remove the caps (Caps _ start _ end, uncheck them both), set length to 1, set the Lat to 1, start and end diameters to 20, and convert to mesh. Flat Shader view (Crtl-f).

Frame (f). Edit > Rotate > Rotate None. Edit > Locate > Stand on Origin. Build > Morph Target > New... "lengthen", turn on snapping (Ctrl-g), turn off x (x). Point edit mode (P), point select (p), drag select (d). Select the top ring on vertexes. Move (m) them up one snap. Build > Morph Target > none. Drag select (d) the same vertexes and move (m) them down one snap.

Make a new material, check Two-sided, select Back, drag the color to black. OK. Object edit mode (A) drag select (d). Select your object and apply the material.

Mode > Scene. Build > Add Object..., object01. View > Camera. Setting > Environment... uncheck ground grid.

Now, set the "lengthen" morph to 0 at frame 0, 10 at frame 36, -10 at frame 71.


Ok, the way that example illustrates my points are:

First point, the morph works because only the position of vertexes were changed.

Second point, no matter what you set "lengthen" to, each vertex will only move in the same straight line you see. If you wanted it to bend, you would need new morph targets to make new straight lines.

Fourth point, the vertexes that were moved were not saved as "position 2 on the y" but "position +1 on the y" This is why the value of "lengthen" equals the total distance from each end of the tube.

Final point, positive values of "lengthen" show a cylindrical tube, while negative values turn it inside out.


I know this is a marathon read, but I truly hope I have helped you out, Boywonda 1.
Logged

ENSONIQ5

  • Sr. Member
  • ****
  • Posts: 928
    • View Profile
    • Mission Backup Earth
Re: Morph targets
« Reply #3 on: December 30, 2008, 11:46:56 pm »

That's a great explanation Dreadkb, worthy of inclusion in an extended manual!  The only point I could add is that morphs can be combined with bones to eliminate problems caused by the linear translation of the vertex points.  For example, to create an arm with an elbow, bones (with weight painting or influences) will force the mesh to distort in a non-linear, arc-shaped fashion, but the muscles of the upper arm could be morphed, to swell as the arm is bent.  In essence, objects applied to bones in Figure mode can still be morphed, often with stunning results.
Logged