Blender 2.74+ XPS tools 1.7.0
|2 min read
johnzero7's avatar
By johnzero7   |   Watch
79 33 37K (2 Today)
Published: August 22, 2016
REQUIRES BLENDER 2.74 AND UP

What's new:
new file format NGFF.
fixed error with multiple UV maps seam spliting.
micro bump texture displacement.
new render groups compability (42/43)
added mask to groups 26/27 and 28/29

Updated the RG list with this changes
docs.google.com/spread…


What is NGFF file format?
Is the new file format currently in development for XPS. Basically is an OBJ with a few features added, such as armatures and vertex color. And just as .mesh.ascii the new file format is composed be text files that can be modified in any text editor.
For more info about the this format check NewGenericFileFormat by XNAaraL

Try playing with this new format, but keep in mind that it's under development, future changes can break compatibility. If you want to keep a model safe, stick to .xps / .mesh / .mesh.ascii


Download, enjoy, and don't forget to share your creations!!!

Download:
Look for this, the latest and previous versions of the addon here.
Mediafire: www.mediafire.com/folder/76g7r…
OneDrive: 1drv.ms/u/s!AgQ_36muy3ejhHlwX5…
Each File is a different version of the addon. Recommend to just download the latest.
RenderGroupTester.zip is a model that displays all the rendergroups in the same model, it as also ben updated to include the recent changes in the RGs.


Github

github.com/johnzero7/xps_tools



Don't know how to import models? or how to install? CHECK THIS GUIDE!
XPS to Blender 2.7x(Blender internal the easy way)

Don't know how to export models? or how to install? CHECK THIS GUIDE!
Blender to XPS(blender 2.7x Internal materials)

Whant to import/export animation/poses? CHECK THIS GUIDE!
XPS, Blender, poses and animation
anonymous's avatar
Join the community to add your comment. Already a deviant? Sign In
Comments (30)
TheBlenderTaper's avatar
hope support for Blender 2.8 will happen in the future.  upgraded from 2.79b to 2.8 to see the differences between that and the previous version.  when i installed the recent xps tool on 2.8 it gives me an error saying that an upgrade to 2.8x required.
Reply  ·  
johnzero7's avatar
Just released the update for Blender 2.80 Beta. Enjoy
Reply  ·  
FlyeThemoon's avatar
I got now win10 When try import any! xps model in blender ive errors
Error by FlyeThemoon  
When used before win7 never happend.
ive downloaded xps tools from Github
Reply  ·  
johnzero7's avatar
The master branch requieres blender 2.79. If you dont want to update blender then you need to uninstall the curren addon and download release 1.8.4
Reply  ·  
Rogan256's avatar
Rogan256|Hobbyist Filmographer

I’ve investigated this problem and it is indeed the line 581 in import_xnalara_model.py:

mesh_da.vertex_colors[0].data[loopdId].color = vertColors[faceVert]

The API was changed, and now the color must be specified with 4 values (R, G, B, Alpha) instead of 3.

(My guess is that they set Alpha to 1 by default before).

I replaced the problematic line with the following code:

                vc3 = vertColors[faceVert]               

                vc4 = ( vc3[0], vc3[1], vc3[2], 1 )

                mesh_da.vertex_colors[0].data[loopdId].color = vc4

Now it works again. (I created a new array with 1 additional value and pass that)

Reply  ·  
johnzero7's avatar
Nice work!
I also fixed this in a more recent versions (currently v1.8.4)

I don't plan to suppport experimental versions of blender. I am waiting for Blender 2.8 beta at least
Reply  ·  
Rogan256's avatar
Rogan256|Hobbyist Filmographer
It worked fine with 2.79.
But it stops working with 2.79.4 (2.79b, lastest version).
During XPS import:

====================================================

---*** Importing Mesh 4_mesh_0.1_0_1 ***---
UV Layer Count: 1
Texture Count: 2
Created Mesh: 4_mesh_0.1_0_1
New Mesh = 4_mesh_0.1_0_1
Traceback (most recent call last):
 File "E:\Users\Rogan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\xps_tools.py", line 141, in execute
   status = import_xnalara_model.getInputFilename(xpsSettings)
 File "E:\Users\Rogan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 172, in getInputFilename
   status = xpsImport()
 File "E:\Users\Rogan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\timing.py", line 12, in wrap
   ret = f(*args)
 File "E:\Users\Rogan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 290, in xpsImport
   meshes_obs = importMeshesList(armature_ob)
 File "E:\Users\Rogan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 651, in importMeshesList
   for meshInfo in newMeshes]
 File "E:\Users\Rogan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 651, in <listcomp>
   for meshInfo in newMeshes]
 File "E:\Users\Rogan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 783, in importMesh
   makeUvs(mesh_da, origFaces, uvLayers, vertColors)
 File "E:\Users\Rogan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 581, in makeUvs
   mesh_da.vertex_colors[0].data[loopdId].color = vertColors[faceVert]
ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3

