• Welcome to Freedom Reborn Archive.
 

Adventures with .NIF, PyFFI & QSkope

Started by life_matrix, December 10, 2008, 03:49:04 PM

Previous topic - Next topic

life_matrix

A few months ago I tried my hand at using NifSkope. It seemed pretty intimidating at first but, following some tutorials, I did manage to learn the basics. I'm not so afraid to use it now. (But now I realize that certain tasks can be pretty complicated, even in NifSkope.)

Recently, despite my initial resistance to the idea, I decided that I was going to attempt to learn how to modify and create meshes using Blender. I'm not the fastest learner, but so far I've gone through numerous beginner tutorials (on blender.org) and watched nearly a dozen of Super3boy's Blender YouTube tutes.

SIDE NOTE: It may look like "Super3boy's Second Blender Tutorial" is split between two parts. But actually, much of it is missing. Parts 1 and 2 on YouTube are, combined, only equivalent to part 1 of the videos on his Nystic website. Anotherwords, additional parts 2 and 3 are on his website and not available on YouTube.

Anyway, I felt like I might be approaching enough understanding to where I might attempt to import and export .NIFs in Blender. So, I downloaded and installed the Blender NIF Scripts package. But before I could get it installed, I found out that I had to download and install both a recent Python package and something called "PyFFI". Err... O.K.  :unsure:

I had already downloaded and installed Python v2.6 (the latest release a month or two ago) as Python is required for Blender. (I was impressed that Blender installed from such a small download. But while the Blender download may only be 9.4 MB, the Python 2.6 package is nearly an additional 14 MB... compressed.) So I downloaded v1.1.0, the latest release of PyFFI, and tried to install that.

Whoops! :o It tells me that it does not detect Python v2.5 and it tells me to download that from the window that pops up. :angry: B-B-BUT... I have Python installed! Apparently, it refuses to work with Python v2.6 or later. (In hindsight, this was hinted at by the "py2.5" in the file name.)

So... I uninstalled Python 2.6 and then installed 2.5.2. Finally, I could get PyFFI to install! :D (Fortunately, Blender 2.48a still seems OK with Python 2.5.2.) But I was truely shocked to find that the tiny 1.5 MB Windows installer for PyFFI required "59.1 MB" of disk space! What?! :blink: Even with text documents, I didn't think that much compression was even possible - not even with something like bzip! :wacko:

Admittedly, PyFFI includes fuctions for .NIF, .KFM, .CGF, .DDS, and .TGA and support to "implement your own format." (Aside from .NIF, the only other format I think I might need is .DDS.) But, as far as I'm aware, the install didn't even downloaded anything. It seems like much of this install space consists of documentation! Many of the files are the details of how to program in Python using PyFFI functions - something I would never, ever need. Still... whoever managed to get 59.1 MB compressed into such a small download has my respect!

I guess what I'm saying is that, while I already appreciate the work put into PyFFI (for NIF conversions), I would really appreciate it if they would release an end-user distribution with a smaller installation. But, beggers not being able to be choosers and all...  <_<  :P

The huge space requirements is not what bothers me the most, however. I think it's pretty silly that the latest Windows installer of PyFFI (v1.1.0) still requires Python 2.5. After several betas, the final, stable release of Python 2.6 was released on October 1st. But version 1.1.0 of PyFFI was released on November 18, 2008. I suppose I could download the source for 1.1.0 and try to learn how to recompile it for Python 2.6. But that's currently beyond my understanding and I already have my plate full trying to learn Blender and Paint.Net, among other things...

life_matrix

Finally, the point that brought be to post:

QUESTION: What is "QSkope"?

What does it really do and is this something that would be useful to someone just messing around with .NIF files (with or without Blender)?

I'm asking because QSkope was automatically installed as part of that huge PyFFI package. I do have an inkling of what it's supposed to be. According to the Python File Format Interface project homepage QSkope is "PyFFI's GUI application". But that, and the fact that it should be able to open .NIF, .KFM, .CGF, .DDS, and .TGA files, is about all I can find out. (I did learn that PyFFI includes a lot of scripts from both niftoaster and HexWorkshop, both useful tools. However, it was also implied that this is a WIP and the full functionality of these tools has not yet been implemented into QSkope.) But neither the  PyFFI homepage, nor the NifTools Wiki offer any further documentation or clues!

