Exporting From Blender 2.7+ to Skyrim
Exporting From Blender 2.7+ to Skyrim (updated)
This tutorial will cover the basics of exporting statics from Blender 2.7+ to a Skyrim .nif as well as explain what does what when it comes to exporting. Depending on how you work, you may find this easier than the old ‘exporting via 2.49b’ method. I believe this method takes a little more work to get set up, but once it is you can export directly to Skyrim with as little messing around in NifSkope as possible, allowing you to quickly test small changes to your static models with little hassle. I will assume you have a basic knowledge of Blender, and I will only be covering the Blender to .nif exporting for static models with collisions. I will not be covering loading these models/placing them into the Creation Kit, nor any modelling techniques.
To export your models, you will require these tools:
- nifskope (click the link, at the right, editing programme)
- blender_nif_plugin (click the link, at the right, exporter)
- NifUtilSuite (contains ChunkMerge for collision)
- Blender 2.7+(as 3d Program to work with)
- a .nif file to use as a template when using ChunkMerge.
Once you have the appropriate files downloaded, install them all, all of the links above should have a readme file somewhere regarding each program. You can also check the niftools forum and the niftools discord (click connect) for advice.
Preparing in Blender
Depending on how you choose to model, you can do this as you go or at the end as one whole process, and it doesn’t matter which order you do these steps as long as they are all completed before you try to export. I recommend modelling in Blender units so you do not have to scale your model upon exporting, as 1 Blender unit is equal to 1 Skyrim unit. The reason for this is that if you are creating a tiling object, scaling on exporting will most likely put out your measurements by the slightest values and cause visible breaks and seams.
Once all of your modelling work is complete, you need to make sure to apply all of your transformations. If you don’t this can cause some issues once it is in-game. To apply all of your transformations, press ‘A’ to select all and then press ‘Ctrl + A’ and select Rotation and Scale. In the left toolbar, you will also need to select the location. After all of the transformations are applied to my completed model, I need to make sure that it is UV unwrapped just like you would with any other model. Once your model is UV mapped and has had all of it’s transformations applied, I will start going into detail about the Nif related requirements.
In the most recent version of the plugin, you will need to go to the Properties editor (by default on the right side of Blender) and select the Scene tab. Down the bottom you should see some NifTools settings where you can change the Nif Version and both User Versions. You will need to make sure that User Version 1 is set to 12, and User Version 2 is set to 83 for a Skyrim export. (For the time being, ‘Nif Version’ is no longer used)
In the Properties editor select the Object tab. This is where you set the properties of the objects you are trying to export into NiTriShapes. Please keep in mind that if you have more than one object in the scene, you will need to edit the object properties for all of those objects individually for all of the following steps. For Skyrim, the settings you will require are:
Once they are selected, you will need to select a shader type. For Skyrim statics we usually choose BS Lighting Shader Property. You must select one. Or else your entire export will fail. A generic static nif will need these shader flags selected: (This image is from an earlier version of the plugin. The new version will look similar and will work the same as seen below)
If you do not use vertex paint, uncheck vertex_colors. You can also do that after the export in Nifskope, your mesh might appear black first.
That is all you need to do in the Object Properties tab. I usually move on to the Material Properties, it looks like a checkered sphere. For more information on how the object properties and your nif properties are linked, see Overview of Plugin Options
If you have not done so throughout your modelling process, you will need to create a material for each object. You can only have one material per object or your export will fail. So create a new material and play around with some of the settings. There are some Nif settings down the bottom, but they don’t need to be changed in this tutorial. For more information on how the material settings and your nif settings are linked, see Overview of Plugin Options & Material Settings
Now I go to the Texture tab, which looks like a checkered square, by default it is on the right of the Materials tab.
This is where we actually get to apply our textures, you can also apply your normal maps, etc. here was well. Once your texture is loaded up, scroll down to Mapping section and select Map – UVMap. You should do this for every single texture on every single object or else your export will fail. Another thing worth mentioning is that you need to have all of your textures in a folder that has a folder named ‘textures’ in it’s file structure if you don’t want to get any errors. If you don’t, you will receive some errors, but your .nif will still export.
Now we are done! Once you have followed all of the above steps, your model should export without a problem. Select everything you wish to export and go File – Export – .nif. In the side menu you need to make sure that Skyrim is selected. If it isn’t, your model will not export, and all those version numbers you spent typing in were all for nothing.
You should get this gorgeous thing up the top. If you don’t, you messed up. See the ‘Errors’ section for some help. You might also get a popup about vertex colors. You do not need to worry about that.
Once your original model is all exported, you can start working on your collisions. The method and requirements are exactly the same as above, you pretty much have to prepare another model in Blender. Instead of having each object assigned a different material, this time you want each object to represent a different type of physics (eg. metal, wood, etc.).
Once that is all done, select your model and give it a smooth shading, then export it as a different file as opposed to your earlier one (I put a _c after all my filenames for collisions). Now we will need to open up our collision .nif we just exported in NifSkope.
Due to my test model being very simple, my collision is also very simple. In this case it’s the exact same model, vertex paint and all. In the end this doesn’t matter, because all that data gets deleted anyway if you follow this tutorial. So, using the left hand tree browser, select your BSFadeNode drop down and expand all the way down to the NiTriShape (By all the way down I meant one branch)
The BSLightingShaderProperty holds all of our vertex paint and texture/material data. The NiTriShapeData holds all of the geometry data. Right click on the BSLightingShaderProperty and delete it, because collisions don’t need pretty colors.
P.S. As far as I know you can keep the BSLightingShaderProperty node there and nothing bad will happen. But it’s better to be safe.
Your collision .nif should now look something like this:
Now we can save that, close down NifSkope and open up NifUtilSuite! This is the part that takes all of the geometry data from our .nif file and turns it into a collision. This part is pretty straightforward. Your target file is the file your original .nif file you exported first, the one that still has your BSLightingShaderProperty branch in it. Your collision file is the one you just edited and removed the BSLightingShaderProperty from. Your collision source should be either Collision fallback Mesh or just simply Mesh, because we are using the mesh to determine where the collisions are. Your collision materials will be different for every object, so you will need to select Name of NiTriShape for your Collision Materials. This way if you have different types of geometry on your model (wood and stone) they can be separated. Your settings should look a bit like this.
Click on Add Collision. Your collision is now a part of your model. Now you can open up your original model in NifSkope to see how it went. Expand all your branches to see what you have. It should look something like this:
If so, that’s good. We are nearly done. If it doesn’t, something went wrong.
Now we need to add in some extra collision data that wasn’t added in with ChunkMerge. Right click on the top BSFadeNode and select Node – Add Extra Data, then select BSXFlags. Click on your newly created BSXFlags and see what’s inside of it. Double click on the value for Interger Data and change it to 130. This is what most static Skyrim models have theirs set to. I like to clean up my branches by moving the BSXFlags to the top of the nif by right clicking on the BSXFlags and selecting Block – Move Up.
Now your collision works! The final thing to do is to determine what kind of material each object is. Open up your nif tree again and find your bhkCompressedMeshShapeData. You may have multiple depending on how many different objects were in your collision file. Select the node and go down to Chunk Materials. Go down the two branches and you will find a line that says material. Open up the selections in the value column and select what you want that part of the mesh to be made out of.
Once that is done, you’re all ready to go! It all sounds really complicated but after a little while it becomes a lot faster. All you have to do is open up the Creation Kit and start placing your new models.
No doubt you got some errors the first time around. These are the most common one’s I have found and how to solve them.
The version numbers and the game you are trying to export your nif to don’t match up. You need to make sure that all of the objects in the scene have all had their version numbers set to the correct export version. Instead of saying ‘Cube’ it will say your object’s name. Makes it a lot easier to narrow down.
You have not applied a shader to an object. Every object must have a shader selected. In most cases, BSLightingShaderProperty.
You have applied a material to an object but that material doesn’t have any textures.
You have not set the mapping to UVMap. Every individual texture in every material must be mapped to the UVMap
You have not UV unwrapped an object but somehow assigned a texture to the UV Map.
You have n-gons in one of your objects. The exporter only supports tris and quads.
One or more of your textures are not in a ‘textures’ folder. eg. C:\Users\Desktop\mytextures. You should have a texture folder in there somewhere, like C:\Users\Desktop\mytextures\textures or C:\Users\Desktop\textures. Your model will still export but you will need to fix up your texture paths in the BSShaderTextureSet.
Blender to NifSkope – Overview of Plugin Options
This is where I will go into the details of what you can change in Blender that the exporter recognizes.
NifTools Object Panel:
- Nif Version, User Version 1 and User Version 2 – all directly relate to the Nif Version found in the Header of the .nif
- Nif Root Node – Will be the root node of your .nif. Self explanatory.
- Tangents Flags – related to each corresponding object’s ‘Extra Vectors Flags’ properties. It can have a value of None or Tangents_Bitangents, where None is any value other than 16 and Tangents_Bitangents is 16. If set to None, your model’s normal maps won’t work.
- UPB – Unknown, I have not experimented.
- BSXFlags – Unknown. I believe it has no effect.
- Consistency Flag – Used to select Static/Mutable/Volatile. Not sure what else.
- Object Flag – Directly related to the ‘Flags’ property in each NiTriShape.
- Nif LongName – Unknown. I believe it has no effect.
NifTools Object Extra Data Panel
- Unknown, possibly used to add in BSXFlags and other extra nodes. I don’t believe it works at the moment.
BS Inv Marker
- I believe it is used to set a rotation for an inventory item
NifTools Shader Panel
- All are mostly self explanatory and can be experimented with.
Material Color Panel
- Ambient – Unknown
- Emissive – Relates to Emissive Color in BSLightingShaderProperty
- Alpha – Unknown
- Lighting Effect 1 – Relates to Lighting Effect 1 found in BSLightingShaderProperty
- Lighting Effect 2 – Relates to Lighting Effect 2 found in BSLightingShaderProperty
NifTools Dismember Flags Panel
Several material settings relate to values in the BSLightingShaderProperty
- Specular – Hardness is related to the Glossiness property.
- Specular – Intensity is related to the Specular Strength property.
I plan on continually updating this as we figure out more about what is available to us with the Blender Nif plugin. Please feel free to correct me on anything I may have gotten wrong. Any questions feel free to ask. I hope I have covered everything for the time being, and I apologize for the terrible wording, it’s 2am and I can’t be bothered to proofread. I will go over this and fix up any mistakes I have made in the coming weeks.
by Hayden Price
Learn more, join our community!
Arcane University (also for non-members!)
Welcome to the Arcane University! We are a collaborative effort of Beyond Skyrim aiming to help people learn the various aspects that play into mod creation, like scripting, level design or 3d modelling to just name the major ones. If you are interested in learning one of these or just want to help out others achieve their goal, feel free to join us on our Discord server and begin your journey. Previous knowledge is not required, only that you are willing and eager to learn. Below you can find some work that students of the Arcane University made during their time with us. By honing your skills you can eventually graduate, those students may choose to work on one of the various Beyond Skyrim teams or the Atronach Forge, our cross-province content creation hub. So it is a good chance to get involved with the project and learn a few handy things along the way. Hope to see you soon!