Page 1 of 3

niftools and blender plugin

Posted: 11 Jan 2017, 16:44
by psi29a
It turns out that they are in the process of moving from Sourceforge over to github. yay \o/
https://github.com/niftools

I looked at their blender_nif_lugin progress:
https://github.com/niftools/blender_nif_plugin

It turns out they have been working on 2.6 which should work with Blender >= 2.77
https://github.com/niftools/blender_nif_plugin/releases

This looks promising. Anything to get us out of the 2.49b era.

I've also been talking with cc9cii, he snuck in some extra NIF bits from Oblivion and above:
- Loading new NIF formats. Most NIF records types are loaded but not all are handled (i.e. new type of particle effects, animations, etc). This is based on the current OpenMW framework and I am not 100% happy with it (or some of the existing implementations). The new files in "components/nif" will need to be cleaned up a bit before it can be merged - and probably will generate some discussions.

- Handling of the NIF models. There are two types for the newer NIF versions, visible mesh/triangle/skin and physics shapes (well, there might be more that I'm not aware of). These are not done well at all, I just hacked and hard-coded to get stuff working. I'm currently looking at the physics part and it it taking a very long time because I'm having to rewrite constantly as I learn more stuff that invalidates my earlier assumptions... Still, all that could be cleaned up without too much trouble for merging (since the functionality of the newer NIF's don't overlap the old in most cases)

Re: niftools and blender plugin

Posted: 11 Jan 2017, 17:13
by DestinedToDie
They've been working on 2.6 for years I think. 4 years at least, now that I look at their forum. But it's still in alpha, still no animation support. Better than nothing, but looking grim unless you're okay with waiting another 5 years. Look at their milestones:

https://github.com/niftools/blender_nif ... milestones

I'm looking forward to 2.6 but I'm not counting on it. It's not realistic to expect anything here.

Re: niftools and blender plugin

Posted: 11 Jan 2017, 20:27
by psi29a
I've been able to export some of my (simple) blender models from 2.77 to NIF. NIFScope seems to see the results just fine.

I also was able to do this on Linux, no wine in between. I think this is a great start. ;)

I'll post a mini-howto on how to get the setup working on Ubuntu/Debian. For 2.49b and 2.77

Re: niftools and blender plugin

Posted: 12 Jan 2017, 10:24
by weedfreak
The niftools dev I was taking with 2 years ago said they might start looking at animation export in 2017, d2d's 5 year estimated might be optimistic and 2.77 blender has already be superseded by 2.78.

Finding out how to get NIFScope working on Linux would be helpful, I have never managed to get it to run.

Re: niftools and blender plugin

Posted: 12 Jan 2017, 10:27
by psi29a
NifSkope 1.1.3, Nov 17, 2012 -> Still useful for Morrowind (and later) NIFs.
https://github.com/niftools/nifskope/re ... kope-1.1.3
Here you can download the windows and fedora17 (rpm) binaries.

I converted the rpm to deb and tested it. It works so feel free to download this and remove the .zip at the end.
nifskope_1.1.3-2_amd64.deb.zip
Nifscope x84-64 linux
(1.2 MiB) Downloaded 521 times
In the meantime, NifSkope was last updated 2016-11-07 https://github.com/jonwd7/nifskope/releases
This isn't too bad, but sadly the Linux builds were broken on a library that was windows only. I fixed that and other issues here: https://github.com/niftools/nifskope/pull/101 to make it more cross-platform.

I also emailed them for a status update. We'll see from there.

For those interested in the blender 2.62 (also works on 2.77) plugin:
https://github.com/niftools/blender_nif ... jun-16.zip

You'll still need pyffi in your python path for this to work. I managed to create a cube and get it exported, so it seems to work... no further testing done. I use the latest PyFFI 2.2.2 from pypi. Using the latest gave me an error in Blender that it couldn't lost nif.xml or something along that line.

Update:

