Blender 3D: Noob to Pro/Die Another Way

Video Tutorial
A video tutorial has been created for this chapter in Blender 2.48a.

It is compressed and packaged in the Theora (.ogg) video format and requires a player that is able to decode this codec in order to play it, such as the VLC player which is available as a free download for Windows, Mac, and most Linux distributions. Firefox 3.5 is also able to stream Theora video.

For best results, it is recommended that you save this file to your computer for viewing, rather than streaming it inside a web browser, since it is 1020 x 746 pixels.



Introduction
In the following tutorial you will be creating a die. You will use:
 * polygon mesh
 * face loop cutting
 * subdivision surfaces
 * subdivision creases
 * bevel
 * set smooth
 * multiple materials
 * extrusion
 * merge vertices
 * remove doubles
 * constraints

There are two methods to create the circles for the die: subdivide first, or manual sizing. In either case, start with the default Cube.

Subdivide First
The die needs to have a 3x3 matrix for the coloured dots (pips). A quick way to do this is to simply Subdivide the cube twice before doing anything else. The disadvantage may be that the spaces for the pips may not be exactly the size that you want. If not, see the next section: Manual Sizing of Pips.

Step 1
Hit tab to go into edit-mode and select all faces to prevent bevel messing up normals. Hit WKEY &rarr; Bevel, Recursion &rarr; 1 (you'll see why later) then choose bevel size (hit spacebar for manual input). Bevel of 0.150 is ok. Note: If you have chosen to subdivide the die twice, jump to Section "Creating Pips" and put bevel of 0.17 in order to have pip's edges length 0.34



Step 2
In editmode, go to the Editing tab (F9) and look at the  Mesh Tools 1  panel (Mesh Tools More in some versions). Turn on Edge Length and note the length of one of the sides of the square faces. This should be 1.7 if the above settings were used. Button "Edge Length" may be outside the screen so you may need to close another set of buttons before you can get to it. Or, you can use MMB to scroll over to see the Mesh Tools 1 panel (in later versions: Mesh Tools More) with "Edge Length" button on it. Or, you can zoom in and out in the menu window with CTRL and NUM+ or NUM- Or, you can press HOME when button window is focused to see all buttons.

Step 3
A typical die has a grid of 9 possible positions for the pips and the gap between the pips is the pip radius (or half the diameter). So, there are conveniently 10 units on each edge of the square faces, where the gaps use 4 of the units and the 3 pips use two each. This means the gaps are of size 1.7/10 = 0.17 and the pips (1.7x2)/10 = 0.34.

Step 4


Now it's time to subdivide the surfaces of the die according to the mathematics above. We'll do that using "edge loops" - additional edges you can add to existing objects.


 * Select axis aligned view: NUM1
 * Enter loop cut mode: CTRL+RKEY (OR KKEY→1KEY OR KKEY→Loop Cut OR CTRL+EKEY→Loopcut OR CTRL+EKEY→NUM5)
 * Select loops' placement: move the mouse around until you see a purple line going the right direction.

''Noob: What's "the right direction?" What should this thing look like after applying the loop/cut? HELP!''
 * Enter the number of loops: 9KEY (OR NUM9 OR SCROLL up 9 times OR NUM+ 8 times)
 * Add the loop: LMB (OR ENTER etc.) on one of the big faces

''Another Noob: It sounds like you have version 2.44 or later. You should do the tuturial "Die Easy"(seriously, it is).''

Now we just have to get rid of the 2nd, 5th and 8th loops to make the undivided spaces for the marks.


 * Select edge select or vertex select: CTRL+TAB→NUM2 (OR CTRL+TAB→Edges OR CTRL+TAB→NUM1 etc.)

Noob: It seems that I could not remove multi loops at the same time, since the error message kept bumping out. Another Noob: That happened to me when I tried to remove them all at once, but it worked fine when I removed one at a time. Change views with NUM3 and NUM7 and repeat steps as necessary. When you're done, your die should look like the one pictured to the right.
 * Deselect all edges with AKEY
 * Choose a loop to remove (using the BKEY to enter box selection mode and drawing a box around the one you want; this will get the whole loop, all the way around the cube). Spoiler: you can also use Alt-RMB on an edge to select a loop (or select the edge and click Select --> Edge loop).
 * Remove loop: XKEY→7 (OR XKEY→Edge Loop)

Creating Pips
The die needs the pips added. Everyone knows how the pips on a die look, right?

Extrude and Merge
(Note: This is Step 10) Select one of the faces where a pip would go and extrude the face by hitting EKEY and then ESC. Do not click after hitting EKEY. This actually replaces the first face with another one even though it looks like nothing has happened. Merge the second face by using ALT + MKEY to merge the 4 corners into the centre. It will tell you Removed 3 vertices. [User Note: To clarify, pressing ESC when extruding does in fact extrude the face as per usual, but by a distance of zero. This creates four new, infinitely narrow faces around the original square face. These four faces then get 'dragged' into the middle when the four vertices of the original square are merged into one. Test this by extruding by say, 0.01 (instead of pressing ESC), and you'll see the result is almost the same.][User Note: on my computer hitting ESC after the EKEY seemed to cancel the extrude and to get the correct result I had to hit the "ENTER" key after the EKEY] You should get the following:

Do this for the configuration of the dots on that side. So for example, 5 would look like this:



Notes :
 * You could create this pip spot on all 9 spots and copy this side of the die to the other six. The amount of time spent doing all of that may be just as long as doing each side individually. You would need to delete the other 5 faces, copy the dented face 5 times, place each face precisely by rotating and moving, and remove doubles.
 * (User comment) I accidentally selected some pip faces from the opposite side of the die (the side behind the side I was looking at). To prevent this, I selected Limit selection to visible (Occlude background geometry in 2.47) [[Image:BlenderCommonLSTV-on.png]]: which should be the second button from the right in the header of the  3D View.
 * Noob, 19th Oct 2008: You can save time by selecting all the 'pip faces' and extruding them simultaneously, ESC-ing immediately after you do so, like above. You'll still need to merge the four corners of each extrusion one-by-one, though, or you'll get some odd results.
 * Noob, 28th Dec 2008: You can save more time be extruding all faces simultaneously, as above, and then selecting "Collapse" rather than "At Center" while merging.
 * Noob, 02/02/09: I tried with the "Collapse" trick as well but all I got were just black squares.
 * Noob, 19/02/09: I got the black squares as well, but it is just a display problem. Press Tab twice (going to Object mode and back to Edit mode) and they are gone.

Create Pips
(Note: This is Step 11) Select one of the edges of the pips to check the size is 0.34. Remember the pip radius was 0.17. We need to use this value to lower the centre point of the pips. Select all the 5 centre points at once to save time and move them inwards by 0.17. The side I put the 5 pips on here was the top so I move the vertices inwards by pressing GKEY, ZKEY, -0.17 and hitting ENTER. I then get this:

(user comment) According to step 4 we are still in front-view (NUM1), but then the ZKEY modification gives undesirable result, changing view to top (NUM7) does the trick! This applies to blender version 2.44.
 * (response) Actually, at the end of step 4 it states to change to side and top view (NUM3 and NUM7) as necessary, so really there is no official view the tutorial left the user in. Also, in this step, the writer mentions they put 5 pips on the top.
 * (user comment) using YKEY instead of ZKEY is also fine.
 * (user comment) Depending on which axis it's supposed to be moved, use the ZKEY,XKEY and YKEY after the GKEY accordingly.
 * (user comment) Pressing ZKEY twice should move them along the normal, which should work no matter which faces are selected.
 * (user comment) I noticed a shortcut: When you extrude, extrude by -0.17 and then do the Merge -> Collapse. Then the point is already inside.
 * (user comment) I just noticed something different. If you extrude and collapse, after applying the subsurf, you got sharp edges of the pips than the pips I got in this tutorial way.
 * (user comment) In blender 2.49a there is an issue where when "Occlude background geometry" is on, sometimes you'll click a vertex and have a far away vertex clicked instead. Rotating the camera usually helps, and if you find your vertex isn't selected, but you know you clicked, clicking again will deselect whatever vertex you selected. Also a big issue with the extrusion - as with escape, right clicking to exit extrusion also creates an "unseen extrusion" . The "unseen extrusion" can be noticed - there's black dots in the middle of your square edges. This is caused by the 0-width faces being selectable (and therefore having a dot in the middle). I had to completely do-over my model because Remove Doubles _did not_ remove the extra vertices. This became noticeable when I would extrude and it would only extrude vertices.
 * (user comment): Don't collapse the vertices! In that case, the pits will be rendered badly. Collapsing removes four vertices, merging at the center removes three vertices --> so there is a difference!
 * (user comment): You can just have the pivot be Individual Centers and scale to zero, then you can remove doubles and it works out fine. That's the fastest way I can think of doing this.

Smooth Out
TAB out of Edit Mode. If you haven't done this already, hit Set Smooth in the Editing panel and turn on subdivision surfaces It should look something like this:

In present versions, you just need to use "Add Modifier" on the Modifiers tab (in Edit-mode), to add a SubSurf modifier. (Or press SHIFT+OKEY) In the image below Levels is set to 3.

Make Sharp Edges
On a die, the edges of the pips are usually sharp so we'll use subsurface creasing to do that. Go back into editmode and with the edge select mode on, select all the perimeters of the pips like so (it may help to turn off subsurf for the moment): Press SHIFT+EKEY to enable creasing and move the mouse until the display says crease is at 1. (to see the effect, you must have the subsurf modifier turned ON). After pressing SHIFT+EKEY, you can then set crease values in the information box that you get by pressing NKEY when objects are selected. This can be useful to check if all the edges have the right crease because it gives you the average crease value and if it is less than 1, there is an edge wrong. Newbie Note: Trying to crease all 6 sides of the die at once using SHIFT+EKEY and moving the mouse doesn't crease all sides of the die. Better to use NKEY, or do one side at a time.

Repeat
Repeat steps 10, 11 and 13 (that is Extrude and Merge, Create Pips and Make Sharp Edges) for all the sides of the die. REMEMBER, a die is numbered so that opposite sides add up to 7. In my example, that means I put 2 on the bottom etc. Once you finish, if you turn on subdiv level 2, you will get something like this: [User Note: Do you mean subsurf instead of subdiv?]
 * Noob note: On the side with 6 pips, I had a hard time getting the creases to work. It turned out to be because I selected in vertex mode when I selected the edges for creasing, and I tried to crease all 6 pips at once.  This put crease values on the short vertical edges between the pips, which messed things up.

(noobie) Some of my pips are square and I tried everything. What should I do? (noob reply) Maybe you had the vertex at the center of pips selected while creasing.
 * User Shortcut: To do them all at once with no repeating. However, order of operation has to change to make it work:
 * In Face Select mode, select all pip faces on all sides.
 * SHIFT+EKEY to crease the edges. (needs to be done before extruding, since extruding changed the selection)
 * EKEY -> Individual Faces then type -0.17 to extrude all faces inward.
 * ALT+MKEY -> Collapse will merge all the extrusions to their respective centers.

Camera Setup
You can make a test render now to see that the pips are the right size and that the bevel is right. So, turn the subsurf level for the rendering up to 3. To help position the camera so that you centre the die, you can make the camera look at the die by adding a track-to constraint to it. I prefer to track an empty though, because it is more flexible.

Make an empty by going into top down view (NUM7) and hitting SPACE &rarr; Add &rarr; Empty. (Noob note: If you can't find "empty" in the list, make sure you are in Object mode.) It's always best to go into one of the set orthographic views so as to align new objects to the axes. If you add something misaligned, just go to the object menu then clear/apply &gt; clear rotation (or ALT+RKEY). Because the empty was created at the origin, you might not be able to see it as it is inside the die. Hit ZKEY to enable wireframe mode and select the empty. Just move it outside the cube until we get the constraint set up. To add a track-to constraint, select the camera first then SHIFT+RMB the empty and press CTRL+TKEY and choose "TrackTo Constraint" from the list. Move the empty back inside the die. You can edit constraints in the object tab (F7). Add a couple of lamps (both intensity 1) to get the scene like this or feel free to experiment with a more advanced lighting setup:

Another way to position the camera is by selecting it and then looking through it as you move it. Look through the camera by pressing NUM0. Use the GKEY to pan across and rotate around the local axes of the camera by pressing say RKEY,XKEY,XKEY to rotate in X-axis. To zoom in and out press GKEY, ZKEY, ZKEY and then move your mouse forwards or backwards. Another useful keystroke (for pre-2.43 especially) to know is that when you are in camera view, pressing Gkey and then MMB, movement will be constrained to the way you are facing. The mouse wheel zoom moves your view towards and away from the camera, without actually moving the position of the camera.

You can also move the Camera in free "Fly" mode by going into the Camera view (press NUM0) and then Shift+F. Now you can "Fly" through the scene and use this setup the camera angle. Make sure that you keey the flying velocity very low by using the scroll wheels or -/+ buttons or the camera will be simply out of control.

Render
To render, set the size of the image you want. 800x600 is a decent size so put these settings in the format panel in the Scene tab (F10). In the render panel, make sure 100% is selected. If it's 50%, the render will come out as 400x300. For preview renders, don't turn on OSA, which is anti-aliasing because it slows your renders down significantly. Try to only use it for a final render.

Another important point is to set the image format. This is done in the format panel. The listbox has a number of image types. I find that png is generally the best because it is lossless and offers the highest compression among the lossless formats. It also supports an alpha channel for transparency. When rendering an animation, it is better to render as an image sequence than as a movie because it is easier to edit these and repair broken frames. Quicktime supports loading of image sequences and you can save as a movie using a wide range of compression formats. To save the render, go to the file menu → save image (Or press F3) and type in the full name of the image including the extension e.g. die.png. The output should now be looking something like this: [user note] To get such a nice render I had to bump the render level of subsurf up to 5, otherwise I get artifacts around the pips [user reply] If OSA is on for the final render, you'll get a nice render result as shown by the above figure with subsurf level 3. [user note] If you set smooth on the whole shape, you'll get artifacts around the circles. [user reply] To avoid artifacts around the circles, you'll have to turn on Auto Smooth

Multiple Materials


. . To give it some colour, we will need to use multiple materials because a typical die has pips that are a different colour from the die itself. In the Buttons Window  go to the Editing panel  (F9) again and make sure the die is selected. In the Links and Materials subpanel there is a section for materials (the right; the left one is for vertex groups) and the box left of the question mark should read "0 Mat 0" (the first number is the number of material links for this object; the second number is the number of the currently selected material link). The die may have more than zero materials if you had assigned materials to the object already. By pressing the New button add enough materials to make 2 in total.

Go back to the Shading panel (F5) and there is a box at the very top of the Links and Pipelines subpanel with the number 2 beside it. If there is no such subpanel select Material buttons (cycle shading buttons using F5 too). Click this number and select Single user in the dialog to make the two materials you've just created independent. Use the arrows on the left side of the box to switch materials. Note: If you do not see a 2 to the right of the material name, that means the material is already a single user material. To change it back you can click the button labelled F, but for this example, you do not want to do that. Note: There should be at least two materials now. One has the materials initial name the other has a number appended to its name (e.g. Material and Material.001). Use the Material subpanel to make material 1 bright red by just picking red in the colour picker (the rectangle to the left of the Col button) or by setting the RGB sliders (right of the Col button). Make material 2 white by doing the same. Or pick whatever colour you prefer and material settings. --MSK61 (talk) 11:27, 17 March 2008 (UTC): The colour picker is to the left(not right) of the Col button, while the RGB sliders are to the right(not left) of the Col button.

Note: It is possible that the two materials were not automatically linked to the material links of your die. If so use the Links and Pipeline subpanel to link the materials to the respective material links. First select the link then the material.

'' Note from noob: Using white as a colour will not let you spot a change in colour, since the default colour is white. For test purposes I recommend you choose another colour (e.g. blue), so you can avoid getting confused.''

'' Note from another noob: Actually (at least in blender 2.49), the default color is grey. To choose a white color, set all colors (R,G,B) up to 1.000.''

Assign Materials
These colours need to be assigned to the right parts of the die. Go into Edit Mode and turn off subsurf to make selecting easier. Do this in the Editing panels (F9) Modifiers subpanel. Right after the subsurf modifiers name there are three buttons (darkgrey). Press the rightmost to deactivate the modifier in the edit mode.

To make the die red
The entire die should now be red.
 * Select the entire die (AKEY).
 * Click the Editing button (F9).
 * In the Link and Materials panel, on the right-hand side you will see "2 Mat X" where X is either 1 or 2. Click the left/right arrows until you see the adjoining square to the left turn red. As you click on the arrows, notice that the label above "2 Mat X" changes from "Material" to "Material.001". These are the names of the materials that you created in the Shading (F5)->Links and Pipeline panel.
 * Click the Assign button (in the Material column, not the Vertex Groups column). The Assign button associates the selected faces with the selected material.

To make the pips white
Use the same method as above, but with only the inner faces of the pips selected and with the colour white.

There are a variety of ways to select the inner faces of the pips:

Pip Selection Method 1
Note: Here you may find Lasso Select useful.
 * Make sure you are in Edit Mode [[Image:BlenderCommonEditmode.png]] (TAB)
 * Select Face select [[Image:BlenderCommonFaceselect-on.png]]: CTRL+TAB&rarr;3KEY
 * Select Limit selection to visible [[Image:BlenderCommonLSTV-on.png]]: should be the second button from the right in the header of the 3D View
 * Go through the axis align views and select the faces:
 * Align view: NUM1 (CTRL+NUM1, NUM3, CTRL+NUM3, NUM7, CTRL+NUM7)
 * For each view, lasso select the pips' faces: hold CTRL and drag LMB around the pips' middle vertex (no need to press SHIFT, Lasso Select automatically adds the new faces to the previous selection).
 * If all went well you should be able to read Fa:84-449 in the User Preferences right after the Blender version number. (84 = 4*(1+2+3+4+5+6))

Pip Selection Method 2
Press CTRL+ALT+SHIFT+3KEY and every triangular face will be selected.(Every pip + The 8 corners of the dice. Just deselect the 8 corners and you're good to go!) ;-) Similarly, you can select quad faces using the 4KEY.

Pip Selection Method 3
You can also use circle select to easily select the desired faces. Enter circle select mode by hitting BKEY twice. The circle can be made bigger or smaller by using the scroll wheel. Drop out of the mode (RMB) to rotate the cube and drop back in as above. Selected vertices are added to those already selected like with lasso mode but without the need to keep holding the control key or draw an accurate lasso)



Turn subsurf back on (Modifiers panel→subsurf modifier→enable in edit mode) and render F12 with OSA (only put it up as high as you need for the resolution of the image you are rendering).

(Note: in Blender 2.44 you should use the Assign button in the editing panel (Link and Materials))

(another noob says: don't be fooled (as I was!) by the fact that there are TWO Assign buttons in this tab, you want the big one on the right under materials, not the small one on the left under Vertex groups!!)

Pip Selection Method 4
That's the easiest way: 1- select one of the triangles (the face) 2- Shift+Gkey, then choose perimeter or press 4NUM.

Extra
The reason I modelled the die this way is because it is also very easy to change the sizes of the components e.g. the bevel and the pip size. You do this by selecting the vertical or horizontal segments and just scaling them in one axis. Here we will reduce the pip size and the bevel by half. Go into front view (NUM1), turn off clipping (i.e., allow selection of invisible vertices) and select a line containing pips (i.e., Select vertices mode (CTRL+TAB+NUM1), and box select a thin vertical line of vertices to the left of a row of pips, then box select another thin vertical line of vertices to the right of that row of pips, making a total of 64 vertices). Then just scale in one axis e.g. SKEY, XKEY, 0.5. Remember to have your pivot point set to median:

Do this horizontally and vertically around the die. You should need to scale 9 times for the pips and 6 times for the bevel:

(Noob note: I find this confusing. what is a line containing pips?  does this mean a loop line?  Using alt-RMB no longer works to select a loop, but selects a single edge.)

(Noob response: he meant a pair of loops of vertices adjacent to a row containing pips. alt-RMB no longer seems to select complete loops - it works until it hits a pip and then it stops - but the box selection can be used.)

(Another Response: Any time you change the geometry of a shape you effect how the automated tools will work. Many dont work at all once you get to complex organic shapes, so its best to not rely on them too heavily.)

You may need to add extra geometry once you are satisfied with the sizes of the dots and the bevel so that the edges of the die don't look warped due to the subdivision. You can use face loop cut again for that and add extra lines in the middle of the gap segments.