Showing posts with label Nif. Show all posts
Showing posts with label Nif. Show all posts

Saturday, April 7, 2012

Making more plants for Skyrim - Part II: nif and in to the game

This part describes how to create nif files that have the new texture. For this you need a tool called NifScope (I have version 1.1.0-rc6). Make sure you download the RC version, it works with Skyrim nif. I follow the tutorial made by ChickenDownUnder on re-skinning meshes, it can be found on the Nexus.

The procedure is quite simple, the step in short:
  • Put the new texture and original nif file in the right folder 
  • Change texture path in NifSkope
  • Change ID and link to the new nif in the CK 
To get the original nif files unpack Skyrim.bsa, if you have not done this before, you can do it with for example BSAopt. The grass meshes are found under Meshes\landscape\grass in the BSA. Make a copy of the grass nif you want. I will use "tundragrassobj03.nif"

Depending on what you want to reskin you have to put the files in the right folders. I will put the new texture under Data/Texture/landscape/grass and the original nif file that I will reskin in Data/Meshes/landscape/grass. If I put them any place else the CK can't find the nif file later on. You don't have to have them in these folders when you work, but before making the new grass in the CK they have to be in the right folders.

Reskin in NifSkope

1. Open NifSkope and Load the original nif. In my case this is "tundragrassobj03.nif".

2. The texture path can be found under 4 BSShaderTextureSet/Textures and are indicated by a purple flower. There are two strings that define the texture path for this model, the first is the texture the other the normal.
 3. Right click on the first texture string, and select Texture/Choose and navigate to where your texture is. Now NifSkope will show the right texture, but in the case of my flowers its really hard to see anything.
If you get a long texture link that starts at the harddrive like, c:\....steam\ and so on you need to change this.  Double left click on the texture string path, remove anything before textures\landscape\grass\nameofyourplant.dds. Repeat this procedure for the normals (if you have one).
4. You can also change the name of the model, it is not necessary but will look nicer. There are two places to change the name, in 0 BSFadeNode and 1 NiTriShape. Right click on the string and choose Edit string index, then write in the name.

5. Press Save As to save the nif file.
Now you have a re-skinned nif file, the next step is to get it in to the CK.

Creation kit

Edit: 
Morcroft Darkes pointed out that the CK loads the nif models for grass (and probably all models) when it opens, so and changes made to the model when the CK is open won't show up until you close the CK and open again.

1. Open the CK, load your mod and Skyrim.esm. The grasses are found in the Object window under WorldObjects/Grass/Landscape/Grass.

2. Double click on the original grass, this will open the grass window. In ID write the name of your new grass and click the Art file Edit, choose the new nif file. Click OK, now the CK will ask you if you want to create a new object, press Yes.

3. If you want to use the new grass/flower you need to associate it to a ground texture and paint that texture somewhere (see part I on how to do that).

Save your mod and have a look in game :)

/E