For testing purposes, I created a house in blender using 2.77. Something simple. (remove the .zip ending)
house_1.blend.zip
blender house
(451.53 KiB) Downloaded 461 times
I then exported it to NIF using the plugin posted above and here is the result: (remove the .zip ending)
house_1.nif.zip
nif house
(2.1 KiB) Downloaded 449 times
The only problem I had was that is complained that I had a non-UV Material that needed to be removed. After that, it worked as expected.

Update:
I found this: https://github.com/niftools/nifxml it turns out to be nif.xml file that isn't being shipped with the latest pyffi. However the latest version introduces hfloat (16-bit floats) used by FO4. This apparently isn't supported by the NifFormat of the plugin.
File "/usr/local/lib/python3.5/dist-packages/pyffi/object_models/xml/__init__.py", line 505, in startElement
self.basic_class = getattr(self.cls, self.class_name)
AttributeError: type object 'NifFormat' has no attribute 'hfloat'
Best to avoid this at themoment.

Re: niftools and blender plugin

Posted: 12 Jan 2017, 15:29
by psi29a
For windows users, you'll need to install:
[*] Blender 2.77 (or later)
[*] Python 3.5 (or later)
[*] PyFFI 2.2.2
[*] blender_nif_plugin-2.6.0a0.dev4-20-jun-16.zip

This should get you the same results as I get on Linux.

Also found these:
Maya2016 NIF import/export plugin: http://www.nexusmods.com/skyrim/mods/65421/
3DSMax2016 NIF import/export plugin: http://www.nexusmods.com/skyrim/mods/5622/

They are both forks, including source. I'm in communication with niftools now over gtalk/email/irc, maybe we can backport some of these. It might be useful to someone.

Re: niftools and blender plugin

Posted: 12 Jan 2017, 16:21
by psi29a
Found this excellent guide about working with Blender 2.77 with the latest NIF plugin:
https://www.darkcreations.org/forums/to ... -tutorial/

It seems I'm not the only one to stumble across this. :)

Re: niftools and blender plugin

Posted: 12 Jan 2017, 16:36
by Frik
Thanks for posting this information. I've installed Blender 2.78a & Blender 2.49B, as well as Nifskope 1.1.3. Getting ready to start doing Blender tuts and reading. :)

Which of the Blender nif plugins would you recommend I use?

Thanks!

Re: niftools and blender plugin

Posted: 12 Jan 2017, 16:55
by psi29a
I posted them above, but you can go here:
https://github.com/niftools/blender_nif_plugin/releases

blender_nif_plugin-2.6.0a0.dev4-20-jun-16.zip for Blender >= 2.6
Prerequisites
[*] Python 3.5 (or later) - https://www.python.org/ftp/python/3.5.2/
[*] Blender 2.77 (or later) - http://download.blender.org/release/
[*] PyFFI 2.2.2 - https://github.com/niftools/pyffi/relea ... yffi-2.2.2
[*] blender_nif_plugin 2.6.0 - https://github.com/niftools/blender_nif ... .20-jun-16

Note: be sure to pick either 32 or 64-bit and not to mix and match them.

blender_nif_scripts-2.5.9.77b0815-windows.exe for Blender == 2.49b
Prerequisites
Install in order
[*] Python 2.6.6 - http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi
[*] Blender 2.49b - http://download.blender.org/release/Ble ... indows.exe
[*] Pyffi 2.1.11 - https://github.com/niftools/pyffi/relea ... ffi-2.1.11
[*] blender_nif_plugin 2.5.9 - https://github.com/niftools/blender_nif ... nder-2.5.9

Re: niftools and blender plugin

Posted: 12 Jan 2017, 21:03
by Frik
Great, thanks! Using Linux (Fedora 24) so had to set Python 3.5 to global default. After that, was able to get everything installed.

Was able to import a simple .obj and export as nif, then into nifskope. Anything that had a texture seemed to toss an error and wouldn't import or export. A simple crystal gave me this error on export:

Image

I guess we are limited to very simple models with this?

Also, I couldn't extract either of the .zip files you posted. Got an error about them being invalid archives. Not sure what's up with that. :|

Btw- Is there a Blender error log somewhere? I could not find it..