Difference between revisions of "Doc:Walk Cycle"

From Synfig Studio :: Documentation
Jump to: navigation, search
m (Constructing a Walk cycle: link to the FAQ reference)
m (Changed file references to point to wiki files)
Line 4: Line 4:
 
An example, provided by Voria Studios, takes 4 still images of a character in various stages of a walk cycle.  These images are shown at 4 FPS to give a sequence that when repeated, show a man walking.   
 
An example, provided by Voria Studios, takes 4 still images of a character in various stages of a walk cycle.  These images are shown at 4 FPS to give a sequence that when repeated, show a man walking.   
  
Here are the images - frame_01.jpg... (I'll upload these from work later)
+
Here are the images<br>
 
+
[[Image:frame_01.jpg]][[Image:frame_02.jpg]][[Image:frame_03.jpg]][[Image:frame_04.jpg]]<p>
And here is the beginning of the 'lst' file. 
+
  
 +
And here is the beginning of the 'lst' file.  <br>
 
<code>
 
<code>
 
FPS 4<br>
 
FPS 4<br>
Line 36: Line 36:
 
I work with a drawing tablet, so the easiest solution for me is to use the draw tool (this is not enabled by default, but [[FAQ#Where_did_the_polygon.2C_draw.2C_sketch.2C_and_width_tools_go.3F|can easily be enabled]]).  Move back to frame 0, select the draw tool and trace over the character.  I find it easiest to break the character down into several regions (Head, Left Arm, Right Arm, Torso, Left Leg, Right Leg).  As a helpful tip, if the shape didn't come out quite right, go to the layer menu and uncheck the region checkbox - this will allow you to see the image below as you drag the ducks around to correct your line.   
 
I work with a drawing tablet, so the easiest solution for me is to use the draw tool (this is not enabled by default, but [[FAQ#Where_did_the_polygon.2C_draw.2C_sketch.2C_and_width_tools_go.3F|can easily be enabled]]).  Move back to frame 0, select the draw tool and trace over the character.  I find it easiest to break the character down into several regions (Head, Left Arm, Right Arm, Torso, Left Leg, Right Leg).  As a helpful tip, if the shape didn't come out quite right, go to the layer menu and uncheck the region checkbox - this will allow you to see the image below as you drag the ducks around to correct your line.   
  
http://home.comcast.net/~pxegeek/synfig/synfig_walk.png
+
[[Image:Synfig_walk.png]]
  
 
Once you've finished Frame 0, move along the timeframe to Frame 6.  Instead of tracing, this time we're going to take the existing elements and reposition them to match the image.  Again, turning off the region layers will allow you to see the image below as you edit them.  Use the rotate and translate tools to reposition the body parts, adjusting the line ducks for fine tuning.   
 
Once you've finished Frame 0, move along the timeframe to Frame 6.  Instead of tracing, this time we're going to take the existing elements and reposition them to match the image.  Again, turning off the region layers will allow you to see the image below as you edit them.  Use the rotate and translate tools to reposition the body parts, adjusting the line ducks for fine tuning.   
Line 42: Line 42:
 
Repeat for Frames 12 & 18, then you can turn off the Import Image layer (uncheck the checkbox in the layer menu).  Now, even though we've only drawn 4 keyframes, by the power of Synfig, we can render a smooth 24 frames of man walking.  Add a 1 second timeloop layer on top, and the man will pace on the spot for the length of your animation.   
 
Repeat for Frames 12 & 18, then you can turn off the Import Image layer (uncheck the checkbox in the layer menu).  Now, even though we've only drawn 4 keyframes, by the power of Synfig, we can render a smooth 24 frames of man walking.  Add a 1 second timeloop layer on top, and the man will pace on the spot for the length of your animation.   
  
http://home.comcast.net/~pxegeek/synfig/walk.gif
+
[[Image:walk.gif]]
  
 
Adding Translation layer will enable your character to walk from one side of the canvas to the other (or moonwalk backwards if you're so inclined.)
 
Adding Translation layer will enable your character to walk from one side of the canvas to the other (or moonwalk backwards if you're so inclined.)
  
[http://home.comcast.net/~pxegeek/synfig/walk.zip Here is a zipfile] with the list file, 4 still images, and the finished Synfig file.  Unzip them in the same directory and open the newwalk.sif file with synfig.
+
[[media:walk.zip|Here is a zipfile]] with the list file, 4 still images, and the finished Synfig file.  Unzip them in the same directory and open the newwalk.sif file with synfig.

Revision as of 17:43, 27 September 2007

Languages Language: 

English • español • français • русский


The List File

One of the less obvious features of Synfig is buried in the Import Image layer. In addition to being able to import some basic still image file types, it will also accept a 'lst' file. This list file is simply a text file consisting of a framerate followed by a list of images to display. (If no framerate is supplied a default rate of 15 Frames per Second (FPS) is used.)

An example, provided by Voria Studios, takes 4 still images of a character in various stages of a walk cycle. These images are shown at 4 FPS to give a sequence that when repeated, show a man walking.

Here are the images

Frame 01.jpgFrame 02.jpgFrame 03.jpgFrame 04.jpg

And here is the beginning of the 'lst' file.
FPS 4
frame_01.jpg
frame_02.jpg
frame_03.jpg
frame_04.jpg
frame_01.jpg
frame_02.jpg
frame_03.jpg
frame_04.jpg
frame_01.jpg
frame_02.jpg
frame_03.jpg
frame_04.jpg
...

Constructing a Walk cycle

Let's take a look at how we can use these images to create a complete walk cycle for a character in Synfig.

Start with a new canvas and add a timeline of several seconds with the default framerate of 24 FPS. On the canvas, select the Caret > Layer, New layer, Other, Import Image.

This creates a new Import Image layer, but nothing will show up until the filename is selected. Go to the Params dialog and scroll down to Filename. There you can navigate to the '.lst' file and select open. Now you should see the first image in the list. Moving forward along the timeline will show successive images from the list every 6 frames. You can preview or render these as is and get a low frame rate animation.

But the result doesn't look very smooth, and the images are not very flexible. (The images can be translated, rotated and stretched, but no elements within the images can be changed.) To make a fully editable character we need to trace over it with Synfig elements such as Blines or Draw layers.

I work with a drawing tablet, so the easiest solution for me is to use the draw tool (this is not enabled by default, but can easily be enabled). Move back to frame 0, select the draw tool and trace over the character. I find it easiest to break the character down into several regions (Head, Left Arm, Right Arm, Torso, Left Leg, Right Leg). As a helpful tip, if the shape didn't come out quite right, go to the layer menu and uncheck the region checkbox - this will allow you to see the image below as you drag the ducks around to correct your line.

Synfig walk.png

Once you've finished Frame 0, move along the timeframe to Frame 6. Instead of tracing, this time we're going to take the existing elements and reposition them to match the image. Again, turning off the region layers will allow you to see the image below as you edit them. Use the rotate and translate tools to reposition the body parts, adjusting the line ducks for fine tuning.

Repeat for Frames 12 & 18, then you can turn off the Import Image layer (uncheck the checkbox in the layer menu). Now, even though we've only drawn 4 keyframes, by the power of Synfig, we can render a smooth 24 frames of man walking. Add a 1 second timeloop layer on top, and the man will pace on the spot for the length of your animation.

Walk.gif

Adding Translation layer will enable your character to walk from one side of the canvas to the other (or moonwalk backwards if you're so inclined.)

Here is a zipfile with the list file, 4 still images, and the finished Synfig file. Unzip them in the same directory and open the newwalk.sif file with synfig.


Languages Language: 

English • español • français • русский