Difference between revisions of "Blender/Custom Shield"
imported>Sickleyield |
imported>Sickleyield |
||
Line 29: | Line 29: | ||
Be sure to configure your NIF Scripts 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.) | Be sure to configure your NIF Scripts 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.) | ||
==Important Preliminaries: Get Python 2.4 AND 2.5 For Later Versions== | |||
I've learned since I wrote the above that for best use of the NIF scripts with later versions of Blender, you need to install BOTH Python 2.5 and 2.4. The first one is for the latest Blender versions (up to 2.43, at least) and the second one is for the NIF scripts. | |||
=='''Starting from Scratch: Choosing your Collision Boxes'''== | =='''Starting from Scratch: Choosing your Collision Boxes'''== |
Revision as of 20:59, 15 March 2007
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. I've tried to be very thorough and not omit any possibly important step. This is for a shield, but it would work with weapons in more or less the same way.
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 NIF Scripts 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.
Important Preliminaries: Configuring the NIF Scripts
Be sure to configure your NIF Scripts 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.)
Important Preliminaries: Get Python 2.4 AND 2.5 For Later Versions
I've learned since I wrote the above that for best use of the NIF scripts with later versions of Blender, you need to install BOTH Python 2.5 and 2.4. The first one is for the latest Blender versions (up to 2.43, at least) and the second one is for the NIF scripts.
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 plain "r" will rotate from the direction you're looking at the mesh, which can have odd results.
- And an important warning:
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.
Preparing for Export: UV map, Material and Texture
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 sword tutorial: [Getting Your Sword Ready to Export]
If you started from a game mesh, you don't have to do any of that because it's already been done for you by Bethesda. Don't forget to use ctrl-a to apply scale and rotation.
If you need to make a whole new UV map, here's the guide to that in my sword tutorial:
I recommend also saving the UV map from the UV map window for texturing use later. Either way, you shouldn't have to UV map the handle, since it already has a map of its own. Just make sure it doesn't overlap oddly with the map for the rest of the shield.
Exporting the Mesh and Editing in NifSkope
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.
Adding a Texture
Now it's time to do some texturing. 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 texture node in NifSkope next to the little flower symbol. It will usually look something like data\textures\armor\mynewshield.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.
Getting Your New Shield 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. You may want to twiddle your thumbs or go get a beverage or light some candles here, to pass the time.
Eventually it will finish loading and you can see everything that is present in the game. Exciting, isn't it? 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 shield 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 you don't want to mess with. Double click the shield of your choice to bring up its information. Click on the name of the nif (say, glass/shield.nif). A little window will pop up with the data directory in it. Click through until you find your own new shield mesh. Click on that and click "OK". Your shield mesh name should now appear in the window. You'll need to do the same with a new icon, which you can learn to make here: [SickleYield's Easy Icon Tutorial]
Now this part is very important. You need to change the ID of the new shield, not just the name. The ID is above the name and looks something like "WeaponGlassLongsword" or "GlasShield". You must change this to a new ID such as "Mynewshield," or you will replace every glass shield in the game with yours. Be sure and give it a unique name, too, so that everyone knows what an amazing shield 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 Shield Into the Game
Now your shield 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. Now you can drop it into the inventory of a merchant, into your house, or into the street of a random city. Go to file - save in the main CS menu and give your mod a name. Close the CS. This might take a while.
It's playtest time. Be sure and check your mod by name in the Data Files list on the Oblivion start menu before you start playing.
Good luck, and have fun!
SickleYield