Blender/Custom Shield

Revision as of 15:32, 27 September 2006 by imported>Sickleyield

I use Blender, and I was very disappointed to find that the only version of this tutorial is for 3D Studio Max. Here's a Blender version.

Important Preliminaries: Your Modding Toolbox

You need:

Some sort of bsa unpacker, but if you're modding, you hopefully have one. If not, look on this wiki for the links. Some people use Ghostwheel's program.

Get it here: http://www.tescreens.be/oblivionmodwiki/index.php/TES4BSA


Blender - as of this writing the latest version is 2.42a. I recommend a few tutorials to get used to its unusual interface before you try to do this one. I'm going to assume you know how to navigate among Blender's windows and buttons, because it's complex and I don't have three weeks to write a step-by-step for it here.

Get it here: http://www.blender.org/cms/Home.2.0.html

Blender tutorials: http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro

Nifskope - a powerful mesh-editing program whose interface is, er, a little less difficult than Blender's.

Get it here: http://sourceforge.net/project/showfiles.php?group_id=149157&package_id=170735

The Blender Nifscripts from Sourceforge - these allow you to import and export .nif files from Blender, which is necessary for your new mesh.

Get it here: http://sourceforge.net/project/showfiles.php?group_id=149157

You'll also need an image editing program such as Photoshop or my favorite, the GIMP, but I won't be showing you how to make a custom texture in this tutorial.

Be sure to configure your nifscripts to version 20.0.0.4. You can do this by clicking on the little python emblem in the main menu to take you to the scripts screen. Then click on scripts - system - import/export. This should allow you to choose your .nif import or export scripts from a dropdown menu. Make sure it says .nif version 20.0.0.4 and size 10. (I've heard people say 1, but 10 is what works for me. If your meshes seem too big or small when exported, this is the setting you change.)

Starting from Scratch: Choosing your Collision Boxes

Blender can't import and export collisions at the present time, so you'll need to find a shield from the existing game that is close to the shape you want. Don't worry if the size is a little off. Things are easy to resize in Blender and in Nifskope.

Delete the collision boxes from the mesh. There should be some branches that say BSX, UPB, bhkrigidbody, etc., and they should all be ABOVE the one that says "nitristrips" or "nitrishape." If you delete some but still can't import, there are still more to delete. After you do this, save the nif under a new name so you don't mess up a game mesh you might need later.

Okay, NOW import this mesh into Blender. You can do this by clicking file - import - netimmerse/gamebryo. Now you're looking at a shield mesh. Notice that it's tilted at an odd angle? Don't move it. It has to be at that angle for a character to hold it in the game.

The New Mesh

Now create your new shield mesh near the game one. If what you really want is just basically a steel shield like the game one, but with spikes, I recommend just taking the game mesh and adding spikes (or whatever) using subdivision and scaling. This way you will have a nice UV map to work from also.

Important key shortcuts to remember in Blender: g: grab (lets you pull a vertex around) g and x, y, or z: lets you pull on just one axis s: scale: s and x, y, or z: scale on just one axis b: bounding box, press twice to get a circle. r: rotate r and x, y, or z: rotate around just one axis. Important because just plane "r" will rotate from the direction you're looking at the mesh, which can have odd results.

Reminder: if you're starting from a game mesh, do NOT add vertices or you will mess up the UV map and make texturing very difficult. The only way to get around this is to select some vertices and click "subdivide" down in the buttons window. Voila, you have new vertices and faces that are included in the UV map already.

If you edited a game mesh, your shield is already in the right position for export. If not, you need to select the handle of the game shield you imported (remember that?) and then click "select - inverse" in edit mode to select everything BUT the handle. Now delete. Now line your new shield up with the handle. Important: DO NOT MOVE THE HANDLE. You can go back to object mode and click ctrl-j to join the two objects if you wish. This may make things a little simpler.

If you started from scratch, this is where you need to give the object a UV map, a material and a texture in Blender. I'm not going into that here. It's in the tutorials. If you started from a game mesh, you don't have to do that because it's already been done for you by Bethesda. Don't forget to use ctrl-a to apply scale and rotation. I recommend also saving the UV map from the UV map window for texturing use later.

Exporting the Mesh

Okay, now export. File - export - netimmerse/gamebryo. Choose the folder you want your shield to go into - let's say data files\meshes\armor\mynewshield.nif.

Open up your nif with nifskope. It may look odd if you started from a game mesh, since it will have the original texture on it still, but that's not what we're worried about right now. Be sure and 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.

Now go to file - new window. Remember the original mesh you chose for its collision boxes? The one that still has those boxes, because it's the original version that you did NOT save over with a new one? Load that in the new window. Find the nitristrips node for the actual shield itself - when you click on it it will be highlighted in the main window. Right click - block - remove branch. Now it is gone but its collision shapes (the bhkconvexvertices node) are still there.

Go back to your new shield. Click on the node for your shield's nitrishape. Now right click - mesh - smooth normals, then right click - mesh - strippify, then right click - mesh - update tangent space. This last one is very important.

Now you're ready to copy your mesh into the old one. Right click again (it should be a nitristrips now, since you strippified it) and click block - copy branch. Switch back to the old mesh's window and right click on the node that says 'scene root.' Now block - paste branch. Your shield should appear in the window. You might get an error message about the version, but just click OK, it's just the niftools folks' way of messing with your head. It may be in the wrong place, because we still have to parent it to the old mesh's scene root.

Now left click the little plus sign by the scene root node to expand it. Scroll down to the "children" node under that. Click it to expand it. There should be a line under it that says "none." Type the number of your new mesh's node here.

Now save the nif under the name of your shield (do NOT save it as the name of the old one). Make sure it's in the directory where you want it to be.

Now it's time to do some texturing and set up your shield in the Construction Set. I leave that to you and to the many other excellent tutorials on the subject, unless someone else wants to type it here.

Good luck!

SickleYield