Panda Project/Basic Blender

From MCIS Wiki

Jump to: navigation, search

These tutorials both start from square one so they may seem a little repetitious. I hope they are helpful at one point or another, at least for my own reference later on when I forget everything here.

Contents

Texturing Models

This was written for Blender 2.46, god only knows what'll happen on the next version so this may explode on you as many of the other tutorials on the web have. Good luck with that

select edit mode from the dropdown next to mesh, on the 3D window.

select face mode - the triangle on the same bar, a dozen or so buttons to the right right click on a face(might be good to rotate with the alt key held down while clicking and dragging with the left mouse button)

press E to extrude (hold ctrl to make the mouse snap to regular distances, otherwise it's free-floating) do this until you get a shape you like(not an advanced modeling tutorial, just a quick rundown on textures and we need multiple faces for testing)

carefully hover over the edge of the 3D window, making sure that you don't roll past it(as this selects the next window down instead) and right click from this menu, select "split area" then click at the location you want the split to be(this seems confusing at first, but it allows you to precisely define the edge of the new area you're creating)

set this new window to be a "UV/Image Editor" from the little menu in the lower-left corner of the window(it should look like a grid, if it's still on 3D and you want to click on the one that looks sort of like a face)

Go back to the 3D area and press 'a' to select all(it'll probably select none at first, so click it a few times to make sure that everything is highlighted - it colors them purple and puts little dots on each selected surface)

press 'u' or select the Mesh menu at the bottom of this area and select UV unwrap)

select the bottom-most option "unwrap (smart projection)" and just hit okay (many of these options surely improve something or another, but are not helpful right now.)

go back to the UV/image editor window and select the image menu, then select new (The details of this are far more complex than any mortals at this level care about, so just leave the settings as they are, except maybe the name and/or the color.)

click OK and you'll see the screen change to the color you picked.

go back to the 3D area and select "Texture Paint" from the viewer menu that we used earlier and we should see the shape you selected before, painted the color you selected.

you can now draw on it by selecting a color from the paint box within the buttons area below the 3D window. There are many different options here to play with.

you can also enable drawing right onto the UV/image editor window by pressing the little button on the bottom of the UV/Image editor window.

This can all be exported as a static model via the chicken exporter. It cannot be used as an actor without first adding the armature, but that's another lesson.

Exporting Vertex Material

If you don't know how you were coloring your model before and it wasn't the method above, chances are good that you were coloring vertex materials. This will not be exported into panda(or anywhere) by default. We 'bake' the texture into a file fairly easily and this will allow panda and other programs to see the texture. It also has the added bonus of allowing you to draw on it in the same manner as above!

Using the method described above, open up your uv/image editor window and make sure you have a file. Not just an image, but a file already saved. This seems strange, but it requires you to have a saved file to overwrite.

Click on the Render menu at the top of the screen and select "bake render meshes". From this menu, select "texture only". This should overwrite whatever texture is on the uv/image editor window. make sure to save this new texture file again, just to make sure.

You've now converted your vertex material into something that other programs can use!


Creating Actors

This is some basic documentation on how to make simple models with skeletons in Blender. There are a million of these out there(And there might be enough information on this wiki to figure this out) but this has the precise stuff we need and it definitely works.

Basic Model Extrusion

We're going to make a vaguely human shaped blob in this tutorial because they're fairly easy and teach you a lot. Start with the cube that's presented to you in Blender (Pictures to come)

We're going to assume that you do not have a three button mouse(or two with the scroll-button) here. Three buttons are really nice to have for this, because that third button allows a lot of grabbing and moving functionality

(FYI: you generally mimic the use of the third mouse by holding down the alt key while dragging things with the first mouse button. So where I say use the alt+mouse1, that usually works with the middle button instead)

Rotate your square so that you can see that it is a cube. do this by holding down the alt key and the left mouse button and rotating the screen around. There is a lot of complicated math going into how this knows where you're rotating, but keep in mind that where you click on the screen matters. if you click close to the center, it will move a little bit and if you click by the edge, it moves a lot. There are some other little details, including rotation, that you just have to play with until you figure it out.

Now that you can see your cube from your favorite angle, select the edit mode from the list on the lower left of the main window. (handy place for a picture) Make sure you have the cube selected when you do this. The view should change slightly. It usually takes on a purple tone and the edges are yellow(highlighted). On the same toolbar, move over to the right and click on the little triangle(Face select mode)(another handy picture). Small dots should appear on each face of the cube.

Select the top face of the cube with the right-click button. For the most part in blender, the right click selects and does a lot of work, while the left one does things that we're not really concerned with right now, mostly involving the little crosshairs that you might see floating around on the screen. press the E key while the face is selected. This Extrudes a face, making a new cube from it. Once the new cube is where you want it, click the left mouse button to set it(if you don't like where it is, the standard undo shortcut ctrl-z, works in blender). We're going to use this extrusion rather Extensively when making our friend here.

