Jump to content

What is the relationship between the .nif and texture?


AmericanJackal

Recommended Posts

I'm exploring working on a mod that adds multiple variants of horses (of different coat colors AND genders) into the same game, using Slof's wonderful work as a starting point.

 

I started using a tutorial called "Creating a Stable" from the Creation Kit wiki, but it only seems to cover the addition of only one kind of horse. I've gone through the Creation Kit itself, trying to figure out how the base game created different horses all from the same horse.nif and I'm not able to find any answers.

 

When modding, it appears that for each different kind of horse (say, a bay versus a black), there can only be one nif file. (I have to use NifSkope to assign the textures to it.)

 

Yet in the base game, there is only one .nif file, and five different horse textures. (And you replace these textures freely with replacers, like Slof's, if you retain the naming structure.)

 

How is the base game accomplishing this?

 

 

(( I'm the answer must be so simple that I'm just overthinking this. ))

 

Basically, I am looking for ways to reduce work and garbage files from my mod. If I have to create a new special nif for each individual horse type (each color I want in each gender), then I guess I will -- but it creates a significant amount of extra work and a lot of files for installing. Eventually, I will be doing the same thing to other certain types of creatures, so the less repetitive work the better. :D

 

(Edit to Note - I do know I will have to use different .nifs for different genders because of the different meshes -- I'm only wondering about applying different textures to the same mesh.)

Edited by AmericanJackal
Link to comment
Share on other sites

I have been trying to find a turotial for how to use and set up texture sets but no luck. I always just get tutorials on how to edit textures in gimp or PS. I know many of the landscape pieces are done via texture sets and I want to create a snow version of a landscape piece that does not have a snow version. Right now I actually made a new .nif with an edited texture path.

 

Anybody know of a tutorial for setting texture sets up?

Link to comment
Share on other sites

The easiest way to describe what you have to do is to open 2 versions of the object. For talking sake, double click on DirtCliffs01 and double click on DirtCliffs01FallForestGrass01.

 

You will see that both of these objects use the DirtCliffs01.nif. The first one (DirtCliffs01) uses the information that's hard coded into the .nif file. The second one (DirtCliffs01FallForestGrass01) uses a texture set to change the ground colour. To see exactly what part of the .nif it is changing, click the edit button of both boxes.

 

In the new boxes that appear, you will see that DirtCliffs01FallForestGrass01 has additional information. This additional information is the texture set that it's using. If you double click on the additional information, another box appears and lets you select a different texture set for that particular part of the .nif mesh.

 

In your case, you would make a duplicate of the object first and go through the steps above. When the box appears for you to change the texture set, you would scroll down and select a snow texture.

Link to comment
Share on other sites

Running with Tambo's last posts and doing a bit more googling, I believe I've figured out the mystery of Texture Sets. For posterity, I'm posting a tutorial going over what I did and if it survives the critique of people who actually know what they're doing, I'll add a better one to the Wiki (with pictures & video).

 

People who know better than me! -- Please comment on what should or shouldn't be done, what isn't correct, etc. here so I can get my story straight!

 

 

Creating New Texture Sets for Use on Base NIF Files

 

 

Step 1: Prepare the Files

 

If you are altering a nif or pre-existing texture in any way, you will need to unpack them both from their BSAs to get access to them. Google "BSAopt" and look for a link on Nexus.

 

Drop the new textures that you want to use into an appropriate directory. Follow folderpath conventions found in Data/Textures. For my horses, for example, I am using Data/Textures/ModName/actors/horse/character assets/texture_file_here.dds

 

 

Step 2: Create the TextureSet.

 

Open your plugin in the CreationKit and look in the Object Window. Expand the "Miscellaneous" tree and select TextureSets.

 

If you are altering a pre-existing texture set, you may want to search for relevent key words to find what you need. For me, I'm just going to search for "horse".

 

Select the most appropriate texture set to edit.

 

Change the Form ID to something specific to your mod, that you will be able to recognize and find again. I changed the Form ID to "SkinFlaxenBay" because I am creating a new texture set for a flaxen bay horse. When you go to save, make sure you allow it to create a NEW FORM.

 

In the table below, you will have different file names that will point directly to the texture files being used. Highlight the fields that you want to change, and then click on "Edit" beneath Texture. Navigate to your brand new texture file.

 

Rinse and repeat until you have created new texture sets for all of the files that you will need.

 

You now have a tangible link between the Creation Kit and your textures.

 

 

Step 3: Create a new ArmorAddon.

 

In the Object Window, go to Items > ArmorAddon. Like before, search for the most relevent entries to you. For me, this again is going to be "horse."

 

Most creatures in the game who have a basic skin will have that skin stored as an ArmorAddon.

 

Select one and change the Form ID to something that you will recognize for your mod.

 

Down below, you will see two sections labeled Male Model and Female Models. You can have two different kinds of looks depending on something's gender, but most animals in the game appear to be set as male (hence why animals only have male models).

 

Under Biped Model, click the "Select" button. It will open a new window called 'Model Data'.

 

Make sure "Model File Name" is pointing to the correct new model that you want to use, if you are using something new (you probably aren't).

 

Below, there is a table with some various fields. You may need to play with these to get the effect you want because they will be different for each different .nif file.

 

For horses, there's fields called Horse:3, Horse:2, Horse:1, and Horse:0. I've discovered that two of these fields relate to the horse's overall body, while one relates to the mane/tail. Just play with what you have and see what happens.

 

Double-click the box under "New Texture" for the field that you want to change, and it will open a dialog box to select a form. Search for the TEXTURESET that you created in Step 2.

 

Click Okay when you are done. Click Okay again to close the ArmorAddon box and make sure that it creates a new field from your new ID.

 

 

 

Step 4: Create the Armor.

 

Armors inherit ArmorAddons to determine their look. Don't ask me why, but the game actually treats anything ON something as an armor (in this case, horse hide).

 

In the Object Window, open Items > Armors.

 

Like in the first two steps, select a good starting point using the search and change the Form ID to something relating to your mod.

 

Look in the lower, left-hand corner and you'll see a box called "Models" next to a checkbox that says "Show All."

 

Select "Show All".

 

Go ahead a DELETE all of the models shown in that box.

 

Now, right-click and select New.

 

In the new Dialog Box, search for the ArmorAddon that you want that you created earlier.

 

Click okay. As before, make sure you create a new form and don't overwrite the one you started with.

 

 

Step 5: Create the Actor base.

 

In the Object Window, go to Actors > Actor and find the critter you want. Just like above, change that form ID and remember to save it as a new form.

 

For horses (and probably most other animals), you will need to DECHECK "Inherit Traits" if it is already checked. This will allow you to select a new skin while keeping all the other information about that animal or thing the same.

 

In the Traits Tab, select the Skin drop down and find the Armor you created.

 

If you don't believe me, select "Preview" and have a look at your new creature with its fancy new textures.

 

Save.

 

 

Step 6: Create an Instance of that Actor (or Thing).

 

Drop your new thing into the world somewhere, save the plugin, and open up a test game with it activated and go have a look at it. You should have a brand new model with a brand new texture.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...