Blender/Custom Cuirass (part 2)

Revision as of 19:49, 11 March 2007 by imported>Sickleyield (→‎Troubleshooting)

Explanation

This is a continuation of my Custom Cuirass in Blender tutorial. If you haven't done the first part, this one won't do you much good.


A quick reminder: There is more than one way to do this, and this is just the method that I've found to be effective for me. If you have another one, write another tutorial. I seriously don't believe it's possible to have too many tutorials. (Not that you could guess that from the number I (SickleYield) am writing for this Wiki.)

The Pauldrons

You don’t have to have pauldrons, but some people like the look, and they add authenticity by adding protection to the chest and neck area. Look at your player character in Oblivion when they’re in their “fighting” stance, and you’ll see that they’ve slightly hunched their shoulders so that their pauldrons can help guard their throat and upper chest.

This is a little tricky, because we can’t add vertices. What I usually do is to copy a big patch of vertices from the shoulder section of BOTH shoulders in Edit Mode using select and shift-D, then g-z to slide them up above the original shoulders to somewhere we can work on them easily. Depending on what pauldron shape you’ll want, you might have to subdivide all these vertices. These will be your proto-pauldrons. Then I select just the outer row of vertices on one “pauldron” and do g-z again to drag them slightly downwards. Next select two that are opposite each other and press alt-m and “at center” when that comes up. This merges the two vertices into one. Repeat until you have a closed shape that is roughly domelike. This will be your pauldron. Give it the shape you want by using the g and the axis keys before you lower it back down onto the shoulders. I don’t recommend joining the mesh to the cuirass, because that can make texturing much harder later on.

I do recommend doing each change you make on one pauldron, then the other, in a continuous way. It can be hard to replicate all the changes from one pauldron on the other side otherwise. You can just make one and copy it, but then the weight paint will be wrong for the side it’s on and you’ll have to rename all the bones to which that particular pauldron is painted (this is done in Edit Mode).

Don’t forget to export the UV map.

The Arm Section

Now when you make this part of the cuirass, you need to have a couple of things in mind. If you want a sleeveless look, you don’t need to do anything here; you’ll just leave the bare arm sections with your cuirass. You do have to have some sort of arms included with the cuirass even if it’s sleeveless, because the game engine deletes the body’s arms and torso when anything is equipped in the upperbody slot. Trust me on this, it will look really strange when a character appears to have a nice cuirass, hands, and no arms.

If you want an armband look, you can do the same as you did with the cuirass: copy the arm sections and enlarge them using s. However, with the arms this will make them further apart, so you’ll have to select each arm separately in edit mode (use b-b to get a bounding circle and z to select vertices all the way through) and move them back in toward the body so they don’t look odd or have the weight paint overlap wrong.

Toggling the wireframe (z key) is an excellent way to make sure things overlap just right, or to select vertices that are behind other vertices.

Once you get the copied arm sections situated, trim away whatever you don’t want. Remember, gauntlets usually cover part of the wrist, so unless you have a very clear and specific idea what gauntlets you want to make/use you don’t want to put things there.

If you want multiple separate parts of the arm section, like the glass cuirass in the game has, you can always copy vertices again. Just make sure you don’t move things around horizontally too much or we’ll get clipping again.

Again, remember that UV map.

Optional: The Skirt/Kilt Section

Bethesda’s default cuirass meshes generally have a lower section that protects the hip/groin areas of the body (which contains many important arteries including the femoral artery in the inner thigh). This overlaps the greaves and provides additional protection over them. However, it creates some issues with fit. This is why this part of Bethesda meshes tends to be so large; it has to fit over every type of greaves in the game to avoid clipping.

If you want a shorter cuirass, you don’t have to include this. Or, if you wish, you can include this section with the greaves instead of the cuirass to make your cuirass compatible with more different greave styles.

If you do want to include this section, there are a couple of ways to do it. One is to import a game cuirass and delete everything but the skirt (don’t forget the skeleton!), then scale and subdivide and grab and drag that into the shape and size you want. Don’t forget to parent this to your skeleton, or you’ll get a really odd look ingame. If you want something longer, do the same thing with a plain skirt mesh from the game.

