Jump to content

[Skyrim] Skyrim Meshes and Blender - Importing/Exporting


Hana

Recommended Posts

Skyrim Meshes and Blender

~~~~~~~

Importing and Exporting

 

 

A couple of caveats before we start;

1. This tutorial is necessary due to the Niftools nifscripts not being current and up to date with Skryim information. This is understandable, it takes a team of volunteer developers time and effort to get there. We need to be patient, and use workarounds such as this for now.
2. For that same reason, Blender v2.49b is used. The nifscripts for the latest 2.6x are not yet up to par and would require extra workarounds.
3. There are other ways to import/export meshes, this is my preferred method.

This tutorial is specific to static meshes. Working with armor/clothing is a whole different ballgame and can be found here.

 


Step 1: Preparing the Nif file.
--------------------------------------

Open a mesh in NifSkope. Again I'm using clutter\carts\handcart01.nif as an example.
In the Block Details, expand the NiHeader arrow.

 

gallery_1482_10_86269.jpg

 

 

Change the following values;

User Version - from 12 to 11.
User Version 2 - from 83 to 34.
What we're doing here is changing the values from a Skyrim mesh to a Fallout mesh so Blender will recognize it.

 

gallery_1482_10_76890.jpg

 

In the Block List, right-click on the line BSXFlags, go to Block > Remove to delete it.

 

gallery_1482_10_14972.jpg

 

In the Block List, right-click on the line bhkCollisionObject, go to Block > Remove Branch to delete the entire block.

 

gallery_1482_10_27043.jpg

 

Expand the NiTriShape block. Right-click on the line BSLightingShaderProperty, go to Block > Remove Branch to delete the entire block. The mesh will lose all it's texturing but don't worry.

 

gallery_1482_10_6752.jpg

 

Repeat for ALL NiTriShape blocks.

 

We've removed all those lines because, as mentioned above, the nifscripts to import into Blender currently does not know what those blocks are and will throw errors. When done, we have left a very bare bones mesh.

 

gallery_1482_10_102775.jpg

 

 

SAVE the mesh under a NEW file name. DO NOT OVERWRITE THE EXISTING FILE. I can't stress this enough. I like to prefix my "Skyrim ready" meshes with Sky so I know immediately what it is. So in this example, I've saved it as skyhandcart01.nif.

 

 

Step 2: Import into Blender
------------------------------------

Import as nif into Blender like you would any other mesh. If you receive an error, double-check you've done everything in Step 1.
As this is NOT a Blender tutorial I am not going into detail of what to do once you're there. Do whatever you like to the mesh.
The only important step to point out here is to apply a material and texture to the mesh.

Step 3: Export from Blender
------------------------------------

When you're finished editing the mesh to your liking, export as nif like you normally would. The only difference here is to export the mesh as a Fallout mesh, not an Oblivion mesh. Remember above where we changed the User Version of the nif to equal Fallout? This is why. Default settings are fine, don't worry about the Collision options, there is none. I prefer to save under a new file name again.

 

gallery_1482_10_131775.jpg

 

 

 

Step 4: Clean-up in NifSkope
--------------------------------------

Open the newly exported mesh in NifSkope.
Expand the NiHeader block in the Block Details. Change the User Version back to the original values for Skyrim. Make sure to do this first as it changes options in the NiTriShape to what we need and will cause errors in later steps.

User Version - from 11 to 12
User Version 2 - from 34 to 83

 

gallery_1482_10_84992.jpg

 

You'll notice, as mentioned in the Dissecting Skyrim Meshes tutorial, that Blender exported the mesh as a NiNode block, but we need a BSFadeNode block for our purposes. Not to worry, this isn't our final mesh so it can be left as is.

 

Expand the NiTriShape block. There's a lot of garbage here we don't need.

 

gallery_1482_10_39212.jpg

 

 

Highlight the NiMaterialProperty line, right-click and go to Block > Remove to delete it.
Highlight the NiSpecularProperty line, right-click and go to Block > Remove to delete it.
Highlight the BSShaderPPLightingProperty line, right-click and go to Block > Remove Branch to delete it (make sure it's Remove Branch to get all the sub-properties associated with it).


All we want left is the NiNode with a NiTriShape and NiTriShapeData, just like before we imported to Blender.

 

gallery_1482_10_30683.jpg

 

 

We now have a clean edited mesh. But wait ... it has no collision, material options or textures, so it's next to useless. There are several routes you can go here, again, this is my preferred process. I've learned that trying to copy collision data from one nif to another doesn't always work as planned. So it seems best to copy a mesh from the stripped down version we have now, into a vanilla mesh.

Open a second window of NifSkope and load the original handcart01.nif.


In our modified mesh window, highlight the NiTriShape line, right-click, go to Block > Copy Branch (make sure it's Copy Branch so the NiTriShapeData is also copied).
In the original mesh window, right click on the BSFadeNode line in the Block List area, go to Block > Paste Branch. Our new modified NiTriShape mesh is now added to the bottom of the blocks and you should see it in the render window (it'll be greyed out because we've not added textures to it yet). Repeat if you have more than one NiTriShape to add.

 

gallery_1482_10_135504.jpg

 

Close out the modified mesh window, we don't need it any more.

In our original mesh window, expand the original NiTriShape branch and the new modified NiTriShape branch. With the modified NiTriShape highlighted, scroll down in the Block Details to the BSProperties line at the bottom. Expand it. In the first property line, change None to the line number of the BSLightingShaderProperty of the original existing NiTriShape.

 

gallery_1482_10_16641.jpg

 

Our modified NiTriShape should now be properly textured and ready to go. Repeat if you have more than one NiTriShape to change.

Highlight the original mesh NiTriShape line, right-click, go to Block > Remove Branch. (Repeat for any other original NiTriShapes you don't need).


We're left with our final modified mesh, complete with proper original options, textures and collision.

 

gallery_1482_10_50132.jpg

 

 

Save with a new file name (it's a new mesh!) and add to CK.

 

As a final word on this tutorial; anyone who knows meshes will know that our collision is not going to exactly fit this new mesh in my example. The collision will still have the cart sides and prevent the player from walking into the side of the cart. But it works for this purpose and will work for anything that's not heavily modified. Collision for Skyrim is a huge messy issue and will be detailed in a separate tutorial for anyone who wants to redo collision from scratch.

  • Like 2
Link to comment
Share on other sites

  • 5 months later...

Fine, now we may need a good tutorial about... collision. Many floating objects ingame are rightly placed in the CK and havok manages them properly, but the problem seems to be in oversized collision boxes. I'm thinking about this, and if it requires advanced modifications in a 3D editor then I may probably have to learn and start from zero.

Link to comment
Share on other sites

  • 1 month later...

@Sclerocephalus : It's purely subjective but working on Skyrim meshes needs to remain sticked on version 2.49b. I made my first steps in 3D modelling with this version, and I was seriously tempted to hang myself...  :sad: (this an exageration, of course). 3DS Max 2012 looks much more 'user-friendly' and intuitive. These aspects cannot be neglected by such a layman as me. As I said, this is probably a matter of taste.

Link to comment
Share on other sites

@Sclerocephalus : It's purely subjective but working on Skyrim meshes needs to remain sticked on version 2.49b. I made my first steps in 3D modelling with this version, and I was seriously tempted to hang myself...  :sad: (this an exageration, of course). 3DS Max 2012 looks much more 'user-friendly' and intuitive. These aspects cannot be neglected by such a layman as me. As I said, this is probably a matter of taste.

 

 Well, so this was just a misunderstanding, as I inferred from your comment that you would never try to do 3D modelling.

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...