HowTo:FullUnwrap8Potato
"Starting Big" in Potato Mode
This may seem like a big contradiction, but I'll begin the work by using an automatic unwrapper: Archi's. Why? Because I've had the horrible experience before of apparently being finished with an unwrap, but some tiny polygon somewhere in the mesh is not yet unwrapped, by default unwraps across the entire UV screen, yet there's no simple way I know of to find where on the mesh it comes from. So, I'd rather start working from a fully unwrapped mesh, even if the quality of the unwrapping is for the birds...
It also helps to have an automatic unwrap saved somewhere as a reference for relative sizes of islands. And to make the islands more easily identifiable, we'll do more than just save this automatically made layout, but we'll also bake a texture from it. Then, if you have a color printer, make a printout and keep it handy. Our real unwrap will look completely different from the above horror, but you never know what questions the printout might help answer at some time or other. But keep in mind that Archy does its own breakup of the mesh into UV islands; i.e.: It does NOT respect your marked seams.
If you're in doubt about the horribleness of the above layout, please refer back to the "Think Hard" chapter, where I listed the requirements for a "good UV layout", --maybe print it out--, and then go point by point and see how the layout above meets, or fails to meet, those requirements. (Hint: there's only two requirements it meets, out of my list of 14...). Otherwise just trust me: You could never make a good texture based on that, and whateve texture you would make, it would take you forever, trying to figure out where things are in that rat's nest.
But okay, how did I do that? Simple: First divide your screen. Right-click on the the top or bottom edge of the window, click on Split. Then left-click on the split to move it. By default, you get the same view on both splits. This is good because, at laast myself, I like to have a split right in the middle of the screen, for UV unwrap work; and I can get the exact center by looking at the two images and moving the split line until they are cut identically (zoom in, make sure the same details appear at the edges of both images). Then you click on the bottom left icon of the right window and choose UV Texture Edit. Then change the left window from Object or Edit mode, to UV Face Select mode, and press A to select all facets.
The right window will show a total mess of vertices and be covered in overlapping facets, giving it a blue color. Just go to the UV menu there, top item, the Scripts, and pick ArchiMap, leaving everything at the default. Let it rip. May take an hour or two. Go for a Cafe Au Lait...
Done?
Okay, first save the file. Needless to say, I save my file often, with succeeding revision numbers. That way, if a corruption in the file creeps up that seems unrecoverable, I can go back to a previous revision number. This is a good time to save, because saving UV face layout sometimes causes Blender to crash and burn. Now go to UV menu -> Scripts -> Save UV Face Layout. Unselect SVG, make it look like...
The purpose of this layout is NOT to serve as a layout. It's a long story; but Blender requires for an image to be loaded before you can bake stuff. What you may want to tweak is the Size. The size should be the size of the final textures for the ship. NOT the enlarged size you'll be working with during texturing. The size of the reduced finals. My standard is 512 for fighters and bombers, 1024 for corvettes to destroyers, 2048 for cruisers and carriers. For space stations I prefer to use multiple sub-objects with their own textures. This ship is a corvette, and therefore I set the size at 1024. (Note that, during texturing work (next tutorial) we'll be working at 4 times the final texture size: 4096, and we'll do all our xcf operations at that high rez, --only at the end to scale it back down to 1024.)
This will save for us a TGA --in my case called "Cutter17.tga"; you might want to open it in Gimp and save again as a .png, if you want to save disk space.
Now go to the Image menu -> Load Image, click on "Cutter17.png" or whatever the name is, and click Open. Congratulations! Now you're ready to bake.
Save the file again, and now go to the top menu, Render -> Bake Render Meshes -> Texture Only. Takes a few seconds. Then Image -> Save As... and give it a name. I just append "tex" to the default name.
The colors in it are the diffuse colors you assigned your material. I don't know how to bake the specular colors yet...
Next, press F8 for the World panel. Make the Horizon and Zenith colors black. Make Ambient color 1.0 blue, 0.879 green, and 0.932 red. What's magical about these values? Happens to be the balance of RGB components for starlight; --at least in this region of the galaxy. Next panel on the right, Ambient Occlusion. Turn it on, put samples at 16, Dist = about the length of your ship, Add, Plain, Energy = 1.0, Bias = 0.5. Then go again to the top menu bar, Render -> Bake Render Meshes -> Ambient Occlusion, and go for dinner.
Ready? Image -> Save As... "Cutter17ao.png" (I'm just showing 512 versions here, but I AM getting 1024 textures, of course.
You may wonder "why are we doing all these bakings if we're going to do a different UV unwrap?" Good question. I originally intended to go straight to unwrapping, but I changed my mind. Two reasons:
- Producing a set of basic textures now that we can test in-game will be fun and educational.
- We should do this as a matter of natural course. It helps identify possible problems with the mesh or the materials.
- One can release the ship with pre-release textures for feedback, for a kind of milestone achievement, and so that others can begin the work of adjusting the ship's scaling factor, fitting it with weapons, docking points, shields, etceteras; kind of parallelizing the work. And the ship can be used for game-testing already. By the time you're done with the unwrapping and the texturing, all the other work should be pretty much done.
So, we've got our diffuse materials and ambient occlusion bakes. We need one more thing: Local lights' contribution. To do that we need to use the old, trusty Radio Baker. Move your ship mesh and all lights to layer 1. Save the file, save again with a new name, like temp.blend, go back to Object mode, get rid of the UV Edit window, press F5 one or more times. till you get to Radio Baker. Only half your ship shows; no mirroring here. Remove all the distant lights you might have; only leave the local lights that should be permanently there. Also, delete all lights you might have placed on the mirror side of the ship. Max Iterations = 7777, Mult = 2, Gamma is 2.0 by default; make it 1.0, click Show Lim, bring ElMin down to 1, PaMin down to 10, click Limit Subdivide, click Collect Meshes, and set up the rest of the params so it looks like...
Click on Subdiv Shoot Element, wait, Subdiv Shoot Patch, wait, and finally Go.
During the operation (takes a fair while) your ship might look very dark or very bright. Once the operation finishes, though, you can adjust the brightness with the Mult parameter, so let it rip, and don't worry.
And the result (after raising Mult to about 50):
The orange things are my "Hot" material. What I'm interested in is what it radiates onto neighboring parts of the ship. I had totally forgotten: Lights are not used by the Radio Baker. It only uses radiant materials. My lights, at the top and bottom of the ship, are inside boxes of the same yellow radiant material I use for the lights in the docking areas; but those boxes are tiny, so I got hardly any light from them. What I will do is make those boxes bigger, and repeat the radio baking operation. Remember, this is a temporary file, so we can do whatever we want.
So, to discard the results, click on Free Radio Data. Then I go to Edit mode, enlarge the light fixtures, and run the thing again. This time I'll leave the Mult parameter at 50, since now I know this number will work, more or less...
I cheated a bit and cranked up the gamma to like 1.6 or 1.7. Thing is, my light fixtures were still not big enough, and I'm lazy, and this is not the final textures anyways. You need to adjust the Mult parameter up until the brightest light recipients begin to reach saturation (maximum brightness), and then adjust down a bit. Click Element Filter just once, then Add New Meshes. You may get a warning if you're already using all 16 materials, so it's better to use up to 15. Something to remember. I deleted 2 materials and tried Add New Meshes again, and got the same warning; but when I checked layer two, the new mesh was there. I switched to Textured mode and the baking showed. SAVE! So now you have to go through all your materials and change them to VColPaint. Then go to potato mode, open the UV Edit window, Render -> Bake Render Meshes -> Texture Only, then Image -> Save As, and I postfixed my file name with "lights":
So, what do we do with all this?
Time for some Gimp work: Close Blender; open Gimp. That last image has too bright a "Hot" material. Select regions by color. A threshold of 19 worked for me. Then bucket fill the whole selection with a dark red. Not too dark, as we're going to darken this image eventually. Save as...
Lights Base:
Close. Open the materials bake we saved, the "tex" image...
Use the select regions by color tool. Too bad Gimp doesn't seem to have a way to select colors by saturation... Set the threshold pretty low, like 6 or 7 and start clicking on black, shift-click one white, and shift-click on every shade of grey you see, until your selection includes everything except vivid colors...
Go to Color Tools, Curves, and drag the bottom-left end of the curve to the top, and the top-right end of the curve to the bottom --i.e.: invert the gray scale colors. Now menu Select -> Invert, so you got all the vivid colors selected. Go to color tools, Saturation; bring saturation down to -33, then brightness up 50 or so. Save that as...
Speccol:
Now, open the ambient occlusion we saved...
Go to Color Tools, Curves, and make the curve look sort of like...
Save as...
DiffAO.png
Open the ambient occlusion again, but this time set up the color curves sort of like this:
Save that as ...
SpecAO.png
Without closing it, File -> Open As Layer: Speccol.png that we saver earlier. In the Layers dialog, change the blending mode to multiply. Save that as
Spec.xcf, and then again as...
Spec.png:
That is, indeed, our ("final" for now) specular texture. Now open again the "DiffAO.png" we saved earlier, the brightened ambient occlusion. Open as layer the original "tex" materials texture we baked, change the blend mode to multiply, save as Diffuse.xcf, and then again as...
Diffuse.png:
And that's indeed our diffuse texture. Now we get to the "glow texture": Open the original ambient occlusion we baked. Open as Layer the original materials bake, like we just did for the diffuse; and set blend mode to multiply. Then open the LightsBase texture we produced as a third layer. Set its blend ratio to about 50%, then blend mode to Add. Save as Glow.xcf and again as...
Glow.png:
Done with the texturing! That was easy, wasn't it? Now we need to put our mesh into Vegastrike format...
(to be continued)