Saturday, December 1, 2007

Hurdles

So, after finding just the right search terms, I found this (+100 points for the Strangelove reference), which explains how to unwrap _after_ you've done your sculpting (which was the deal).

In text only, with no helpful images like the other people (and I'll be checking this through next time to make sure I haven't missed a step, so approach with caution now, also note that this assumes you've gotten this far on your own, refer to the others for more helpful stuff. This is really just so I have something if they go poof):


Prep model for mapping. If you've got a mesh, make sure you've marked your seams (Edit Mode, select 2 points in the loop you want, ctrl-E, Select Edge Loop, ctrl-E, Mark Seam). It has to unwrap to a square, so you need good edges. You _can_ kill sphere end points after it's UV mapped (and any other niggling things that muck up your nice square grid, if necessary. Finding them can be annoying with the way modes work.)


UV mapping:

Window with object: UV Face Select. Second window: UV/Image Editor

In UV Face Select pane, hit A (select all), hit U, select Project from View (Bounds). This presents you with something fucking terrifying, and my problem before.

Select a face in UV Face Select mode, hit A twice to select all. Hit U, choose Follow Active (Quads)->None. Still a mess, but better. In the UV/Image Editor pane, select Quads Constrained Rectangular from the UVs menu. You _may_ need to hit A on your UV map, and G to move it a little, to get it to pay attention to the next step, it doesn't always unmap properly unless you've reminded it. Back to UV Face Select window, hit U, Follow Active (Quads)->None again. If all has gone well, it's all rectangular!

If you mapped a cylinder first, then sculpted (as in this tutorial), you won't need to force it to be rectangular repeatedly.

Use S (scale, if you hit Y or X after S you can scale in just one direction) and G (move) with A (all) selected to scale and move it within the bounds. In the UVs menu, Layout Clipped to Image size will eventually help.

In Image menu, add new, 64 by 64. (Note: if your model isn't that size with vertices exactly, you may need to burn that larger and shrink down. I had a 63x64 due to miscalculation that worked perfectly when a 256 square was shrunk down, but had white lines at 64).

Note: There is a possibility, depending on how you've gotten your edges together, that the UV map will be at 90 degrees to where it ought to be. Tick off Quads Restrained Rectangular (important! It does nasty bad things if it's still on), select all (A) your grid mesh, and type in R (rotate) and 90 to rotate things nice and easy (you can do this later and rebake the UV map if necessary, since you've set up everything to make it happy to rebake at any time).


Texture mapping:

F5 selects the Shading panel, Materials. In Material, Add New under Links and Pipeline. Things change drastically. Click Texface on in the new Material pane.

Either add 3 textures here under Texture (Add new), or add them in the F6 window (it makes no nevermind, but you have to go to F6 next- Shading, Texture). At each of the 3 textures, set Texture Type to Blend.

Hit F5 to go back to the Materials panel, and in the Texture menu, select the first texture button. Change Map Input to X, blank, blank (vertical); and Map To Red 1.0, Green 0.0, Blue 0.0; select Add from the dropdown. Second texture is Map Input to Y, blank, blank (vertical); and Map To Red 0.0, Green 1.0, Blue 0.0; select Add from the dropdown. Third is Map Input to Z, blank, blank (vertical); and Map To Red 0.0, Green 0.0, Blue 1.0; select Add from the dropdown.

In other words: all textures set to Add. Texture one is the X coords, which stores info in Red channel, two is Y coords in Green, and three is Z coords in Blue. The 2nd and 3rd coord space in each is blank because we're separating out each coord to be translated into colourspace.

Switch to Scene->Render with F10, Choose Bake, click on Textures, and hit the button. If your texture is predominantly white! go back to F5 and make sure you've selected Texface!! I always forget that. If it isn't shiny happy rainbow but has too much white or black, something Bad happened. You can add a new Image texture at any point, and overwrite existings if something goes wrong. However, in theory you have a psychadelic rainbow, so Save the targa in the Image menu in UV/Image mode.


Texture Painting:

Add a new Image in the UV/Image pane, make this one larger (256, 512, whatever. I usually go 1024, so I can shrink down later). Switch the pane with UV Face Select to Texture Paint. Start doodling, and go wheeee! In Panels, hit F9 (Editting), and adjust your brush in Paint. Save your image off once you're done. I only do certain things with this, then bring lots of layers into PS to make things happy and pretty- however, there is a lot you can do here, including texture the model entirely in Blender if you have the stomach for figuring it all out.

Baking up bits that Blender sets up for you can also be really useful. Add a new image in the UV/Image mode. Go back to UV/Face Select mode in the other window, select all, hit ctrl-alt-B and choose from the menu of baking choices. If you can set up nice lighting, you can do some pretty fancy stuff here. Although sometimes it looks like saran wrap and is all crinkly. Ambient Occlusion can give some basic depth.

No comments: