Blender

From eBabel wiki
Jump to: navigation, search

On this page I am gathering my notes on learning Blender.

I'm following the Udemy course Learn 3D Modelling

Online courses

Articles and tutorials

Export from Blender to Javascript

  • "Maturity" checks whether the library is stable and used in many projects and games.
  • "Activity" is about whether the library is still currently being developed. Any recent release?
Library Documentation Maturity Activity
Three.js Agerage but a lot of examples Well established Very active
Blend4web
Babylon.js
Unity 3D

Change Blender UI Theme

Toggle User Preferences in one of the panels.

Select the Themes tab.

In Presets, select your favourite Theme, like "Science Lab" for example.

Views

Each panel can be a different view with the small dropdown.

Mouse shortcuts

Use a mouse with a scroll between the left and right buttons.

Scroll

Zoom in and out.

Press Scroll

As you stay pressed on the scroll, you can move around the 3D view like the keyboard number pad but with more precision.

Shift and Press Scroll

First keep Shift pressed, then press the scroll to pan left or right and up or down.

RIGHT CLICK

When right-clicking an item in the 3D view, it becomes possible to move it around. To apply that move, use the LEFT CLICK.

LEFT CLICK

Apply the change of position that has been made with the RIGHT CLICK selection in the 3D view.

Keyboard shortcuts

N and T

Toggle the side panels.

CTRL ALT w

Duplicate windows

SHFT F1 to F10

Toggle different views in full screen.

1 to 0

Toggle layers. The numbers are at the top of the keyboard, not on the right-hand side number pad. These are not the F keys.

Number pad 2, 4, 8 and 6

These number pad keys also have arrows on them. They pivot the main 3D view around the central point. Very useful.

CTRL z

Undo changes.

SHIFT CTRL z

Redo changes.

SHIFT c

Center the 3D cursor and the whole 3D view to the origin co-ordinates.

Number pad .

The "." on the number pad will center the 3D view on the selected object and zoom in.

SHIFT s

Context menu to move selected object, cursor and grid in relation to each other. Very useful.

Center the 3D cursor

In Edit Mode, select a Face and SHIFT S the 3D cursor to the selected Face to place it in the middle of that Face.

g

Translate transformation applied to the selected object.

Use a mouse to move the object or the arrow keys to nudge it in place.

Warning: make sure the g key is pressed only when the mouse cursor is in the 3D view, otherwise that same key will do something else.

g then x, y or z

Translate alongside a single constraint axis, depending on which key is pressed after the initial "g" key.

r

Rotation transformation applied to the selected object.

r then x, y or z

Rotate with axis constraint.

s

Scale transformation applied to the selected object.

s then x, y or z

Scale with axis constraint.

SHIFT a

Add a new object where the 3D cursor is.

Note: when the object has just been added, a menu lets you change its parameter, but only when that object has just been added and before doing anything else.

TAB

Toggle Object Mode or Edit Mode.

Edit mode makes it possible to edit an object and create new models by manipulating

  • Vertices
  • Faces
  • Edges

f

While in Edit Mode, SHIFT RIGHT CLICK (select) at least two vertices to make a new Edge, or SHIFT RIGHT CLICK at least three vertices to make a new Face.

SHIFT CTRL ALT c

Set the Origin, which is useful when creating a new model and its origin has moved somewhere else.

ALT d

Duplicate linked, which means that in Edit Model, all duplicate geometries will have the same transformations applied to them. However, in Object Mode, any transformation is independent (translate, rotate and scale).

Link duplicate then repeat with SHIFT r (see pawns on the chessboard).

SHIFT r

Repeat the last action.

SHIFT d

Duplicate and the new Object is independent from the source.

CTRL j

When selecting more than one Mesh with SHIFT and RIGHT CLICK, it's possible to join them into a single Mesh.

Note: any duplicate link will be cancelled by this, so each part of the new Mesh can be edited on its own, although it's now part of a bigger, single Mesh.

z

Toggle the Wireframe Mode.

CTRL f

When a Face is selected in Edit Mode and the Mesh Display from the right hand side panel has the Face icon selected under Normals, a contextual menu pops up and it's possible to flip a Normal (among other things). Flip Normal is the first option in the contextual menu.

a

Select / Deselect all.

i

Inset.

CTRL e

Select an Edge in Edit Mode then press CTRL e to get a menu to, for example, select Edge Loop. If Edges can be looped around a Model, they will be selected.

When selecting multiple Edges, the same CTRL e menu makes it also possible to bridge the edge loops, which is time saving when several Edges need to be bridged with faces. It's useful when going from a high poly model to a low poly one, as seen in the Udemy course where intermediary Edge loops were deleted and the remaining Edges were bridged together to former new Faces.

Alternative way to select an Edge Loop: Press both SHIFT and ALT then RIGHT CLICK on an Edge to select its Edge Loop.

CTRL R

In Edit Mode, with Faces selected in the bottom menu (not Vertex or Edges), this lets you select first which way to cut, then where exactly to place the cut.

Press 0 to place the cut in the middle.

CTRL R then SCROLL WHEEL

Multiply the number of cuts.

b

In Edit Model, the b key makes it possible to select several Vertices, Edges or Faces at once (select one of them in the bottom panel) but drawing a selection around an area. Orthographic view (5 on number pad) may be helpful.

b then ROLL CLICK

After doing a selection, while selecting, click once on the scroll wheel in the centre of a mouse to deselect.

c

