Getting Models into Skyrim

By TwentyEngineRunner

This tutorial will cover methods for bringing models into Skyrim. The tutorial emphasizes static objects without animation (architecture, world objects, tilesets, etc.). I will be using one of my Skywind shacks to demonstrate.

Part 1: Exporting NIF files

NIF (NetImmerse File) is aformat used for models in Skyrim and a number of other games, mostly those inthe Gamebryo engineor its variants. I will cover twomethods for exporting NIF files.

3dsMax: The Easy Way

Exporting a NIF via 3ds Max is fairly straightforward. First, download and install Eham’s exporter, found on the Skywind forums (https://tesrenewal.com/forums/tools-and-coding/nif-importexport-plugin-for-3dsmax-2013). I believe this only works in Max 2013; correct me if I’m wrong. Older versions of the plugin also exist through NifTools (http://niftools.sourceforge.net/wiki/3ds_Max), though development is currently inactive. Then, choose “Export” or “Export Selected” from Max’s file menu (the symbol in the upper left corner). Savethe file as NetImmerse/Gamebryo. You will see an export dialog.

[]

Most of the defaults should work. Change the default texture path if your textures do not reside in the root of Skyrim’s “textures”folder; otherwise,you will need to edit the paths in NifSkope. If there are any vertices on your model that are in close proximity to each other (like maybe a plant using dual planes or a decal), set Weld Vertices to 0.Select “Export,” and the file is ready for the NifConvert step.

Blender: The Hard Way

Most of the modelers working on Skywind do not use Blender. As I am one of the few who do, I figured I would include a section on how exporting works for that program, or in case anyonereading this can’t get ahold of 3ds Max.

There are several reasons that exporting NIFs from Blender is significantly more complicated than doing so from 3ds Max. The primary issue is that Blender’s NIF import/export plugin has not been updated to work with Skyrim models,which differ from older NIFs. For the workaround, you will need:

1.Blender NifScripts, Python 2.6.6, PyFFI 2.1.11 (http://niftools.sourceforge.net/wiki/Blender)

2.Blender 2.49band Blender 2.62(http://www.blender.org/download/previous-versions/)

If you are working in a version of Blender beyond 2.62, you will need to save a .blend file in the Legacy Mesh Format (on the lower left in the Save As screen). This is because Blender changed how it storesmeshes in later releases.Even with the old format, Blender 2.49b cannot correctly read files saved above 2.62 (faces will be wrong/missing). So, you will need to open the legacy mesh .blend in 2.62 and save it again from there, then open thatfile in 2.49b. So, save legacy mesh -> open in 2.62 -> save file again -> open in 2.49b. Another option is to export an OBJ/FBXor some other format from a recent version of Blender and import that into 2.49b.

The reason Blender 2.49b (aka Blender before they fixed the interface) is needed is because NifScriptsdoes not work in laterversions. The plugin is apparently still being developed, but progress is ludicrously slow.

Once the file is opened in Blender 2.49b, choose File -> Export ->NetImmerse/Gamebryo(make sure that the model is selected first). On the export settings screen, choose either Morrowind or Oblivion (the defaults are fine).

Note on scale and units: Blender uses a measurement system called “Blender Units”by default, which are based onMetric units. In Blender 2.49b, this is the only option. Newer versions added the ability to use both Imperial and (actual) Metric. Skyrim’s units are essentially Imperial, so you might wish to model in this system to more closely mirror the game. Do not do this if you want to do your exporting in Blender.Since the Blender NifTools pluginwas made to work with Blender units, it will cause scaling issue when you attempt to export to model. You can manipulate the Scale Correction slider in the export settings to fix this, but this is impractical if working on something likea tileset that requires exact precision. If you wish to use Imperial units, export an FBX or OBJand import into Max.

[]

NifConvert

NifUtilsSuite(http://niftools.sourceforge.net/forum/viewtopic.php?f=38&t=4128) is a collection of separate NIF-related programsbundled into one application. One of these tools is NifConvert, which is used to convert NIFs made for older games to work with Skyrim. Running your model through NifConvert is not technically necessary for a Max export, but I woulddo so anyway since it is the simplest way to create the flags. The In-File is the NIF you want to convert,and the Out-File is the resulting Skyrim-compatible NIF (pretty much a Save As option). The Template is a model from Skyrim used as an example for creating the new NIF. This should be something that serves a similar function ingame asyour creation. If you make ahouse, for example, use a building as the template. I collect different, renamed template models into their own folder for easy identification and access. The Texture Path should point to wherever your texturefiles arestored within the Skyrim installation. Everything else can be left at the defaultsin most cases.

[]

Note on Object Origins

Both the 3ds Max and Blender plugins take the center of the scene intoconsideration when determining the placement of objects. The model itself will always be placed at the center of the scene upon export, while the origin will remain where it was. This can cause all sorts of weirdness with scaling and rotation in the Creation Kit, not to mention create havoc for anything that needs to tile. To solve that problem, make sure that the object’s origin is already at the center of the scene before export. There is probably some way to change the origin in NifSkope as well, but I have not yet discoveredthe function.

Note for Maya Users

A significant number of modelers working on Skywind use Maya. There are various NifTools-basedplugins for Maya floating around out there, but they tendto suffer from many of the same problems as their Blendercounterparts: meant for use with older versions of the software, lacking Skyrim support, etc.(though you could still use the NifConvert method).NifTools lists their plugin (http://niftools.sourceforge.net/wiki/Maya) as being under active development, but progress appears even slower than Blender. There may be users that have fixed or expanded the plugin(a quick search, for example, indicatesthat someone has compiled it to work with 64-bit systems), but as I do not use Maya, I cannot say for sure.Unless you can find a more recent version of the plugin somewhere, it will probably beeasier to export an FBX or OBJ and use 3ds Max.

Note on Model Preparation

Before you export the model, there are a few things to keep in mind. First, the mesh must ONLY use triangles and quads; anything else will result in missing faces. Second, make sure your materials are assigned correctly. Upon export, NifTools will split your model intoseparate NiTriShapes based on the material. Third, keep an eye on your polygons. Even if you have a monster computer, there are limitations to Skyrim’s engine, and going crazy on the ploycount will create instability. Again, use a vanilla Skyrim model for reference. Consider where your model will be used. When it comes to statics, interior assets can typicallybe more complex than exterior assets.

Part 2: Adding Collision.

The easiest way to add collision to your model is to use ChunkMerge, another program bundled in NifUtilsSuite. I will not cover it in depth, since there is already a great tutorial on the NifTools wiki (http://niftools.sourceforge.net/wiki/Skyrim/Adding_Collision_Mesh_using_ChunkMerge).

Part 3: NifSkope

NifSkope is a tool used to make specific adjustments, corrections, and additions to NIF files. When you downloadthe program, make sure toget the current alpha release(NifSkope NightlyDev Builds, found at http://niftools.sourceforge.net/forum/viewtopic.php?t=5793; get the2.0 Pre-Alpha3. The screenshere are from the older 1.2.0 Alpha2 version. I will update them eventually). The “stable” version is rather old, and I have personally never encounteredany problems with the “unstable” release, which includes a few more features.Read thetopic linked above for more information.

[]

You might not have to do much of anything at all in NifSkope, depending on the model. So, I’vecompiled a few tipsinvolving common tasks.

1: Update All Tangent Spaces, Face Normals, Smooth Normals

Update All Tangent Spaces can be found under the Spells -> Batch menu. I have found that running this sometimes fixes problems with normal maps, or simply makes them look better.However, this can apparently cause problems if the file has animation, or create otherweird issues, though I have never experienced any myself. Use with caution.The Mesh menu is found by either right-clicking on a mesh in the preview window or on a NiTriShape/NiTriShapeData block in the Block List. Click Mesh -> Face Normals to set vertex normal values to polygon face values. This is another function that fixes strange looking normals. After doing this you will sometimesneed tosmooth the normalsagain using Mesh -> Smooth Normals. I typically use 180 for Max Smooth Value and the default for Max Vertex Distance, thoughresults vary depending on the nature of the model. Note: Always run Update All Tangent Spaces after Face Normals, especially on tilesets. Otherwise, youwill likely encounterseams and other oddities due to the tangents pointing in the wrong directions.

2: Adding Properties, Transparency

Sometimes you will need to add additional data to your NIF. For example, transparency. To do this, right-click on the appropriate NiTriShape in the Block List and choose Node -> Attach Property. To add alpha, click NiAlphaProperty.

The Alpha node takes into account alpha data from the diffuse texture’s alpha channel and the alpha values assigned to vertices.By default, it interpolates between black and white, with the opacity varying based on shades of gray (black is completely transparent, white completely opaque). There are times when you might want a more abrupt transition. The fringeon my shack, for example, does not look right with the defaultform of transparency.

[]

To change this, click on the NiAlphaPropertynode. Setthe value of “Flags” to 4844. This will make the alpha explicit rather than interpolated (everything is either completely transparent or completely

opaque). Use the “Threshold” value to set the intensity of the effect, based again on diffuse/vertex alpha. For the shack I set the value to 85.

[]

3: Additional Texture Types, Glow Maps

Every NiTriShapeneeds at least adiffuse texture and a normal map. You can also add other texture types to achievespecific effects. A glow map, for example, uses shaders to simulate glows, such aslight bouncing off a reflective surface. This is commonly seen on metal weapons or windows.

In order to add a glow map,you need to make a few changes to the BSLightingShaderProperty of the appropriate NiTriShape. I will be using the shack lattice, which is a window, to demonstrate.

[]

First, you must change the value of Skyrim Shader Type toGlow Shader. Next, add SLSF2_Glow_Map to the value of Shader Flags 2 (keep the other options selected). You can change the intensity of the glow with the Emissive Multiple value. Lastly, add your glow map texture to the third slot in the BSShaderTextureSet node.Like alpha channels, a range between black and white is used to indicate intensity.

[]

There are other texture types in addition to glow maps, such as environment maps andcube maps. I will not be covering them in this tutorial, though their setup is similar to glow maps.

[]

4: Adding, Editing, and CopyingBlocks

Content coming soon.

Part 4: Creation Kit

Now that yourmodel is ready, it’s time to bring it into the Creation Kit. Copy the NIF file into the Data/Meshes folder, either in the root or in a subfolder. Do this before you open the Creation Kit.Also, make sure that your texturesare somewhere in Data/Textures. If they do not follow thesame path specified in NifSkope, they will not appear on your model in the Creation Kit.

You will need to create a new object for your model. The easiest way to do this is to duplicate a similar object. For my shack, I duplicatedfarmhouse01. Right-click on the original object and select Duplicate, then rename it. Right-click on the object again and choose Edit. In the new window, click the Edit button to the right ofthe Model field. This opensthe Model Data window. Press another Edit button under Model File Name and navigate to your model. If it shows up in the preview window, you are good to go.

[]

Note: If you overwrite the model with a new version while the Creation Kit is open, you may get errors when you try to place the model in a cell. Restarting the Creation Kitshould fix this.

Now all you have to do is drop the object into a cell. I’ve placed a few of my shacksnear Whiterun.

[]

That’s it –your model is in Skyrim. If you have any suggestions about improvements or additions to this guide, let me know.