<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><TITLE >Relative VertexKeys</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="Blender Documentation Volume I - User Guide" HREF="book1.html"><LINK REL="UP" TITLE="Animation of Deformations" HREF="c6169.html"><LINK REL="PREVIOUS" TITLE="Animation of Deformations" HREF="c6169.html"><LINK REL="NEXT" TITLE="Lattice Animation" HREF="x6419.html"></HEAD ><BODY CLASS="section" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Blender Documentation Volume I - User Guide: Last modified April 29 2004 S68</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="c6169.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Animation of Deformations</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x6419.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="section_animation_RVK" ></A >Relative VertexKeys</H1 ><P > Relative Vertex Keys (RVK) works differently inasmuch only the difference between the reference mesh and the deformed mesh is stored. This allows for blending several keys together to achieve complex animations. </P ><P > We will walk through RVK via an example. </P ><P > We will create a facial animation via RVK. While Absolute Vertex Keys are controlled with only <I CLASS="emphasis" >one</I > IPO curve, Relative Vertex Keys are controlled by one interpolation curve for every key position, which states 'how much' of that relative deformation is used to produce the deformed mesh. This is why relative keys can be mixed (added, subtracted, etc.). </P ><P > For facial animation, the base position might be a relaxed position with a slightly open mouth and eyelids half open. Then keys would be defined for left/right eye-blink, happy, sad, smiling, frowning, etc. </P ><P > The trick with relative vertex keys is that only the vertices that are changed between the base and the key affect the final output during blending. This means it is possible to have several keys affecting the object in different places all at the same time. </P ><P > For example, a face with three keys: smile, and left/right eye-blink could be animated to smile, then blink left eye, then blink right eye, then open both eyes and finally stop smiling - all by blending 3 keys. Without relative vertex keys 6 vertex keys would have needed to be generated, one for each target position. </P ><P > Consider the female head in <A HREF="x6309.html#BSG.ADF.F.S68.301" >Figure 4</A > </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.301" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK01.png"></P ></DIV ><P ><B >Figure 4. The female head we want to animate.</B ></P ></DIV ><P > To add a RVK just press <B CLASS="keycap" >IKEY</B > and select <TT CLASS="literal" >Mesh</TT > as for AVK, but, from the pop up menu select <TT CLASS="literal" >Relative Vertex Keys</TT > This stores the reference Key which will appear as an yellow horizontal line in the IPO window. </P ><P > Relative keys are defined by inserting further vertex keys. Each time the <B CLASS="keycap" >IKEY</B > is pressed and <TT CLASS="literal" >Mesh</TT > selected a new horizontal line appears in the IPO window. If frame number is augmented each time the horizontal line are placed one above the other. For an easier modelling let's hide all vertices except those of the face <A HREF="x6309.html#BSG.ADF.F.S68.302" >Figure 5</A >. </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.302" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK02.png"></P ></DIV ><P ><B >Figure 5. The female head we want to animate.</B ></P ></DIV ><P > Now move to another frame, say number 5, and add a new Key. A cyan line will appear above the yellow, which now turns orange. Switch to Edit mode and close left eye lid. </P ><P > When you are done exit from Edit Mode. If you select the reference key you will see the original mesh. If you select your first RVK you will se the deformed one (<A HREF="x6309.html#BSG.ADF.F.S68.303" >Figure 6</A >). </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.303" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK03.png"></P ></DIV ><P ><B >Figure 6. Left eye closed.</B ></P ></DIV ><P > Repeat the step for the right eye. Beware that the newly inserted key is based on the mesh of the currently <I CLASS="emphasis" >active</I > key, so it is generally a good idea to select the reference key before pressing <B CLASS="keycap" >IKEY</B > </P ><P > Then add a smile (<A HREF="x6309.html#BSG.ADF.F.S68.304" >Figure 7</A >). </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.304" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK04.png"></P ></DIV ><P ><B >Figure 7. Smiling.</B ></P ></DIV ><P > Your IPO Window will look like <A HREF="x6309.html#BSG.ADF.F.S68.305" >Figure 8</A >. </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.305" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK05.png"></P ></DIV ><P ><B >Figure 8. Keys in the IPO Window.</B ></P ></DIV ><P > The vertical order of the Vertex Keys (the blue lines) from bottom to top determines its corresponding IPO Curve, i.e. the lowest blue key line will be controlled by the <TT CLASS="literal" >Key1</TT > curve, the second lowest will be controlled by the <TT CLASS="literal" >Key2</TT > curve, and so on. </P ><P > No IPO is present for the reference mesh since that is the mesh which is used if all other Keys have an IPO of value 0 at the given frame. </P ><P > Select <TT CLASS="literal" >Key1</TT > and add an IPO with your favourite method. Make it look like <A HREF="x6309.html#BSG.ADF.F.S68.306" >Figure 9</A >. </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.306" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK06.png"></P ></DIV ><P ><B >Figure 9. The IPO curve of Key 1.</B ></P ></DIV ><P > This will make our mesh undeformed up to frame 10, then from frame 10 to frame 20 Key 1 will begin to affect the deformation. From frame 20 to frame 40 Key 1 will completely overcame the reference mesh (IPO value is 1), and the eye will be completely closed. The effect will fade out from frame 40 to frame 50. </P ><P > You can check with <B CLASS="keycap" >ALT-A</B >, or by setting the frame numbers by hand. The second option is better, unless your computer is really powerful! </P ><P > Copy this IPO by using the down pointing arrow button in the IPO Window toolbar <A HREF="x6309.html#BSG.ADF.F.S68.307" >Figure 10</A >. Select the <TT CLASS="literal" >Key 2</TT > and paste the curve with the up pointing arrow. Now both keys will have the same influence on the face and both eyeds will close at a time. </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.307" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK07.png"></P ></DIV ><P ><B >Figure 10. Clipboard buttons.</B ></P ></DIV ><DIV CLASS="tip" ><P ></P ><TABLE CLASS="tip" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="./stylesheet-images/tip.gif" HSPACE="5" ALT="Tip"></TD ><TH ALIGN="LEFT" VALIGN="CENTER" ><B >Panning the Toolbar</B ></TH ></TR ><TR ><TD > </TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > It may happen that the toolbar is longer than the window and some buttons are not shown. You can pan horizontally all toolbars by clicking <B CLASS="keycap" >MMB</B > on them and dragging the mouse. </P ></TD ></TR ></TABLE ></DIV ><P > Add also an IPO for <TT CLASS="literal" >Key 3</TT > Let's make this different (<A HREF="x6309.html#BSG.ADF.F.S68.308" >Figure 11</A >). </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.308" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK08.png"></P ></DIV ><P ><B >Figure 11. All IPOs.</B ></P ></DIV ><P > This way the eyes closes and she begins to smile, smile is at maximum with closed eyes, then she smile 'less' while eyes re-open and keeps smiling (<A HREF="x6309.html#BSG.ADF.F.S68.309" >Figure 12</A >). </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.309" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK09.png"></P ></DIV ><P ><B >Figure 12. Sequence.</B ></P ></DIV ><P > The IPO Curve for each key controls the blending between relative keys. These curves should be created in the typical fashion. The final position is determined by adding all of the effects of each individual IPO Curve. </P ><DIV CLASS="tip" ><P ></P ><TABLE CLASS="tip" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="./stylesheet-images/tip.gif" HSPACE="5" ALT="Tip"></TD ><TH ALIGN="LEFT" VALIGN="CENTER" ><B >RVK in Action Window</B ></TH ></TR ><TR ><TD > </TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > You can operate with RVK also in the Action (<B CLASS="keycap" >SHIFT-F12</B >), not IPO, Window (<A HREF="x6309.html#BSG.ADF.F.S68.310" >Figure 13</A >). The influence of any Key is given via a slider. Marks are present at Key points (i.e. where the IPO would have a control point). </P ><DIV CLASS="figure" ><A NAME="BSG.ADF.F.S68.310" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartA/soft_animation/gfx/RVK10.png"></P ></DIV ><P ><B >Figure 13. RVK in Action Window.</B ></P ></DIV ></TD ></TR ></TABLE ></DIV ><DIV CLASS="tip" ><P ></P ><TABLE CLASS="tip" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="./stylesheet-images/tip.gif" HSPACE="5" ALT="Tip"></TD ><TH ALIGN="LEFT" VALIGN="CENTER" ><B >Values out of [0,1] range</B ></TH ></TR ><TR ><TD > </TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > An important part of Relative Keys is the use of additive or extrapolated positions. For example, if the base position for a face is with a straight mouth, and a key is defined for a smile, then it is possible that the negative application of that key will result in a frown. Likewise, extending the IPO Curve above 1.0 will "extrapolate" that key, making an extreme smile. </P ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="c6169.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="book1.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x6419.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Animation of Deformations</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="c6169.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Lattice Animation</TD ></TR ></TABLE ></DIV ></BODY ></HTML >