1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

An easy way to create noshader units from your unit with shaders.

Discussion in 'Civ4 - Modding Tutorials & Reference' started by C.Roland, Apr 17, 2007.

  1. C.Roland

    C.Roland FFH Art team member

    Nov 26, 2005
    An easy way to create noshader units from your unit with shader in 6 Steps.

    First of all, I apologize for my bad English, it is not my first language, but it’s not my first tutorial so it shouldn’t be too hard to understand ;).

    A really quick speech on the shaders before beginning:
    All the vanilla model of civ4 has two versions, one with shaders and an other without shaders. The game chooses the right version for you. If you have an old, obsolete, not powerful graphic card, the model that the game displays is probable one without shaders. If you have a nice graphic card, than the game probably display the model with the shaders on.

    In the xml, there are two different tags for the two models. The two versions are in the same folder. The naming convention is usually this one:

    With shaders = yourmodelname_fx.nif
    Without shaders = yourmodelname.nif

    Ex : maceman_fx.nif
    And maceman.nif

    Now that you know this, you should know that if you want to create units that can be used by everybody you would have to create 2 times the same units. It’s annoying because we are all busy and lazy :D.

    This is the fastest method, in my opinion, to create both versions of your units:

    What do you need:
    2-Basic knowledge of Nifskope or NifViewer* (One of this program is needed to make all your units modification)
    3-A 2d editing software like photoshop, gimp or PSP (optional, but it’s better to create units with custom skin)
    And that’s it … you should be fine with this

    *If you do not how to use this program, you should read Rabbit White’s tutorials on the subject first.

    Step 1 – Create your unit.
    That is the funniest step. Create your unit like you want with the program you want. Skin it, add some object with the viewer or nifskope, “puppet” it, etc.* You must use the version with the shaders as a base, the xxx_fx.nif.

    *If you do not know what the verb “puppet” means, you may read Rabbit White’s viewer part 3 tutorial. Also, you have to note that units exported from blender don’t work with this tutorial.

    Step 2 – Open you new unit with Nifskope

    Open with Nifskope you modified unit_fx. (For this tutorial I’m using a vanilla maceman without any modification). Click on the body of the units (it should have green edge and you should have a blue highlight in the block list)

    If you look at the end of the block details, you will see the information about the shaders. The two lines that who interest us are in yellow in my next screenshot. The first one say if the version support shaders (Normally, it should be written yes) and second one is the shaders name.

    Step 3 – Open the vanilla no shader version of the unit in a new window.

    It is important to open it in a new window (File/New Window)

    In your new window, open the vanilla unaltered mesh of the no shaders unit. In my case, it is the maceman.nif. If you click on the body and look at the block details, it shoudn’t have a shader.

    Step 4 – Copy your no shader body in your scene with the version with shaders

    At this point, you should have two window opened, one with a modified unit with shaders and an other with a vanilla unit without shader. Click on the body of the vanilla no shader unit and right click his Nitrishape in the block list and than copy the branch.

    Than, you have to paste your no shader body in your scene with the version with shaders. For this, you have to right click on the block list of your first window (with the modified unit with shader)

    Now, you should have a new branch in your block list. This branch is in fact the no shader model of your unit. In my screen shot, it is number 74.

    Step 5 – Replace your body with shaders by the version without shader

    If you followed carefully, you had probably notice that the NiTriShape that have the number 65 is the model with the shader. We need to replace it by the one without shader (74). The 65(shader) is in fact the children of the block 64, so you have to click on the block 64 and in the block detail, replace his current children (65) by the no shader (74). When you’ll be done, the blocks will exchange their place. After, delete the unused block, the 65(shader).

    Step 6 – Redo the thing for the other mesh with shader

    You now have a body whith no shader that work but your job is not done yet. You have to redo the process for all objects that have a shader. Sometime, there are only the body that have a shader but in this case, the metal chain and sphere have a shader too. The wooden stick do not have a shader, so you won’t have to recreate the process. Usually the weapons and shield do not have shaders(except for those that use a gloss map) and other object like horses and chariot do have shader. You will have to check all the objects to be sure

    Finally, save your unit … For my case, I must save it under this name maceman.nif

  2. Kael

    Kael Deity

    May 6, 2002
    This is awesome work, thanks C.Roland!
  3. GarretSidzaka

    GarretSidzaka Deity

    Dec 17, 2002
    thanks C. Roland!!! this will save alot of people alot of time :)

Share This Page