3ds Max/NifSkope: Custom Weapons
PremiseEdit
The aim of this tutorial is to help you get a mesh from a 3d program into Oblivion with collision data (it won’t fall through the floor), a color map and a normal map, and with correct lighting interaction. At the time of writing this there is no official exporter, thus we are making due with NifSkope and the Civ4 plugin (for 3ds max). Please keep in mind that while I will try to make this as user friendly as possible that troubleshooting will likely be needed, and that Google is a wonderful tool.
This method is superior to importing OBJs in NifSkope because importing OBJs will result in incorrect smoothing groups and lighting. This means your weapons will have little to no specular information, generally dark textures, and wonky normal maps. Many weapons have been released in mods like this, thus stifling their potential. These lengthly steps do pay off if you're looking to produce quality content.
Here are comparison screenshots:
OBJ Importing
This method
- There is a method for Blender, but it has its problems- as of now, the Blender plugin by the NifTools team doesn’t seem to create the new smoothing groups upon export like the Civ4 one does (this is just my speculation). This means your object will be lit slightly oddly, but your spec maps and HDR will work. Go to the very bottom for this method.
ToolsEdit
The tools you will need are… TES4BSA - Unpacks the oblivion master files (so you can see the models and textures)
Check here on how to use TES4BSA to unpack files.
Civilization 4 NIF Exporter Plugin (version 7 is compatible with version 8 of 3ds Max) Civ4
3dsmax8 (Link to Trial version, 30 day use)
The ProcessEdit
To begin with: This tutorial assumes you are aiming to make a 2 handed sword. Other weapon types are possible with this method (with the possible exception of bows), but require a bit more tweaking. I personally use 3ds Max 8. I will also assume you are using Photoshop when I talk about texturing.
Step 1: Obtain/Create your mesh in your 3d program. You will need to UV map it as well, then place textures on it. Oblivion supports color maps, specular maps, and normal maps (there are more, but they are not used by most meshes). There are many, many tutorials on these subjects online- Google the subject if you don’t know it well.
However, I will mention this- if you are familiar with bump maps, grayscale images that represent height on a texture, it is fairly easy to convert these into a normal map. Using the aforementioned normal map filter, accessible in Photoshop via Filters>Nvida Tools>Normal Map Filter, you can turn a grayscale image in Photoshop into an RGB normal map. Explaining normal maps themselves is another matter- again, Google it if the concept confuses you or you are unfamiliar with it.
Place your weapon at 0, 0, 0 in your 3d program. From experience, the middle of the hilt is usually running through the 0 line on the x axis. Results may vary. In max, the weapon should be rotated so it is lying “flat”, the blade running up the z axis.
Another word of warning: Make sure the alpha channel of your weapon is pure white. If not, some of the mesh may show up as transparent (or not show up at all).
Your specular map, a grayscale image representing how light affects the surface of your mesh, goes in the alpha channel of normal map. Basically, make shiny parts white and darker parts, like iron, dark gray. Pure black may have unpleasant results. Adding a new channel can be as simple as clicking channels in your layer manager, and clicking the add new icon on the bottom bar (Near the trash bin, or delete channel).
Step 2: Export your textures as .dds files. DDS stands for direct draw surface, a file type many games use. You can export as DDS from Photoshop after installing the DDS plugin, as referred to above. To do so, just click Save As>DDS
I personally save as DXT 3 Explicit Alpha. I had no need to fiddle with all the options, just make sure “Create Mipmap” is enabled.
Step 3:Put your textures in your oblivion directory.... C:\Program Files\Bethesda Softworks\Oblivion\Data\textures\weapons. If you have yet to make a weapon you will probably have to make some of these folders yourself. A word of warning: DO NOT INCLUDE UNDERSCORES IN THE NAME OF YOUR WEAPON, WITH ONE EXCEPTION. This exception is the normal map, which should be “myweapon”_n.dds. Both textures should be in the same directory.
Thus, your textures will look like… “myweapon”.dds (color map) “myweapon”_n.dds (normal map)
Step 4: Export with Civ4.
Make a new shader (blinn) and only assign it a diffuse map. Go to Export>Civ4 (NIF). Make sure to check original images. Here are screenshots of the material editor and exporter...
Material Editor Exporter Options
Save this in your meshes folder….such as C:\Program Files\Bethesda Softworks\Oblivion\Data\meshes\weapons.
Step 5: NifSkope.
First, make sure block details are on.
Load up NifSkope. Load the file you just exported. MAKE SURE YOU HAVE A TEXTURE BLOCK ALREADY IN THE FILE- this block will have a purple flower within it, which is clearly visible. IF NOT, YOU EXPORTED WRONG. Copy the NiTriStrip branch by clicking your mesh in the viewport, then right clicking the block that becomes highlighted and going to Block>Copy Branch. Now load a default weapon from the game- like a claymore - in the same instance of NifSkope (A new window doesn't work for me).
Paste your branch. (Right click any block, Block>Paste Branch). Now, go to NiNode near the top. Expand Children. Change the number under Value to the number of the block you just pasted. Screenshot
Click the old mesh in the viewport, go to the block highlighted, right click, Block>Remove.
Make sure the texture node of YOUR mesh (should have been copied over with NiTriStrips) is going out to the correct DDS. Also, I changed the material to that of the original weapon...the symbol with the pallette. Here's a Screenshot
Save the file in your meshes directory, such as C:\Program Files\Bethesda Softworks\Oblivion\Data\meshes\weapons, and go into the CS and place it. You can place it by right clicking under Weapons and choosing New. Remember to give it health, make it a 2 handed sword (or whatever), speed, reach, damage, and weight. And of course assign it the NIF you just made. Load up a cell, drag drop your weapon in, and run a Havok sim (World>Run Havok Sim). Save your new plugin and test it out.
Blender MethodEdit
For Blender Users:
First, if you aren’t familiar with Blender, it can be a little confusing. Take the time to learn how to navigate it if you must…I will assume you can get around it on your own.
You’re going to need the NIF exporter scripts for Blender. NifTools Blender Scripts
Then, you will need to configure the Blender NIF script options…
Options
REMEMBER TO CHANGE THE SCALE TO 1.
Step 1: Export from your 3d program as an OBJ. Disable everything but texture coords and smoothing groups. OBJ Options
Step 2: Import the Wavefront OBJ in blender.
Step4: Make a UV map using this tutorial and apply an image using the UV-Image Editor
Step 5: Do a test render by going to render>render current frame. If your weapon has a texture you should be good.
Step 6: Export as NIF format. If you get the UV coord error, you did not perform step 5 correctly. Open it in NifSkope. If you can view your mesh and have a texture node in the file, you did everything right. Proceed as Max users would (Step 5).
If at this point something went wrong- don't be surprised. By the length of the steps alone, much can go awry. Please take time to troubleshoot and double check yourself.
My thanks go out to the NifSkope team and everyone on the forums that has contributed various tidbits on the forums, whether it be those who contributed some great ideas or minor revisions.