Tuesday, 31 March 2015

Blender: The Essential Hotkeys

In today's tutorial we talk about what I consider to be the essential hotkeys that every novice Blender user should learn and start to practice with as much as possible. The sooner these become second nature to you, the sooner Blender will start to feel comfortable.

Blender has an immense number of hotkeys, and many of the are context-sensitive. A hotkey that applies in Edit mode might do something else entirely when working in a different mode, or might perhaps do nothing. Those are ones that we tend to learn if we're working a lot in those modes but aren't as useful to learn as ones that apply far more generally or are very commonly used in multiple modes.

The hotkeys are also sensitive to the location of your mouse pointer. When you use a hotkey assignment the first thing Blender often does is check its location since a hotkey combination for one pane might do something completely different in another. The only way Blender knows which action your hotkey is supposed to initiate is to take its cue from where your mouse is.

From an Opensim content creator's perspective the number of really essential hotkeys becomes quite small since we're only typically using a very small subset of Blenders features: the ones that apply to modeling (Edit mode) and assembling things (Object mode).

This is less of a tutorial and more a list of the hotkeys that I use constantly and think would benefit a notice to learn as soon as possible. By no small coincidence, they're the letters on my keyboard that are almost completely worn off. I won't explain in detail what each one does or all of the options associated with it since those are usually each an entire tutorial worth of content unto themselves. I've also omitted many I use because they'd likely be less commonly used by most people.

This is intended more as a reference to useful hotkeys, but will also serve nicely as a list of "if I don't know what this means then I should probably learn about it because it's something I might want to be using a lot" subjects.

