From OniGalore
Jump to: navigation, search

Poly Modding with Blender


[insert-link-here Blender] is an open-source 3D modeling and animation tool with many features, most of which are unneeded for basic Oni modding. It's also free, so it makes a good tool for 3D newbies on a shoestring budget. The catch is, the interface is totally non-standard and very complex. However, once you learn its basics, and use it as it's meant to be used, you can poly mod quickly and efficiently. That's where this tutorial comes in.

A quick tour

Open Blender, and move the mouse to make the splashscreen go away. In the main area of the window is a sample file that Blender always starts you off with. The scene shows you a cube. You can see, in the upper-right area, some stats that say: "Ve:8 | Fa:6 | Ob:3-1", etc. The first stat is the number of Vertices, or points, in the entire scene. Since the only physical object in the scene is the cube, it's not surprising that Blender says there are 8 points here. Next, the Faces stat tells you that the cube's six faces are all present and accounted for. Finally, the Object stat tells you that 1 out of 3 objects are selected. The cube is selected, and the two lights in the scene are not.

Blender has two menubars, numerous modes that change how you work, and over a dozen panels across the bottom with uncountable options. Just ignore everything but the following eight main things:

The top menubar

1. The File menu. Works like these menus usually do. Open, Save, Quit, etc.

2. The Screen menu. That's the pop-up menu that says "SR:2-Model". All your modeling work is done in this mode. Call up the menu and notice "3-Material". That's where UV work is done. We'll come to that later.

3. The Scene menu; that's the pop-up menu that says "SCE:Scene". "Scene" is the name of the current scene. A scene is a completely distinct set of objects within a Blender file. If there were more scenes, they would appear as choices in this menu. All your Oni modding work will take place within one scene.

The bottom menubar

4. The pop-up menu that shows an icon of a grid; this is the Window Type menu, and it always stays in "3D View" (the current mode) until you get to doing UV work, at which point you use the "UV/Image Editor" window type.

5. The View menu. You can choose from preset views and define your own, to quickly look at the model from any angle you want.

6. The Select menu. Mostly useful for its "Select/Deselect All" and "Border Select" options.

7. The Object menu (becomes "Mesh" in Edit Mode). This is where the real meat is. We'll come back to it so we can focus on it in depth.

8. The Mode menu (the pop-up menu that says "Object Mode"). If you work like I do, you only use Object mode for picking what part you want to work with, Edit mode for altering that part, and UV Face Select mode for UV work. You might want to try out the other modes later and see if you find them useful, but let's stick with Object mode and Editing mode in this tutorial.

Controlling Blender