After installing PyFFI I found a shortcut to QSkope on my desktop. After clicking on that a DOS-like terminal window pops up with:

QuotePyQt4 not found. Please download and install from http://www.riverbankcomputing.co.uk/software/pyqt/download

Sound familiar? :angry: (BTW, I had to type in that long address as it's not possible to copy and paste from a terminal window.) What's with all these annoying dependencies, anyway? It didn't even used to be like this. Version 2.3.8 and later of "Blender NIF Scripts" requires something like Blender 2.45 or higher, Python 2.5 or higher, and PyFFI 1.0.2 or higher. Particulary with PyFFI, this adds up to a lot of space. In comparison, version 1.5.7 of the "Blender NIF Scripts" only requires "Blender 2.41 or higher", nothing else! On the other hand, it's missing a lot of bug fixes and additional support. For example, it requires you to first convert all .dds files to .tga.

Curious, and a bit hopeful of gaining another useful Nif tool without much additional effort or HD space, I checked it out: What is PyQt? Apparently,
QuotePyQt is a set of Python bindings for Nokia's Qt application framework and runs on all platforms supported by Qt including Windows, MacOS/X and Linux.

:blink: Why on Earth should this Python implementation for Nokia cell phones be required to use the GUI of a NIF/KFM/CGF/DDS/TGA python library-slash-toolkit which, in turn, is required by a simple NIF-to-Blender conversion script? Wierd! (I wonder if this much effort is required to install the NIF plugins for 3ds Max or Maya?)

So... I clicked on the link for the PyQt-Py2.5-gpl-4.4.3-1.exe Windows installer. I started to download that, until I discovered that the download is over 23 MB in size! For something I know almost nothing about, I don't want it that much. I would guess that this would balloon to at least 46 MB after installing (not including the archive kept as backup).

It would have to be the v4.4.3-1 and not v4.4.4-2 because, as I mentioned, I had to install Python 2.5.2 in order to get PyFFI to work! Further, it seems that "The Phonon multimedia framework" is included in the PyQt4 version for 2.6 and, while I know I don't need that, I'm sure it would take up even more space.

Message to those just starting to use Blender with plans to import/export .NIFs:

Don't be surprised to find a lot of file dependancies or the fact that this will eat a lot of HD space. The "Blender NIF Scripts" download is deceptively very tiny (271 Kb) and even Blender is well under 10 MB. But by the time all the required files are downloaded and installed you may end up using 100 MB - at the minimum! Could end up being over 150 MB if you want to install PyQt4 as well.

While this may not seem like much to some people, ever since I got DSL I found that I'm always running out of space.  :? That, and the fact my laptop HD (my only working PC with WinXP) is only rated at "60 GB". I already uninstalled most games and removed Ubuntu to make more room. Most of this space is taken up either by mods, music, or anime...  :blush:

GogglesPizanno

Since life_matrix has gone batcrazy for blender, and reading the first few lines of your post reminded me what a pain it is to set up once they added all those dependencies, I though I would offer an alternative.

I modified a portable version of blender to include the nifscripts.
The original Blender download I used is available here: http://portableapps.com/node/16257 - I take no credit for the portable version... The only modification I did was compile PyFFI into the included python package and installed the nifscripts.

http://gpwarehouse.freedomforceforever.com/BlenderPortable_w_Niftools.rar

The file compressed is 27MB, uncompressed about 68MB or so. I tested it and it appears to work -- the occasional character mesh crash notwithstanding. But I imported and exported some objects with it and it appears to be working. Just extract the rar file onto your HD or thumbdrive or whatever and run.

Hopefully those that want to play with Blender but got scared off due to the pain of installing everything will find it useful:


life_matrix

Quote from: GogglesPizanno on December 11, 2008, 01:17:44 AM
...reading the first few lines of your post reminded me what a pain it is to set up once they added all those dependencies, I though I would offer an alternative.
...
http://gpwarehouse.freedomforceforever.com/BlenderPortable_w_Niftools.rar

Cool!  :thumbup:

Although, I would have found it more useful had I learned about this before I got everything installed. :D

I still don't know much about QSkope, however.