From BlenderWiki

Jump to: navigation, search

If you want to document Blender 2.5 features please edit pages under Doc:2.5/Manual.

If a "2.5" page doesn't exist please copy the text from 2.4x Manual and edit the new page (i.e. you should paste the wikitext from this 2.4x page to this new 2.5x page and then update the latter with 2.5 features)

A mesh is a set of connected Vertices, sometimes thousands of vertices for the more complex objects. Blender allows you to group these vertices for several main reasons:

  • Re-using parts of a mesh for making copies
  • Hiding “everything else” while you work on details
  • Documentation and explanation to others
  • Armatures deformation
  • Generating particles from only the group
  • Controlling the velocity of particles emitted
Armatures
Vertex Groups can be automatically created for each bone in an armature. However, that process is pretty involved and for more information on Armatures and Bone Vertex Groups, click here. The rest of this section will focus on user-defined vertex groups.


[edit] Why use Vertex Groups?

Vertex groups identify sub-components of an object, like the legs of a chair or the hinges of a door. By 'bookmarking' such regions in vertex groups you can easily select and work on them in isolation without having to create separate objects. With the hide function you can even remove everything else from view.

Vertex groups also make it easy to cull out and duplicate a part of the mesh many times. Consider modelling a Lego block. The most simple block consists of a base and a nipple. To create a four-nipple block, you would want to be able to easily select the nipple vertices, and, still in edit mode, duplicate them and position them where you want them.

Another use for vertex groups is for skinning an armature. If you want to animate your mesh and make it move, you will define an armature which consists of a bunch of invisible bones. As a bone moves, it deforms or moves the vertices associated with it. Not all of the vertices, but some of them; the ones assigned to it. So, when you move the bone “Arm”, the arm bone moves the Arm vertices, and not the Leg vertices. In this way, parts of the mesh can stretch and move around, while other parts remain stationary.

By entering the name of the group in the VGroup: field in the Particle and/or Particle Motion panels, the weight painting of the group will define how much particles come out. Recall that hair is a static particle; so define a Vertex Group called “Scalp” and use it to tell Blender to emit hair from the Scalp.

Another great use for vertex groups is for keeping track of vertex selections. For instance, I was modelling a coin-like object with a raised, bevelled border. For some reason, I couldn’t do a loop select around the base of the border, so I had to carefully select the vertices. I knew I’d need to use that same selection several times in the next few minutes while working on the model, so I named and saved the group, saving me a lot of work later.

[edit] Vertex Groups Basics

[edit] Creating a Vertex Group

Mode: Edit Mode

Panel: Editing context (F9) → Link and MaterialsVertex GroupsNew

Hotkey: CtrlGAdd Selected to New Group

Vertex Group default panel.

By default, an object does not have any groups, and all of its vertices are hanging out there in cyberspace as loners. The image to the right highlights the Vertex Groups buttons in hot pink. These buttons are located in a Buttons window in the Editing context (F9) on the Link and Materials panel. They are shown when an object with vertices is selected AND being edited (⇆ Tab). You can tell when an object is in Edit mode because your 3D window cursor is a cross-hair.

Groups are only for Vertices
Vertex Groups are only available for objects that have vertices. Text objects, for example, cannot have vertex groups and the panel is not shown when that kind of object is selected. Vertex Groups are only shown when an object with vertices is being edited.


To create a vertex group, LMB File:Template-LMB.png click the New button. When you do, a new vertex group (named, surprisingly, “Group”) is created, and the panel shows you a Weight numeric slider/entry/scroll box. Any selected vertices are not yet assigned to the new vertex group, you must click the Assign button to actually allocate vertices to the newly created vertex group. Note that using the shortcut CtrlGAdd Selected to New Group, you do all this in one step.

Check Your Assignment
It’s a good idea to make sure the vertices have been properly assigned to the group by using the deselect and select buttons. If nothing happens, just hit the Assign button to add the selected vertices to the group.


[edit] Naming Vertex Groups

Mode: Edit Mode

Panel: Editing context (F9) → Link and MaterialsVertex Groups → dropdown list

To name a group something other than the creative “Group”, ⇧ ShiftLMB File:Template-LMB.png click the name field, and type in the name you want.