Circle select. Roll the scroll to change the size of the circle that can select. To deselect, click in the middle of the mousse on the scrolling roll.

SHIFT z

Toggle quick render on and off.

SHIFT TAB

Toggle the Magnet (snapping tool).

Next to the Magnet tool, there is a dropdown that can be switched to the Vertex value. A second dropdown then indicates "Closest" as on of the values.

Moving objects into place can be tricky.

First select the object to move and place your mouse cursor away from it, near where you want that object to snap to. Press the "g" key and start moving your cursor near the place where you want to snap to. The selected object should snap to that Vertex, Edge or Face.

p

Separate by selection.

w

Subdivide the selection in equal Faces and Edges.

Warning: too many subdivisions can crash Blender or slow down the computer.

ALT c

Convert selected Bezier Curve into a mesh.

ALT r

Spin a Bezier Curve **Mesh** into a circular shape (half curve of bowling pin into a full bowling pin, for example).

e then twice x, y or z

While extruding with e, it's possible to lock the direction to an axis. Click twice on that axis will lock from a local reference instead of the global one.

CTRL b

Bevel selected Edges in Edit Mode.

CTRL p

Select several objects then the last one can become the parent with CTRL p and choosing Object as the option.

A good parent could be an Empty object (no Mesh, create it with SHIFT a and select Plain Axes).

Selecting a group parent

Left clicking on the Empty only selects the Empty itself, not its children. CTRL click to selec everything.

CTRL b

Select an area that will be rendered, so that the rest isn't rendered.

CTRL ALT b

Clear area selections made with CTRL b.

Array Modifier

On the right-hand side panel, Properties.

In the top tab, click on the Spanner.

In the Add Modifier dropdown, select Array.

Click on Apply.

Note: at this point, all duplicated objects are still the same Mesh.

Separate Geometries built with an Array Modifier

Select the Geometry that needs to be separated:

  • Edit Mode with TAB
  • Wireframe with z
  • Select with b

Press the p key to separate by selection.

Display Normals direction

To know which way a face is pointing, in Edit Mode, on the right hand side panel, under "Normals", select the Face icon and make the size bigger if needed.

Automatically move Vertices moved to the same location

On the bottom panel, there is a toggle (3rd from last) to automatically move Vertices moved to the same location.

I prefer to enable this (it's not by default).

Select multiple Faces

  1. Toggle the Edit Model with TAB
  2. Toggle the Wireframe view with z
  3. Switch to Orthogonal view with number pad 5
  4. Show the Front view with number pad 1
  5. Click on the Face icon in the bottom panel
  6. Press the b key to select multiple Faces through the whole model, including what is on the sides and behind the selection on the Front

Mayan temple

Start from a wide base: cube primitive, make it large with s then SHIFT z to scale only on x and y, excluding z in the scaling, then:

  • In Edit Mode (TAB), make an inset (i) then set the left hand side panel options to 0.1 (a tenth of the original size). Press enter to validate the inset.
  • Extrude with e and raise by one unit by pressing 1.
  • Rinse and repeat!

Triangles vs Quads vs Ngons in gaming

For gaming, performance is very important, therefore Triangles are the best way to create a model.

Triangles also work better when looked at closely in a game settings.

More about quads vs triangles.

Import images

2 ways:

  • Background images
  • Textured planes

Bezier curve

SHIFT a to add a new Bezier Curve.

From selecting the central Vertex of a single Bezier segment, to create another segment, CTRL and LEFT CLICK somewhere else.

Warning: use as few Bezier segments as possible for a smooth, elegant result.

Convert a Bezier Curve into a Mesh

Select the Bezier Curve and with ALT c, convert it into a Mesh.

Note: on the left hand side menu at the bottom, check Keep Original to keep the original Curve as a separate object.

Finally, spin the half Bezier Curve Mesh into a bowling pin with ALT r

The settings of that Spin need to be 0 for most values and 360 degrees. Select an appropriate level of details.

Don't forget to select all Vertices and to Remove Duplicates.

Export Model with its Material to THREE.js

In Edit Mode, select all Faces (a), press the u key and select "unwrap". Export to THREE.js json format.

Create a Collider Mesh from the main model

Make a copy of the model in a new file and call it something-collider.blend

Delete all Materials and any superfluous objects like the default Lamp and Camera.

Switch the Shading to Flat on the left hand side panel.

Get to Edit Mode (TAB).

Select everything (a).

CTRL V then select Convex Hull.

Warning: the absolute maximum number of Vertices is 256, preferably lower.

In the right-hand side window, find the Wrench tab and add a Modifier: Decimate.

Switch to Object Mode (TAB).

In the Decimate menu, select Un-Subdivide and set a suitable number of Iterations that will get the number of Vertices to 256 or less. Don't forget to click on Apply.

Note: in THREE.js, there is automatically a BoundingBoxHelper that creates the Collider suitable for each model and will handle collisions. Unity on the other hand does require a Collider Mesh to be imported to define the Bounding Box of each model expected to handle collisions.

Make a hole in an Icosphere

Select an hexagon 6 Faces.

Inset (i) to 0.05 for example.

The smaller hexagon is not circular yet but can be made so:

  • First, select the edges.
  • Subdivide these edges with CTRL e and select "subdivide". Choose 3 for the Number of Cuts.
  • Make these Edges circular with SHIFT ALT s and press 1 for maximum smoothness.

Inset again to give the hole a small lip.

Select the Faces of the now smaller circular "camember" and with e extrude down to make the hole.