Essential Blender- P15

Chia sẻ: Cong Thanh | Ngày: | Loại File: PDF | Số trang:30

lượt xem

Essential Blender- P15

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Essential Blender- P15: You may copy and distribute exact replicas of the OpenContent (OC) as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the OC a copy of this License along with the OC.

Chủ đề:

Nội dung Text: Essential Blender- P15

  1. A dding Bones to Assist Deformation Figure RST.63: The head bone in Edit mode, showing envelopes. With this armature, there is no way to have the head bone's envelope be broad enough to deform the entire head without dipping into areas like the shoulder and chest that have no business being affected by the head bone. What to do? There are several ways to approach it, but the easiest is to add a new bone as a child of the head bone to assist with the deformation.
  2. Figure RST.64: A new bone to help with head deformation. Notice how the envelopes of the original and new head bones completely cover the head now. To get this configuration, we Shift-D duplicated the head bone, then positioned the new bone's root and tip so it fell perpendicular to the original. After that, the overall envelope size was altered with Alt-S until it appeared to fill in the gaps the original bone had left. Of course, this new bone must be made the offset child of the original head bone or things will go very badly once you begin to animate. Then, we returned to pose mode and tested it by moving the neck and head. In fact, our first attempt when creating this exercise didn't quite cover the area correctly, and an additional adjustment had to be made to the envelope size. W eight Painting and V ertex G roups
  3. The last way of adjusting mesh deformation that we'll talk about is called Weight Painting. Behind the scenes, it involves the creation and use of vertex groups, but the 3D view interface elements let you work rather intuitively. Figure RST.65: A bad deformation in the chest. In this illustration, Hank's back has been bent backward, showing off a poor deformation in the chest. You could add another bone that was linked to the spine to fix it, but there is another way. To weight paint your way out of a mess like this, select the mesh object, and on the 3D header choose "Weight Paint" mode. On the mesh's Modifiers panel, enable the "Vert. Groups" button in the Armature modifier.
  4. Figure RST.66 Figure RST.67 Although the mesh object is selected, you'll find that you can RMB select the bones of the armature, if it was in Pose mode. In this example, the "" bone has been selected. At this point, the LMB in the 3D view becomes a paint brush. What the brush is "painting" is really bone influence. As you click and drag on the mesh, it is telling the mesh that it should be influenced by the currently selected bone. In terms of color, dark blue means that the mesh is not influenced by the bone at all, through teal, green, yellow, orange and red, at which point the mesh is influenced by the bone's transformations at 100% strength.
  5. Figure RST.68: The weight paint panel on the Edit buttons. You can choose to what maximum weight you would like to paint in this panel with the "Weight" control, and how much of that maximum value will be painted with each stroke with the "Opacity" control. An opacity of 1.0 will paint the full value of the Weight control with every pass of the mouse.
  6. Figure RST.69: A few mouse clicks on the chest and sternum later. By painting a few strokes on the poorly deforming area with Weight 1.0 and Opacity .25, this deformation was achieved. A definite improvement. Serious animators will use this technique to finely tune their deformations for nearly each and every bone in their characters. W rapping Up When you have envelopes and weight painting set so that each controller can move, deforming the portions of the mesh you desire while leaving other parts alone, then you are done. Move any deformation helper bones you created to a hidden bone layer so they are out of the way. If you need to revisit your envelope settings or weight painting, though, don't forget they're there! If you have already worked with Chapter 6, we encourage you to try it again with the rig you just created. It's different than the rig provided with Hank in the previous chapter, and you can learn from the differences in how your rig responds to the same set of instructions.
  7. Chapter 8: Shape Keys: Tools By Andy Dolphin You already know that in Blender you can animate the way that objects move around the 3D world. Blender also gives you the ability to have your mesh objects change their shape over time. These changes, called deformations, are saved in "shape keys". Examples of where you might use shape keys include morphing from one character or shape to another, or adding subtle variations to a shape to add interest to an animation, like having a creature's chest rise and fall to show breathing. One very popular use of shape keys (sometimes called "morph targets") is for character facial expressions and lip-syncing. Shape keys are not restricted to animation however. If you have a model you wish to use in a series of still images, shape keys can be a convenient way of saving shape variations that will be used more than once. Figure 8.2.1: Various facial expressions created only with shape keys. Shape keys store vertex positions relative to their original positions in the mesh. After the shape key is stored, the deformation can be controlled by influence sliders. Moving the sliders causes the vertices to change from their positions in the original mesh shape and move toward the positions saved in the selected shape key. Multiple shape keys can also be combined to vary the final shape of the mesh. The original shape of the mesh is saved as a basis shape key. It is always available and can be returned to at any stage, no matter how many shape keys have been made from it. As shape keys are non- destructive, you can try out various ideas on changing or improving a model, and if you find you don't like them, you can delete or ignore them, returning to the basis shape. Keep in mind that shape keys do not allow you to change the structure of the mesh, only the positions of the vertices which make up the mesh. You cannot add or delete vertices when using shape keys. Making Shape Keys Before you begin Before working on your shape keys, be sure that you are happy that your basic model is finished.
  8. One important point to remember when working with shape keys is that since they store relative vertex positions, the mesh should be in a finished state before applying them. While some editing is possible after shape keys have been saved, it can lead to unpredictable results and may make some of the shape keys useless, in which case you'll need to recreate those shape keys from scratch. It is common practice to build organic models, like humans and animals, using a mirror modifier so only one half has to be modeled while Blender automatically creates the other half. If you've used a mirror modifier while modeling, make sure to "Apply" it (join the two halves) before proceeding with shape keys, as applying mirror modifiers later will result in the loss of all shape keys. Shape key controls are found in the Shapes tab of the Editing Buttons (F9). Shape keys are added to a mesh in Object mode. Then, the shapes are made and edited in Edit mode. Figure 8.2.2: The Shapes tab before any shape keys are saved. If no shape keys have previously been stored for a selected mesh object, the Shapes panel will show a single button with the label "Add Shape Key." When this button is pressed, the panel changes to show a button labeled "Relative," which is active by default, and a drop-down menu with the word "Basis" showing in the text field. This shows you that Blender has stored the current state of the mesh as the Basis shape key. The Basis shape key is essentially the original un-deformed mesh, and all future shape keys for this mesh will be stored relative to this shape key.
  9. Figure 8.2.3: The Shapes tab with basis shape key saved. Pressing the "Add Shape Key" Button again results in a new shape key labeled "Key 1" being added to the drop-down menu. The key name can, and usually should, be changed to something that will indicate what this shape key represents. For example, when making mouth shapes for lip-sync, the shape keys should be given names that indicate the sound or letter each key represents. If you fail to do this, a lot of time will be wasted when you go to actually use the shapes in an animation. You can edit the name of each shape key by selecting it from the shapes panel menu, then typing a new name into the text field. Figure 8.2.4: The Shapes tab after the first shape key is saved.
  10. When the first new shape key is added, you will see a key value slider, a "Min" and "Max" adjuster and a text box labeled "VGroup:" in the Shapes panel. These give you additional control over the shape key, which will be explained in a bit. A list of shape keys with sliders also appears in the Action Editor window (Action window), if one is open. When animating with shape keys, it is usually better to do so in the Action Editor as multiple shape keys can be easily accessed without scrolling through a menu, and markers are placed to indicate key frames for each shape key. Figure 8.2.5: The Action Editor window showing a list of shape keys. Once a shape key has been created, a unique target shape can be made by tabbing into Edit mode. Selected vertices, edges or faces can be moved, scaled or rotated to create a new shape. Remember that vertices, edges and faces should not be added or deleted when making shape keys. After the mesh has been modified into the desired shape, it can be stored by exiting Edit mode. Each time the "Add Shape Key" button is pressed, a new shape key is created, ready to store a new shape. Shape keys can be selected from the drop down menu next to the shape key names or by scrolling through all keys using the "Previous Shape Key" and "Next Shape Key" buttons. Using One Shape Key as the Basis For a New One New shape keys are based on the currently selected shape key at the time the "Add Shape Key" button is pressed. So, if the Basis key is selected, the new shape key will be a copy of the Basis key, ready for editing. Sometimes it is useful to have two or more keys that are similar to each other. In this case, an existing shape key should be selected before pressing "Add Shape Key". Then, when entering Edit mode, the mesh will already be deformed to the same state as the previous shape key. From here, minor or major adjustments can be made to the mesh to create the new shape key. This can save quite a lot of time when creating similar shape keys in complex models, as the majority of the adjustments would only need to be done once. Subsequent shapes could be based on the first adjustment.
  11. Editing Shape Keys As shape keys store positions of vertices relative to the base mesh, it is quite simple to change them, even after they have been used in an animation. In fact, it can sometimes be useful to begin animating and using the shape keys to determine if they need to be tweaked for best results. To edit a shape key, select it from the shape key drop down menu, then tab into Edit mode. Adjust the mesh as desired and save it by tabbing back into Object mode. One problem that may arise after saving shape keys is coming to the realization that your original shape isn't quite the way you'd like it to be. You may, for example, decide that your character's ears are too small. Simply making them bigger won't deliver the desired result as the smaller ears have already been saved in all existing shape keys and the changes you make will only affect the currently selected shape key. A very useful feature of Blender shape keys is the ability to change the mesh in one shape key and have that change affect all existing shape keys. Such changes would usually best be done with the base mesh (the Basis key), as this is the un-deformed mesh and any changes will probably be more predictable. So, if you decide the basic shape needs some adjustment, select Basis from the shape key menu and fix the mesh in Edit mode. Then, with all edited vertices still selected, press W-key and choose "Propagate To All Shapes". Return to object mode and examine the remaining shapes to make sure that everything happened as you expected. Remember that you cannot add or delete vertices, edges or faces when you do this. You can only move, rotate or scale existing ones.
  12. Figure 8.2.11: A mesh in Edit mode, showing "Propagate to all shapes." It is also possible to adjust selected vertices of one shape key by applying vertex offsets from another shape key. Select a shape key from the menu and enter Edit mode. Select some or all vertices and press W-key. Choose "Blend From Shape". A menu pops up with a list of other shape keys to copy from. Select one, then move the mouse slowly in order to see and control the adjustment. Pressing MMB will apply the adjustment at 100%. This feature would prove useful if you wanted your character to have larger ears in some of your existing shape keys, but not all of them. It is certainly quicker and easier than editing the ears in each shape key individually.
  13. Figure 8.2.12: A mesh in Edit mode, showing "Blend to Shape" selected. If you've already commenced animating, it is important to note that the effect of editing the shape keys or the base mesh will apply immediately to any animation you have already keyed. Be sure to tweak carefully and check the animated results regularly. You may find you'll need to adjust some sliders or edit some key frames to achieve a better result after you've made changes to your shape keys. Deleting Shape Keys You can select a shape key from the drop down menu and press the "X" button to delete it. When a shape key is deleted, its influence in an animation is completely removed. Using Shape Keys When a shape key is created, the key value slider associated with it will show a default value of 0.0. This means that new shape keys have no influence on a mesh, leaving the mesh un-
  14. deformed. If the key value slider is moved forward and released, the mesh will deform. The amount of deformation is relative to the slider value (0.0=0%; 1.0=100%). Note that the slider is not interactive, and the mesh is not updated in the 3D view until the slider is released. Also note that the vertices move in a linear fashion. That is, they move in a straight line from the basis position toward the position stored in the shape key. This linear displacement is important to recognize and understand, as it is one of the main differences between shape key animation and animation using armatures. If you need your mesh to move in a curved motion, such as an eyelid sliding over the surface of a rounded eyeball, shape keys may not be the best option. The "Min" and "Max" settings next to the key value slider allow you to push vertices past the values saved in the shape key or to move them in the opposite direction, relative to the basis mesh. Pushing a shape to extremes by setting the Max value greater than 1.0 and pushing the influence slider up can sometimes be useful, but it can also deliver unexpected results. The "Min" setting can be made negative, giving the reverse of the shape key. If a group of vertices was moved to the left in the stored shape key, setting "Min" to a negative value and pushing the influence slider below 0.0 would cause those vertices to move to the right. While this can be an apparently easy way of turning a smile into a frown, for example, it must be approached with caution and is usually best for subtle effects. Values can be negative or positive but the Max value must always be greater than the Min value. Figure 8.2.6: A single Shape key applied to a sphere with its slider set to 1.0 and -1.0. The Pin icon in the Shapes panel can be used to view the effects of a single shape key on a mesh, or an entire set of shape keys at the same time on multiple instances of a mesh. Linked duplicates of the mesh, created by pressing Alt-D on selected objects in Object mode, can be placed side-by- side with each one displaying a different shape key at full key value. A gallery of shape keys can be created using this method. This can be a useful way of comparing different experimental shapes and to choose a preferred shape.
  15. To use shape Pinning, simply find the shape you want to display from the shapes drop down and click the pin icon. Until the pin icon is turned off, the object will display with that shape, regardless of other keys that might have been set. Figure 8.2.7: Linked duplicates of the same mesh, each showing a different pinned Shape key. A More Advanced Trick The influence of a shape key can also be limited to a selected vertex group using the VGroup option, and the result can be further controlled through vertex weight painting. Using this feature, it is possible to create one shape key which contains complex deformations all over a mesh, and then use the shape key in conjunction with different vertex groups to create a whole series of new shape keys, each affecting only a small portion of the mesh. For example, it may be simpler to create an angry face shape key all at once, but you may want access to different components of that shape individually: knotted brow, squinting eyes and snarling lips. It often gives better results to model adjustments all at once, and then to create separate shape keys using vertex groups than it is create several separate shape keys from scratch. Note: For more information about vertex groups, refer to Chapter 4. To do this, create an overall shape key, then create and assign several vertex groups to the mesh, one for each section that would benefit from having a separate shape key. In the VGroup text box of the shape key, enter the name of one of the vertex groups. The shape key is now restricted to only affecting those vertices contained in the group. Press the Add Shape Key button. Normally, this would create a whole new copy of the entire current shape key. In this case, though, it just creates a copy of the shape keys from the vertex group. You can now go back to the original shape key, change the name to that of another vertex groups, and create additional keys.
  16. Animating Shape Keys Animation occurs when different shape key values are stored at various points along the animation timeline. These values are stored in key frames. Blender displays the current frame number in the header bar of the Buttons window and with a green vertical line in the Action Editor. Frames can be changed using the arrow keys. More information about the animation timeline and changing frames can be found in Chapter 3. When the key value slider is moved, a key frame is automatically inserted in the animation timeline on the current frame, so the mesh shape at that frame is recorded. Changing frames and moving the slider to various values will result in an animated shape when the frames are played back. If a shape key slider's value is set to 1.0, then the stored values for each vertex affected by that shape key will be applied at 100% on the current frame. This influence will remain unless the slider is moved to a different value on a later frame. Blender creates smooth transitions from one key frame to the next by interpolating values for all shapes between key frames. These values can be seen by setting the frame counter to the desired frame number and reading the value shown in the key value slider in the Shapes panel with the desired shape key selected. It is often useful to have a mesh change shape over a period of time and remain unchanged for a while, sometimes for just a few frames, before changing shape again. To force a shape to stay at one value for a number of frames before changing shape, it is necessary to set the value slider at the start and end of the fixed-shape period. Shape Keys in the Action Editor If your mesh has more than one shape key saved, it is more efficient to animate with the sliders in the Action Editor than to keep switching from shape to shape in the Shapes panel of the Edit buttons. The Action Editor window displays a list of all shape keys associated with the selected mesh. Each shape key has a key value slider that follows the same rules as the influence slider in the Shapes panel. Again, simply moving a slider forward or backward inserts a key frame for that shape on the current frame. You can also see in the Action Window that Blender places a key frame marker in the selected shape's channel. These markers not only serve as a reference for existing key frames but also give the animator access to even greater control over the animation as they can be moved, duplicated or deleted with the standard Blender controls (G-key, Shift-D, X-key).
  17. Figure 8.2.8: The Action Editor window showing key frame markers. You can also use the Action Window to edit the name of shape keys or change the Min and Max values. Simply LMB on the shape key name in the list, and a dialog panel will open up, giving access to the shape key values. Figure 8.2.9: The Action Editor window showing the Shape key pop-up panel. When animating, you may notice some unexpected results when several shape keys are applied at once. If two shape keys affect the same vertex, the final position of that vertex will be determined by the influence of both shape keys added together. For example, if you apply two shape keys to one frame and both keys push the same vertex one unit to the right, the end result will be to push the vertex two units to the right. Conversely, if the second shape key moves the vertex one unit in
  18. the opposite direction, the combined result will be for the vertex not to move at all. A practical example of the combined effect of shape keys is given in the tutorial for this chapter. When Blender saves key frames for shape keys, it can display the values as a set of curves along the animation timeline. These are called Ipo curves and can be viewed by opening an Ipo Curve Editor window and choosing "Shape" from the Ipo type menu in the window's header. Each shape key has its own curve, identified by the color key in the upper right of the window. Ipo curves can be edited in a variety of ways for advanced animation control. This is often the final step in tweaking an animation. You can refer to the Ipo window section in Chapter 3 for more information on handling Ipo curves. Figure 8.2.10: An Ipo window, showing curves for Shape Keys. Crazy Space When a model is deformed by an armature, it can be difficult to edit the mesh, as the vertices, edges and faces are no longer in their original locations and don't respond to editing as you might expect. Under some circumstances, they might even move away from their intended direction. For this reason, working on a mesh while it is being deformed by an armature is called working in "crazy space". To avoid this problem, select the armature and put it in its un-deformed position using the "Rest Position" button in the Armature tab of the (F9) Editing buttons. This returns the mesh to its default position, and things will behave as expected when editing. Advanced Uses for Shape Keys Once you've mastered shape key basics and are comfortable with animating and editing them, you may wish to use automated shape keys in combination with an armature for subtle effects during animation. This automated process is referred to as "driven shape keys". Shape keys can be "driven" such that when a bone is moved or rotated, the shape key will respond automatically. This feature can be put to great use to prevent meshes from pinching at joints like elbows and knees, or to simulate muscle contraction and expansion as limbs move. Some animators use a combination of bones and driven shape keys for facial animation. Although driven keys are outside the scope of this book, it is good to know that such things can be accomplished.
  19. Conclusion Shape keys give Blender artists a powerful way to animate and deform their mesh models. They are the primary tool for facial expressions and lip syncing as well as for creating morphing effects. Combined with armatures, they give artists nearly complete control over the shape of their meshes.
  20. Chapter 8: Shape Keys Tutorial By Andy Dolphin Shape Keys are a way of storing changes in the shape of a mesh. Blender shape keys can seem a little daunting at first, but once you come to grips with the basic workflow a whole new world of animation possibilities opens up. Shape keys can range from very simple to extremely complex, but either way the approach to creating, saving and animating them is the same. One thing to remember when animating with shape keys is that the word "key" is used for two different purposes. A "shape key" stores the locations of vertices in a mesh, ready to be used for animation. On the other hand, a "key frame" records information on the animation timeline and tells Blender what should be happening with an object at a specific point in time as an animation plays or renders. Both terms will be used throughout this tutorial so it's important you understand the distinction. Note: Before you begin, it needs to be emphasized that you should only add shape keys to a finished mesh. Don't use them on a mirrored mesh or a partially finished model. Adding or deleting vertices, edges or faces can cause unpredictable results or even the loss of the shape keys. This is because a shape key records the changes in the vertices' locations which define the shape of the mesh. Using shape keys is only appropriate for a mesh that is considered "complete". Fun with Suzanne Suzanne the monkey is Blender's official mascot, and to celebrate this fact there is a Suzanne mesh included in every Blender release. Poor old Suzanne has been abused in countless ways. She's been turned into stone, glass and all sorts of slimy materials. She's been duplicated, animated and had her head stuck on all sorts of different bodies. Most Blender users have fun with Suzanne at some point, and as a ready-made character mesh she is great for learning new tools and concepts in Blender. So, in order to help familiarize you with the Shape Key user interface, we will have a bit of fun with Suzanne!
Đồng bộ tài khoản