Jump to content
Lord Hayden

Blender 2.7+ Nif Exporter Tutorial

Recommended Posts

I have next problem on export, I checked all as written in description in first post (game skyrim,  user versions 12 83, etc. etc.) , checked "process All(nif)" however it exports geometry only with shader and textures, without skeleton, as a result I cannot use it in game. What I need to do to export file with skeleton? BTW what skeleton do I need to use? From skeleton_female.nif or from body, (femalebody.nif). Tried both versions, result the same - exported file is without skeleton. Tried blender versions 2.77 and 2.78, both exports without skeleton. If anyone had/know how to solve the problem please answer!

Edited by Baradha1

Share this post


Link to post
Share on other sites

I have next problem on export, I checked all as written in description in first post (game skyrim,  user versions 12 83, etc. etc.) , checked "process All(nif)" however it exports geometry only with shader and textures, without skeleton, as a result I cannot use it in game. What I need to do to export file with skeleton? BTW what skeleton do I need to use? From skeleton_female.nif or from body, (femalebody.nif). Tried both versions, result the same - exported file is without skeleton. Tried blender versions 2.77 and 2.78, both exports without skeleton. If anyone had/know how to solve the problem please answer!

I can't be of any help here, I've only explored the .nif exporter to the point of getting static .nifs exported such as houses, etc. I'm not certain if the 2.7+ exporter even supports skeletons. It's been a while since I exported anything other than static models, been very busy lately with other projects, but I will try and get back and expand on this tutorial further once I've figured out more functionality. No way of telling if that will be any time soon though. If in doubt, an alternative is to export to 3DS Max first, make the required changes and then export from there.

Share this post


Link to post
Share on other sites

I have next problem on export, I checked all as written in description in first post (game skyrim,  user versions 12 83, etc. etc.) , checked "process All(nif)" however it exports geometry only with shader and textures, without skeleton, as a result I cannot use it in game. What I need to do to export file with skeleton? BTW what skeleton do I need to use? From skeleton_female.nif or from body, (femalebody.nif). Tried both versions, result the same - exported file is without skeleton. Tried blender versions 2.77 and 2.78, both exports without skeleton. If anyone had/know how to solve the problem please answer!

As far as I'm aware the Nif Plugin for the current Blender version does not support the export of skeletons, you'd need to use Blender 2.49 for that. Or, like Hayden said, 3DS Max.

Share this post


Link to post
Share on other sites

thanks for answers, will use 2.49 as used before. Just thought I don't understand something if I cannot export with skeleton :D

"I think Neo popped in once and said that it was possible but we didn't get any details."

It would be good to see how it can be done

Edited by Baradha1

Share this post


Link to post
Share on other sites

I'm trying to make an export test exporting a simple mortar but I keep getting this error:
 

Traceback (most recent call last):
  File "C:\Users\lorenzoantenucci\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_scene_nif\operators\nif_export_op.py", line 164, in execute
    return nif_export.NifExport(self, context).execute()
  File "C:\Users\lorenzoantenucci\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_scene_nif\nif_export.py", line 291, in execute
    root_block, root_object.name)
  File "C:\Users\lorenzoantenucci\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_scene_nif\objectsys\object_export.py", line 214, in export_node
    self.mesh_helper.export_tri_shapes(b_obj, space, parent_block, node_name)
  File "C:\Users\lorenzoantenucci\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_scene_nif\objectsys\object_export.py", line 639, in export_tri_shapes
    bsshader = self.nif_export.texturehelper.export_bs_shader_property(b_obj, b_mat)
  File "C:\Users\lorenzoantenucci\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_scene_nif\texturesys\texture_export.py", line 121, in export_bs_shader_property
    if self.basemtex.texture.image.use_clamp_x == False:
AttributeError: 'NoneType' object has no attribute 'use_clamp_x'

location: <unknown location>:-1

Share this post


Link to post
Share on other sites

Looks like something that might be texture related, I'm not sure. How many multiple objects do you have in the scene? Can you post your Material and Texture properties in the .blend file?

Edited by Lord Hayden

Share this post


