Reskinning Tutorial
Part I: A Weapon
This is a tutorial on reskinning or retexturing objects using Dave Humphrey's utility, NifTexture. There are several good tutorials out there which were written before reskinning utilities were available, but there seems to be a need for a tutorial which covers how the process works with a utility.
Update, 7/2/03: I've added a second part, on reskinning armor and clothing. It assumes you're familiar with the material on this page.
Before starting, you need two pieces of software:
DDS Format: the official plugins and expansions (and many fan mods) have upgraded to .dds format for both textures and icons. This format supports "mip-maps", which store the texture at different resolutions for different levels of detail depending on how close you are to an object. To use images in this format, you'll need a paint program that can accept Adobe Photoshop plugins (such as Adobe Photoshop or Paint Shop Pro), and the DDS Phtoshop Plugin, available here.
I'm assuming you know how to use your paint program -- if not, use its tutorial, or search the web for one. I'm also assuming you're familiar with basic operations in the TESCS, such as modifying an object's properties and loading and saving a mod.
OK, that's all the preliminaries. On with the tut!
(1)
My mod needs a unique axe (the "Woodsman's Axe"), so we are going
to take an existing axe and reskin it. I want a simple hatchet, so I start with
the Iron War Axe. First, I'm going to make a new object based on the Iron War
Axe.
In
the TESCS, I click the Weapons tab, and double-click the Iron War Axe. In
the axe's property sheet, I type in a new ID ("ST_WoodsmanAxe"),
and a new name ("Woodsman's Axe"). It's always a good idea to
preface a new item ID with your initials or the initials of your mod, so you
and the mod's users can easily see what objects belong to your mod.(2) Next, I'm going to copy the mesh and textures for this axe from the Construction Set CD to the Morrowind Data Files directory, so I can work on them without worrying about altering the originals. (For information on where to copy to, see this note on filepaths.)
But how do I know which files to copy? Well, the weapon's properties sheet tells me the mesh name (on the top button next to the icon): w\W_WARAXE_IRON.nif. So I'll start by copying that over and renaming it. Using Windows Explorer,
(3)
Next, I have to find the textures this axe uses. NifTexture will tell me what
they are.
(4) This simple axe uses four different textures! I'm going to copy and rename them just as I did in Step 2. All textures live in the same directory: Data Files/Textures (but see the tip from Dongle!). I copy the files from the CD to Morrowind/Data Files/Textures, remove their Read-Only attributes, and rename them as shown in the table below:
|
Original name
|
New name
|
Original Texture
|
New Texture
|
|
Tx_metal_iron_rusty.tga
|
Tx_ST_axe_metal.tga
|
![]() |
![]() |
|
Tx_metal_strip_02.tga
|
Tx_ST_axe_strip.tga
|
|
|
|
TX_W_miner00.bmp
|
Tx_ST_axe_miner.bmp
|
![]() |
(unchanged)
|
|
TX_W_waraxe_iron.bmp
|
TX_ST_axe.bmp
|
![]() |
![]() |
(5) Now comes the fun part. I'm assuming the reader knows how to use their image editing software -- a graphics tutorial is beyond the scope of this document -- but I'll just go through what I did. You can see the results in the table above. If you want to try for a completely different look, go for it.
I open the four renamed textures in Photoshop. Comparing the images to the original iron axe, I conclude that the "axe" texture is the blade and the lower handle; the "metal" texture is the shaft. The other two textures are used for minor details.
I'm not out for radical changes -- this is basically a recoloring job. I want the axe to be a little lighter and to have a mossy greenish look to go with the "woodsman" theme, and I want the lower handle to be metal and the upper handle to be wood (the reverse of the original).
I start with TX_ST_axe.bmp. I brighten the whole image by using "Image | Adjustments | Auto Levels", and make the rusty parts greener by using "Image | Adjustments | Hue/Saturation" and moving the "hue" slider. I then use the rectangle select tool to select the rings that attach the axe blade to the handle and the circle that goes on the bottom of the axe, select "colorize", and move the hue slider back towards orange to make them resemble brass.
I want the lower handle to be metal; that's the rectangular piece at the bottom of the axe texture. I notice that Tx_ST_axe_strip.tga is about the right size. I use "hue" to recolor it to something brassy, and then select it, copy it, and paste it over the handle part of the axe texture. I stretch it a little to make it fit.
Next is Tx_ST_axe_metal.tga. I want the shaft to be wood, rather than metal. There are dozens of wood textures that ship with Morrowind, so I go back to Data Files/Textures on the CD, and browse textures starting with Tx_wood till I find one I like. I choose Tx_wood_wormridden.tga, and open it in Photoshop. I apply the same hue adjustment I used for the blade, to give it a greenish color, and tile it four times over the original "metal" texture, so it will have the same resolution.
I save all the modified textures under the same filenames.
It isn't necessary to use textures of the same size as the original, but if you use a smaller texture it may look blurry in the game. All textures must have pixel dimensions (width and height) which are a power of 2, for instance 64, 128, 256, 512.
(6) Now it's just a matter of modifying the .nif to point to the new textures.
(7)
Done -- the axe is retextured! Now I just need the Woodsman's Axe object in
the CS to point to my new mesh.
(8)
Now all that's left is an icon for my new axe. I could just recolor the original
Iron Axe icon, but I prefer to make something more distinctive.
Note: This method works for me in Photoshop. In Corel Photopaint,
I find that masking (seleting) the icon is enough. In other image editors,
you may have to explicitly provide an alpha channel (a black-and-white bitmap
that shows which pixels you want to be transparent).
(9) Voila! All done. Now to test in-game:
(10) Pretty much what I had in mind... but I can't resist fiddling with it a little more...
If you want to tweak the textures at this point, you can simply continue editing the texture files. To update the object in the TESCS:
(Thanks to SciMuse and Ankit Sharma for the tip on how to update textures!)
.nif files must go in a (direct) subfolder of Morrowind/Data files/Meshes; but it doesn't matter what you call it. Similarly, icons go in a subfolder of Morrowind/Data files/Icons. The game uses letters to name the subfolders, as follows (the Morrowind Alphabet!):
|
a
|
Armor |
f
|
Flora, Furniture, terrain |
o
|
cOntainers |
|
b
|
Body parts |
i
|
Interiors |
r
|
cReatures |
|
c
|
Clothes |
l
|
Lights |
w
|
Weapons |
|
d
|
Doors |
m
|
Misc, books |
x
|
eXteriors |
|
e
|
spell Effects |
n
|
iNgredients |
You can follow this or make your own folders, but you can't use nested folders.
Textures normally go all together in Morrowind/Data Files/Textures. However, Dongle suggests a method for using subfolders (from a TESCS forum post; he credits a Feanturi post in the "3D Studio Max Answers" thread):
|
You can have a .nif use sub-directories below \Textures\. I've done this with models I've made in Max so I could use the stock textures in \Textures\Water\. You cannot use a different directory altogether. To reskin an existing .nif I use a combo of NifTexture and hex-editing. If you know which bytes to hex-edit that allow you to change a texture name length you can use hex editing alone. Create a sub-folder in \Textures\ and place your texture file there. Say; "\Textures\DGL\CoolTex.dds". Now make a copy of your texture in your working folder. Rename it; "Textures-DGL-CoolTex.dds". Then use NifTexture to re-skin your chosen .nif with this reamed copy of your texture. Finally open your .nif in a hex editor and replace the dashes "-" with backslashes "\". Voila, you now have a pathname in your .nif texture pointer. Works too! Notes: You must have the top folder "Textures" in the texture path name, otherwise it won't work. Stick with short subfolder names, the editor limits you to 32 characters, and counts the path in that. If you're making a fresh model in Max you can use your renamed copy of the texture when building your model, and hex edit after export. |
Unfortunately, Beardo adds that this doesn't always work, for reasons that are unclear. Experiment at your own risk.