Low Polygon Modeler Tutorial 1
LPM version: 2
02-25-06
-----------------------
This tutorial will show you how to make a fully textured model that can be used in the game. I will be building a basic metal frame chunk. You will see how to use only the most basic tools to create almost any type of simple 3D geometry.
Part 1 - Modeling stuff
First, set your bounding box. This will limit the space that you can model in so that your model will be the right size when imported into the game. In the console, type:
/setbbox 0 1 0 1 0 1
The form of the function /setbbox is:
setbbox(int xmin, int xmax, int ymin, int ymax, int zmin, int zmax)
Now press 'b' to go to Create box mode. Drag out a box, then select the appropriate faces and move them to make sure the box is roughly a cube (equal size of all faces). It doesn't matter if its not perfect - it will be so small in the game that nobody will notice any small imperfections.
Now we want to extrude this box a bit to create a little bit more complex geometry. First switch to 'select polygon' and select one side of the cube (one facing inwards to the bounding box). Hit 'e' to switch to extrude tool and drag out the side of the face. You'll notice a new box appear that is connected to the old box. We will do this once more to create a 3-cube rectangle thing. Then, we will select the some more faces (see img4) and extrude them. To get the two on the edge and not in the middle, either select each separately while holding the shift key, or select all 3 then deselect the middle while holding the ctrl key. Extrude these faces twice (just hit 'e' again, they are already selected).
Now we will connect the upper boxes to make a ring like shape. Select the appropriate face and extrude it. Now we want to actually connect the vertecies so the geometry is continuous. For this we will use the snap vertex function by hitting 'n'. This forms all of the selected vertecies into one, the position of the final vertex being the last vertex selected (last on the list). Since we want the hanging box to connect to the edge that is in the right place, we will select that vertex first, then the vertex on the final edge, then deselect whatever vertecies happened to get in the way of the selection (in another view). Connect all four one by one to get the final ring shape.
Now we have a basic chunk of geometry. The metal frame is like a hollow box, so we will make it by duplicating this chunk and connecting the two. First select all polygons, then hit 'd': you will see the duplicate appear slighty offset. Put it rougly in the position you want it with the move tool. Dont worry if it isnt perfect - we will fix that later. Now we extrude the appropriate faces and connect them like before.
Now we have our polygons built. Now we can morph the shape to our liking. I selected the middlemost boxes in each view and used Scale 2D tool ('s') to make the frame a little bit thinner. Argh. Now it looks like a mess. Luckily we can use the 'flatten' tool to clean it up a little bit. This tool works by making all selected vertecies have an averaged value on the specified axis. Now that everything is lined up and neat, it would be nice for the box to fix the bounding box perfectly. To do this, select everything and 3D scale it so that the outer edge of the model is just outside the bounding box. Now hit '`' (~ key) to set the min and max values for all vertecies.
Save your model by typing /save modelname in the console.
Part 2 - UV Mapping
UV Mapping is a friggin pain in the ass. This is because you have to be very meticulous and exact for it to look good. However, doing so will make your models look a ton better - shitty UV mapping can make a model look terrible and amateurish. We will start uvmapping before we even have a texture prepared - we will lay out the polygons first and then we will know how to paint our texture (doing it the other way around is wrong and stupid).
UV mapping works like so: you select the polygons you want to map, then right click and select UV map selected. The direction that the selected polygons are projected onto the UV map depends on what viewport you initially right click in. You want to map polygons so that they are face on, otherwise you'll just see the texture stretching over the polygon. You can always remap polygons without ever affecting the actual geometry, so don't stress out if you get it wrong the first time.
I am starting by selecting one side of the cube frame as well as the parallel side. I also want to select the faces that are on the inner edge of the selected side (see pic, its hard to describe). Now I will uvmap from the appropriate viewport (2 in this case). You will see the projected polygons in the UV window.
Now you will want to 'unwrap' the polygons on the inner edge that werent directly projected. The reason for doing this is so that the UV map is continuous and the texture is smooth throughout. Of course, you wont be able to do this for all polygons (its usually impossible), so you have to choose which edges need to be smooth and which edges can suffer it. I chose the outer edges to be continous and the inner ones not. First I select the appropriate vertecies and then move them in the UV window - you will see the hidden polygons unwrap.
You want to try to keep the polygons in the UV map as close to their actual planar shape as possible. Of course, this is hard because you can only judge it with your eye, and it will not always be possible if you want to keep things continuous. Textures can be made, however, to accomodate whatever stretching might occur (you'll see later).
Now that we have unwrapped one set of sides, we need to do the other 2. Since they are the same shape, we can use the same bit of texture for all 6 sides. Once you have all sides mapped, make them line up with each other by using the flatten u/v commands. Then select all 8 middle most vertecies (not in the UV mapper - but it will select the corresponding UV coordinates) and move them slightly to the side. Now that you can see the hidden vertecies you can select them individually and drag them into the middle (see pic).
Now that we have our UV map finished, we can simply copy the screen to the clipboard (hit print screen) and cut out the wireframe to use as a template to paint our texture. After creating the texture and loading it in with /loadtex we can see our nice finished model. Hooray!