Link to post
Share on other sites

I was able to get Blender 2.7 working with armatures! :D Based on the advice here: http://niftools.sourceforge.net/forum/viewtopic.php?f=21&t=6504

 

Blender 2.78c
NifTools 2.6.0 Dev 4 (from June 18th 2016)

1) Install Blender and the NifTools plugin (through Blender's addon manager). Exit Blender.

2) Navigate to the addon folder: %AppData%\Blender Foundation\Blender\2.78\scripts\addons\

3) Apply the changes found here: https://github.com/niftools/blender_nif_plugin/pull/252/files

   - At the top of each change is a filepath. Find the file at that path within the addon folder. Open with Notepadd++ or something.

   - Remove any lines shown in red. Add any lines shown in green. Don't include the + at the beginning of the line.

4) Apply the changes I describe here (second comment): http://niftools.sourceforge.net/forum/viewtopic.php?f=21&t=6700&p=32976#p32976  New site, here's the link: https://forum.niftools.org/topic/4487-bonesvertex-groups-named-incorrectly-after-export-fixed/?do=findComment&comment=29890

Just in case it goes down again, here is the text: 

"In file io_scene\nif_common.py

In function get_bone_name_for_nif

Replace:

name = name.replace("NPC ", "NPC L")

With:

name = name.replace("NPC ", "NPC L ")

 

This should be on two lines (176 and 181 for me)."

 

 

And that's it for the install.

 

Be careful about applying transformations before export as described in the original post, that can have bizarre effects on armatures which are quite difficult to fix. 

When exporting the armature, I think you will need to check the Flatten Skin box and set Max Partition Bones to 60. But I'm not 100% sure about that

And if you're going to use it in Skyrim Special Edition, you will want/need to run it through SSE Nif Optimizer.

 

