First, open up blender. You should see the (somewhat imposing) blender window, with a single cube helpfully available
This is the default blender setup, but it is insanely customizable. Perhaps too much so -- any panel can become any menu, menus can be located anywhere on the screen, and so on. It's great for power users who want to get the GUI to be exactly the way that they want it to be, but it is a bit of a pain if you are new to Blender, since your environment may be quite different that the environment of any particular tutorial.
Before we do anything else, let's see how to navigate the 3D scene. If you hold down the middle mouse button (MMB) and move the mouse around, then the camera orbits the scene (that is, objects in the world rotate in comparison to the camera, which is equivalent to the camera orbiting around the objects). If you hold down shift-MMB and move the mouse, the camera moves left/right and up/down. If you hold down CTRL-MMB and move the mouse, then the camera moves forward and backwards (mouse wheel has the same functionality). OK, now that we can navigate, it is time to create a model!
The first thing we want to do is change into edit mode
Once we are in edit mode, we can edit vertices, edges or faces.
Select vertex mode (that's the leftmost of the above circled buttons), right-click on a vertex (selection in Blender uses right-click), and use the manipulator to move it around.
OK, so we are not going to be able to make a whole lot of interesting objects using just a cube
with relocated vertices, we will likely need to add some more vertices / faces to our
model. Make sure that you are in Edit mode (circled below). Change to face select mode (button circled below) and right click on a face to select:
Now, press the 'e' key for Extrude. (Alternately, you could select Extrude from the Mesh Menu:)
Once you have either pressed 'e' or selected extrude from the submesh menu, you can move the mouse around
and see the new face you have created.
Once you have the face where you want it (you can always move it more later), click the left mouse button. If you click the right mouse button instead, the face will still be extruded, but will not me moved, so you will have two faces right on top of each other. The Ogre exporter will complain mightily if vertices are on top of one another, so be warned. The right mouse button undoes the movement of the face, not the extrusion of the face.
Once we have the model that we want, it is time to wrap a texture around it. This is equivalent to taking the
model and unwrapping it so that it is flat, drawing on the flat model, and then folding it back up. Step one
is slicing the model along some edges. Go to edge selection mode, and right click on an edge to select it.
To select multiple edges at a time, hold down SHIFT as you select more edges. (Just right-clicking an edge unselects previous
edge and selects the new edge. SHIFT-right-clicking adds the new edge to the previous selection -- just like
mouse selection works almost everywhere) The selected edges are orange (with the most recently selected edge being
Now, we just need to mark the seems. Either press CTRL-e and select the "mark seam" menu item, or from the
mesh menu select the Edges submenu and then the mark seam command
Now we will need two separate windows, a window for our 3D view and a window for examining texture wrapping. Move
the mouse to the top of the screen, to the line right between the 3D window an the menu above (the mouse cursor should
change to an up/down arrow). Right-click, and select
Now we have two 3D windows. (This can sometimes be useful in and of itself, to have two simultaneous views of the same
object). However, we want a 3D window and a UV/Image editor. Left-click on the pane selection button (the lower-left of the
pane, as in the diagram below, and select the UV/Image editor
Now we have two side-by-side windows, one with a 3D view, and one with a texture view:
We are ready to unwrap! Make sure you are in Edit Mode, select Face Selection, and press 'a' to Select All faces.
(You could also open the Select Menu and choose the select/deselect all menu item). Pressing 'a' toggles
back and forth between selecting everything (everything is orange!) and nothing (nothing is orange!)
Next, either press 'u' and then select Unrwap, or from the Mesh Menu select UV Unwrap and then Unwrap.
You will now see a nice unwrapping of your object on the right. Select different faces to see how they are selected in the unwrapping.
Next, we want to export the UV layout as an image, that we will later paint over.
And save the image somewhere reasonable. Open up this file in an image editor. We'll be using GIMP, but any
image editing program (photoshop, any drawing program, etc.).
Paint the image however you like
Export the image (if you are using gimp and save the image, you will save the image in gimp format, you
want to export the image to get a .png. Go back to blender and open the image you've just painted
Make sure that the texture is wrapped correctly by changing from solid mode to textured mode.
Parts of your
model will be black, because there is only one light by default in the Blender scene. Move the light around to
take a look at the object
OK, now for the parts of dealing with Blender that get a little annoying. Since you can do so much with the tool,
doing something simple takes a few more steps than seems really necessary. First, we want to rename our object
to something better than the default name of "cube". Take a look at the outliner, which is by default on the right
side of the screen.
First, click on the arrow next to the "cube" object to expand it. Then right click on each of the "Cube" objects and rename them to something
Next, we want to create a material for the object. Select the model in the outliner, and select the material tab, and click on new material
(there may be a default "Material" already applied, if so, create a new one anyway). You can rename the material to something more suitable by
right-clicking on the material name in the outliner and selecting rename
This step is very important! You need to assign the material to the object by clicking the Assign button. If there is no
assign button visible, you have likely switched from Edit Mode to Object Mode. Switch back to Edit Mode, and assign the material.
Next, switch to the texture tab:
Create a new texture (there may be a default texture there already, create a new one anyway)
Open the "Type" pulldown, and select Image or Move
Look down a bit, find the Image Heading (If the Image section is closed, it can be opened by clicking on the little arrow)
select Open to open up a texture file. You want to use the same .png file you modified in Gimp
You are almost done! We want this texture to use our UV Mapping. Scroll down a bit, look for the
Mapping heading, and under coordinate, pick UV
Make sure everything is working in Blender before exporting. In the viewport shading button, select rendered and make sure your
model has a nice texture
OK, we're ready to export to OGRE! Switch from Edit Mode to Object Mode, make sure your model is selected (check the outliner), and
select file / export / ogre. (If you are in edit mode instead of object mode, the option to export ogre will be greyed out. Switch to
object mode and you should be OK)
There are a number of options here, the important ones for now are to Export Meshes, and Export Materials
Export away, picking any directory you like. I'd recommend a currently empty directory, then you can
move the files to the appropriate places in your Ogre project. Here's what that directory should look like after
you are done exporting:
This is all you should need for OGRE. Place MyObject.mesh, MyMaterialName.material, and ObjectTexture.png where Ogre can see them (I'd recommend placing the .mesh file(s) in the Models directory, and the .material and .png files(s) in the materials directory, but use any file structure that makes sense to you) and you are good to go. Note the .mesh.xml file is not required for Ogre -- that is the file that is created by Blender, and then converted by the OgreCommandLineTools. Once the files are in the correct location, you should be able to load them into Ogre and get going.