Cabinet Vertex Group example.

For example, consider the model of a kitchen cabinet. The cabinet consists of three vertical walls (two sides and a back), a floor and countertop, a door frame, a door, a knob and two hinges. You may or may not, at some point, to be able to model the door opening. You may want to make the cabinet a single door or later easily modify it to be a double door (with two knobs). You may wish to copy the knob design and use it for the drawers which you will be modelling later. In this case, you would want to define at least three vertex groups: Base, Door, and Knob. If you were writing a user manual, you would want your example to contain each possible group for maximum re-use and selection, as shown.

Access the group list by clicking the list selector button next to the group name. Select a group by clicking on any named group.

[edit] Assigning Vertices to a Group

Mode: Edit Mode

Panel: Editing context (F9) → Link and MaterialsVertex GroupsAssign

Hotkey: CtrlGAdd Selected to Active Group

To add vertices to a group you do the following:

  1. Select the group you want to work with from the group list.
  2. Use your mouse to ⇧ ShiftRMB File:Template-RMB.png select more vertices that you want in that group.
  3. LMB File:Template-LMB.png click the Assign button, or make CtrlGAdd Selected to Active Group.

Keep in mind that a vertex can be assigned to multiple groups.

Note
When using the Assign button to assign selected vertices to a vertex group, any vertices that were already in the vertex group are not removed, so Assign adds extra vertices to the selected vertex group.


[edit] Seeing a Vertex Group

Mode: Edit Mode

Panel: Editing context (F9) → Link and MaterialsVertex GroupsSelect

From experience, we have found that is is best to start first by seeing the existing vertices in a group, before adding more or removing some. To do this, de-select all vertices by pressing A once or twice in the 3d window until the User Preferences header shows “Ve:0-x”, where x is the number of vertices in your mesh. This means that zero (0) vertices are selected. The Vertex count is located just to the right of the Blender Version.

Then, with the appropriate group active, press the Select button. In your 3D window, the vertices that belong to the active group will be selected and highlighted.

[edit] Removing Vertices from a Group

Mode: Edit Mode

Panel: Editing context (F9) → Link and MaterialsVertex GroupsRemove

Hotkey: CtrlGRemove Selected from Active Group/Remove Selected from All Groups

To remove vertices from a group:

  1. Select the group you want to work with from the group list.
  2. Select the vertices you want to remove from the vertex group.
  3. LMB File:Template-LMB.png click the Remove button.

Note you can remove selected vertices from all groups at once, using the Vertex Groups popup menu (CtrlGRemove Selected from All Groups).

[edit] Deselecting Vertices

Mode: Edit Mode

Panel: Editing context (F9) → Link and MaterialsVertex GroupsDeselect

Sometimes you will want to see if any vertices are still loners. To do so, select All the vertices in the 3D window. For each Vertex Group, LMB File:Template-LMB.png click the Deselect button to de-select the vertices in that group. Repeat the de-selection for each group. When you run out of groups, any vertices left highlighted are the loners. Sort of like picking baseball teams.

[edit] Deleting a Group

Mode: Edit Mode

Panel: Editing context (F9) → Link and MaterialsVertex GroupsDelete

To delete a vertex group, select it from the list and click Delete. Yes, it’s as simple as that. Any vertices that belonged to that group are unassigned from that group. However, please keep in mind that vertices can belong to many Groups. When they are unassigned from one group, they still belong to their other groups.

[edit] Using Vertex Groups in Practice

Assume you have defined the groups used in our cabinet example. Here are some examples of common things you might want to do involving Vertex Groups.

[edit] Duplicating Parts

You now want to make that cabinet a double door model:

  1. Select the cabinet object (RMB File:Template-RMB.png) and enter Editmode (⇆ Tab).
  2. Ensure that NO vertices are selected (Ve:0-x - remember?).
  3. Select the “Knob” vertex group from the dropdown menu.
  4. Click the Select button.
  5. Move your mouse into the 3D window.
  6. Duplicate that sub-mesh by pressing ⇧ ShiftD. The vertices are copied, selected, and grabbed.
  7. Move the mouse over to position the new knob.
  8. LMB File:Template-LMB.png to drop the sub-mesh.