One problem that I've seen: After exporting, there may still be issues with the skeleton losing its rotation values. I've only seen this happen when multiple meshes were imported into a single Blend file (but even when doing this it won't always have a problem). This also effects the NiSkinInstance so if your mesh needs custom bone weights, I don't know how to fix it I've had some luck with copying the mesh components into separate blend files before exporting. But if you've only moved vertices around, without adding or deleting any new vertices and without changing the vertex groups, then you can just splice the new NiTriShapeData into the old mesh. I'm not sure what exact circumstances cause this issue since I haven't had problems combining meshes in the past.

 

Edited by opusGlass
  • reaction_title_1 1

Share this post


Link to post
Share on other sites

For anyone making clothing with Blender 2.78.

I appear to have everything working except my wrist dismemberment is a little off.  My wrists are slightly below and at a different angle than they should be.  Nothing is jumping out at me as being wrong when looking at my Skin Partition Blocks in NifScope. I don't have very much clothing making experience so my issue could be something very simple.  I'd appreciate any ideas on how to fix this.

Solved; I didn't have the PF_START_NET_BONESET set on the correct skin partition.

Edited by cunningmoss6833
update

Share this post


Link to post
Share on other sites

Hi everyone.

Thanks for a great tutorial, it helpes me a lot. But there is something wrong and I still have a third error (You have applied a material to an object but that material doesn't have any textures.). I don't understand why because I have added a texture for my material.  Is there a mistake somewhere? Here are my screens:

Texture window:

2a6da05370ade86ca411f45e3b13ffc2.thumb.j

Material window:

90ed83dd66c9a92eda8ac67ac6b111ec.thumb.j

Object window (I have selected all the shader flags you wrote about).

f2e410e8534464030fdaca8840696224.thumb.j

Edited by ingetnamn

Share this post


Link to post
Share on other sites

You've currently got it set up for a Cycles Render. Swapping to Blender Render along the top toolbar will change the way your materials are set out, similar to the tutorial, that should fix your problem. Just to be safe, I'd remove all textures and materials from your model before swapping over to Blender Render and re-applying them, as I'm not sure how the two interact.

  • reaction_title_1 1

Share this post


Link to post
Share on other sites

Dude, thank you very much for your help. After that, there were some other problems, but in your guide you fully described everything, every nuance, every possible error. Very useful information.

  • reaction_title_1 1

Share this post


Link to post
Share on other sites

[SOLVED]
Hey, good people, I need some help.
When I try to export my sword, I keep receiving TextureHelper error logs. Sometimes "warning", sometimes "offset". I've put the files in a path structure like Skyrim's, I've separated the parts so there'd be no multiple materials in the same object and even deleted the normal texture so I have only one texture per material (don't know if that helps, but it doesn't harm, I can correct that later). Could someone please take a look at my file to see what's wrong?

http://www.mediafire.com/file/c70f923xavclr3c/MySword.zip
r1y9mI4.jpg

Plugin version: blender_nif_plugin-2.6.0a0.dev4-16.12.14
Blender version: 2.78a

Edited by Spiegel
SOLVED

Share this post


Link to post
Share on other sites

Hi all,

I have been fighting for a while trying to get my meshes imported into Skyrim CK. CK keeps crashing whenever I import and then I came across this tutorial. So far I've been working along side it well until the need for NUS. I can seem to find out how to get it to work. Any help that gets me back on track with this is greatly appreciated.

 

Thanks.

Share this post


Link to post
Share on other sites

Hi all,

I have been fighting for a while trying to get my meshes imported into Skyrim CK. CK keeps crashing whenever I import and then I came across this tutorial. So far I've been working along side it well until the need for NUS. I can seem to find out how to get it to work. Any help that gets me back on track with this is greatly appreciated.

 

Thanks.

Have you tried to change the template in ChunkMerge? What kinds of objects you're trying to create? If your custom object is similar in shape to something from the game, it may be easier to use Nifskope to copy your geometry data into the original file and keep the collision data (then save it into a new file). But you'll have to fix the Name string to avoid conflict with the root node, if I remember well. You can also create box and spheric collisions from scratch in Nifskope, copying the structure of another nif file by eye. Those are some alternatives to using ChunkMerge if you can't make it work.

Edited by Spiegel

Share this post


Link to post
Share on other sites

Have you tried to change the template in ChunkMerge? What kinds of objects you're trying to create? If your custom object is similar in shape to something from the game, it may be easier to use Nifskope to copy your geometry data into the original file and keep the collision data (then save it into a new file). But you'll have to fix the Name string to avoid conflict with the root node, if I remember well. You can also create box and spheric collisions from scratch in Nifskope, copying it by eye the structure of another nif file. Those are some alternatives to using ChunkMerge if you can't make it work.

Hey thanks I will just attempt to do a simple box collision. I'm testing a pretty basic mesh at present just to see if CK can even manage w/o ctd.

Share this post


Link to post
Share on other sites

Hey, good people, I need some help.
When I try to export my sword, I keep receiving TextureHelper error logs. Sometimes "warning", sometimes "offset". I've put the files in a path structure like Skyrim's, I've separated the parts so there'd be no multiple materials in the same object and even deleted the normal texture so I have only one texture per material (don't know if that helps, but it doesn't harm, I can correct that later). Could someone please take a look at my file to see what's wrong?

http://www.mediafire.com/file/c70f923xavclr3c/MySword.zip
Plugin version: blender_nif_plugin-2.6.0a0.dev4-16.12.14
Blender version: 2.78a

All the warnings you are getting should be covered on the first page. For example, 'Offset' usually refers to not having a texture applied to your material. If you're getting an error that isn't covered on the first page please post a screenshot of it so I know exactly what it's saying.

Hi all,

I have been fighting for a while trying to get my meshes imported into Skyrim CK. CK keeps crashing whenever I import and then I came across this tutorial. So far I've been working along side it well until the need for NUS. I can seem to find out how to get it to work. Any help that gets me back on track with this is greatly appreciated.

 

Thanks.

What exactly is NUS that you're referring to? Collisions depend on a lot of things, what kind of model are you trying to add collision to? If it's a static model then ChunkMerge can cover that for you, and I can go through it a bit more in depth in this thread if you like. If you're looking into adding collision to things like weapons or physics objects then that's a little more complex.

Share this post


Link to post
Share on other sites

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

×