[Tutorial] Adding Team Colour / Changing Units Shader with NifViewer

Refar

Deity
Joined
Apr 10, 2005
Messages
4,608
This is about adding team colour to custom units.

The procedure is rather easy (i hope the tutorial is possible to follow as well). All you need is the NifViewer and the image editing software of your choice to adjust the textures alpha channel.

The same approach can also be used to add Gloss and Glow maps to some units, by making the unit use a FX shader. This might in some cases greatly improve the overall look of a unit. To help with this i added a appendix about 'advanced' shaders.

I added some pictures to help understanding my "second hand" english, so i hope even modders with very few previous NifViewer experience will be able to follow and reproduce the steps of the tutorial. If you not get something, you of course can ask :D

Database Link

PS.: For the sake of completenes: Here is how to get a Gloss map from main textures:

Before making efforts to produce a gloss/glow map, note that some custom mechanical units will be not able to display those. I explained in the tutorial, how to find out. Many custom non-mech units will support gloss and glow however - for example for armor/helmets/shields.

There might be better ways to do it - i am not that good with textures. But i tried this on original Civ4 textures, and the results were close to the Gloss maps from those units. So if nothing else it is a good placeholder for exporting units with FX shaders, until someone is nice enought to make a new shiny texture :lol:

Gloss Map

0) Load the texture in PS or Gimp
1) Take colour saturation all the way down (Make it greyscale basicly, but you need the image to stay in RGB mode to save as DDS. You can also convert to greyscale and then back to RGB)
2) Increase Contrast while reducing the Lightniss. How much depends on the image, on how much gloss you want etc.

This gives you a dark greyscale replica of the texture, with increased sturctural features. Then to increase the effect:

3) Paste the original base texture in a new layer
4) Run the "Find Edges" filter
5) Desaturate
6) Invert colors
7) Set the opacity of the edge layer to 30 - 40 %
8) Merge layers

Finally, if there are some parts, that you do not want to be glossy at all - like wood or maybe the face on a living unit, you might want to pait those parts over with black. I use the path tool to mark the areas precisely.

Glow Map.

In tha Vanilla Shared art folder, there is a environment_fx_greymetal.dds. It is used on many (all?) Civ4 units that have gloss/glow. You need the file in the units folder to assign it, and to see the effect in NifViewer, but you not need to keep/upload it with your unit - the game knows where to find it.

Another - in my opinion iferior - possibility is, to use the Gloss map for glow as well.
 
Thx for this tutorial :)

I could fix some of my old units now :)
 
Just read it, you are brilliant. Thank you! :)
I'm a pro at changing the shaders on Leaderheads, but not so much at units. Thanks for clearing things up. :D
 
would it be possible to reupload the pdf? or somebody else upload it here, so that it can be again downloaded and used

Thanks
 
I reuploaded the pdf. The link in the first post should be working now.
 
Thank you, I was looking for this!
 
it seems to fit good here as an addition:

it seems with Nifskope it´s possible to create the nifInstance by custom models (http://niftools.sourceforge.net/forum/viewtopic.php?f=18&t=777)

tried it and it seems to work (but it was a only a short time test)

short summerize (open nif in Nifskope, select the mesh, go to mesh, select make SkinPartition, save, open in Nifviewer [no the model looked funny], select the shader you want [at least after save and reload the model should look correct], change the postion of the textures to fit the shader)
 
Top Bottom