I've tried expanding duplicated vertices from the underwear meshes, but that tends to result in having to repaint a lot of very small points. I don't recommend it as a method.

And of course (sing it with me, now) don’t forget to save the UV map!


Bonus Section: Editing the Default Game UV Maps

Bethesda’s default UV maps for their body meshes look nice in the UV screen, but once you get them out and start trying to texture them, you realize that they are absolutely insane. The femaleupperupperbody.nif in particular has considerable distortion in the chest areas. It is very difficult to texture over UV maps with no straight lines in them. This gives us much respect for the talents of Bethesda’s texturers, but it doesn’t do a thing for us as modders. Besides, we don’t have to work with the filesize constraints that the original game makers did, because we’re making a mod rather than a whole game.

Before I get into what I’m about to propose, you need to be familiar with this method for UV mapping:

[Relevant Section of Sword Tutorial]

…Or at least with the UV window and where it is.

Here is a dress whose upper bodice I made using a method similar to the one for the cuirass above:

SickleYield's Regency Ballgown

I then discovered that I wanted to paint folds on the bodice, but it was impossible with the UV map as it was and my limited drawing talents. After much flailing, swearing and muttering, this is what I did.

I went into UV Face Select mode in Blender. Then I used the bounding circle (b,b) to select the front half and ONLY the front half of the bodice. Then I went to the UV screen, which I had in a small window (per the sword mapping tutorial above). It was showing the section I had selected with its overly-curvy original UV map.

Then I went to the UV dropdown and selected “LSCM unwrap” (in Blender 2.42a it says nothing but "unwrap"). Suddenly my UV map was beautifully flat. I repeated this with the back half and laid them one above the other in the UV screen, so that they could still be used on the same texture.

NOTE ON UV MAPPING IN RECENT BLENDER VERSIONS: You can use the "u" key as a shortcut, and it will pop up with a list of options for unwrapping. Very handy.

Now, what you get by doing this is still rather curvy for us to use a flat phototexture over it. So then I used the weld commands (w,2 and w,3) to straighten the lines where possible. On female chest sections, you’ll sometimes just have to learn how to draw lines curved to make them look straight. If you straighten too much, you’ll get a bizarrely stretched texture that won’t look right.

Be sure and export this UV map so you can use it for texturing. A tutorial for texturing from the UV map is [here].

Export: Putting It All Together

Okay! It has now probably been several hours of staring at your screen, swearing violently at Blender, et cetera, and your cuirass looks exactly like you want it to look.

Make sure everything is parented to the skeleton you imported back at the beginning (select item, hold down and select skeleton, ctrl-p, don’t create groups). Press ctrl-A to apply scale and rotation, so that NifSkope and the game know your meshes don’t look like body meshes any more. Make sure you’ve saved your finished project in Blender.

We don’t have to add textures or materials, because they’re already there. You’ll want to add different textures, so you won’t have a fleshtoned cuirass, but I’ll show you how to do that in NifSkope. I won’t show you how to make a new texture from a UV map here, because I’m saving that for another tutorial on another day.

Ready? Okay! Now go to Object Mode and press A to select all. Now File-Export-Netimmerse/Gamebryo. A screen will come up that lets you name your cuirass and decide where to export it. Mine always go to Oblivion\Data\meshes\armor\SickleYield\cuirassname.nif.

Minimize Blender when you’ve exported, then click through the Data files on your computer until you find your cuirass.nif in the armor section. It’s NifSkope time.

Necessary NifSkope Alchemy

Fixing the Textures and Making the Skin Partition

Open up your nif with NifSkope by double-clicking it. See how the fleshtone textures appear on the mesh, even though they didn’t show up in Blender? This is typical. Your mesh has several different textures on it, because like Bethesda’s cuirasses, it has several different parts: the torso, the arms, the skirt, the pauldrons (if any) and any underlying body parts.

You need to do the following for EVERY part on the file that has a nitrishape and a nisourcetexture.

Expand the texture node branch to make sure it has the following series of numbers going downwards: 6,1,3,1,1. If it says 5,2, etc., change it. Believe me, you'll thank me later.