This is by no means a comprehensive list and you may find that the kind of things you're interested in creating might use other hotkeys that I haven't listed here (and don't often require the use of some that I have). If you find yourself doing something via the menu on a regular basis, look at the menu labels because often there will be a hotkey associated with that action and it will be displayed after the menu item name. Many won't have a specific hotkey but might have a hotkey to rapidly display that submenu which will be placed at the current location of your mouse.

If there's something you find yourself using all the time but doesn't have a hotkey assignment, you can almost always use the User Preferences to assign it one.

Here's the list of the hotkeys I most often use when doing general content-creation:

Universal Hotkeys

The first group of hotkeys we'll look at are ones that are more or less universally available in all modes -- or almost all modes that a beginning user is likely to be in.

Hotkey: assorted numpad keys

What it does: rapidly switch to a specific view

I've talked about the assorted numpad keys in the Baby Steps I tutorial so I won't go into any detail about them here other than as a reminder that:
  • numpad5 toggles between perspective and ortho view mode
  • numpad1 and Ctrl+numpad1 is front and rear view
  • numpad3 and Ctrl+numpad3 is left and right view
  • numpad7 and Ctrl+numpad7 is top and bottom view

Hotkey: Ctrl + S

What it does: saves your file
I guess I really don't need to explain why you might want to use a hotkey to save your file periodically. Blender's propensity for crashing is far less now than it used to be, but it can still happen so don't let too much time elapse between saves. Whenever I've finished any major bit of modeling I save. I also save before I start to use a feature that I'm not entirely sure about. I also save immediately before I start to work with materials to do their UV-mapping and then once I'm happy with my results I save again. Heck, if the dog barks, I save.

You can also do this via the "main" Info pane's menu using File > Save. If you look at the menu you'll see that each action that has an associated hotkey will display the combination in the menu as well. Related actions are Shift + Ctrl + S to "save as" and Ctrl + Alt + S to "save a copy" which I generally don't use nearly as often so I'm more likely to use the menu to access them.

Hotkey: A 

What it does: acts as a toggle between select all visible and select none

If you currently have nothing selected in a scene, using this hotkey will select all visible objects in all visible layers in the scene. By "visible" I mean unhidden, so this can select things that aren't in your actual 3D view at the moment provided they're not hidden.

The only visible objects this won't select are ones that are locked, which you can do by toggling the object's little arrow in the Outliner pane. Anything that's hidden is also protected from selection.

If you currently have 1 or more items selected, the hotkey becomes "select none" so nothing is selected at all in the scene. You'll frequently finding yourself hitting the A key twice...once to deselect a few things you've selected and then once more to select everything.

This hotkey applies in almost all modes that are relevant to an Opensim content creator. The only times it won't work are when making a selection of any type is impossible. Any objects on hidden layers are ignored.

Hotkey: H, Shift + H, and Alt + H

What it does: this trio of hotkey combinations hides and unhides things in visible layers

The basic "H" hotkey tells Blender to hide whatever objects (or in some more the faces/edges/vertices) you currently have selected in a scene. In object mode it has the same effect as clicking on each selected object's little eyeball icon in the Outliner pane. Once an object is hidden it can't be selected, can't be changed by any on-screen actions, and also isn't blocking your view of something else you might want to work on.

Shift + H will hide anything in the scene that isn't selected. Sometimes if faster to select the thing(s) you want to work on and then use this to quickly hide everything else.

Alt + H unhides and immediately selects anything that is currently hidden on the visible layers. It won't unhide layers or unhide anything on those layers. This can be an extremely handy way of making a complex selection by:
  • start by unhiding everything (Alt+H)
  • Select none (A) just to make sure you don't have anything selected
  • now start to make your desired selection, hiding (H) it each time you've selected a part that you want to have as your final overall selection
  • keep selecting and hiding (H) more bits
  • once you have everything hidden that you want as part of your final selection, make sure you have nothing selected (A if necessary)
  • now unhide (Alt + H)
  • everything you have been hiding will now be unhidden and selected and is ready to work on.
  • (optional) you can now use Shift+H to hide everything else if you don't want it in the way
This trio of hotkeys will be in constant use in almost all modes you're likely to work in.

Hotkey: Ctrl + I

What it does: invert your current selection

This hotkey inverts your selection by de-selecting anything currently selected, and selecting anything visible in the scene that isn't currently selected.


What it does: activate bounds (rectangle) selection mode

I described the bounds selection method in the Baby Steps II tutorial so I won't detail it here.

Hotkey: C

What it does: activate circle selection mode

I described the circle selection method in the Baby Steps II tutorial so I won't detail it here.

Hotkey: Tab

What it does: toggle from your current mode to Edit mode

You'll be going in and out of edit mode all the time when you're working with things so the Tab hotkey will save you from having to keep using the 3D View pane's mode-selection drop down box nearly as often. It might seem like a small thing since it's so readily accessible down there already, but you'll be amazed how much you'll come to rely on it.

When you're in Edit mode, pressing Tab returns you to whatever mode you were in previously

Hotkey: X  or Del

What it does: delete the selection

Pressing either the X key or the Del (delete) key on your keyboard will delete the current selection. By default a little box pops up at the location of your mouse asking you to confirm that you really want to do this.

Hotkey: Z

What it does: toggle into wireframe view and then (annoyingly!) toggle back only into solid view

I frequently need to switch to wireframe view when modeling so the existence of this handy Z hotkey is very nice. Unfortunately I also do a lot of my modeling in texture view rather than solid view but when you press Z again it only toggles you back into solid view display mode. That's on my pet list of things I with Blender would tweak, having it return you back to your previous view instead.

Main Transform Hotkeys

This next group of hotkeys are all ones that we'll be using constantly when modeling and are applicable to both Object mode and Edit mode unless otherwise specified. These are your go-to transformation tools to move, rotate, and scale objects or selections. If you start working with animations, they're also applicable to an armature in Pose mode.

These key are used to initiate the transformation. For each I indicated "and friends" because the hotkey can then be followed by additional keys to change the way it behaves -- what I consider highly user-friendly complements to the key.

If you've swapped your mouse buttons as I suggested in my other tutorials, when you've initiated a transformation the left mouse button becomes the "confirm" button and the right mouse button is the "abort" button. If you're using Blender's highly counter-intuitive default mouse button settings it's the opposite. You can also confirm using your keyboard's Enter key and abort using the Esc key.

Each transformation works in roughly the same way:
  • you initiate the action
  • the selection will now transform based purely on the movement of your mouse (with no keys or mouse buttons being held down)
  • optionally, while an action is "active" you can enter additional key strokes to limit the axis or specify the amount of a transformation
  • once you see the desired change on your screen, confirm to finish the action.
  • if you change your mind you can abort at any time and the selection will return to exactly the way it was when you started
You can use buttons on the toolshelf to initiate these transforms as well, but you'll find this a lot less convenient because the instant the button is pressed the action is active so the object will begin to change as you move your mouse from there. The same is true if you initiate a transform from the menu system.

In the Baby Steps III tutorial we also looked at a set of icons on the 3D View pane's menu bar that provide you with handles that you can drag around the screen to accomplish these same transformations without needing to initiate them or confirm them. Simply grab the handle and when you're finished, release it.

Regardless of which method you use, once you confirm a transformation you will see details of what you did appear in the "most recent action" part of the toolshelf. You'll then be able to change values and/or options there to further refine or fine-tune the action. Remember that as soon as you do anything else you'll lose that ability.

The context settings of the transformation can be quite important(we talked about those a bit in the Baby Steps III tutorial as well) but are also usually amongst the options you can subsequently change in the "most recent actions" panel.

Here are the "big three" transformations:

Hotkey: G (and "friends")

What it does: initiate the grab (move) transformation action

Blender uses the term "grab" to indicate moving something around and usually only uses the term "move" to refer to moving an object from one layer to another. This is why the hotkey is the somewhat less intuitive "G" key but you'll be doing it so often that you'll cease to think about that pretty quickly.

After pressing G you can then (optionally) press the X, Y or Z key to restrict the movement to only that axis (so G X will limit the movement to be only along the x-axis). You can follow this up with a numeric value as well to specify the exact distance to move. "G Z 1.3" would move the selection exactly 1.3 Blender units along the z-axis.

The context settings tend to be slightly less important for this transformation than they are for the other two, but are still extremely powerful in some specific situations. Most of the time you'll use the defaults and this will behave exactly as you'd expect it to in-world.

Hotkey: R (and "friends")

What it does: initiate the rotate transformation action

The second of the "big three" transformations, rotate does exactly what it says it does: rotate the selected object(s).

Just as with grab, you can (optionally) follow the R with the letter X, Y, or Z to limit the rotation to only that axis, and then also a value it you wish to. "R Y 90" would rotate the object by exactly 90 degrees on its y-axis.

The context settings are extremely important (and powerful!) for this action; in particular what setting you've chosen as your center of rotation as well as which orientation to use. Using the default values for both will make it behave the way you'd expect it to in-world but you can rapidly accomplish some rather complex rotations using other settings (ones that would take you a considerable amount of time, a calculator, and a good grasp of trigonometry to do in-world).

Hotkey: S (and "friends")

What it does: initiate the scale transformation action

Gosh, I'd kill to have this rapid and easy ability to scale object and groups of objects in-world with the kind of precision that Blender allows.

Just like the other two, you have the option to follow this up with an axis letter to constrain the scaling to only that axis, and can specify a numerical value to scale by. "S X 2" would scale an object by doubling its size on the x-axis only. If you don't specify an axis you can still specify a value to have the entire selection scaled on all axes by that amount, so "S 0.9" would make the object 10% smaller.

As with rotate, the context settings are quite important and allow you to rapidly do things that would otherwise take you much longer to accomplish in-world.

Hotkey: M (in Object mode only)

What it does: initiate moving the currently selected object(s) to a different layer

I include this one in this section even though it really isn't a transformation...it's simply the hotkey you use to move one or more objects from their current layer to the identical location of a different layer. This hotkey is only available in Object mode and in some other modes the M key has a completely different function.

Pressing the hotkey initiates the move, displaying the small grid of 20 layers immediately beside your mouse. Click in the box for the layer you'd like the objects to move to or move your mouse anywhere outside the grid box to abort.

Edit-Only Transformation Hotkeys

There are at least three more hotkeys you'll probably tend to use quite often when modeling. These initiate additional types of transformations that are only available to you when you're in edit mode. Some of these also have "friends.".

hotkey: F

What it does: fill a face or edge

The exact effect of this depends on what you have currently selected and whether you're in vertex select, edge select or face select mode. There are far too many variations of effect to even list them all here, but you'll very commonly need to connect or fill things in a mesh as you're modeling it. This is the fastest and most common way to do it.

Hotkey: J

What it does: join two or more selected vertices

Again, the exact effect will vary a little depending on what is currently selected but the general function is to join the vertices with edges across existing faces. This won't bridge gaps (use fill or another connection method to do that) so a connecting face must already exist for this to work.

Hotkey: Shift + V

What it does: initiate the edge-slide transformation

Edge-sliding is a common modelling technique allowing you to "slide" vertices (or edges) along the existing shape of the mesh without drastically altering its shape. It is usually used to help even out the topology of a mesh (the overall spacing of things) in problem areas in an attempt to smooth or even them out in small areas. There are other tools to facilitate this for large areas which you'd typically use first, then come back to the problem spots and adjust them manually using edge slide.

This is one of those transformations that you'd almost never initiate in any way other than via hotkey because you'll first select the vertex (or edge) and with your mouse still in that exact position you'll initiate the transformation and then slowly move your mouse along the line of one of the edges associated with that vertex. The vertex "slides" smoothly along the edge keeping the overall shape of the geometry approximately the same.

You likely won't use this a lot at first but as you make the transition from beginner to somewhat more advanced modeling, you'll begin to use it all the time.

Hotkey: Shift + D (and "friends")

What it does: duplicates the selection, making a complete, separate copy of it

If you need to make another copy of something this is by far the easiest. Simply select whatever you want to duplicate, then shift+D to do so.

This also immediately selects your newly created copy and automatically initiates the grab (move) action to allow you to position them somewhere else if you like (essentially as though you'd pressed the G hotkey). If you'd prefer to rotate or scale your copy instead, press R or S. You can then follow any of these up with the standard set of "friends" options for those three actions to restrict the axis of the transformation and/or to specify a numerical amount.

In Object mode you will see new copies of the select object(s) created and added to your Outliner pane. The name will be identical to the source object(s) with a numerical suffix added to it since no two objects can have the same name. All properties of the objects are duplicated including using the identical materials, UV maps, modifiers, etc. They are, in all respects, exact copies.

In Edit mode the selection is duplicated in much the same way but remains part of the same object. This doesn't create a new object from that selection (there's a different method used for that).

Hotkey: E (and "friends")

What it does: initiate the extrude transformation action

Extruding faces and edges is quite possibly the action used more than any other when modeling anything other than the most basic shapes. Loosely speaking you select an edge or face (or a bunch of edges or faces) and then "extrude" them in a direction. This leaves behind your originals and places a new set of identical ones in the new location while at the same time joining each new one to its original and filling in the necessary faces. Here's an example of a simple sphere where I am extruding a set of faces:

Once extrude is initiated you use you mouse to position the extruded part wherever you like and to assist you with this you can:
  • press the X, Y or Z key to limit the movement of the extrusion to that axis
  • after pressing X, Y, or Z you can then also specify a numerical amount for the distance to extrude, so "E Z 0.3" would extrude the selection and move the new section up by 0.3 Blender units (that's exactly what I have done in the picture above).
  •  rather than moving, you can extrude and then immediately follow that up by pressing the S key to initiate scaling of the extruded section (after pressing S you can then also use any of the "friends" of the scale action so "E S Z 0.5" would extrude, and then immediately scale the new part by 50% on the z-axis)
  • rather than moving you can extrude and then immediately follow that up by pressing the R key to initiate rotation of the extruded section (again, with all "friends" options of rotate being available)
(Effectively you can think of initiating extrusion as also automatically pressing the G key for you immediately afterward since that's the most likely transformation you'd do, but if you'd prefer to do one of the other two you can switch to that instead)

Yet again, context settings are extremely critical for extrusion operations and there are a variety of additional options available.

Hotkey: Ctrl + R (and friends)

What it does: initiate the loop-cut transformation action.

Loop-cutting is a modeling technique used to help create good topology and/or additional detail on a mesh. This only works in edit mode and only works with quad faces (regions of the mesh where all faces are 4-sided). It subdivides a single row of faces into a number of evenly-spaced sub-rows.

In the above picture you can see me in the process of loop-cutting that newly extruded section of my sphere. This will give me new geometry to work with if I want to make a fancy shape to the area.

Loop-cut is a multi-step action:
  1. initiate the loop-cut transformation action
  2. use your mouse's scroll wheel to change the number of cuts from the default single cut to as many more as you need...by default these will be evenly spaced cuts
  3. position your mouse over an existing edge of the mesh to determine where the loops will be cut
  4. once the cut location and number are correct, confirm once
  5. the newly cut edges are now immediately selected and edge-slide action is initiated for the entire selection
  6. you can now move your mouse to help position the loops where you want (if you don't want them evenly spaced and centered)
  7. during this step you can also use S to scale the newly-created loops
  8. during this step you can also use R to rotate the newly-created loops
  9. once all of this is finished you confirm a second time to lock in the results and return to normal edit mode
  10. don't forget that there are even further options then available in the "most recent actions" section of the toolshelf

Hotkey: Ctrl + numpad+ and Ctrl + numpad-

What it does: expend or contract a selection

We talked about expanding and contracting selections in the Baby Steps III tutorial so I won't go into any details of it here.

Hotkey: ALT + mouse-select

What it does: select a loop of edges or faces depending on selection mode

We talked about selecting loops of edges and faces in the Baby Steps III tutorial so I won't go into any details of it here.

Monday, 30 March 2015

Blender: Baby Steps III

In this third installment of the "baby steps" novice Blender tutorials we focus our attention on the jam-packed bottom menu bar of the 3D View window and revisit the subject of making selections in edit mode.

In the previous tutorial we briefly touched on the 3D View pane's bottom menu bar and talked a little bit about the "modes" we expect to be working with when creating content for Opensim. Blender behaves quite differently in each mode so it's important to know which one you're in at all times. At least initially, the vast majority of your work will be done in either "Object Mode" or "Edit Mode" so the first little drop-down box of the pane's bottom menu will tend to serve more as a visual confirmation of your mode rather than as the mode selector that it is. You'll do most of your toggling between Object and Edit modes using the "tab" hotkey instead.

"Mode" is an over-used word in Blender in the sense that it gets tacked on to the end of a lot of other words. When someone says "Mode" by itself, or prefaces it with the name of one of these, this is the mode they're referring to (what I think of as "main" modes).

It's also common to see the term "display mode" which I suppose is more of a misnomer. Everyone uses the term but it's more correctly called "display method" and is selected using the second little icon on this bar. Clicking it reveals a drop-down box offering you a number of options.

If you've set Blender to use the Cyles Render engine (as recommended) then for Opensim content creation we will spend almost all of our time using only three of these: texture, solid or wireframe. The display mode has absolutely no effect on what you export. All it does is change the appearance of your objects when you're looking at them in Blender.

The subject of texturing in Blender is a lengthy one so we'll save it for another series of tutorials. The basic idea, though, is to set up "materials" for the various surfaces of your mesh. Each material can be given a plain solid appearance (like putting a "blank" texture on a prim) and then tinted to whatever colour you want. You can also assign it an entirely different texture, as I've done above by giving Suzanne some fur, and putting different floral fabric patterns on each face of the cube.

To make it very easy to spot and work with various materials, I tend to use light and vibrant colours for my "solid" assignments and will work with them in "solid display mode." When I then move on to working in more detail and precision with the actual textures I want to put on the object, I switch into "texture display mode" to be able to see the effects of my work immediately on screen. When I'm editing an object (and in a few other cases) I'll sometimes switch to wireframe mode which can be more convenient in many situations. The above picture shows you the same objects in all three display modes.

Let's now hop to the opposite end of the menu bar where we see six little icons that I didn't label in this tutorial's first picture. The two on the extreme right relate to rendering which doesn't apply to us as Opensim content creators. The next two change the "snap" settings which are roughly analogous to the "snap" steps in your viewer's editor except with more control. I rarely use them, personally, preferring to work with numerical precision instead. The next little button acts as a toggle to enable and then select between various "proportional editing" options and those aren't something you'll likely use until you're a considerably more advanced user. The sixth relates to cameras which you won't use except for a few special (and advanced) operations.

This brings us to twenty (20!!!) little buttons: your layers.


If you've used Gimp or PhotoShop, you almost certainly already know what a layer is except that layers in Blender are much less complex. A Blender layer from our perspective is simply a very convenient method of organizing multiple objects to make them a bit easier to work with. You might want to think of them as having a bunch of windows open on your computer, all running the identical program and all simultaneously working on the same file and with the same view.

Each object you create in Blender can be placed on any one of these 20 layers and later moved around at your convenience. You can pick which layers to show and which to hide. The ones that are showing are combined to present you with a single view on your display, and anything that's hidden is temporarily invisible (much like clicking the little eyeball beside an object in the Outliner pane). If it isn't visible, you can't accidentally select it and it won't obstruct your view of the thing you're working on.

To see a layer, simply click on its little box here. If you hold down the shift key when clicking it adds that layer to your view. If you do that same again, it hides it again. A visible layer's box is shaded dark grey and a hidden layer is shaded light grey so in my pictures, above, I've selected both the first and second layers and none of the others.

Any layer that has 1 or more object sitting on it will have a dot inside its little box to let you know that it isn't empty. If you look closely at my pictures, you'll see a dot in each of the first three layers' boxes. That's because I put Suzanne on layer 1, then I placed the cube on layer 2, and finally I put a sphere on layer 3. I wanted to show you the monkey and the cube so I shift-clicked on their layers to display them, and I left the third layer with the sphere on it hidden.If I wanted to do some work on Suzanne, that cube might get in my way (visually) so I'd just click on the 1st layer to select it and automatically hide everything else.

There's no limit to how many objects you can place on a layer and for the time being simply use them as a convenient way of managing multiple objects. When you begin to use some of Blender's more advanced features there are some operations and controls where the layer arrangement becomes more important but these will rarely be used for Opensim purposes.

Blender loves using hotkeys so of course layers have them too. To pick a layer use the corresponding keyboard number. For layers 11-20 you hold down the ALT key and then a number, where ALT+1 is layer 11, ALT+2 is layer 12, etc ...up to ALT+0 for layer 20. If you want to add a layer to the view rather than switch to it, hold down the shift key and then press the layer number you want.

When you switch into edit mode you are only working on the current primary selected object and the layers buttons all disappear. I find this a bit of a nuisance and am not sure why Blender chose to do this since they stay there in all other modes. Luckily the hotkeys all still work provided you're able to remember which layer contains the stuff you want to show or hide.

Transforms Buttons

Although I've labelled them separately in the picture at the beginning of this tutorial, the pivot center, transform maniputors, and orientation buttons are all related to the same subject: transformations. That's Blender's fancy word to lump three very common types of actions together: move, rotate, and scale. When you move something, rotate it, or scale it, you're "transforming" it.

It's possible you might not see exactly the same thing as shown in this picture since the first of the four transform manipulator buttons (the one I call the "transform control visibility toggle) acts as a toggle and, when off, will hide the three buttons beside it. To the left of this group of four buttons are two more -- one of them that's actually a drop-down box -- that also relate to transformations, as does the drop-down box to their right. Those outer three change the "context" of the transformation while the ones I've highlighted in this little picture control the type of transformation.

About 90% of modeling involves transforming something, or part of something, so we're going to be transforming a lot. The easier we can make this, the better, and the four "type" buttons are one "quick" method that Blender makes available to you.

The toggle button turns the capability on and off. When off, your selection won't have any "handles" on it at all but you can still move, rotate and/or scale it using another method (buttons in the toolshelf, hokeys, or via the menus). When on, a set of handles appears at your current selection and you can simply click and drag on a handle to do the transformation. You'll know which type of transformation it will do based on which of the other three buttons is highlighted which in turn changes the shape of the handles displayed on your screen.

Move, which Blender also likes to call "grab", uses handles that look like the ones you're familiar with in your Opensim viewer: red, green and blue arrows pointing along the x, y, and z axes. If you click on the red arrow and drag it, you'll move the selection in the x-axis direction just like you would when building with prims.

When you switch to rotate as the transformation type, Blender uses arched handles that, again, look like the ones you see when building with prims. Click on one and drag to rotate your selection on that axis.

The scale type of transformation is one that you don't see when building in-world. It as handles with little cubes on the end instead of arrows, letting you click and drag to scale your selection along that axis.

All three types of transformation are available to you at all times via the other methods. This is simply enabling the quick transform handles and then setting their type so you have yet another method ready and waiting for you to use.

Blender is quite a bit more sophisticated with transformations than Opensim allows you to be and that's the purpose of the "context" settings of the other three buttons. I won't go into detail about them here but if you've done a lot of building in-world you'll be familiar with "global" vs "local" transformation orientation. Blender offers a few more choices for that. The most basic choice is "global" since it will be the one you're most familiar with from in-world building.

Blender also allows you to assign a "pivot center" for your transformation which is something you don't have the luxury of doing when building in-world but once you see what you can do with it I'll bet you really wish you could. The default "bounding box center" choice is the one -- and only -- one you get when building in-world so if you're experimenting with them and forget which one to go back to, that's your go-to choice. The toggle for manipulating center points you'll usually want set to the off position.

When you set a context, that same context is applied to all methods of transformation, so if you use toolshelf buttons, hotkeys or menu they'll be applied to those as well.

All of this is available to you in both object mode and edit mode. When you're in object mode the transformation is applied to the entire object. If you have multiple objects selected, it applies to all of them and the context can affect how their relative transformations occur. When you're in edit mode the transformations only apply to your current selection...which brings us to our third and final discussion about making selections...

Selections - Part 3

When you switch into edit mode (hotkey: tab) there's an extra consideration involved when making selections and some additional options for making those selections, but it's easier to explain by taking you through it step by step so you can see it in action.

Just to practice a little bit of what we learned today, let's leave anything you happen to already have on your screen where it is and pick an empty layer for this demonstration. In my case the first layer I don't already have anything on is the 4th one, so I'll click on its box in the menu bar to select it. If you don't see those layers boxes that means you're in edit mode and need to use the tab hotkey or the mode select drop-down to return to Object mode.

Now we want to add a new mesh cube. Any time we add a new object to the scene we must be in Object mode and Blender will initially position the object based on the location of the 3D cursor (the little red and white target circle). If you've moved your 3D cursor away from the center of the screen, bring it back to the <0,0,0> position using the menu command "Object > Snap > Cursor To Center". That's where our new cube will be added.

Adding a new object like a cube can be done in one of two ways: use the menu to "Add > Mesh > Cube" or use the toolshelf (hotkey T to display the toolshelf if it's hidden) where you'll see a tab called "Create" and one of the buttons there is "Cube". Both methods achieve the same result.

Notice that the bottom of the toolshelf immediately changes to show that you've added a cube and to give you some additional options for it. In the case of a cube there aren't many options: you can only change its size (radius), location and rotation. For other objects there are frequently more options. We'll use the default cube ones for this tutorial. If you wanted to change the options you must do it now because as soon as you take any other action the options will disappear and be replaced by any options associated with that next action. Using ctrl+z doesn't bring them back, unfortunately.

When you add a new object it's automatically selected for you so you won't need to do so. Now let's switch into Edit mode by pressing the tab hotkey (or you can use the dropdown box on the menu bar if you prefer). You'll find that the entire object is pre-selected for you in edit mode too. Also you'll notice that your layers buttons have disappeared and been replaced by four new buttons: the three different Edit mode selection type options and a toggle button called "limit selection to visible."

In edit mode always need to be aware of which selection mode we're in because the effects of what we're doing -- and sometimes even the options available -- may change depending on which of the three modes is active. As you're hopefully remember from the previous tutorial, a face is the planar area that is enclosed by 3 or more edges (in our case 4) which are the lines that connect the defining location of the point-like vertices (our cube's corners in this case).

Normally this would be a perfect way to model a cube because it's the simplest, most efficient  design using the minimum possible number of faces. I want to show you an extra selection mode, though, and we'll need some more detail to work with so we're going to "subdivide" our faces a few times using a button in the toolshelf and then it's options.

If you can't see the toolshelf, use the T hotkey to display it. All the main tools are on the "Tools" tab of the toolshelf which will usually be selected by default until you change to a different tab. Blender remembers which tab you last used during a session and returns you to it next time you open the toolshelf.

There's lots of stuff in this side panel. You'll notice some transform buttons with names you'll recognize from our discussion a moment ago, plus a couple new ones. Below that, in the "Mesh Tools" section you'll see some buttons for "Deform" options, and then some "Add" button options. That's where the button we're looking for is located, about half way down the collection of buttons. Click "Sudivide."

As soon as you do so the bottom of the toolshelf will change to show you the options associated with the "subdivide" action. There are quite a few of them but we're only going to change one of them: the "Number of cuts" option at the top of the list. What subdivide does is cut our current selection into smaller connected pieces which rapidly increases the number of vertices and faces so from an Opensim perspective we try not to do this any more than we have to, otherwise the model's file size gets quite large which makes it slow to load into people's viewers in-world. For this demonstration we need some extra faces, though, so let's cut it 5 times which will now make you cube look like my picture here.

In the menu bar, make sure you have "vertex select" mode as your active mode. It's the icon with an orange dot in the corner of the cube to indicate that it's dots -- vertices -- that you'll be selecting. Now click on the vertex in the top right corner of your cube. The rest of the cube will go grey to show that it's not selected any longer, and only the one vertex you clicked on will be highlighted.

A new method of selection that we haven't talked about yet is called "expand" and is done by holding down the ctrl button and then using the numpad+ and numpad- keys (not the regular plus and minus keys). The ctrl+nupad+ combination expands your selection by selecting each vertex that is connected to a currently selected vertex by an edge. You can keep pressing this combination to further (and rapidly) expand your selection. The ctrl+numpad- combination does the reverse.

Play with this for a moment, then select just that corner again, then use ctrl+numpad+ to expand the selection just once. Now look at the bottom of your toolshelf where it is showing you the last action options. In the case of "select more" there's only one option: a check box for whether to "Face Step" or not. Toggle this and see how the effect of your selection changes. When "Face Step" is enabled, Blender tries to intelligently anticipate that you're ultimately interested in which faces are highlighted so it speeds things up by adding them when it seems logical, even if that means selecting a little bit more than the actual rule for expanding a selection would normally do. When it's disabled, Blender follows the actual rule precisely.

This same technique also works the same way when you're in edge select and face select modes and the "Face Step" method for predicting what you're interested in also changes a little. This predictive/intelligent face-stepping is a brand new feature of 2.73 that wasn't available in 2.72. Prior to this, it only had the strict "follow the rules" option.

This method of expanding selections can be extremely handy and much more rapid than any other selection mode and often becomes even more useful when combined with yet another selection method that is unique to Edit mode: loop selection.

Loop selection only works with portions of a mesh that are quads (four-sided faces) and is used to pick a row of connected vertices or edges, or a strip of faces. The easiest way to see it is to do so...switch back into vertex select mode if you aren't currently in it, then hold down the ALT key and click on any of the edges. You'll see a line of selections made along that edge. You can do the same thing in edge select mode as well. If you switch to face select mode, it will pick a loop if faces based on whichever edge you ALL+click on.Holding down the shift key and then making a loop selection will add that loop to your selection.

Using a mixture of loop selection and expanded selection techniques is often the fastest and most precise way to make selections in Edit mode, and you can always use any of the other methods we've already discussed to then add or subtract from those results.

With both of these selection methods, the primary selected vertex, edge or face will depend on where you first click. When using expanding selections your primary will remain the very first selection you made. With loop select it will be the nearest one to the point you clicked on the screen.

The "limit selection to visible" toggle button determines whether the faces of a mesh are displayed in a sort of half-wireframe way that allows you to select something that's behind a face. When it's enabled you can only select something that's closest to you and everything behind it is protected from accidental selection. When it's disabled you can often make your selections more rapidly but are somewhat more prone to selecting something extra my mistake.

The best way to get used to these techniques is to practice and "play" with them until they become second nature. It's worth doing so because a huge amount of what you do in Blender will depend on being able to make a selection and then transform it using one of Blender's many tools. The more rapidly and intuitively you can do this, the more it will speed up and simplify your workflow.
Selection made using three simple loop-select clicks in face select mode
and shown with limit select to visible disabled

Friday, 27 March 2015


Many of the Paramour products I distribute -- and that are now seeing fairly wide-spread use -- require the use of OSSL functions. By default these are disabled in the Opensimulator builds from the main web site; and other distributions typically enable them for only very low thread functions. The ones my products typically use are higher threat than that and require some adjustments to the opensim.ini [XEngine] section.

It has come to my attention that there are a few people "helping" others by instructing them to change the global setting to "VeryHigh" instead. PLEASE DO NOT DO THIS!!! The functions with very high threat level are usually given that rating for a reason and have a high potential to be abused by malicious scripters. Globally allowing them for all scripts in the region is like having unprotected sex with every person on the planet!

Functions with high threat level should ONLY be enabled for a highly trusted subset of users in your regions. Typically that's the ESTATE_OWNER and probably the ESTATE_MANAGER as well. In some situations PARCEL_OWNER would also meet those criteria for many functions.

I urge you to read the instructions I supply with each item to correctly and safely enable OSSL for only those users.

You may find complete details about threat level and configurataion options at the Opensimulator.org website.




Thursday, 26 March 2015

Blender: Baby Steps II

In the first "baby steps" tutorial we looked at the overall Blender interface and tried to make it just a tiny little bit less scary. In part two, we continue that process and look at a few specific things that are of particular importance to us as Opensim content creators.

At the end of previous part of this tutorial we added a monkey to the scene. Yes, a monkey. Her name is Suzanne. Why? No idea...that's what the folks at Blender call her and she's their monkey so they ought to know. If you were following along, your screen will look like this.

Take a deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep breath...

Okay...that's some scary stuff, isn't it? Particularly with all my little notes added to it. Don't panic.

Yes, there's an awful lot of stuff there and when you don't know what any of it means or what it's for, it's pretty darned intimidating. Even worse, a considerable amount of it will change somewhat depending on what you're doing.

The flip side of this interface overload is that once you do know what it is and what it's for, you'll be blessing them for putting it all where it is so you don't have to go search for it, slowing down your work flow or hiding that critical piece of information you need to avoid f***ing something up.

So many programs these days try to simplify workspaces...they hide everything to make it more "user friendly". Actually what they're often doing is making it novice-friendly at the expense of making it user-functional. Blender hasn't gone that route, bless them! All you have to do is keep a bit of an open mind about it while you're learning.

Let's get some easy stuff out of the way.

The Info Pane Revisited

The info pane is that main menu bar across the top and you'll be happy to hear that you almost never need to touch it. You'll barely use it at all, in fact.

There are 4 menus and the only one of any interest to an Opensim content creator is the first one: the file menu. That's where you save files, load files, export files, import files...and set user preferences (which you'll very rarely change now). We don't Render because that's not what we're interested in for Opensim, we're unlikely to need/use anything in the Window menu, and Help is that place where you find help and instructions that nobody ever reads anyway. It would get a lot more use if it had the name "Don't look in this menu" instead. But then I wouldn't be writing tutorials...

Beside the menu are three drop-down boxes.

View Selection: In the first part of this tutorial we took a brief look at this...it's access to the 9 different preset views Blender gives us depending on what we're doing. If you were following along and replaced the Timeline withe the UV/Image Editor at the bottom you won' t need this at all until you become a fairly advanced user and start doing animation work. By the time you're doing that, you'll have lost all fear of the interface. Until then, "Default" view will be what you use.

The Middle One: Yes, it's so important that I neither know its official name nor have I even bothered to give it a pet name of my own. It's of interest to people doing renders, which isn't us. Just pretend it isn't there.

The Render Engine: About 99% of the time anything that relates to rendering is something we can safely ignore.This drop-down is no exception except that it is actually responsible for setting the rendering engine used for the scene and we want to be using Cycles render. Right now it doesn't matter in the slightest if you use the default Blender render engine instead, except that the way materials are set up becomes different. As you become more advanced I'm confident that you'll want to be using Cycles (it's better!) so you might as well start now. That's why I recommended setting it as your start-up file's engine in the Virgins and Mice bonus tutorial. Once you've set it, you'll never need to change it again.

Everything else up there is information about the current scene which you'll glance at periodically -- mostly to make sure you haven't done something that's going to make your mesh impossibly large to import in-world. We'll talk about that another time.

The 3D View Pane (Main screen) Revisited

We're going to revisit this one quite a lot during this series of tutorials. As you'll recall, this is the main portion of the screen where we'll be doing the bulk of our work. It has two side panels that are shown or hidden using the "T" (toolshelf) and "N" (properties) hotkeys. It also has a fairly complex menu bar running along the bottom with a ton of little icons on it in addition to its four menu categories.

The toolshelf on the left we'll talk about in other tutorials but there's a section at the very bottom of it that I want to draw your attention to. I've labeled it the "Most Recent Action Options" area. Whenever you do anything in Blender's main 3D View pane, there's a very high chance that something will show up here. It might even be every single time you do something but it's possible I'm forgetting a case where it doesn't.

The thing that shows up is the name of the action you took and any parameters or options associated with that action. Sometimes these are options that aren't available to you prior to taking the action. As an example:

When you add a cube, you don't have any options. You just go to the 3D View pane's menu and pick Add > Mesh > Cube. The moment you do that, the cube appears on the screen and suddenly there are a bunch of things you can change about that cube immediately, all displayed in that most recent action area. You can change the values there to affect its size, position, and rotation.

As long as you don't take any other action at all those options will continue to be available to you and can be changed. You're allowed to adjust your view, but nothing else. As soon as you do something else, that new action will replace it and you'll have lost your ability to use that area to change your cube -- you'd have to do it another way. Sometimes doing it another way is easy. At other times it's a nightmare.

When I originally planned the content for this tutorial and created the picture, above, I intended to cover a few more elements of this pane in a little greater depth. Looking at the total tutorial length, though,  I've decided to cut those parts and cover them in a subsequent tutorial instead. There was simply too much new material packed into this one and I think it would result in information overload.

We'll talk a bit about the one I labeled "Current Mode" but we'll skip the rest of the stuff on the bottom bar for this session. Instead, we'll very briefly look at the right hand side and move on.

The properties panel is one we'll touch on periodically throughout the tutorials but I wanted to draw your attention to some of the information that's presented there.You can change values here, manually, and those changes will be reflected by actual changes to the object; but until we have a grasp of selections I don't want to go into any great detail here about how that works. For now, treat it as a source of information.

There are a couple things that are of considerable interest, though.

You'll notice that the entire panel is subdivided into little sections with lines between them. Each section has a black arrow at the top left corner of it that acts as a "show/hide"button. If the arrow is pointing down, the section is "expanded" and being shown. If it's pointing to the right, it's hidden. There's a lot of stuff here we rarely need to refer to so you might want to hide some if it. Just remember that it's there.

You can even drag these little sections up and down the panel to change their order. The handle you click on to do this is the little dots to the right of the section's name. Via the user preferences you can go really wild and add and remove almost any section from any panel on any pane. Blender is the absolute ultimate when it comes to having your own custom work environment.

This same approach is taken to all panels and many panes. You'll see them in the toolshelf (though fewer of them) and you'll see many of them in the hugely elaborate menus of the Properties pane. In my picture I've selected the "Object Properties" tab which has an icon that looks like a little cube. Just by selecting that tab, everything below it changes. Some of the information there is a duplicate of the properties panel of the 3D View window (but you will often have that panel hidden) and some if it is completely new (and scary so we won't look at it today).

The reason I'm pointing to the Properties pane in this tutorial is only to show that it shares this approach to the sections (hide, expand) and that setting found on one pane are frequently also found on other panes as well. This might not seem all that efficient a use of screen space until you remember that Blender has no idea at all about which panes a specific user will have on their screen, so anything that is relevant to a pane needs to be included on it, somewhere.

In the 3D View pane's properties panel I've pointed out a few areas of interest:
  • the "Transform" section at the top where you can see things like location, rotation, scale, and dimensions...the same information is duplicated in the Object properties tab of the Properties pane. You can change a value manually (and with numerical precision) and it applies the change\ to the model. Some of these will almost feel comfortable to you...that's the same sort of information you're used to seeing about prims in your viewer's editor. And then some.
  • a bit lower down is the 3D Cursor section which tells you the exact current location of the cursor (the white and red target thing). Yours will probably be saying <0, 0 , 0>. Changing these values lets you position your cursor (with numerical precision).
  • just below that is the "Item" section where you can name the currently selected object (in my picture it's the money mesh "Suzanne")...this is also shown at the very top of the Object properties tab of the Properties pane. You can change it in either location and it will update the other one.
  • I also pointed to the "Display" and "Shading" sections as my example of a hidden section (Display) and an expanded section (Shading). On your screen they may both be expanded or be reversed.
Once you become slightly more comfortable with Blender you'll really appreciate all of this stuff being here. But gosh it's intimidating for a new user! For now, keep in mind that there isn't anything you can really do to break anything and sometimes playing with things to see what they do is just as valuable a learning experience as any other. Just save a lot so you can recover your work if necessary.
As a side note: saving you file, frequently, is a good idea for even the most experienced users. Blender's tendency to crash is far less often than it was even a year or two ago, but it does still happen. Also, having a saved copy to revert to can be handy.

We won't spend any time at all in this tutorial looking at the Properties pane so let's continue our tour with another look at the Outliner.

The Outliner Pane Revisited

We won't revisit this one for very long but there are a few things here that need to be pointed out. You'll notice that by adding our monkey mesh to the scene she's now also been added to our list of scene objects in the Outliner pane.

The name given to the object is what shows in the list. You can double-click on the name and change it here if you like. You can also right-click on it to bring up a context-sensitive drop-down menu that includes an option to rename it. There's also a box in the 3D View pane's properties side panel where you can change it (I labeled it in the picture above) and some of the other panes also give you a place to change an object's name.

When you have only one or two objects in a scene it isn't all that important to name them. When you start getting 20 or 30 or more, taking the time to give each one a meaningful name is worth it. Names must be unique...if you try to use an identical name the other object that already has that name will be given a .001 suffix. Imagine a list of objects called cube.001, cube.002, cube.003....cube.030. Do you think you'll be able to remember which cube is which if you want to select if from this list? Very unlikely. Naming them makes them easier to locate later in a busy scene.

To the left of the name is a little upside-down triangle which tells us it's a mesh object. There are other types of objects that use different icons. For Opensim, only mesh objects can be imported. Anything else either can't be imported or needs to be converted into a mesh first.

There's some other stuff on the right-hand side of the object's name which will change as we work with it. Right now all you'll see is the same upside-down triangle that tells us it's a mesh. When we add a material or two to the mesh, it will get another icon telling us we've done that. Other icons will appear when you add other things, so these serve as handy reminders as to whether you've done something or not. There's more to it than that, but not at this level.

Lastly, out at the far right are three more icons.
  • The eyeball is something you can click on to quickly hide/unhide that object.
  • The arrow is something you can click on to quickly toggle whether you're allowed to select that object.
  • The camera icon determines whether to render it which means we get to ignore it.
A few last comments before we leave this area because this can be confusing to a new user
  • If an object has been selected in the scene its little icon will be highlighted in orange. If it isn't currently selected, it won't. 
  • There is also a light grey or dark grey shading that can be applied by clicking in the line..I don't have the faintest idea why because it does not indicate anything at all about whether it's selected or not. If the grey highlighting has a use or function, I haven't discovered it yet. As a novice user this can be extremely counter-intuitive and misleading! Just remember that grey highlighting in this pane is meaningless. Orange highlighting is what you're looking for.
  • If you click (single left click) on something in the list it selects it. This is very handy when you're in Object mode (we'll talk about modes in a moment) but can do unexpected (but useful) things when you're in one of the other modes. When you're first getting started, though, my advice is only to click on names in the outliner when you're in object mode.
  • There are a lot of other handy things you can do in the outliner pane to help organize and even manipulate objects. Unfortunately this means you need to exercise a little bit of care when clicking here to avoid accidentally doing something you don't intend to. As a beginner you'll likely under-appreciate this pane and use it primarily to make selections.
This brings us conveniently to the subject of selections.

Selections - Part 1

Talking about "selection" in Blender is a bit like talking about snow in the arctic or sand in the desert...if you don't live there the single word is just fine. If you do, your immediate thought is "what kind of snow?" or "what kind of sand?" or in the case of Blender, "what kind of selection?"

It's not quite that bad; but it is important. Happily for our purposes we only need to be aware of five types of selection and they're split into three main types:
  • object selection which involves selecting an entire object (much like selecting an entire prim) or group of objects (a bit like a linkset)
  • face, edge and vertex selection which doesn't have a very good Opensim analogy...think of these as the things that are use to create a mesh object.
  • other stuff which is a rather large assortment of things associated with objects that aren't mesh which means in many cases we won't be using them or they'll be the only selectable things available to you when you're working with them so they'll be a bit self-evident. They have different names, though, so it can be a bit confusing at first if you're reading about them.
The key determining factor about which type of selection we're doing is our current mode which is set using the drop-down box immediately to the right of the menu options in the 3D View menu bar (the one at the bottom of the large main viewing area).

By default you'll be in "Object mode" which means any selections you make are objects. In almost all other modes you'll be working with a single object and selecting its individual faces, edges or vertices (if it's a mesh object) or its "things" (handles, control points, etc. if you're working with non-mesh objects). You can see a list of some of those modes by clicking the drop-down box.

I say "some of those modes" because the list of available modes is determined by which object is currently selected. Selection and mode are inter-twined. The ones you see above are the modes that you can switch to when Suzanne (or any mesh object) is selected. There are other modes but they don't apply to mesh so they're hidden.

The vast majority of your work (at least while you're learning) will be done in either "object" mode or "edit" mode and, since it's so common, Blender helpfully makes the tab key the hotkey to switch between them. Strictly speaking, the tab key is actually the hotkey to switch from your current mode into edit mode and back again.

As your skills expand, the mode you're most likely to experiment with as your third one is "sculpt" mode -- referring to the artistic discipline of sculpting, not the Second Life "sculptie" type of mesh -- so if you are in scupt mode and press the tab key, you'll enter edit mode, then pressing tab again will return you to sculpt mode. For now, though, you'll likely be spending 99.9% of your time in either object or edit mode.

The bottom line of this, for a beginner, is that in object mode you'll be selecting objects. In edit mode you'll be selecting either vertices, edges or faces; or if you're working with something other than a mesh object you might be selecting one of those "other stuff" things. When you're in one of the other modes you're usually selecting the same things you'd be selecting in edit mode but it varies a bit from mode to mode depending on what's relevant.

Making life easier, the way we select things is almost universal regardless of what we're selecting or which mode we're in. It's the mode that determines what we select. The "thing" can be any of the types we discussed a moment ago (objects, vertices, edges, faces, and "other stuff"). When you select something, Blender highlights it to clearly show you that it's selected.
  • Selecting one thing is a matter of clicking on it (and if you've reversed your mouse keys as I suggested, that means a left-click).
  • If you're in object mode, you can also select something by clicking on its name in the outliner pane.
  • Selecting a second -- and any additional -- thing can be done in the same way while holding down the shift key.
  • Clicking on an already-selected thing while holding down the shift key will deselect it again.
  • You can select a group of things by pressing the hotkey "B" (for "bounds select" although I've also seen it called "border select") which will turn your mouse pointer into crosshairs. Then click and drag to select anything that falls inside the rectangle formed between your starting point and the point that you release. This always adds to any existing selections rather than replacing them.
  • If you press the B hotkey, then hold down the shift key, then drag your selection box, anything inside the box will be deselected. If you prefer, you can press "B" then hold down your middle mouse button (but not the shift key) to make the "deselection" instead.
  • There's another way of selecting larger number of things: "circle select" which is activated with the "C" hotkey and turns your mouse pointer into a circle. This one takes a little bit more getting used:
    • holding down the left mouse button (if you've swapped your mouse buttons) will add anything new that is inside your circle. You can drag it around while holding it down to keep "painting" more additions.
    • you can use your mouse's scroll wheel to change the diameter of the circle (even while in the middle of "painting")
    • you can press your middle mouse button and "paint" to subtract from the current selection
    • you can hold down the shift key and left-click paint to subtract from the current selection
    • when you're finished, press the right mouse button (assuming you've swapped your mouse buttons) or press your keyboard's Enter key to leave circle selection mode
    As I say, it takes a little getting used to but it can be a very fast method for selecting things.
  • And finally there's the magic hotkey button "A" that acts as a toggle between "select all visible" and "select none". If nothing is currently selected it will always select all. If one or more things is selected, it will select none (and then pressing it a second time would then select all).
  • When in object mode, anything you've marked in the outliner as being non-selectable (by toggling the little arrow icon to the right of its name to off) will ignore any attempt you make to select it. If it's already selected, switching it off in the outliner will deselect it.
While this might all sound a bit complicated, you'll be surprised how rapidly it becomes second-nature once you start using it.

Oops! (Undo)

I really shouldn't go any further in this tutorial without mentioning that Blender offers you the standard "oops!" capability of undoing something you just did: the hotkey combination ctrl + Z. It's actually a super-charged undo that is limited only by the number of steps you're willing to let it remember and/or the amount of memory you can let it use to store those steps.

By default Blender remembers and can  undo your last 32 steps. If you're working with normal file of the size that would be suitable for export to Opensim this won't occupy too much memory (although it's not uncommon for more complex scenes to have it climb into the range of a few GB). If you start to work with very complex scenes, or high resolution models, this can rapidly gobble up all of your available RAM and (shudder) go into virtual RAM.

The amount of RAM being used to store your undos (as well as your active file) is shown as part of that data I referred to above in the Info bar. The actual .blend file size when you save will usually be much less because it doesn't store undo data with the file.

You can change the number of steps and/or limit the amount of memory Blender is allowed to use by changing this setting in the User Preferences (Editing tab). The default values (32 steps and unlimited memory) is fine to begin with though.

I say Blender's undo is "super-charged" because there's a twist: if you enter edit mode and make some changes, using the ctrl+Z undo will undo each action step by step while you're still in edit mode. If you exit edit mode and return to object mode, a single "undo" will undo all of the changes you made while you were last in edit mode, not just the last change. This can lead to some surprises if you do it without thinking. If you only want to undo your last step, go back into edit mode first, then undo.

There's a redo too which in Blender is ctrl + shift + Z (many Windows users will be expecting ctrl + Y which isn' the undo). If you've undone something this will redo it.

Where are they? If you're used to working with menu-undos/redos in other software, you'd expect "undo" and "redo" to be in the main menu's edit menu. Trouble is, Blender doesn't have a main menu (remember, that thing that looks like a main menu is actually an Info pane) and there's no "edit" menu anywhere. Fear not, there is a menu way to access undo...it's in the 3D View pane's menu (at the bottom of the main screen area) but the exact name of the menu button depends on what mode you're in. In Object mode it's in the "Object" menu, in Edit mode it's in the "Mesh" menu, in scupt mode it's in the "Scupt" menu, in....well the chances you'll remember any of that is pretty small so let's stick with remembering ctrl+Z is undo, and ctrl+shift+Z is redo. In Blender, hotkeys are usually an integral part of the workflow, not an alternative to it.

While you're doing something, there's a "woops, I didn't mean to be doing this" abort ability too: the escape (esc) key on your keyboard. This doesn't undo anything, it just aborts an action that you've initiated but haven't finished yet (like the bounds and circle selections we talked about a moment ago).

Usually the right-mouse button (if you've swapped your mouse buttons) does the same thing as the esc key, with a very small number of exceptions. Circle select is one of those exceptions where the right mouse button is "I'm finished" instead of "woops...stop." In bounds select the right mouse button cancels the operation.

Face, Edge, Vertex

I guess this is also as good a time as any to explain what a "face," an "edge" and a "vertex" is when talking about mesh, although perhaps you'll already have a good idea.

A mesh is composed of "faces" where each face is defined by three or more edges that meet at shared vertices ("vertices" is the plural of "vertex"). A simple cube, like the one above, has six faces (you can see only 3 of them here). Each face of the cube has four edges (the lines) and 4 vertices (the dots at either end of the line).

In Blender a lot of our work involves manipulating these. You will frequently be switching between these three -- mostly in edit mode -- and it's important to understand that they're all interdependent. When you edit a face you're changing all of the edges and vertices that define that face. When you edit an edge, you're affecting the two vertices at either end of it as well as the shape of any face it helps to define. When you edit a vertex you're affecting any edge and any face that it's part of. When you're in object mode it's like working with every face/edge/vertex selected...you're working with the whole thing.

In Blender we try as much as possible to work with faces that have four edges (and thus four vertices). These faces have a special name: "quads". Blender can also work with triangular face (called "tris") or with faces that have 5 or more sides (usually referred to as "n-gons") and any mixture of the three; but it's "happiest", most convenient, and considerably more flexible when working with quads. Unfortunately Opensim (thanks to a decision made many moons ago by Linden Lab for Second Life) only accepts triangular faces.

The good news is we can do all our work with quads then use a handy Blender feature to convert them all to triangles at the end. The bad news is converting quads to tris doubles the face count.

The even worse news is that Blender happily works with double-sided faces. Opensim doesn't (thanks again, Linden Labs). If you want a face to be seen from both sides you actually have to model two faces with a small space between them, at least doubling the face count yet again for your object. Don't ask me why Linden Labs decided to do it that way. Most likely because they never originally intended to allow us to work with anything other than default prim shapes and lacked the foresight to realize we'd want to.

Now that we've completed our topical detour let's return to the subject of selections.

Selections - Part 2

Complicating matters when it comes to selections is:
  • When you're in object mode much of the information that's displayed in the 3D View pane's properties side panel is only for the current "single one selected thing" which I tend to think of as the "primary selection." It's not for some attempted average of "everything selected. In edit mode it's the other way around, usually representing an average of all selected faces/edges/vertices.
  • Almost all of the Properties panes tabs supply data that is only for the "primary selection," not an average of all current selections.
  • Some Blender operations are applied to "everything you've selected"
  • Other Blender operations are only applied to the "primary selection" without in any way affecting anything else that's also selected.
  •  Yet other Blender operations base the way the operation works on the "primary selection" using the "other stuff selected"
Needless to say, this can get confusing for a novice -- heck, at times I can still find myself a bit lost when it comes to this stuff -- so don't be upset if it takes a while to get used to this and even longer before it becomes second nature. Remember, ctrl + Z is your friend!

The one happy note in this confusing subject is that the importance of primary selections is typically not all that great until you start using some of the more advanced features. In many basic situations it doesn't matter at all.

It does beg the question, though, as to how one knows what this special "primary selection" is and how one goes about making sure the thing you want as your primary selection actually is your primary selection.

Sadly, as you can see from the above picture, Blender isn't entirely consistent. When you're in object mode the primary selection is bright orange and anything else that's selected is a red-ish orange. When you're in edit mode you'll be selecting either faces (as shown in this picture) or edges or vertices. In edit mode the primary selection is highlighted in a bright white while everything else that's selected is highlighted in bright orange. In both Object and Edit mode anything that isn't selected won't be highlighted at all. In other modes the primary selection (and selections in general) can be shown in yet another way.

Seeing your primary selection often all boils down to singing a Sesame Street song to yourself while looking at a group of selected things..."one of these things is not like the others...."

There are a couple rules that determine which is the "primary" object/face/edge/vertex/thing:
  • No matter what you're doing, if you have a number of things selected and then select exactly one more thing (by shift-clicking on it when it isn't already selected) it becomes the primary selection. This means you can select a bunch of stuff however you want to, then deselect the one thing that you want to have as your primary selection, then reselect it. This always makes it the primary.
  • If you add to a selection using either border or circle select, whatever was the primary selection before this will remain the primary selection after it.
  • If you have an existing primary selection, then use the "A" hotkey to deselect all then use it again immediately to select all, the previous primary selection is remembered and becomes the primary selection for all.
I'm sure this is making your head spin at the moment but let me re-emphasize that when you're first starting out the importance of primary selections is minimal. I only bring up the subject at all because you'll need to be aware of it, and that when something you're trying to do doesn't work the way you though it would, or if the information you're seeing somewhere isn't what you'd expected to see, the "primary selection" consideration might very well be the reason.

There's a third part to this subject of making selections and it only applies to edit mode. It's also far easier to explain by having you "do it" rather than trying to explain it in words or show you with pictures, but it also begs to be done while looking at other elements of the 3D View pane while in edit mode.

This tutorial already being extremely long and packed full of information, let's leave that for next time and give you a chance to digest what you've learned from this one.


I find myself struggling with explanations and order of presentation for some of these novice tutorials because Blender's most basic elements are highly interdependent and also highly sensitive to the context they're being used in.

I want to avoid not telling you something that's relevant even at the most basic level, but because of this context-sensitive interdependence there's a lot of different subjects and new terms that have to be thrown at you in a very short span of time and will be hard to absorb.

I find that in cases like this it's often best for the student to read through once, absorbing and understanding as much as they can,m and then go and play with it to see how it works. Then later come back, re-read, and usually the parts you haven't absorbed or understood will make a little more sense.

All I can do it urge you to persevere. If you're like me, there will be this "eureka!" moment when suddenly the entire Blender interface will go "click" in your head and begin to make sense. Once this happens it will change -- almost instantly -- from being a scary, overwhelming, intimidating environment into one that you realize puts everything you need almost exactly where you want it to be.

Wednesday, 25 March 2015

Blender: Baby Steps

By request, today's tutorial is for the extreme novice...someone who has either never used it before, or has tried for an hour or two and given up. I hope to show you around a little bit, making the Blender workspace a little less daunting, and talk in general terms about the function or use of a few things. Hopefully this will help get you started.

This tutorial is specifically written for people intending to use Blender for content creation for Opensim (or Second Life). If you're planning to use it for something else, some of my comments or suggestions will be wrong or at very least misleading.

I'll also be the first one to tell you that I'm' not formally trained with Blender and learned a lot about it simply through trial and error or experimentation. That means I tend to use names for things that aren't Blender's "official" names for them. I've learned to stop calling the modifiers properties pane "the little wrench thingy's stuff" but I'm sure there are other cases where I'm still using the wrong nomenclature.

While I usually don't like to make assumptions, in this case I'll be expecting that you've already completed all the steps in both the main and "bonus" section of my "Virgins and Mice" tutorial. This gives us all a common starting point where we're swapped select to the left mouse button, we're looking at a completely empty screen because the default cube, camera and light source have been deleted, we're in "user ortho" viewing mode, and we have the Cycles render engine selected.

Like the aforementioned tutorial, today's post won't be making anything. It's more of a guided tour which a few more screen customization suggestions or tips.

Lights, Camera, Action!

These are the things in Blender that Opensim content creators don't care about all that much but it's worth talking about them first. That's be cause we're using a piece of software where all three of those components are a very big deal and critical to the typical user's workflow where Blender is more or less the one and only piece of software they're using to go from a blank screen to finished product. The modeling component of Blender -- which is our primary interest in it -- is only very, very tiny piece of the puzzle.

The finished product for a typical Blender artist might be a static ad for magazine/billboard/promo use, or perhaps a short video, or perhaps even a full feature film. From a game/environment perspective, Blender has the capability of doing the whole thing internally (it has a complete suite of game development tools that let you make Blender games). Here's a YouTube "demo" that shows the kind of output the Blender folks think you'll be trying to create.
So what does this mean for us? It means there's a lot of stuff  - a vast number of features and controls and interfaces and shortcuts and kitchen sinks - that are of absolutely no use to the Opensim content creator but are all there inside the software.

When you're first starting to use Blender and look at that incredibly complex interface with menus all over the place and panels that dock and undock like they have a mind of their own, and then drop-down boxes that change the whole screen to yet another vast array of things...gosh that's scary shit!

So let's make one thing clear right at the start: as an Opensim content creator it's very likely that you'll be using less than 10% of the total capability of Blender. An advanced user might periodically employ a few of those other things to assist in modeling, but for the most part you'll be sticking to a very small subset of Blender's tools -- which also means that other than being visually a bit intimidating, you really don't need to know what most of the rest of that stuff is. You just need to know where your stuff is.

To quote Douglas Adams: Don't panic!

  The other thing it means for us is that Blender's tools and controls might seem a little odd or quirky, or as one of the comments made on my "Virgins and Mice" put it:
...Blender is so foreign, compared to any other software I have ever come across.  Why they chose this approach, is beyond me..
 When you think of it from the typical Blender user's perspective it's actually the Opensim content creator who's the weird one. Why the heck would we want to make incredibly basic low poly poorly lit objects with an insanely limited animation capability and stone-age physics and then export it when Blender has a whole suite of things to make that visual experience infinitely better right there inside the software itself. We must be nuts! (Maybe we are...)

It also means that Blender's layout, features, and general methodology is designed in keeping with that typical user's needs, convenience, and workflow, and makes a lot more sense when viewed in that light (though the left-right mouse button thing is still an utter mystery to me!).

The typical user wants an easily-customize and flexible workspace. They want to be able to maximize their viewing area for preview yet almost instantly get at all the tools and panels necessary to do their tweaking. And most of all they don't want to be clicking their way through a million menus to do something so there's a very heavy reliance on hotkeys as part of the standard interaction with the tools and interface. This brings me to...
  • Tip#1 If you ever hope to become comfortable with Blender, start learning and using its hotkeys right away.
Hotkeys aren't considered an alternative method for doing something. They're usually the primary method for doing it, and in most cases menus or interface buttons are just a back-up alternative. In some cases there are even undesirable side-effects when you don't use a hotkey.

The sooner you start to learn and use the primary ones, the sooner they'll become second nature to you and, in turn, the sooner Blender will start to feel almost comfortable as a working environment.

Speaking of environments...let's start getting acquainted with what we've got.

The Default Screen

If you did the previous "Virgins and Mice" tutorial whenever you start up Blender your screen will look like this (or very close to it). If yours is a little different it's my fault -- I might not be remembering correctly what a "virgin" screen looks like any more. It should be close and anything you see in the following picture that isn't on your screen is something I'll be mentioning in this section.

This is called the "Default" view and is one of nine different basic view layouts that Blender installs. When I say "view" in this sense I'm not talking about skins...I'm actually talking about entire view screens. There are many different skins that further change or customize the working environment and you're welcome to experiment with those until you find something you like. In fact the entire Blender screen (with the exception of the window edges) is 100% customizable via User Preferences.
The entire Blender window is subdivided into "panes" and you can add, size, change, move, and remove panes very easily -- so easily that it's not uncommon to accidentally do something to one when you're in a hurry. Some panes have their own menu bars, others have icons or tab, and others don't have either and use some other control mechanism. It all depends on what type of pane it is. Panes can be a real pain until you get used to this.

In the Default view there are 5 panes, each of which we'll talk in some more detail about later:
  • The "Info Pane" is the one running across the top of the entire screen. You probably think that it's the main menu bar since that's what it most closely resembles. Blender doesn't actually have a main menu bar...it just has a pane that looks (and behaves) like one and usually gets put in the place you'd expect to find a main menu.
  • The vast majority of the Default view screen is taken up with the second pane, called the "3D View" pane. That's the area where you will do the bulk of your actual work. The 3D View pane has two addition sub-panels built into it which are shown in my picture above:
    • the one on the left is what I call the "toolshelf" because that's where you'll find most of the tools relevant to what you'll want to do in the main screen area
    • the one on the right is called the "properties" panel and shows some detailed information about something you have selected (and allow you to change it there) plus some other things, most of which Opensim creators will ignore.
    As long as your mouse is hovering somewhere inside the main 3D View area you can hide and show the two panels using the hotkeys "T" for the toolshelf and "N" for the properties (I have no idea why they chose N..."need to know" maybe?) which toggle their visibility.

    I suspect you all know what I mean when I say "cursor" in the context of a text-based program...it's the place where text will appear if you start to type. Blender's 3D View has a cursor too, but it's a 3D cursor. It looks like a red-and-white striped target circle and in the previous tutorial we placed it at the <0, 0, 0> point of the screen. It has a very wide number of uses and is the thing that was annoyingly moving around when you tried to left-click on things that very first time you tried to play with Blender. With our mouse buttons now swapped, you can move it by right-clicking somewhere where instead. Why you'd want to move it is a different story...for now, its main purpose is to make the place to add a new object into the scene and most of the time as beginners we want that to be at the <0, 0, 0> spot (to put it there use 3D View menu: Object > Snap > Cursor to Center)
  • Down below the main 3D View area is another pane called the Timeline. For a Blender beginner that's an utterly useless one and later in this tutorial I'll recommend changing it to something that will be very useful.
  • Over at the top right is another pane called the "Outliner" which is sort of a list of everything in the scene arranged like a file tree. Out list is almost empty at the moment, containing only two things (both of which are useless to us but they'll always be there).
  • And then finally the fifth pane is called the "Properties" pane, making it easily confused with the 3D View's properties side-panel when I try to describe things. This is the "bread and butter" pane that gives us rapid access to almost all of the key features that we'll be using in Blender (as well as many, many features we won't).
Each of these panes can be made larger or smaller by moving your mouse to the edge of it -- your mouse will change to a two-way arrow when you're positioned correctly -- and then click-and-drag it just like you'd scale any screen window.Be very careful about that mouse pointer! You want to make sure it's a two-way arrow, not a plus sign, before you start to drag it!

The plus sign (seen when you hover your mouse over the lower left or upper right corner edge of a pane) subdivides the current pane, adding a whole new pane that you're moving and leaving behind another. This further chops up the precious screen real-estate but can be very handy at time when you want to simultaneously view something from multiple angles or change it to a different type of pane that you need but isn't normally part of this view.

Hotkey are very pane-sensitive! The effect of a hotkey will very often (almost always!) depend which pane your mouse is currently hovering over, and even what part of a pane. This will take some getting used to, but once you do you'll discover that it very greatly speeds up your workflow and drastically reduces the number of mouse clicks required to do something.

Who Cares About Time?

I mentioned above that the 3rd pane -- the "Timeline" at the bottom -- is one that isn't very useful to us at all for Opensim purposes. If you get into animations or a few other more advanced operations it will become more relevant, but when you're starting out it's just sitting there eating screen space and making the interface even more confusing.

I suggest changing it to something that will be very much more useful (though no less confusing) and will save us some time and hassle later: the UV/Image Editor pane. How do we do that?

Each pane has a little icon that usually appears in it's bottom left corner (in a few it's in the top left corner instead) and is actually a drop-down box that lets you pick what type of pane it is. The little icon changes depending on what pane type it is but is always in one of those two locations. You can change any pane at any time just by clicking on it and picking a different one. Let's do that.

Click on the little icon on the very left end of our Timeline pane to see the full list of different pane types, then pick the one called "UV/Image Editor".

After doing this you may wish to use the Info Pane's menu (what we've been calling the main menu in previous tutorials and I'll now return to doing so) and do File > Save Start-Up File which will now save this as your new preferred Default view when starting Blender.

Looking Around Some More

Now that our interface is a bit more useful to us, let's start looking around a little more.

You might have noticed that I've been quite careful to keep saying "Default view" in this tutorial (with a capital D at the start). That's because this is only one of Blender's nine (9!) preset views and it happens to be called "Default." Each different view is a fairly common screen pane arrangement for a different type of Blender task.

For an Opensim content creator, you'll now be spending about 99.9% of your time in Default view thanks to our swapping to the UV/Image editor instead of the timeline. If you want to have a peek at some of the others, click the drop-down box in the main menu at the top and pick one of the others. All of Blender's preset views put an Info pane at the top so you'll always have that "main menu" with the drop-down box to let you get back to something less scary. When you've had a look, come back to the Default view.

 You can add even more views to that list if you want to, saving any screen customizations you might happen to find useful and want to be able to return to another time in this file. That's done using the little plus sign at the right end of the box but we won't go into the details. Whatever you do, don't click the X beside it while you're in Default view...that will delete the view and you'll have to restart Blender or rebuild the entire view from scratch again.

In our Opensim viewer environment we use the term "camera view" to describe the position and angle we use to view the world. In Blender the word "camera" has a whole different meaning because that's an object that a Blender artist places in the scene and can control (including scripting movements with it, changes of camera angle, and all that fun stuff). In Blender we just say "view" or "screen view" (without capitals) to talk about our personal view of the Blender screen.

Just like almost any 3D environment (or game), Blender has its own approach to controlling our view that is a little bit different than others and takes a bit of getting used to (but you had to do the same thing to get used to your Opensim viewer too, and it's probably different than the controls to other games you play or other 3D software you might use, so you'll get used to Blender's too.

With Blender, the middle mouse button and scroll is your flexible view control (and these days the most common type of mouse has a clickable scroll wheel that does both) and you'll be using that in conjunction with two keyboard keys: the ctrl and shift.

Let's give ourselves something to look at.

  • First, make sure your 3D cursor is at the center of the main 3D View's screen
  • Now in the 3D View's menu bar at the bottom, select Add > Mesh > Monkey
Monkey? What?!

Yes, Blender's cute little play toy that they've been using for years to show the effect of various tools is a monkey's head. At once time I seem to recall they even used it as their logo. They like it so much that they include it as a mesh type you can add to the scene (along with more common things like cubes, spheres, torus, etc that you're familiar with from Opensim building, plus some others you're not). It's slightly more interesting to look at than a cube, plus it's easy to know whether you're looking at it from the front, left, right, top, bottom, or sides, so it's actually a convenient object for us to use.
Now let's learn about moving our view around using the mouse.
  • Press down on the middle mouse button and, while holding it down, move your mouse around the screen. You'll see that the causes our view to rotate around the monkey's head. When you have an angle you like, release the middle mouse button.
  • You can zoom in an out just like in Opensim, using the scroll wheel.
  • You can also zoom in and out by holding down the ctrl key, then pressing your middle mouse key and move your mouse.
  • You can pan left and right by holding down the ctrl key and then use your mouse's scroll wheel
  • You can pan up and down by holding down the shift key and then use your mouse's scroll wheel
  • You can also pan up, down, left and right by holding down the shift key, then press your middle mouse button and move your mouse in the direction you want to pan.
When you're very used to Opensim camera controls this will take a little bit of getting used to, but once you've working in Blender for any length of time you'll find it extremely fast, efficient and comfortable (or at least I do...I like it a lot more than the in-world camera controls).

If you get lost (and believe me, we all get lost and suddenly can't find the part of the screen we want to be looking at) there are some incredibly useful "home" positions available to you via hotkey. You will use them all the time when modeling so why not start getting a feel for them now? They are all on your numpad keys.

It's important to remember that all of these keys only work when your mouse pointer is somewhere inside the main 3D View window, and not hovering over its menu or either of its side panels. It has to be inside the actual working space for the hotkeys to work.
  • numpad1 is front view
  • ctrl+numpad1 is back view
  • numpad3 is right side view (ie looking at the object from the right, so you'll see its left side)
  • ctrl+numpad3 is left side view
  • numpad7 is top view
  • ctrl+numpad7 is bottom view
The numpad2, 4, 6, and 8 keys are used to
  • rotate your view around the object in steps (2 and 8 are down/up, 4 and 6 are left/right)
  • if you hold down the ctrl key then use them, they pan (down/up/left/right)
  • if you hold down the shift key then numpad4 and numpad6 rotate your view on its own axis (and doesn't do anything with the others)
  • if numpad9 has a use, I don't know what it is and don't use it
 And then last but not least...numpad 5 is a toggle between "ortho" and "persp" viewing mode. The effect if this is a little hard to describe but you'll see it quite distinctly on the monkey's head.

Perspective view is what you're used to seeing in-world in Opensim but is actually fairly difficult and inconvenient to work with when you're trying to get things to align nicely. It's great for giving the illusion of depth and a 3D environment, though, which is why our views use it.

Ortho view removes that perspective distortion and keeps all lengths their actual length which is fantastic for building but not good at all for trying to trick the eye into perceiving a flat screen space as being three-dimensional.

In this picture I've split my workspace into two 3D View panes, setting the left side to perspective view mode and the right side to ortho view. We're looking at the a single cube from the identical position. The perspective view looks 3-dimensional but it's hard to tell whether it's really a cube, a rectangular box, or even whether any of the side's lengths are really identical. In ortho view the 3-illusion is completely gone, but you have a far better idea of its real shape. When modeling we're almost always much more interested in the actual shape so ortho is a lot more useful.

I recommend (strongly!) that you do the vast majority of your Blender work in ortho view, then just quickly use the numpad5 key to toggle to perspective view on occasion to check out how it might look in-world, then quickly toggle back. Once you've been working in ortho for a little while, you'll detest building with prims in-world in perspective view

I think that's enough information to throw at a new user in one sitting, so I'll stop here. I hope this gives you a little better sense of the environment you'll be working in when you use Blender, and helps you take that first baby step towards mastery of a very cool, powerful piece of software.