The duplicated vertices belong to the same group(s) as their originals.

To assign this new knob to its own group, click New, name it something like “Knob.L” and click on Assign. See Creating a Vertex Group and Assigning Vertices to a Group.

Left and Right naming convention
Certain features of Blender can perform related actions on groups that are left and right counterparts of each other. If you end a name in “.L” or “.left” and its counterpart “.R” or “.right”, Blender may be able to easily mirror its actions for you. You can read more about the naming convention in Editing Armatures: Naming conventions. The convention for armatures/bone apply here as well.


[edit] Simplifying a Vertex Group

You may have correctly surmised that the original “Knob” group now has both sets of vertices: the original and the duplicated ones. You’ve created a “Knob.L” group, but there is no corresponding ‘right’ group. The “Knob” group really needs to be renamed and contain only the vertices for the right knob. To correct this,

  1. Ensure the new “Knob.L” vertices are still selected (the ones that don’t belong).
  2. Select the original “Knob” Vertex Group from the list.
  3. Click the Remove button.

To test your work, deselect all vertices and click the Select button. Only the vertices from the original knob should highlight. Rename this group “Knob.R”.

Repeat the above for the “Door” and “Hinge” group, and you now have a two-door cabinet model. Note that you will have to either make the doors narrower or cabinet wider to accommodate the new door.

[edit] Combining Groups

To create a “Knobs” (plural group), you could:

  1. Ensure that no vertices are selected.
  2. Select the “Knob.L” group (select its name from the list and click Select).
  3. Select the “Knob.R” group (ditto).
  4. Observe that selecting one set of vertices does not deselect the others; the selection process adds on vertices to the selection.
  5. Click the New button, and name the group “Knobs”.


[edit] Focus on a part of your model

You want to make an inset panel on the door. To work on the door sub-mesh without cluttering up your screen with all the other vertices, you would:

  1. Ensure that all vertices are selected (you can use A for that).
  2. Deselect the “Door” group by selecting its name from the Vertex Group list and clicking Deselect, leaving everything but the door selected.
  3. With your cursor in the 3d Window, Hide the selected vertices. Poof! They disappear.


[edit] Separating a part into its own

Now, the patent lawyer calls and says that you must patent your hinge design to keep anyone else from copying it; you need to separate the hinge out from the cabinet mesh:

  1. Ensure that NO vertices are selected.
  2. Select the “Hinge” vertices (select the name from the Vertex Group list, and click Select).
  3. With your cursor in the 3d Window, seParate them into their own object.
  4. The remaining cabinet vertices are left. ⇆ Tab out of Edit mode and RMB File:Template-RMB.png click the floating hinge object. Note that it is conveniently called “Cabinet.001”, and has all the same Vertex Groups as the original. Delete those groups you do not need, rename the object “Hinge”.

Parent it to the original (and now hinge-less) “Cabinet” object (include the parent by ⇧ ShiftRMB File:Template-RMB.png clicking the Cabinet, and pressing CtrlP). Now, when you move your cabinet, the hinges move with it.

[edit] Finding Groups for a Vertex

As you are rigging and animating the deformation of a mesh, you might need to find out which groups a vertex belongs to, and to adjust the weights of influence each group has on that particular vertex.

  1. Select the vertex.
  2. In Edit mode, press N to open the transform properties window for that vertex.
  3. Open the drop-down menu that shows all vertex groups to which it belongs.
  4. From this window you also can assign weights to the vertex for each group.


[edit] About Weight

By default, every vertex in a group has a weight of 1.00. If a vertex belongs to multiple groups, it has a combined weight. When influenced by a bone or other object, it is moved by an amount proportional to its weight; heavier vertices move less. So, a middle vertex belonging to two groups (each with a weight of 1.00) would move half as much as a left vertex that only belonged to one group. This weighting system provides realistic deformation of a mesh when bones move, for example, around the shoulder area, where some of the vertices belong to both the chest and the arm groups.

You can set the weight of all vertices in a group using the Weight numeric control. For more advanced weighting, please read Weight Painting. Weight Painting allows you to smoothly blend individual vertex weights so that meshes deform smoothly.