A Shape Forms

If you want precise co-ordinates instead of trusting your eyes and steady hands, you can hold down ctrl to get it to snap to regular points. this allows you to make uniform blocks. Once you've made two blocks sitting on top of each other, proceed to build the rest of the model in a similar process. (great place for a picture of the model, but I'll settle for ASCII art right now)

    []
[][][][][]
    []
  [][][]
  []  []
  []  []

You can extrude multiple faces by selecting them with the shift key and pressing e. It will pop up asking if you want to extrude the region or individual faces. select faces. It doesn't really matter at this point either way, but the region is for more complicated tasks.

Bones

Great, now we've got a creepy-looking block-dude. I'd suggest saving this now, if you haven't already. Save a lot, as bad things will inevitably happen if you don't. It's time to give this guy some bone structure, so that he can move properly. Start by switching back to object mode and selecting your model. Access the add menu either by clicking on the top bar or by holding down the left mouse button on the model itself(this menu will pop up anywhere in the main editing window) and select "Armature" (it's usually near the bottom of the add menu, above lattice). You'll notice a weird little cone-thing has appeared right at that cross hairs we talked about. Now, Move the bone(or delete it and position the crosshairs before creating it, if you prefer. Blender is flexible like that.) by right-clicking on the center of the bone (the long part, not either of the endpoints)to highlight it, then click and drag the right mouse button to move it.

  • Tricky note here: you're working in three dimensional space, but on a two-dimensional screen. This means that you can really only move the bone side-to-side, unless you use the three colored arrows. You can position it into place by lining it up one way, rotating with the middle button dragging and lining it up again. You'll have to do this a few times before you get it right. It's just another trick to learn in blender.

This bone is going to be the central base bone for the model. There are a few places you can put it and if you really want to get into it, you should probably look into serious animation websites/books about skeletal structure and the like, but for now, we'll just place it at the base of the spine.

Once it's in place, click on the bottom node of the bone. Press E to extrude the new bones out and click to set them. The first bone we want to place is going to be one of the upper-leg bones. so extrude the bone out some distance to the hip/top of the leg of the model and click to set it. Next, make the thigh/middle leg by pressing E again and clicking half-way down the leg. The the last part of the leg. Repeat for the other leg. Make a spine, head and arms similarly.

Connecting the Bones

Now we have a creepy guy with a skeleton. Not super easy so far, but it gets a little more tedious here. Now we set the envelopes for the bones. The envelopes are the points of the model that the joints control, and these joints are too small to do any good by default, so we have to go through and make them all bigger. (There is an easy/really-ugly cheat for this, instead of bone by bone, you can select them all simultaneously, Use at Your Own Risk!)

Select a bone to start with(in edit mode) and on the bottom most pane(the one we've mostly ignored thus far), select envelope mode from the armature pane(at first, it was probably on octahedron, and the other choices are stick and D-bone). Move the mouse over to the main window in the center and press alt-s. Move the mouse to get the size of the envelope that you want - similar to everything else thus far. Make sure it covers every corner by rotating your view in between setting the size. Do this for every bone.

Posing

Now we have bones with envelopes on a creepy box dude. Once we wade through the Blender-Gibberish, we're almost ready to start posing. Switch back to Object mode. Select the model, then hold shift and select the armature as well. It's very important that you do it in that order, it won't work properly otherwise. press ctrl-p and select armature from the drop-down menu. it will prompt you to make groups, select "don't make groups". You should now have a model that you can pose. select Pose mode from the same mode menu and select bones with the right click. then tap the left click and wiggle the mouse around. if the model moves with the bones, then you've got a working model of a scary dude with way too few bones.

Congratulations!

Inserting animation in blender

These were from my notes, so they may not make sense.

Ensure that you are on keyframe 1(the little box under which mode(pose mode, object mode, edit mode)) and make sure you have the armature selected. Click on pose mode and hit a to select the entire bone structure. press i to enter the "insert key" menu and select "locrot". change the keyframe(probably to 2, since we don't care right now) and click on a single bone. Note the different color of the bones here now. position that bone slightly. press a twice to select everything again and hit i like before. select "locrot" again and you've got an animation.

Looks like it won't let you keep the model parented to the armature. Seems like it might be a better idea to unparent it and add the modifier to the cube. seems easy enough, looks like the option was already there.

Export that via the chicken into an egg, and you've got yourself a functional panda model.

Personal tools