Monday, January 7, 2008

Texturing the Avatar with Blender

You should know basics of texturing first- see Natalia Zelmanov's tutorials, they are quite well done.

Mostly I recommend this for seam matching and some previewing, I, at least, don't have the sort of fine control to want to use Blender to do the whole thing (especially without layers!), but seams can be a bitch (although I did just paint a sculpty in Blender, and he came out pretty nice really- but still, I did a little bit of post processing in Photoshop to make it all happy and right). I just figured out how to maybe make them less bitchy! I would have loved knowing this forever ago. But at least now I have hope with this damn corset that's been giving me a headache and still not quite working with massive amounts of guessing and zooming and pixel tweaking (stupid complex irregular pattern).

Go to the SL site and download the avatar mesh, if you haven't. Mostly you will have it somewhere, in some form, because you're using something to preview it unless you really are crazy and like working without a net (I do all my previewing with the SL Clothing Previewer- it isn't perfect by any means, but it gives me enough of an idea I can manage in most cases), but basically, you need a file that ends in .obj that has the avatar mesh (male or female, I always work on female because I find it wraps a bit more accurately to SL, although still not accurate, especially around the face).

Go to the Blender importer page and grab the Wavefront obj one, and put in your Program Files\Blender Foundation\Blender\.blender\scripts directory, as previously stated in the av painting intro.

Delete the cylinder that's probably there with the delete key (and say yes...Blender's popups sure can be annoying). Go through the same annoying importing in Blender: File->Import->Wavefront (.obj), navigate the clunky file navigation, don't move your cursor because the popup window will go away and leave you wondering why everything's broken, say ok to the popup at default values. Now you should have a teensy tiny person. Zoom in (remember nav keys are holding down alt and nothing, shift, or ctrl, and the left mouse button, as well as the middle scrollwheel doing strange and potentially useful things). You're still in Object Mode, so select the pieces you want to match seams on. For matching the waist seams, select the stomach and then shift select the pelvis to have both of them highlighted, and ctrl-J to join them into one (say yes to another annoying popup). GLEE. Now that horrible awkward seam there can be painted directly on! (Do a separate join and image for the arm and shoulder seams, so you don't have things overlapping on the UV map, since those are also one of the horrible things, same with legs.)

With your stomachpelvis selected still, choose UV Face Select Mode in the dropdown menu. In the dropdown next to it, pick Textured, the weird nobbly thing at the top. Your second window, as always, should be the UV/Image Editor, and you should see odd highlighted outlines of the stomach and the pelvis, in the places in the image that they are in the map files we get to do all of our mapping from.

Now, your choice: you probably have something that just needs some seam fixing, so take the pelvis part of that and paste it in the proper place at the top over an image that has the stomach part, and Open that image in the UV/Image Editor; or you can just paint the whole thing directly onto the avatar mesh in Blender. Me, I'll be going with option 1, because I am far more comfortable with my lots of layers and things in Photoshop. (When doing the shoulder/arm seams you can just grab an upper body texture without the splicing, since it's all in one image to begin with.)

Hit A to deselect all, so you can see what you're doing better (The light grey lines are still slightly annoying, but they do show you were you need to pay attention to, and they aren't super huge), and change the UV/Face Select panel with your 3D view to Texture Paint Mode. In the Buttons panel with all the menu options, hit F9 to go to Editting, and play around with your brush settings in the Paint panel.

I'll be importing particular layers with the parts (wrinkles, etc.) that go over the edges, not the finished product, myself (both so I can keep working with all my layers, and so it's easier to finish the fine tuning fixing). Also, note that it doesn't always do the very edge that's only a partial pixel- keep in mind that you will probably still need to clean up and expand those parts to make them work properly (especially with shrinking down, since you ought to be working at 1024, at least), as well as the fact it tends to do hard pixely edges if you've dropped your brush small enough for detail work. Once you've finished with this image, Save it off in the UV/Image Editor window menu, and then you can move to cleanup in something else. Once you've done all that cleaning, import it again to make sure you've pulled things across properly.

It might be a good idea to save your joined up avatar for later, so you don't have to reimport and rejoin all the assorted bits. You may want two copies, one with the upper all together, and the lower all together, and a second with the upper/lower joins, since side seams are also a pain to align (this might speed up my guess, import to the clothing previewer, move one part one pixel up, import to clothing previewer, move one more pixel up and one over, import to clothing previewer...etc.)

Of course, there's also the importing into SL to take into account- things will not be as perfect there as they are here. For one, avatar textures get resized to 512, for another we have to deal with the crappy JPEG2000 compression. In fact, I find to match up my waist seams, I usually have to import the lower body that connects to an upper at 1024 (i.e. my corsets- they have enough fine detail it really does matter, the coats don't), just to trick the compression into being less awful (I upload everything else at 512, including lower bodies that don't need to match up exactly).

No comments: