Difference between revisions of "3ds Max/NifSkope: Custom Weapons"

no edit summary
imported>Edgeofforever
Tag: Manual revert
 
(25 intermediate revisions by 10 users not shown)
Line 1: Line 1:
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.


*There is a method for blender, but it has its problems- as of now, the blender plugin by the nifskope 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.
== Premise ==


'''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.'''
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:
Here are comparison screenshots:
[http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=ScreenShot12.jpg OBJ Importing]
[http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=ScreenShot12.jpg OBJ Importing]
[http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=ScreenShot21.jpg This method]
[http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=ScreenShot21.jpg 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.






== Tools ==


The tools you will need are…
The tools you will need are…
[http://www34.brinkster.com/ghostwheel/ TES4BSA] - Unpacks the oblivion master files (so you can see the models and textures)
[http://www34.brinkster.com/ghostwheel/ TES4BSA] - Unpacks the oblivion master files (so you can see the models and textures)


Check this part of the Wiki on how to use it.
Check [[BSA Unpacker Tutorial|here]] on how to use TES4BSA to unpack files.
[http://cs.elderscrolls.com/constwiki/index.php/BSA_Unpacker_Tutorial Tutorial]


Civilization 4 NIF Exporter plugin (version 7 is compatible with version 8 of 3ds max)
Civilization 4 NIF Exporter Plugin (version 7 is compatible with version 8 of 3ds Max)
[http://forums.civfanatics.com/showthread.php?t=159481 Civ4]
[http://forums.civfanatics.com/showthread.php?t=159481 Civ4]


Line 24: Line 32:
[http://developer.nvidia.com/object/photoshop_dds_plugins.html Photoshop Normal Map Filter/DDS Import/Export]
[http://developer.nvidia.com/object/photoshop_dds_plugins.html Photoshop Normal Map Filter/DDS Import/Export]


[https://sourceforge.net/project/showfiles.php?group_id=149157 Nifskope]
[https://sourceforge.net/project/showfiles.php?group_id=149157 NifSkope]


== The Process ==


To begin with:
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 with 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.
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 how it well.   
'''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.
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.
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.
Line 44: Line 53:




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
'''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.
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.
'''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…
Thus, your textures will look like…
Line 57: Line 66:




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...
'''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...


[http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=fimbulwintermated.jpg Material Editor]
[http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=fimbulwintermated.jpg Material Editor]
Line 67: Line 77:




Step 5: Nifskope.
 
'''Step 5''': NifSkope.


First, make sure block details are on.
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).   
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).   
Paste your branch.  (Right click any block, Block>Paste Branch).   
Now, go to NiNode near the top.  Expand children.  Expand Indicies.  Change the number under value to the number of the block you just pasted.   
Now, go to NiNode near the top.  Expand Children.  Change the number under Value to the number of the block you just pasted.   
[http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=meshnifindicies.jpg Screenshot]
[http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=meshnifindicies.jpg Screenshot]


Click the old mesh in the viewport, go to the block highlighted, right click, block>remove.
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 [http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=fimbulwinternif2.jpg 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 havoc sim).  Save your new plugin and test it out.


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 [http://smg.photobucket.com/albums/v665/EdgeOfForever/?action=view&current=fimbulwinternif2.jpg 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 Method ==


FOR BLENDER USERS:
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.
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.
You’re going to need the NIF exporter scripts for Blender.
[http://sourceforge.net/project/showfiles.php?group_id=149157 Nifskope Scripts]
[http://sourceforge.net/project/showfiles.php?group_id=149157 NifTools Blender Scripts]




Then, you will need to configure the Blender NIF script options…
Then, you will need to configure the Blender NIF script options…
[http://niftools.sourceforge.net/forum/viewtopic.php?t=150 Options]
[http://niftools.sourceforge.net/forum/viewtopic.php?t=150 Options]
REMEMBER TO CHANGE THE SCALE TO 1.
'''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.   
 
 
'''Step 1''':  Export from your 3d program as an OBJ.  Disable everything but texture coords and smoothing groups.   
[http://img.photobucket.com/albums/v665/EdgeOfForever/exportforblender.jpg OBJ Options]
[http://img.photobucket.com/albums/v665/EdgeOfForever/exportforblender.jpg OBJ Options]


Step 2: Import the wavefront OBJ in blender.


Step 3:  Hit F6.  Click new texture, and for the type, choose image.  Navigate to any image, you can change this later.  It just has to have a texture in place (I believe).
[http://img.photobucket.com/albums/v665/EdgeOfForever/blendermaterial.jpg Screenshot]


Step 5: Hit F5. Look for the tab on top of the bottom right menu…click map input.  Choose the UV tab.
'''Step 2''': Import the Wavefront OBJ in blender.
[http://img.photobucket.com/albums/v665/EdgeOfForever/blenderuv.jpg Screenshot]
 
 
 
'''Step4''': Make a UV map using this tutorial and apply an image using the [http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/UV_Map_Basics 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: Do a test render by going to render>render current frame.  If your weapon has a texture you should be good.


Step 7: 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).
'''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 s
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.
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.




[[Category:Tutorials]]
[[Category:Tutorials]]
[[Category:NifSkope Tutorials]]
[[Category:Modeling Tutorials]]
Anonymous user