====================================================

I can import the exact same mesh in 2.79 without any problems. So I guess they changed something in the API, as the error message suggests (expects 4 items instead of 3).
Reply  ·  
Gamerz31w's avatar
Gamerz31w|Hobbyist Artist
Will this plugin work in Blender 2.79 version?
Reply  ·  
johnzero7's avatar
Haven't test it.
Download the latest version to be sure. Currently v1.8.4 it works with blender 2.79
Reply  ·  
Gamerz31w's avatar
Gamerz31w|Hobbyist Artist
It's working fine to me.
Reply  ·  
mbmichael1's avatar
how to instal this?
Reply  ·  
johnzero7's avatarComment Featured By Owner
Here is video showing the installation process made by DragonLord720
 Install Xps addon to blender
Reply  ·  
adoggo's avatar
adoggo|Hobbyist Digital Artist
Thanks so much~
Reply  ·  
Dangel-Deviliono's avatar
Dangel-Deviliono|Student Digital Artist
Next version, will you do an importer for NGFF?
Reply  ·  
johnzero7's avatar
I already has.
It's in: File->Import->XPS NGFF (.obj)
Reply  ·  
Dangel-Deviliono's avatar
Dangel-Deviliono|Student Digital Artist
It can't import XPS shader?
Reply  ·  
johnzero7's avatar
No, it's just a different format. The functionality is similar to the .mesh/.ascii/.xps formats, but using OBJ.

Due to the use of the OBJ, the materials may end up being slightly different from what you expect. This will happen even if you export the model using the Blender addon or from XPS itself.

Since the NGFF format is based on OBJ, other application may be able to import the model but without the armature.
Reply  ·  
Selpiere's avatar
Hi, I'm getting a variation of errors on the bytes object of length, thanks for your work

Reading Header
Reading Bones
Traceback (most recent call last):
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\xps_tools.py", line 141, in execute
   status = import_xnalara_model.getInputFilename(xpsSettings)
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 172, in getInputFilename
   status = xpsImport()
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\timing.py", line 12, in wrap
   ret = f(*args)
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 267, in xpsImport
   xpsData = loadXpsFile(xpsSettings.filename)
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 198, in loadXpsFile
   xpsData = read_bin_xps.readXpsModel(filename)
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\read_bin_xps.py", line 297, in readXpsModel
   bones = readBones(ioStream)
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\read_bin_xps.py", line 207, in readBones
   boneName = readFilesString(file)
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\read_bin_xps.py", line 17, in readFilesString
   lengthByte1 = bin_ops.readByte(file)
 File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\XNALaraMesh\bin_ops.py", line 32, in readByte
   number = struct.unpack(TypeFormat.Byte, numberBin)[0]
struct.error: unpack requires a bytes object of length 1

location: <unknown location>:-1
Reply  ·  
johnzero7's avatar
Seems there is something wrong in the model file.

Try opening it in XPS. If it works, save a new file going to Modify->Save Generic_Item ...
Then import the new model file in blender.
Reply  ·  
IamMortui's avatar
IamMortui|Hobbyist General Artist
I'm stupid, but how do I install this? I can't seem to get it to work.
Reply  ·  
johnzero7's avatarComment Featured By Owner
Here is video showing the whole install process. Hope it helps.
dragonlord720.deviantart.com/a…
Reply  ·  
TastyMoonCheese's avatar
TastyMoonCheese|Hobbyist General Artist
I've tried this script, and it doesn't work. For starters, the XPS files it exports from blender are stuck with the 58 bone limit, and when imported XPS prevents the meshes with more than 58 bones from importing. Also, the actual mesh of the model being imported is invisible, and causes XPS to crash when you try to edit its materials. 
Reply  ·  
johnzero7's avatar
The addon has no limit on anything. The 58 bone limit is from the version of XPS you are using. Update to XPS 11.8

Check the guide I made to export models. There you will find the cause of the invisible meshes. XPS crashing by the same cause.
Reply  ·  
anonymous's avatar
Join the community to add your comment. Already a deviant? Sign In
©2019 DeviantArt
All Rights reserved