Thursday, April 10, 2008

Blender, the avatar, and you.

You know those evil seams? Yeah, there are things that, while not perfect, can make it easier. With Blender, you can draw right on the avatar. Not with the same precision as a graphics program (in my experience, at least, maybe you're better at it), but for matching up stuff in the problem areas? 100% awesome.

I'm not super great at tutorials, because I tend to skip steps, but here's hoping this is something that isn't totally random. I'm going to try to give a really basic crash course to take you through the whole system. And hope I haven't forgotten steps on the way.

Download Blender, install and all that. Blender is a very weird program, but I think the installation was reasonably straightforward.

Download these avatar Blender files:

(Note: the first one may not be good. The second one is more useful, it should be good as of now, up to when they decide to nuke it again.)

Default model for cross section seams- the avatar on the green axis line has some sections joined crosswise. The one next to it is divided up into each image. Both are in the T pose, so shoulders are not as useful for how things will really hang.

Ruth in 3 poses- the mother of us all. I don't find the model you download off the website to actually be accurate, this is actually Ruth. This is entirely divided into the per images, there are no cross image sections. Also, her feet are the Ruthfeet size, so don't sculpt shoes around it unless you're willing for them to not be size 0. Yes, one of them has shoe morphed feet with max height anyway. This is better for things you want to see the sleeves in, as well as being a nice way to preview what something will look like before importing to SL, if you don't have the clothing previewer (which I think you ought to, personally! I don't know how I could live without it, even with this. It's far more lightweight and compact for previewing). (Bonus for skinners and the like: the eyelashes should be connected properly, and the eyes are also included as a separate texture mapped thingie.)

I'll be working on more avatar models (including guys) to make seeing where things really go easier eventually. You can use the male model off of the website (note: you will have to do a lot of prep, including importing the .obj, which requires a plugin), but I find that it doesn't map particularly true in a lot of areas.

Open the file of choice. Now the fun starts, because there are a jillion and 4 options in Blender, and it can be daunting. Below the black avatar wireframes, there should be a menu. You should be in Object Mode, which is what you need to switch to any time you want to choose which part of the model you want to work on.

First, a note on camera: Hold down Alt, and the mouse button, and you rotate around. Alt+Shift and mouse, and Alt+Ctrl and mouse move different ways (drag around the scene, zoom in/out). I just hold down alt and play around with the others to see what's what, since everything has to use a different camera and it's hard to keep straight! If you've got a mouse with a scrolly wheel, that also zooms in and out (generally, mouse settings vary and all).

Here, have a picture that may not help much that I've scribbled all over:

I've spliced the bottom there in while in Texture Paint, you can't see all of those options while in Object Mode!

Choose the bit you want to work with, with the right button. If you want to join parts of the model together (note, this will mean they share texture images! So don't join unless you _want_ that), shift, select the other parts, and then Ctrl+J to join. Note: Blender does very weird sensitive submenus, if you mouse off of it before clicking to verify, it will not do what you ask! This includes things like saving! Joining is useful with the 3 avatar file, as you can join all the heads, all the torsos, all the legs, and they will all update at once. Currently they are each separate.

The new version of Blender has done away with UV Face Select mode, and collapsed it into Edit mode. Change everywhere I say "UV Face Select" to "Edit Mode" if your version of Blender doesn't have UV Face Select.

Once you've got your selection, go to the Object Mode dropdown, and choose UV Face Select. Now, the windows should all be set up such that in the next panel, you will now see the UV outlines for that piece laid out in that space (this is the UV/Image Editor mode, which only has a face icon visible, click on the dropdown to see the name). If that panel does not have them outlined, hover over the avatar and press A (select all, which toggles selection on and off). It should be selected unless you've clicked off of it. At any time you can unselect a section, if you've clicked on one face, and then select the entire model by pressing A twice (yes, just A, no shift, control, or alt. And you have to have your mouse hovering that section). Your image will not be applied to the entire model, unless the entire model is selected. That includes not being able to draw on it, even though it looks like it's right there.

If you are using the cross image seamed avatar, the stomach will have lines at the bottom, and the pelvis at the top, but the legs and arms and such won't be there! This way we can draw across it all on one image, and it will update top and bottom. You'll have to divide these out later, as well as the fact it won't do anything about the parts that aren't outlined there. (Note: I tend to not do this that much actually due to laziness, since I have to splice out the pieces back to where they belong. Your mileage may vary.)

In the panel with the UV map laid out, go to the Image menu, New, or Open (note: I think it only accepts tgas, but it ignores transparency entirely1, so denote that with a contrasting colour when working on it), and either create a new image of your choice or import something you want to check. Remember, if you're doing the stomach/pelvis, you will have had to prep an image to have both of the necessary pieces in it, that you will divide back up again later.

1This is no longer true in newer versions of Blender. It DOES do transparency, so save your working copies as 24 bit tgas, or don't drop your channel in. Transparency is awesome for trying to get the $*%@#! skirt mesh to line up, crap for everything else.

The image should now appear under the UV map. To get it to appear on your avatar, in the menu under it, there is a strange outlined box thing next to UV Face Select. Click on that dropdown, and choose Textured.

To actually _do_ something with all of this, change UV Face Select to Texture Paint. Hit A to deselect the model so you can see it better. The vertex lines will still be there. If you want them to go away, switch to Object Mode and then to Texture Paint (don't change your selection any), and it will just outline the entire thing in a light pink line around the area you're working on. Both things have their uses.

In the bottom panel that has all that scary menu text, hover your mouse, and hit F9. The Paint panel lets you choose paint colour, opacity, brush size, and all that fun stuff. Draw all over the avatar! Once you're done, go back to that Image menu where you created a new image or opened one you already had, and save it. Blender WILL let you close things without saving! It does not prompt!

If you want to save what you've done with the model as a whole, for instance the joining, you can save it under the File menu. As I said before, Blender does not prompt for saving if you've changed anything!

It actually is less complicated than it looks, once you've done it a few times!


Alyx Sands said...

Whee-finally, someone has explained Blender to me and I *understand* it. I might even try using it. I had a long fight with Wings3D for sculpties a while ago, which *also* has a very elusive UI....

Allegory Malaprop said...

Wings...gah. If I didn't do things in one particular order, it would crash. Without fail. And, maybe I didn't get to know the sculpting tools because of that, but what I did see there was so terribly limiting I couldn't see it be of much use. I've got to clean up my sculpty tutorials more, as I have a tendency to only cover the things right then that were an issue (I started writing them as notes to remind myself how to do things), but if you look at the top of the sidebar on the front page, there's a list of how tos on various bits. This is, I think, the only time I've really gone into the Blender interface much, and I really need to go back and take some pictures and point out the bits that I'm talking about in those.

Once you get familiar with Blender, it stops being _quite_ as incomprehensible, but it's not an easy program to figure out at first. In part due to the fact that there's a bunch of stuff that you do with hotkeys that I've never found in menus...and of course, _finding_ those hotkeys to begin with...