Resource icon

HOW TO: Import/modify/export LH 2016-10-05

Original Post

English is my second language so I’m sorry for all the syntax mistakes.

Here a little tutorial on How to Import a LH into Blender, modify it and export it without crashing the game.

Note: This tutorial is for blender but I think you can follow it with the import/export tools of max and it may work, I think.

1. The tools

You will need all this programs:

-Blender
Niftools import/export scripts for blender
NifSkope
-The Scene Viewer (Nif Viewer)
-A texturing program like PS, PSP or Gimp

2. What you should know before to begin

If you have some basic experience with all those program (except nifskope), it should be enough. If you do not have experience with those program maybe you should read other tutorial on those subject:

-Blender Guide
-Exporting tutorial for Blender (From me)
-Scene Viewer Tutorial 1 (From Rabbit White)
-Scene Viewer Tutorial 2 (From Rabbit White)
-Scene Viewer Tutorial 3 (From Rabbit White)

3. Ok, I’m ready, what should I do?

It’s simple, just follow those step. :

First of all you need to configure your export script. (See this tutorial). Civ 4 units are nif version 4.2.2.0 but leaderhead are nif version 20.0.0.4 so you have to configure your export script.

When your script is configured, import the leader of your choice. For the example we will take Cyrus.

Note: You can skin your model in the step you want, but I think you should skin it in two steps. First, skin it before to import it in Blender, so you will be able to see your modified model with texture in blender(you just need to have the dds and tga in the same folder of your nif when you impor it) while you will be doing the modifications. The second time it’s at the end of the whole process, to finalize your skin with the latest details.

1156544935.jpg


When it’s done, you should see Cyrus with his armature. I presume you know how Blender works (if not take a look at the Blender Guide). Now it’s the funniest part, play with your leader! Change his nose/hair/chin/shouler/beard/mustache/mouth/eyes/… shape. (You should not play with the armature; all the armature and bones modification won’t do anything. We won’t use the exported armature). Don’t forget do remove all the part that you do not want, this technique is great because we can remove part that we do not want like Cyrus’s crown. Here my modified Cyrus:

1156544985.jpg


When all the modification is done, you have to export it. Select all (a-key) and then deselect the lamp and the camera. Export it.

1156545012.jpg


Your are done with Blender, Now it’s NifSkope time ! Open NifSkope and load your freshly exported model, and than the first thing you’ll have to do is to enable the block details.

Note : If the textures files (dds) are in the same folder of your nif when you open it in NifSkope you will be able to see it textured.

1156545028.jpg


Simply click! : File/New Window

1156545042.jpg


In the new window, open the original file (like the original Cyrus without modifications)

Here a little comparison between the original Cyrus (reskinned) and my new one.

1156545060.jpg


In the window of your new leader, click on his body. He should become “green” and there should have a blue NiTrishape.

1156545083.jpg


Right click on this NiTrishape and than : Block/Copy Branch

1156545116.jpg


In the window of the original leader, in the white section, right click and than : Block/Paste Branch

1156545133.jpg


Than you should see Cyrus (or your leader) with his twin, one under the other.

Note : You should also see in the white section a new NiTrishape. This is your modified mesh. (In the screenshot it have the number 310)

1156545787.jpg


Click on the older one(the original leader), make it green and note the blue NiTrishape number, in the screenshot the number is 286.

Note : In the future screenshot the “original” leader will be the black one and the new “modified” leader will be the white one.

1156545805.jpg


Than you have to click (make it Blue) on the upper NiNode (284 in the screeshot) and click on the + of the children in the Block Details (take a look at the screenshot)

1156545837.jpg


You will see in his children the number of the “original” leader’s NiTrishape (286 in my screenshot). You simply have to change it for the “modified” leader NiTrishape (310 in my screenshot) Paf ! The leaders will change their position, they may lost their teeth in the process. (See screenshot).

1156545861.jpg


You can also see that the NiTrishape will change their position too. (In the white section the two object are now 0NiNode and 286NiTrishape, before it was 0NiNode and 310NiTrishape)

So click (make it Blue) on this NiTrishape (the 286 in my screenshot) andthen click : Block/Remove Branch

1156545882.jpg


Save you new nif and Congratulation you are now done with NifSkope.
Now, Nif Viewer Time! Sorry I do not have screenshot for this step but Rabbit White excellent tutorial should help you with this tool if you are not a master of the viewer.

Open your model. You will se that his eyes and teeth are not in right place. You will have to select your mesh (click on the leader’s body with the arrow tool) and then to edit his propriety (rigt click). You will have to make some translations to put his eyes and teeth in the right hole. (You can also play a bit with the rotation matrix to make your leader “longer” or “larger” or “wider”). When you exported your model from Blender some minutes before you loss the entire model’s maps (Gloss map, Normal map) and now your model have only one texture like the noshader version. The goodnews is you do not have to redo your model for those who do not have shader compatible video card, the bad news is it looks cooler when it have a normal and a gloss map. Life isn’t paradise so we will have to do ours model with only one texture map so you will have to go in the texture propriety and change the texture for the noshader texture. You may realize that your model is “Shiny” or “Dark”, it’s time to edit your material propriety. In the material propriety option you can play with the specularity, the diffuse, emissive colors and the other things that will affect your model “shinnies”. When your material is fine you can now add other objects (like crown, hat, glasses …) via the viewer (see Rabbit’s tutorials)

Note : I think I have found a way to make this process without losing the normal map and the gloss map, I’ll have to experiment it. It smells the tutorial part 2 … maybe.

Here my Cyrus=Charlemagne transformation In Game:
Note: This model is not done, I’ll have some other things to add (like a crown) and change (like his eyes) before to release it.

1156281402.jpg


Voilà! It should be done.
Author
C.Roland
Downloads
615
Views
615
First release
Last update

Ratings

0.00 star(s) 0 ratings
Back
Top Bottom