The creators of Blender intend for it to be used with one hand on the mouse and the other on the keyboard. Therefore, you should memorize all the shortcuts in this tutorial to work as efficiently as possible (it's not that hard to do).

Pretty much anything you can think of doing in 3D boils down to: translation, rotation, and scale…ation. Translation is just a fancy word for moving something. Scaleation is not a word at all.

You can use these three transformations on your view (in other words, the camera), or on an object, or on a piece of an object. Let's try them on the view first.

Put your mouse cursor in the main area of the window. Use your scrollwheel to zoom in and out (that's scaling, in case you didn't guess). Click your scrollwheel's button, and the view will rotate as you move the mouse. Hold Shift down and use the scrollwheel button again; now the view shifts around from side to side, doesn't it? Voila, translation! P.S.: Clicking the scrollwheel is called "middle-clicking" later in the tutorial.

(If you have a keypad on your keyboard, the number keys can also be used for rotation and shifting. Try them out with and without the Shift key held down to see how they work.)

What if I have a Mac?

If you have a Mac and a mouse with two buttons on top and a clickable scrollwheel, all you need to know is to press Option whenever you see Alt in this tutorial, and press Command () whenever you see the Control key used like this: "Ctrl-Z". You still use the Ctrl key as a modifier for other operations such as "Ctrl-left-click"; it's only when you see menu command shortcuts that you substitute for Ctrl the Mac's special Command key.

What if I have a one-button mouse?

Holding down Command and clicking produces a right-click.

What if I have no scrollwheel or middle mouse button?

If you are lacking a scrollwheel on your mouse, you can still zoom using Ctrl-left-click. If you do have a scrollwheel, but it's not clickable, you can rotate the view using Alt-left-click, and shift using Alt-Shift-left-click.

Blender's hidden preferences

For some of these alternatives to work, you may need Blender's Emulate Three-Button Mouse option turned on. It's found in the super-stealthy ninja preferences pane. Point to the bottom of the top menubar, so that the mouse cursor becomes a grabby-hand, and pull down the bar until you can see options. Emulate Three-Button Mouse is under the View & Controls section. There's plenty of other options you can adjust, but this tutorial assumes you've left them as default, so you should wait until later if you want to customize the controls.

Basic operations in Object Mode

We've already applied the three basic transformations to the view; now let's manipulate objects. Right-click an object (you could choose a light, but let's use the cube) and start dragging in any direction to translate it. Left-click to finish, or accept, the operation. Now, that's a handy shortcut, but the "proper" way to move an object is to use the Grab operation. It's found under Object>Transform, but the shortcut is the 'G' key. Press 'G' to turn Grabbing on, and simply move the mouse to move the object around. Press Escape to cancel the Grab (or Ctrl-Z to undo if you already finished the grabbing operation).

Now, the problem with this basic Grab is that it operates on axes which are relative to your current view; you probably don't want that. Notice the three colored arrows that appear at the center of the selected object? Those indicate the global (world) axes. Now, if conditions are correct, the Z axis is "up", Y is "forwards/back", and X is "side to side", according to the way our brains work, so if you don't use the global axes, you are probably going to get unexpected results when transforming objects.

Here's the two main ways to efficiently use the axes. First, while an object is selected, press 'G', then, before moving the mouse, press 'X'. Now move the mouse. The point that was selected should only move side to side. Escape out of that operation and try 'G'-'Y' and 'G'-'Z'. This way, when you determine that a point needs to be moved in a particular direction, you can get precise results. The second way to do this is to left-click one of those three arrows to lock onto that axis, then move the mouse to move only along that axis.

Okay, so we've covered Grab. Less often, you can use Object>Transform>Scale to adjust multiple points. Select two points (use Shift to select additional objects), and then press 'S'. Now the points can be moved closer to or farther from each other. You can also axis-lock Scale by pressing the 'X', 'Y', or 'Z' keys during the operation, but the results are probably not useful to you.

Finally, Object>Transform>Rotate ('R') may occasionally be helpful. Try it out, and notice that its results too are best when using the center point it provides automatically, rather than locking it to the X, Y, or Z axis.

Basic operations in Edit Mode

Moving objects is all well and good, but you're not actually changing anything. In fact, when modding a model taken from Oni, it's best not to transform any objects at all. What you do want to alter are the points in the object(s).

If you're working with a character model (as opposed to a weapon or other one-part model), you have to choose which body part to mod first. Select it using the right mouse button. Then, go under the Mode menu and choose Edit Mode (it won't be there unless something is selected first). The stats at the upper-right will change to reflect only the object that is selected. Also, the Object menu at the bottom becomes the Mesh menu.

You already know the the basic transformations — translate, rotate, and scale. These are also used on the mesh for an object. You have to make a choice, first, though: do you want to alter individual points in the mesh (vertices), the edges that connect two points, or entire faces? Look for the quartet of buttons to the right of the Mesh menu, where the first button's icon is four points, the second's is two lines, and the third's is a triangle. These switch between working with vertices, edges, and faces, respectively. The fourth button is a cube, and unlike the others, it's a toggle that turns on/off hidden points/edges/faces. Play with these four buttons and watch how the model is drawn differently onscreen.

90% of your modeling work will probably be a use of the Grab transformation. Let's try it out. Choose Vertex select mode (the four points button) and turn on the "limit to visible" option (the cube button). Try out the 'G', 'R', and 'S' keys on points and groups of selected points. These operations apply similarly to edges and faces. You can try those modes now if you want. Moving individual vertices is probably the best way to get the results you want, but your experience may vary. You now know enough to work with a pre-existing model. It simply takes practice to learn how to sculpt an object efficiently. Have fun!

Advanced Features

As a reminder, this tutorial only includes what is useful in Oni modding, so these advanced techniques are nothing compared to the features that Blender can bring to other projects that can take advantage of animation and physics. This section simply contains further tips for improving your modding work.

Notice the button to the right of the Mode menu, which is called the Draw Type or Viewport Shading menu. The best mode for normal Edit mode work is Solid. Sometimes, though, you need to grab a point (or edge or face) that is inside another object. One way to see that point is to turn off the "limit to visible" option (the cube button, remember?), but another way is to use the Bounding Box option in the Draw Type menu. Try the two ways of looking at the model to see what you prefer. When working with complex objects, these modes can interfere with your ability to select the right point, so it's best to leave the Draw Type as Solid and to leave "limit to visible" on, except in special cases.

To add polygons to a model (in other words, to break up existing polygons into smaller ones so you can give a model more detail/smoothness), select at least one face and press 'W' to call up the Specials menu. This operation may also split surrounding faces, which is necessary to make enough points to accomodate the new faces, or polygons. Strictly speaking, what you just did was subdivide all the edges of those faces, as subdividing only applies to edges. Sometimes, all you want to split is one edge, so you can select just that edge in edge mode and subdivide it.

Be sure not to create non-triangular polygons, since Oni only supports models composed of triangles. The model you exported from Oni is guaranteed to only have triangles, but if you split a face (that is, subdivide it) you may end up with a four(or more)-sided polygon. Simply select it in face mode, and choose Mesh>Faces>Convert Quads to Triangles (Ctrl-T). You can leave this step for last (as long as you remember!), at which point you can simply press 'A' to Select All the points in the part's mesh, then press Ctrl-T to Triangulate the whole thing at once.

The opposite of subdividing is merging, where two points become one. You should try to keep your model as low-poly as you can (while still preserving your desired level of detail). Select two points and press Alt-M, then choose whether to merge the two points into a point that is at the location of the First point you selected, the Last (second) point, or right in the Center of them. This is an operation that does not work well on edges or faces, only individual vertices. The best time to use Merge is after all modeling work is done and you are sure what polygons are not needed.

Sometimes the triangles in a model may become "disconnected" during the process of converting between file formats (such as when using Autodesk's FBX Converter), meaning that instead of polygon X's leftmost point being the same point as polygon Y's rightmost point, they're separate vertices that simply overlap exactly. This raises the vertex count dramatically, and it's the vertex count that is most important to keep down in an Oni model (the limit is 2048 per part, although you should stay well below 1024 if possible). There's a wonderful solution in Blender, and it's called Remove Doubles. You can find it under the Specials menu ('W'). In Edit mode, Select All of a part's vertices, then use this command to re-connect the part's triangles.

You can also delete vertices, edges and faces by selecting them and pressing the 'X' key. This is usually a bad idea, as it leads to holes in the mesh. Generally, what you really want to do is merge to get rid of excess points.

This next feature is hard to describe in writing, so try it yourself: select two adjacent faces and choose Mesh>Edges>Rotate Edge CW (Ctrl-E calls up the menu in the main window area). See how an edge flipped from being between Point A and B to being between Point C and D? This is very useful in some circumstances when you need an edge to be connected to a different set of points so it can be moved differently.

Selecting many vertices by Shift-right-clicking can be tedious, so try Border Select ('B') and Lasso Select (Ctrl-left mouse button) to draw regions that will select all visible points within them.

UV Work

Coming later!