Blender Tutorial 2013

The following tutorial is at the moment just a copy/paste of a personal reference for the GDC Fall 2013 Game Jam event, intended to be used during a live demo where someone is actually performing all these steps one at a time. So please excuse the excessive brevity, lack of pictures and terrible formatting for now :)

  • Open blender
  • Describe verts/edges/faces
  • mouse movment
    • Shift/control + scrollwheel to pan
    • Shift+f to enter fly mode and fly with wasd
  • numpad keys - 1/3/7 to quickly reset views, 2/4/6/8 to rotate view, 0 for camera view, 5 for ortho toggle
  • right click to select
  • cancel a current action by right clicking

Blender shortcut cheatsheet!

Making a simple arch model in blender:

-> The mesh manipulation:

1) press tab to go into edit mode (bottom left menu)
2) switch to face mode
3) press 1 to move view to side
4) press "s" and hold ctrl while moving the face up 5 times
5) press ctrl+r to make a loopcut in the middle of the block -> this forms our first support column
6) press "e" and extrude the top sideways edge of the block 4 times while holding ctrl -> this forms the base of the arch
7) do the same thing on the same side of the arch, except extrude 2x -> this forms the top half of the second support column
8) select the bottom face of the newly formed piece & enable vertex snapping by pressing the magnet icon on the bottom pane, and selecting "Vertex" from the drop down menu next to it.
9) extrude the bottom part until it meets the same level as the base of the first support column
10) press ctrl+r and hold the cursor over the arch
11) roll the mousewheel upwards 6 times to get 6 new edge loops
12) left click, then right click to automatically center the edge loops in case the mouse was moved
13) change the view so that the arch is being seen face on
14) change vertex snap to increment (grid snap)
15) press z to get xray view
16) press b to use box select, and select the 4 middle vertices
17) move them upwards to form the middle of the arch
18) select the two pairs of vertices on either side of the middle of the arch, and bring the upwards in the same manner. Can use box select, then shift+box select to get both pairs at the same time.
19) do this again for the last pair of vertices until a nice arch shape forms
20) press "a" and then press w -> remove doubles

Texturing the arch:
-> The UV unwrapping

Explain UV unwrapping
- U,V coords are coords on a 2d plane which relate to space on the 3d model
- in order to texture, need to allocate 3d parts of model onto 2d plane -> UV plane
- UV unwrapping is process which we go through to map the 3d parts to the 2d plane
- user needs to mark "seams" on object, so the unwrapping can actually take place (think of unwrapping a christmas gift by tearing it)
- since textures come in squares, the best UV maps are ones which maximize the area they take up within a square region
-> such a UV map uses up more of the texture, and thus gives a higher resolution in game
- conclusion: making good UV maps isn't so easy!

Marking seams:

1) enter line mode by selecting the line icon on the bottom tab (select many lines in a row by clicking on one line at end, then clicking on last line)
2) mark seams on arch so the 2 halves are joined at the top and the entire piece folds open upwards. (1 total) (mark seams either through toolbar on left, or through pressing space and searching "mark seams", or maybe a hotkey?)
3) sides of arch should be seperate pieces (2 total)
4) bottom parts of arch should be seperate pieces (3 total)

Unwrapping:

5) Open new window in blender by clicking on top right corner and dragging to left.
6) click button on bottom left on window to select UV/image editor mode
7) press "a" in 3d window, then "u", then select unwrap, should see UV map appear on UV window.
8) Press UVs option in bottom pane of UV window, select "export UV layout", save UV image somewhere

Texturing:

9) open UV image in paint
10) go to cgtextures.com, choose a texture (I chose medieval brick)
11) click on texture, click on 3d Tiling Preview, right click and copy image
12) paste into paint, cover entire UV texture with multiple pastes.
13) *save texture as* to not lose original UV layout texture

Applying texture:

14) can get rid of the UV window by grabbing the top left corner of 3d window and moving right until an arrow appears, then let go.
15) press tab in original window to enter object mode
16) press spherical button on rightmost pane
17) rename material to "myMaterial" (or add it if not already there)
18) go to checkerboarded button next to spherical one
19) press new (if not already there)
20) change type to "image or movie"
21) press open and find the painted image from before
22) go to coordinates, change to UV

23) to do a test render, go to camera button in rightmost pane
24) under Render heading, change display to new window
25) press f12 to render

  • If your render is weird and smooth, go to the wrench and remove the subsurface modifier
  • If your model is all dark, make sure there's a light in your scene (In object mode, Add -> Lamp -> anything)

26) save the model

Loading in Unity:

27) Find it wherever it is saved, and drag in onto the assets folder in Unity (can goto File > Export > Autodesk FBX to export as .FBX file to use that instead). Do the same for the texture made earlier.
Note: Unity can read raw .blend files for models (as well as .psd files for textures). This saves you the trouble of having to re-export every time you change it
28) Drag the model into the scene to use it, and drag the texture onto the model for it to have a texture. If the texture looks odd adjust the tiling in the inspector panel
29) To enable collisions with the model, check "generate colliders" on the model in the assets folder.
30) To give the model texture some depth, we can change the shader type to "Bumped Diffuse" in the Inspector panel.
31) Now select one of the pre-made normal textures for the normal map, and adjust the scale as desired. Usually a unique normal map is generated for each texture (this can be done in blender or even photoshop), but for this quick tutorial we just chose a random one to see the effect.

Done!

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License