So, use the Tab key to enter Edit Mode with the default cube still selected, and you'll see that the four edges straight lines and four vertices points at each corner that make up this p
Trang 1Figure 1.27: The Constraints panel in the Object buttons
You could have used the "Add Constraint" button in this panel to do the same thing you've just done in the 3D view, but you would have had to fill in the proper object name in the panel's
"OB:" field to get things to link up properly Using selections and the Ctrl-Alt-C hotkey builds the constraint for you automatically
Tip:
Ctrl-Alt-C brings up the Constraint menu, which adds a
constraint to the Active object, using the other selected
object as its target
What is the final effect? Move the new empty back to its original position (just using G to move
it by hand will surely be close enough, but if you'd like to practice your precision movement, you can always use the Shift-S snap method described earlier) Play the animation
The new Empty rotates, without any keys, so that it always points to ("tracks") the electron to which it is constrained Its child electron, in turn, follows the Empty's rotation, most likely
generating some neat orbital motion
Trang 2Finishing Up
Use Shift-1 (or Shift LMB on the layer 1 button) to add Layer 1 back to the display Play the animation to see it in all its silly glory While the animation is playing, you'll learn one more trick
Let the animation run, and as it plays, try using the MMB-drag in the 3D view that you've used before to rotate your view It works while the animation plays back! The other view translation controls work as well, although you'll have to use Ctrl-MMB for zoom, as the scroll wheel won't work in this mode
Now that you've made three protons, three neutrons and three electrons in orbit, you have
yourself a finished atom If you would prefer to have some more practice, add some objects to the nucleus and toss in some more electrons until you have the element of your choice
Rendering for Animation
In the Interface chapter, you rendered a still of the default cube which was, without a doubt, thrilling Since you've just animated a nucleus, let's render it and watch it move
On the far right of the 3D window's header (you may have to MMB-drag the header to see it) is a small Render icon LMB click it
Trang 3Figure 1.28: The Render icon on the 3D header
Almost instantly, the render window appears with a preview image of the Scene, drawn in
whatever style (solid/wireframe) and from whatever perspective the 3D window is using This sort of preview render (technically, it's called an "OpenGL" render) can be triggered from any 3D view by LMB on the render icon in its header
Now, Ctrl-LMB on the same render icon This time, the preview seems to animate, albeit slowly What it's really doing is creating 250 OpenGL preview images and saving them somewhere (secret!) on your hard drive If you don't feel like waiting for this to happen, you can cancel it (or any render, even one with a single frame) by pressing the Esc key
When it has finished making the preview renders, you can press the Esc key to go back to the main Blender window From there, find the Scene buttons (F10), and press Play
Trang 4Figure 1.29: The Play button in the Scene buttons
A new window opens and your animation will play in a continuous loop
Okay, that was the fast, crummy OpenGL preview render It's great for checking your animation
to make sure that everything is moving correctly, but not nearly suitable as a final product
Chapter 12 contains full instructions for rendering animations to disk, so we're just going to take
a shortcut here:
Zoom outward in the 3D view until you can see the Camera RMB select it Now, with the mouse still over the 3D view, press Numpad-0 to switch to the view from the camera
Trang 5Figure 1.30: The camera's view of the atom
The outer solid border in this view represents the camera object itself and should be pink If it's not, then you may not have the camera selected (just RMB on the solid border to select it) At the moment, your atom is most likely not in the center of the camera's view Press the R-key twice to put the camera into an "aiming" mode and fiddle around by moving the mouse until your atom seems to be reasonably in the center of things
Trang 6Figure 1.31: The camera is now aimed a little better
If you're up for it, and you have some time to kill, press the Anim button in the Scene buttons (F10) Blender will begin to actually render your scene, frame by frame Even on a speedy
computer, this will take several minutes, so go get yourself a drink
When it's done, press the play button again to see the finished, rendered animation
It doesn't look so hot, does it? Even rendered Don't despair - you haven't learned modeling yet,
or materials Or lighting for that matter But you know the basics of working with Blender objects and animation now, so the rest will come easily
Trang 7Chapter 4: Mesh Modeling Discussion
By Kevin Braun
Introduction
What is Polygon Modeling?
Polygon, or "Poly," Modeling is the process of creating a 3D model using basic 3D elements called vertices, edges and faces A vertex (more than one vertex are called vertices) is a point
in 3D space An edge is a line connecting two vertices Three edges together form a triangle face, while four edges together form a quad face Those triangle and quad faces of filled space are the polygons
Fig 1: A vertex, an edge, and a face
One of the main advantages of polygon modeling over other modeling methods is the ability
to easily add detail to specific areas without having to add more complexity to the rest of the model Other advantages include speed of rendering in real-time environments and relative ease of texturing
actually work in Edit Mode So, use the Tab key to enter Edit Mode with the default cube still selected, and you'll see that the four edges (straight lines) and four vertices (points at each corner) that make up this polygon are highlighted in yellow
Trang 8Tip:
The Tab key toggles between Edit and Object modes
If you press the A-key with your cursor in the 3D viewport, you can toggle between selecting
and deselecting all of the vertices in this object, just like you could when working with
multiple objects in Object Mode Putting an object into Edit Mode makes it function in many
ways like a mini-version of the whole scene - a lot of what you have already learned will
apply within this new, smaller scope
Make sure all vertices are deselected and then right click on the vertex in the upper left corner
to select just that one If you now right click on the vertex in the lower left corner, the one you
previously selected will become deselected and the lower one will now be selected You can
select (or deselect) multiple vertices at the same time by holding the Shift key down while
right clicking (RMB) on each vertex you would like to select
Tip:
In Edit Mode, selection works for vertices just like it does
in Object Mode: RMB selects, while Shift-RMB builds and
takes away from the selection
Fig 2
Deleting
Trang 9The next thing you'll need to know is how to delete a vertex First you'll want to get a good look at all the vertices that are in this object By pressing Numpad-5 you can toggle your view between Perspective and Orthographic view (see Chapter 2 for more on the difference) Switch over to perspective view and use the techniques you just learned to select all of the vertices except the one in the upper-most left corner and then press the Delete key (or the X-key) A menu will appear with a number of different options - this is where things start to differ from object mode Choose "Vertices" from the menu to delete the vertices that you have selected You may notice that a side effect of deleting the vertices is that the edges and faces are also deleted This is because the faces are made up of edges and the edges are made up of the vertices you just deleted Removing the vertices necessarily removed the other things they had built If you had chosen "Edges" or "Faces" from the Delete menu you could have
removed only the edges or faces respectively, leaving the vertices in place, but unconnected
Tip:
X-key or Delete key brings up the delete menu, allowing
you remove vertices, edges or faces
Fig 3.Ortho: Orthographic view
Trang 10Fig 3.Perspective: Perspective view
Tip:
Transform keys in Edit Mode carry over from Object
Mode: G-key (Grab), S-key (Scale), and R-key (Rotate), as
well as axis constraint shortcuts, transformation
manipulators and mouse gestures
Exact Positioning
Using the G-key is a great way to move things as long as you don't need to be precise In fact, most of your modeling will be done using this method However, there are times when you'll need exact positioning To achieve that kind of precision in Blender you'll use the "Transform Properties" panel To access the transform properties dialog make sure you have something selected (the remaining vertex in this case) and press the N-key
Trang 11Fig 4: The Transform Properties panel
In the Transform Properties panel you'll see that you have a number of different options Here you can rename your object by modifying the text in the "OB:" text field (the object in the example is named "Cube"), or place the object exactly where you want it by modifying the numbers in the various X, Y and Z text fields
To place the vertex in the exact center of the 3D workspace hold the Shift-key and click the LMB in the "Vertex X:" spinner control This makes the field instantly editable Type the number "0" and press Enter To complete the process, repeat these steps for the "Vertex Y:" and "Vertex Z:" fields For faster access to the Y and Z controls, you can simply hit the Tab key when you've entered your value in the X control When entering values into fields in Blender, the Tab key functions much like it does in other programs you might be familiar with, taking you to the next text field
Tip:
N-key brings up the transform properties panel for numeric
positioning
Trang 12The Extrude Tool
A vertex by itself will not show up in a render So what can we do with vertices? Combine them into edges (which still don't show up in a render) and then into faces Faces render There are several ways to create edges from a vertex
The easiest way is to extrude the vertex Extrusion is simply taking one thing, like a circle, and extending it into space Extruding a circle into space creates a cylinder Extruding a square creates a box Extruding a vertex in Blender will create another vertex and an edge that links them To do this, make sure the vertex is selected and press the E-key Now move the mouse around and you'll notice that you are moving another vertex, and that an edge attaches the two vertices like a string To place the new vertex where you want, press the LMB To add some precision to your placement you can hold the Ctrl-key while moving the vertex and it will "Snap to" the nearest increment in Blender units Of course, you could also use the
Transform properties dialog
Tip:
E-key extrudes vertices, edges and faces in space
If you need to create a whole chain of vertices, there is a simpler workflow than using the key for extrude With a vertex selected, clicking with Ctrl-LMB in the 3D view creates a new vertex at the location of the click, selects it and links it with an edge to the original vertex By holding down the Ctrl key and LMB clicking repeatedly, you can quickly build a chain of vertices linked by edges This fast extrusion feature will actually work with any mesh
E-selection: vertices, edges or faces
Tip:
Ctrl-LMB will automatically extrude the current selection
to the point of the mouse click
Another easy way to create an edge is to duplicate a vertex by selecting a vertex and pressing Shift-D After using the LMB to place the duplicated vertex, Shift-RMB selecting the original and pressing the F-key will create an edge between them
Removing Extra Vertices
There are many cases where you may end up with vertices that occupy nearly the same space You may have imported a mesh model from a CAD program that has portions of the mesh duplicated in the same spot as the original You may be trying to join two parts of a mesh into one, scaling vertices toward each other until they occupy the same point In any of those cases, you need to remove the extra vertices and join the edges and faces that they help to define
To remove extra vertices and join the edges and faces that they build, select the vertices in question and press the W-key, choosing "Remove Doubles" from the popup menu that
appears Remove Doubles works with a distance threshold value, adjustable in the Mesh
Trang 13Tools panel of the Edit buttons (F9) with the Limit spinner, so you can, for example, select all vertices in the entire mesh and use the function without fear that it will remove all but one of your vertices
In the illustrations, you see two halves of a cube, separated, then with the vertices scaled together
Figure PMD.045.1, 2: [no text]
Although the vertices occupy the same space, the edges and faces they build are not
connected, and will render with ugly lines at the gaps As you can see in the next illustration, the vertices are still independent, and can be selected and moved apart from each other
Trang 14Figure PMD.045.3
Once the vertices of the cube have been selected and the Remove Doubles function has been used, the vertices are merged into one, and the edges and faces they build are now truly
connected
Trang 15Figure PMD.045.4: With the vertices joined into one, the two halves are now one continuous mesh
Tip:
Remove Doubles, from the W-key specials menu and Mesh
Tools buttons, merges vertices that are very close together
A common technique is also highlighted in the next example When trying to get vertices close together for a merge, it is often easier to use the Scale command (S-key), scaling them down to 0 with the help of the Ctrl key, than it is to move one (G-key) and trying to line it up with the other on screen
Trang 16Fig 5
Working with an Edge
With edges, the same rules and methods that you have learned with vertices apply, plus more You might be wondering why working with an edge (or face) is important since you already know how to work with vertices By being able to work with all three, you will be able to take full advantage of Blender's tool set and learn to work as efficiently as possible
Selecting
Blender has tools made just for selecting edges To activate Edge select mode, click the icon
on the 3D header that looks like a diagonal line It's between the Vertex select (four dots) and Face select (triangle) icons Once Edge select is activated, you'll be able to RMB click
anywhere along the edge to select it To select multiple edges, you can hold the Shift key while RMB clicking on other edges
Fig 6
Trang 17Blender also has tools for selecting multiple edges Under the Select menu on the 3D header, you'll see the Edge ring and Edge loop options These can be used to easily select complex groups of interrelated edges, and are especially useful when working with character models
In the case of this head model, Alt-RMB selects the loop of edges that runs around the mouth, giving the modeler easy access to this crucial area Also, Ctrl-Alt-RMB will select the
corresponding ring of edges, in case the modeler would want to cut a new loop of edges through them to add, say, a crease to the face
Figure PMD.07.1: Edge loop selected around the mouth