EDIT for latest NifSkope version: With the newest one you only have to change one number. The very last thing in the texture node is a number 0 that needs to be changed to a 1.

Go to each nitrishape and right-click it. Click Mesh-Smooth Normals, then Mesh-Make Skin Partition, then Mesh-Update Tangent Space. These last two are absolutely vital and your mesh will not work without them! If your mesh crashes the game when equipped, you probably forgot to do this.

Copying To A New Nif

Now go to file - new window - load. It’s time to pick a cuirass that has the same bones that your cuirass uses. This should be in your BSA folder under meshes\armor. You can always use the Arena armor, but deleting all the parts is tedious (as you now know). If your cuirass has no skirt, or a shortish one, the chainmail cuirass usually works. If you used a really long skirt or loincloth, you’ll probably have to use the Arena one.

Load up the default game mesh. Delete all the separate sections of it by right-clicking each nitrishape and clicking Block-Remove Branch. When that is done, go back to your own lovely cuirass’s torso section. Right click the nitrishape-Block-Copy Branch. Go back to the now-empty empty game cuirass and click Block-Paste Branch. Thanks to NifSkope’s newest version’s autochild feature, your cuirass should appear here exactly where it needs to be. Repeat with every section of your cuirass. You’ll get an error message that complains about the nif version, but just click Okay; that change in versions is the entire reason we have to do this copying to begin with.

If there is skin showing, I wouldn’t use the body sections you used in Blender, because they sometimes don’t look quite right ingame. Instead, you can open the relevant body parts in NifSkope and copy them into your nif. Make sure you update the tangent space on every piece again. This takes a minute, but it’s worth it to avoid hassles ingame. Now File-Save. You can replace your original exported cuirass, or give this one a new name if you like. Make sure it’s in the right folder, as NifSkope is not telepathic and will not often target the right one on its own.

Adding/Changing the Textures

I'm not going to tell you how to make a texture from scratch here, but once you have one, you've only got to type the texture path into the top of the nisourcetexture node in NifSkope next to the little flower symbol. It will usually look something like data\textures\armor\cuirasstorso.dds. This tells NifSkope where your texture is. For now I'll leave it that the texture must be a .dds file and it must have a normal map, which is called something like mynewshield_n.dds.

Important warning: make sure the slashes in the texture name lean backwards, like this: \ and not forwards like this: / or the game will refuse to recognize the texture. NifSkope will sometimes try to change this around on you. (The newest version seems to have mostly fixed that problem. Huzzah for the wonderful makers of NifSkope!)

Troubleshooting

1. PROBLEM: My mesh looks bizarre and spiky when I copy it into a new .nif.

   SOLUTION: Perhaps you didn't parent your mesh to the skeleton, in which case you need to go back into Blender, parent it again, and export again. And believe me, the ctrl-A thing is not optional here, it's very necessary.  

Another possibility is that you chose a game mesh with a very different kind of skeleton from yours to copy into. If you get an error message that says “cannot find (name of bone such as Bip01 UpperArm),” you’ve probably chosen a mesh that doesn’t contain the same bones as your cuirass; choose another one and try the NifSkope dance again.


2. PROBLEM: Error message in NifSkope says "cannot find 2," or "cannot find sceneroot.001," etc.

   SOLUTION: Rename your mesh's node 0 to just plain Scene Root and try again.


3. PROBLEM: My mesh looks fine in NifSkope, but it's invisible when I playtest in Oblivion.

   SOLUTION: A few things can cause this, but it's usually one of two.  Either a) you did not update the tangent space, because you thought for some reason that step was optional and I included it in this tutorial for my own amusement, or b) your skeleton is bad.  This can happen.  You can usually fix it by going back into Blender and deleting the skeleton to which your mesh is parented.  Then import a clean skeleton, delete the meshes that came with it, and parent your cuirass to that.  Now do the export dance all over again.

If you do this, make sure you use the EXACT SAME MESH to copy your new mesh into as the one you parented it to the second time. I.e., you can't parent it to the Arena heavy armor skeleton and then export it and try to copy it into the Dark Brotherhood skeleton.

