Animer des formes
(ARELIRE! - Éléments de base -paragraphe1- Traduction) |
|||
Line 1: | Line 1: | ||
+ | <!-- Page info --> | ||
+ | {{Title|Animer des formes}} | ||
+ | {{Navigation|Category:Manual|Doc:Interface}} | ||
+ | {{Category|Tutorials}} | ||
+ | {{Category|Tutorials Intermediate}} | ||
+ | {{Category|Updated}} | ||
+ | <!-- Page info end --> | ||
+ | |||
+ | Cette page à besoin d'être traduite, soyez patient et/ou participez! | ||
+ | |||
=== Éléments de base === | === Éléments de base === | ||
− | Dans ce | + | Dans ce tutoriel, nous allons apprendre comment créer une animation simple consistant à faire grandir une fleur en utilisant les {{l|Doc:Creating Shapes|BLines}}. |
+ | |||
+ | [[Image:flower_0.png|right|frame]] Ouvrez ''Synfig Studio''— une nouvelle animation se crée. Si ''Synfig Studio'' est déjà ouvert, faites {{c|Fichier|Nouveau}} dans la boite à outil. | ||
+ | |||
+ | Premièrement, nous avons besoin de créer un dégradé comme arrière-plan. Cliquez sur les couleurs de contour et de remplissage dans la boite d'outils pour sélectionner les couleurs que votre dégradé prendras. Vous pouvez également éditer directement le dégradé en cliquant sur la ligne Dégradé par défaut dans la boite à outils. | ||
+ | |||
+ | Sélectionnez l'Outil dégradé et déplacer votre curseur verticalement le long du canevas pour le remplir avec un dégradé. | ||
+ | |||
+ | Ensuite, sélectionnez l'Outil Bline et dans le panneau d'option des outils, vérifiez que uniquement {{Literal|Créer une région (BLine)}} est sélectionné. Dans la boite à outils, mettez la couleur de remplissage sur vert. Dessinez une sorte de triangle avec l'Outil Bline. Pour fermer la forme après avoir dessiné les trois vertex, cliquez droit sur le premier vertex et choisissez {{Literal|Fermer la BLine}}. | ||
+ | |||
+ | Maintenant que le chemin de la forme est fermé, vous pouvez générer réellement la forme en sélectionnant un autre outil ou en cliquant sur le bouton avec l'icone engrenages dans le bas du panneau Options des outils. | ||
+ | |||
+ | [[Image:FlowerTutorialCanvas1.png|center|frame]] | ||
+ | |||
+ | Cela seras la base de la tige. Vous pouvez modifier the poignées de tangentes (les points rouges) un petit peux pour rendre le triangle plus rond. Avec l'{{l|Outil de transformation}}, cliquez-droit sur chacun des vertex et sélectionner {{Literal|Séparer les tangentes}}, ainsi les poignées de tangentes de chaque vertex peuvent être déplacer indépendamment. | ||
+ | |||
+ | [[Image:FlowerTutorialCanvas2.png|center|frame]] | ||
+ | |||
+ | == Animate the stem == | ||
+ | |||
+ | In the Canvas Menu, select the {{l|Caret|caret menu}} icon in the upper left hand corner, where the rulers intersect, and then select {{c|Edit|Properties}}. Go to the Time tab, set the {{Literal|End time}} to {{Literal|6s}} and click OK button. | ||
+ | |||
+ | Click at the beginning of the timetrack ({{Literal|0f}}), then, in the {{l|Keyframes Panel}} (the one with a key icon) click the button with a "+" icon (add a new keyframe). | ||
+ | {{l|Keyframe|Keyframes}} allow us to ''settle down'' the scene; i.e. on a keyframe, every element of the scene will have all its properties remembered. | ||
+ | Click again on the timetrack, at {{Literal|4.5s}}. | ||
+ | Press the green circle at the bottom right of the canvas (or whatever icon you have there, depending on your icon theme) to switch to the {{l|Animate Editing Mode}} (the circle is now red). | ||
+ | |||
+ | With the {{l|Transform Tool}}, select the green sprout, and move the upper vertex up to make a stem. | ||
+ | You can play with the vertex handles to bend the shape a bit if you want. | ||
+ | |||
+ | [[Image:FlowerTutorialCanvas3.png|center|frame]] | ||
+ | |||
+ | While you are still at {{Literal|4.5s}}, right-click on the stem border, close to the top, and choose {{Literal|Insert Item (smart)}}. Do the same on the other side of the stem. Right click on those new points and choose {{Literal|Split Tangents}}. Then try to make a shape that looks like the one on the image, to create the flower bud. | ||
+ | |||
+ | [[Image:FlowerTutorialCanvas4.png|center|frame]] | ||
+ | |||
+ | Now if you click on {{Literal|2s}} (for example), you'll see that the shape of the bud is slightly visible, even if the sprout is rather small, and even if the bud ducks are invisible. | ||
+ | |||
+ | [[Image:FlowerTutorialCanvas5.png|center|frame]] | ||
+ | |||
+ | {{ | ||
+ | Note|Note|Due to a bug introduced in 0.63.02, the {{Literal|Insert Item (smart)}} won't produce a correct "Off" point at the previous keyframe (at 0s). You have to move the time cursor to 0f and right click each vertex and select {{Literal|Set Active Point Off}} . | ||
+ | {{DevNotesBegin}} | ||
+ | This bug is fixed in the upcoming release (0.63.05). | ||
+ | {{DevNotesEnd}} | ||
+ | }} | ||
+ | |||
+ | Let's say we want the bud to appear only at 3.5s, and be full size at 4.5s. | ||
+ | |||
+ | Click on {{Literal|3.5s}} on the timetrack. Now take a look at the {{Literal|Params}} and {{Literal|Timetrack}} panels at the bottom. You'll see that each parameter in the Params Panel matches a row in the Timetrack Panel. The last parameter is the vertices list. Click on the small arrow on the left to unfold the list. You should see something like this: | ||
+ | |||
+ | [[Image:FlowerTutorialTimetrackParamsPanels6.png|center|frame]] | ||
+ | |||
+ | Each big green dot (or {{l|waypoints|waypoint}}) stands for a recorded value (here the vertices positions were recorded at 0f with the keyframe, and at 4s when we moved some vertices or vertices handles). The two vertices we added to make the bud are marked at {{Literal|DYN}} (dynamic). Right-click on them in the params list, and select "Mark Activepoint as Off". | ||
+ | |||
+ | The panel should now look like this, the grayed part being the part where the bud vertices have no effect on the stem. | ||
+ | |||
+ | [[Image:FlowerTutorial-7-WaypointsActivepointsOff.png|center|frame]] | ||
+ | |||
+ | For example if you click on {{Literal|2s}} or even {{Literal|3s}} now, the bud shape is not visible. It starts to appear only a little after 3.5s. | ||
+ | |||
+ | However, the shape of the stem may not look very nice during its growth between 0 and 4s. Make sure you're still in Animate Edit Mode, and tweak the shape at various moments in time, to get something you like. | ||
+ | |||
+ | The animation of the stem is now finished, but it still lacks the petals. | ||
+ | You can watch a preview of your animation: Go to {{c|File|Preview}}, validate, wait for the preview to be generated, and watch. | ||
+ | |||
+ | {{Note|Note|Previews are often pixelated and blurry, but the final render will be clean-cut. Higher quality previews are obtainable by using higher values for 'Zoom' and 'Frames per second' in the preview dialog window.}} | ||
+ | |||
+ | == Adding the petals == | ||
+ | |||
+ | Now leave the {{Literal|Animate Editing Mode}} by clicking on the red circle at the right bottom of the canvas. | ||
+ | |||
+ | Change the fill color to pink, and create a petal with the BLine Tool. You'll notice that the green {{l|duck|duck}} that allows easy movement of a shape is at the center of the canvas. Select all the vertices of the petal with {{Shortcut|Ctrl|a}} and move them close to the green duck (with the Transform Tool), as shown. | ||
+ | |||
+ | [[Image:FlowerTutorial-8.png|center|frame]] | ||
+ | |||
+ | Then drag the green duck very close to the top of the bud. Hit {{Shortcut|Ctrl|a}} again to select all vertices of the petal and tweak it a bit with Rotate Tool. Also, in the {{l|Layers Panel}} select the petal layer and put it '''under''' the stem layer. | ||
+ | Click on the petal to select it, then ctrl-click on the stem. Both objects should be selected. | ||
+ | |||
+ | Now click on the vertex at the top of the stem and ctrl-click on the green duck of the petal (both should appear in a lighter color, as they are selected). Then right-click on the stem top vertex, and select {{Literal|Link}}. The petal will move a bit as the green duck is snapped on the stem vertex. | ||
+ | |||
+ | [[Image:FlowerTutorial-9.png|center|frame]] | ||
+ | |||
+ | Now that there's a link between the petal and the top of the stem, when the top of the stem moves, the petal will follow the move. (And if the green duck of the petal moves, the top of the stem will move, but we don't want to do that here.) | ||
+ | |||
+ | On the Layers Panel, select the newly created Petal layer and duplicate it (with the third button, on the bottom of the Layers Panel). On the canvas, press {{Shortcut|Ctrl|A}} to select all the vertices of the duplicated petal, and move them a little, so the petals are no longer overlaid. (Don't move the green duck, just the orange ones). Repeat the process several time, to get something looking like this image. | ||
+ | |||
+ | [[Image:FlowerTutorial-10.png|center|frame]] | ||
+ | |||
+ | Note that the duplicated petals are also linked to the stem. | ||
+ | If you go back to the first keyframe, you'll see that the petals are visible. | ||
+ | We don't want that. We want the petals to appear and bloom almost at the end of the growth. | ||
+ | |||
+ | == Hiding the petals == | ||
+ | |||
+ | <!-- This part is maybe the most clumsy one. I guess there may be an easier way to manage this step, and if I find it, I'll update the tutorial ;) --> | ||
+ | |||
+ | Let's say we want the petals to appear a little after 4 seconds in the animation, and be full size at 5 seconds, instead of being visible and full size all the time. | ||
+ | |||
+ | Switch to {{Literal|Animate Editing Mode}} again by clicking on the green circle at the bottom right of the canvas. But if we will go to {{Literal|4s}} and modify them, then they also change at {{Literal|5s}}. Because the shape/position of the petals is not fixated at this moment of time by any waypoints or keyframes. That means that we need a keyframe at {{Literal|5s}}. On the timetrack, click to place the cursor at 5 seconds. On the {{l|Keyframes Panel}}, click on "+" to add a new keyframe. | ||
+ | |||
+ | Now click on {{literal|4s}}, and on the Layers Panel, select all the petals layers (with ctrl+click), then press {{Shortcut|Ctrl|A}} to select all the petals vertices. Scale them down with the {{l|Scale Tool}}, and move them, so they are hidden by the stem, as shown. | ||
+ | |||
+ | [[Image:FlowerTutorial-11.png|center|frame]] | ||
+ | |||
+ | From 4s to 5s, the petals will now appear and bloom. But notice that we have a keyframe at 0s which also remembers petals shape. That makes the problem — the petals are still visible from the first keyframe to the 4s keyframe. | ||
+ | We could either make the petals tiny and hidden tweaking their size on every frame from 0s to 4s, or we could make them invisible on this interval. | ||
+ | |||
+ | Let's choose the second solution. To make things easier, we are going to {{l|encapsulate|encapsulate}} the petal layers into an {{l|Paste Canvas|Inline Canvas}}. With all the petal layers selected, right-click on them on the Layers Panel and select {{Literal|Encapsulate}}. You can rename the layers to | ||
+ | make things more understandable. | ||
+ | |||
+ | [[Image:FlowerTutorial-12.png|center|frame]] | ||
+ | |||
+ | Select the "Petals" inline canvas and jump to the first keyframe. In the Param tabs, set the {{Literal|Amount}} value to {{Literal|0}}. The petals are now invisible on that keyframe. | ||
+ | Note that two waypoints were added in front of the {{Literal|Amount}} parameter, one at 0s and the other at 5s. Drag the 5s waypoint to 4s, so that the opacity of the petals will be 1 at 4s. | ||
+ | |||
+ | [[Image:FlowerTutorial-13.png|center|frame]] | ||
+ | |||
+ | There is still one problem left: from 0s to 4s, the opacity of the petals slowly increases, making the petals visible when they shouldn't. To solve this, we will change the Amount interpolation method. Right click on the Amount waypoint at 0f, and select {{Literal|Edit}}. A new dialog will appear, in which you can choose the In and Out interpolation. Set the Out Interpolation to {{Literal|Constant}}. | ||
+ | |||
+ | [[Image:FlowerTutorial-14.png|center|frame]] | ||
+ | |||
+ | {{Note|Tip|You can also change waypoint Out interpolation by right-clicking on it and selecting {{c|Out|Constant}}.}} | ||
+ | This means that ''after'' that waypoint, the Amount value will remain constant, until another waypoint is encountered. So from 0f to 4s the Amount value will be equal to 0, and at 4s it will suddenly changed to 1, and make the petals visible, as expected. Alternatively, we could have achieved the same effect by setting the In Interpolation of the waypoint at 4s to {{Literal|Constant}}. | ||
+ | |||
+ | Notice how (half of) the waypoint changes from a green circle (meaning smooth animation of the amount parameter) to a red step (meaning that the amount parameter is suddenly stepped). | ||
+ | |||
+ | Now you're done. | ||
+ | The stem grows for 4.5 seconds and then stays still the last 1.5 seconds. | ||
+ | The petals are hidden until 4 seconds, and then grow quickly between 4 and 5 seconds, and stay still the last 1 second too. | ||
+ | |||
+ | Click on {{c|File|Render}} to render your animation. Select any format you want, and ensure that {{Literal|Use current frame}} option is unchecked (otherwise, one frame only will be rendered). | ||
− | + | == Next Steps == | |
− | + | This is the end of the introductory tutorials. From here you can take a look at the {{l|Doc:Interface|Interface}} page, or continue reading or doing the rest of {{l|Category:Tutorials|Tutorials}}. The {{l|Category:Manual|Manual}} gives you a list of the available articles to read for a more complete understanding of Synfig. |
Revision as of 13:17, 12 May 2012
Cette page à besoin d'être traduite, soyez patient et/ou participez!
Éléments de base
Dans ce tutoriel, nous allons apprendre comment créer une animation simple consistant à faire grandir une fleur en utilisant les BLines.
Ouvrez Synfig Studio— une nouvelle animation se crée. Si Synfig Studio est déjà ouvert, faites "Fichier → Nouveau" dans la boite à outil.Premièrement, nous avons besoin de créer un dégradé comme arrière-plan. Cliquez sur les couleurs de contour et de remplissage dans la boite d'outils pour sélectionner les couleurs que votre dégradé prendras. Vous pouvez également éditer directement le dégradé en cliquant sur la ligne Dégradé par défaut dans la boite à outils.
Sélectionnez l'Outil dégradé et déplacer votre curseur verticalement le long du canevas pour le remplir avec un dégradé.
Ensuite, sélectionnez l'Outil Bline et dans le panneau d'option des outils, vérifiez que uniquement "Créer une région (BLine)" est sélectionné. Dans la boite à outils, mettez la couleur de remplissage sur vert. Dessinez une sorte de triangle avec l'Outil Bline. Pour fermer la forme après avoir dessiné les trois vertex, cliquez droit sur le premier vertex et choisissez "Fermer la BLine".
Maintenant que le chemin de la forme est fermé, vous pouvez générer réellement la forme en sélectionnant un autre outil ou en cliquant sur le bouton avec l'icone engrenages dans le bas du panneau Options des outils.
Cela seras la base de la tige. Vous pouvez modifier the poignées de tangentes (les points rouges) un petit peux pour rendre le triangle plus rond. Avec l'Outil de transformation, cliquez-droit sur chacun des vertex et sélectionner "Séparer les tangentes", ainsi les poignées de tangentes de chaque vertex peuvent être déplacer indépendamment.
Animate the stem
In the Canvas Menu, select the caret menu icon in the upper left hand corner, where the rulers intersect, and then select "Edit → Properties". Go to the Time tab, set the "End time" to "6s" and click OK button.
Click at the beginning of the timetrack ("0f"), then, in the Keyframes Panel (the one with a key icon) click the button with a "+" icon (add a new keyframe). Keyframes allow us to settle down the scene; i.e. on a keyframe, every element of the scene will have all its properties remembered. Click again on the timetrack, at "4.5s". Press the green circle at the bottom right of the canvas (or whatever icon you have there, depending on your icon theme) to switch to the Mode Édition d'Animation (the circle is now red).
With the Transform Tool, select the green sprout, and move the upper vertex up to make a stem. You can play with the vertex handles to bend the shape a bit if you want.
While you are still at "4.5s", right-click on the stem border, close to the top, and choose "Insert Item (smart)". Do the same on the other side of the stem. Right click on those new points and choose "Split Tangents". Then try to make a shape that looks like the one on the image, to create the flower bud.
Now if you click on "2s" (for example), you'll see that the shape of the bud is slightly visible, even if the sprout is rather small, and even if the bud ducks are invisible.
Note Due to a bug introduced in 0.63.02, the "Insert Item (smart)" won't produce a correct "Off" point at the previous keyframe (at 0s). You have to move the time cursor to 0f and right click each vertex and select "Set Active Point Off" .
Development Notes:
This bug is fixed in the upcoming release (0.63.05). |
Let's say we want the bud to appear only at 3.5s, and be full size at 4.5s.
Click on "3.5s" on the timetrack. Now take a look at the "Params" and "Timetrack" panels at the bottom. You'll see that each parameter in the Params Panel matches a row in the Timetrack Panel. The last parameter is the vertices list. Click on the small arrow on the left to unfold the list. You should see something like this:
Each big green dot (or waypoint) stands for a recorded value (here the vertices positions were recorded at 0f with the keyframe, and at 4s when we moved some vertices or vertices handles). The two vertices we added to make the bud are marked at "DYN" (dynamic). Right-click on them in the params list, and select "Mark Activepoint as Off".
The panel should now look like this, the grayed part being the part where the bud vertices have no effect on the stem.
For example if you click on "2s" or even "3s" now, the bud shape is not visible. It starts to appear only a little after 3.5s.
However, the shape of the stem may not look very nice during its growth between 0 and 4s. Make sure you're still in Animate Edit Mode, and tweak the shape at various moments in time, to get something you like.
The animation of the stem is now finished, but it still lacks the petals. You can watch a preview of your animation: Go to "File → Preview", validate, wait for the preview to be generated, and watch.
Note Previews are often pixelated and blurry, but the final render will be clean-cut. Higher quality previews are obtainable by using higher values for 'Zoom' and 'Frames per second' in the preview dialog window.
|
Adding the petals
Now leave the "Animate Editing Mode" by clicking on the red circle at the right bottom of the canvas.
Change the fill color to pink, and create a petal with the BLine Tool. You'll notice that the green duck that allows easy movement of a shape is at the center of the canvas. Select all the vertices of the petal with CtrlA and move them close to the green duck (with the Transform Tool), as shown.
Then drag the green duck very close to the top of the bud. Hit CtrlA again to select all vertices of the petal and tweak it a bit with Rotate Tool. Also, in the Panneau Calques select the petal layer and put it under the stem layer. Click on the petal to select it, then ctrl-click on the stem. Both objects should be selected.
Now click on the vertex at the top of the stem and ctrl-click on the green duck of the petal (both should appear in a lighter color, as they are selected). Then right-click on the stem top vertex, and select "Link". The petal will move a bit as the green duck is snapped on the stem vertex.
Now that there's a link between the petal and the top of the stem, when the top of the stem moves, the petal will follow the move. (And if the green duck of the petal moves, the top of the stem will move, but we don't want to do that here.)
On the Layers Panel, select the newly created Petal layer and duplicate it (with the third button, on the bottom of the Layers Panel). On the canvas, press CtrlA to select all the vertices of the duplicated petal, and move them a little, so the petals are no longer overlaid. (Don't move the green duck, just the orange ones). Repeat the process several time, to get something looking like this image.
Note that the duplicated petals are also linked to the stem. If you go back to the first keyframe, you'll see that the petals are visible. We don't want that. We want the petals to appear and bloom almost at the end of the growth.
Hiding the petals
Let's say we want the petals to appear a little after 4 seconds in the animation, and be full size at 5 seconds, instead of being visible and full size all the time.
Switch to "Animate Editing Mode" again by clicking on the green circle at the bottom right of the canvas. But if we will go to "4s" and modify them, then they also change at "5s". Because the shape/position of the petals is not fixated at this moment of time by any waypoints or keyframes. That means that we need a keyframe at "5s". On the timetrack, click to place the cursor at 5 seconds. On the Keyframes Panel, click on "+" to add a new keyframe.
Now click on "4s", and on the Layers Panel, select all the petals layers (with ctrl+click), then press CtrlA to select all the petals vertices. Scale them down with the Scale Tool, and move them, so they are hidden by the stem, as shown.
From 4s to 5s, the petals will now appear and bloom. But notice that we have a keyframe at 0s which also remembers petals shape. That makes the problem — the petals are still visible from the first keyframe to the 4s keyframe. We could either make the petals tiny and hidden tweaking their size on every frame from 0s to 4s, or we could make them invisible on this interval.
Let's choose the second solution. To make things easier, we are going to encapsulate the petal layers into an Inline Canvas. With all the petal layers selected, right-click on them on the Layers Panel and select "Encapsulate". You can rename the layers to make things more understandable.
Select the "Petals" inline canvas and jump to the first keyframe. In the Param tabs, set the "Amount" value to "0". The petals are now invisible on that keyframe. Note that two waypoints were added in front of the "Amount" parameter, one at 0s and the other at 5s. Drag the 5s waypoint to 4s, so that the opacity of the petals will be 1 at 4s.
There is still one problem left: from 0s to 4s, the opacity of the petals slowly increases, making the petals visible when they shouldn't. To solve this, we will change the Amount interpolation method. Right click on the Amount waypoint at 0f, and select "Edit". A new dialog will appear, in which you can choose the In and Out interpolation. Set the Out Interpolation to "Constant".
Tip You can also change waypoint Out interpolation by right-clicking on it and selecting "Out → Constant".
|
This means that after that waypoint, the Amount value will remain constant, until another waypoint is encountered. So from 0f to 4s the Amount value will be equal to 0, and at 4s it will suddenly changed to 1, and make the petals visible, as expected. Alternatively, we could have achieved the same effect by setting the In Interpolation of the waypoint at 4s to "Constant".
Notice how (half of) the waypoint changes from a green circle (meaning smooth animation of the amount parameter) to a red step (meaning that the amount parameter is suddenly stepped).
Now you're done. The stem grows for 4.5 seconds and then stays still the last 1.5 seconds. The petals are hidden until 4 seconds, and then grow quickly between 4 and 5 seconds, and stay still the last 1 second too.
Click on "File → Render" to render your animation. Select any format you want, and ensure that "Use current frame" option is unchecked (otherwise, one frame only will be rendered).
Next Steps
This is the end of the introductory tutorials. From here you can take a look at the Interface page, or continue reading or doing the rest of Tutorials. The Manual gives you a list of the available articles to read for a more complete understanding of Synfig.