It's dimly possible you could get this problem because you didn't even try to do the workaround and merely assumed you could export a usable mesh straight from Blender. That is possible with Morrowind modding. It doesn't work with the current tools we have for Oblivion. You have been warned.


4. PROBLEM: My texture won't show up on my mesh. The mesh is totally black in the game even when it looks fine in NifSkope.

   SOLUTION: Click the mesh's nisourcetexture node.  Now look at the block details in NifSkope.  There should be an "unknown byte" near the bottom of the list that says 1 and another that should also say 1 right below it.  If the bottom one says 0, change it to 1.

This could also be caused by failing to create a normal map. Make sure the texture you want to use has a normal map with a name like cuirass_n.dds (if your texture is called cuirass.dds).

Getting The Mesh Into The Construction Set

Double click on the construction set icon on your desktop to load up the CS. If you don't have this icon on your desktop, I urge you to put it there right now. Now wait for it to load. This may take a while, and then there will be very few items on the screen. That's because we haven't loaded any data files. Click file - data in the top menu. You should see a list of all the mods on your computer here. If you don't have any, it'll probably just show oblivion.esm. Click on that so that a little "X" appears next to it, making it active, and then click "OK."

Now wait for THAT to load. Or come back in two years.

Eventually it will finish loading and you can see every object in the game. Imagine the possibilites! Find the objects window, which has a list that says "Actors," "Items," etc. Click on Items to expand it, then click on Armor. Now you see a list of all the armor sets in the game. You can click on one set, say "Glass" or "Daedric," in the left-hand pane and it will show you all the pieces in just that set in the right-hand one.

Choose a cuirass that has the kind of stats you want. Glass and Daedric are very popular because they are the best light and heavy armor in the game. Don't choose one that says "arena" anywhere in the ID, because those have scripts on them that we don't want. Double click the cuirass of your choice to bring up its information. Click on the name of the nif (say, glass/f/cuirass.nif). A little window will pop up with the data directory in it. Click through until you find your own new cuirass mesh. Click on that and click "OK". Your sword mesh name should now appear in the window.

You'll need to do the same with a new icon, which you can make easily in GIMP using this method: [Easy Icon Tutorial]

Now this is different from swords and shields. You need a world object, so that your cuirass will be visible when a character drops it in the game. I won’t tell you how to do that here. One method is to pick a game item that closely resembles yours and retexture it. Here’s a retexturing tutorial for the GIMP: [SickleYield’s Retexturing Tutorial]

Now this part is very important. You need to change the ID of the new cuirass, not just the name. The ID is above the name and looks something like "GlassCuirass" or "DaedricCuirass". You must change this to a new ID such as "Mynewcuirass," or you will replace every glass cuirass in the game with yours. Be sure and give it a unique name, too, so that everyone knows what an amazing piece of armor you've made.

When that is done, click OK. You'll get a message asking if you want to create a new ID. ALWAYS SAY YES.

Getting the New Cuirass Into the Game

Now your cuirass will appear in the Armor list. It will be listed alphabetically by its ID, although you can change the sorting method by clicking the headings of the list. If you keep it in a separate folder such as Data\meshes\armor\myarmor and don’t just drop it into Data\meshes\armor, the Construction Set will create a special tab just for you under the Armor list.

Now you can drop the cuirass into the inventory of a merchant, into your house, or into the street of a random city. If you already have a quest all planned out, you can do that, too, but I don’t plan to cover that here. Go to file - save in the main CS menu and give your mod a name. Close the CS. This might take a while. It might even crash. This is okay, because we already saved.

After all that work, you can now go into the game and see where you screwed up. Ha ha. Just a little bitter humor there, based on the number of times I normally have to playtest before I get a version I like. Don’t worry, the cuirass is the hardest piece of armor to create; everything after this is cake. If you plan to make lots of armor, you might want to create a different esp mod file just for testing with a name like “ArmorTestMod.esp.” Then you can create a different one for your actual mod and only setup meshes in that file when they’re in exactly the kind of shape you want.

Making armor can take a little while, but before long you’ll get used to the steps and it goes much faster. There’s nothing like the satisfaction of seeing a character wearing your sweet-looking new armor for the first time.

Good luck.

SickleYield