Shop Forum More Submit  Join Login

Things we are gonna need are


For Mac Users
Safari automatically unzips downloaded files and deletes the original ZIP file. 
Try disabling this function (I don't know how, I never used a Mac) or download using another browser like Firefox.

Preparation

UPDATE: Here is a video showing the install process. Thanks a lot!
Install Xps addon to blender

First thing we have to do is to installing the addon.
Go to the provided link and download the latest version of the addon. DO NOT UNZIP IT.
Open Blender and go to File > User Preferences
Select the Addons tab and click the "Install fom File..." button

Screen002 by johnzero7
Find the downloaded addon zip file and click the "Install fom File..." button

The XPS tools addon should be de only addon diplayed on the list, if not type "XPS" in the search dialog.
Now Check the checkbox to the right to enable the addon.
Click the "Save User Settings" button and close the window.

Screen005 by johnzero7

A new tab called XPS should have appeared in the toolshelf
Screen007 by johnzero7


Necessary knowledge

First we need to know how XPS manages material. XPS suppports only one material per Mesh
For XPS to properly display the meshes, the name of each mesh must by like this.
22_suit_0.7_20_5
The undercores are separators. Each part has a diferent function

22: is the Render group. A render group tells XPS how many textures a the material has, how will they be use (diffuse map, bump map, specular map, etc.), in what order the textures are, if the textures have alpha channels, etc.
This particular Render group (22) has 7 textures, they are: Diffuse, Lightmap, Bumpmap, Mask, Bump1, Bump2 and Specular. Always respect the order of the textures.
suit: is the name of the mesh. Can be anything, but can't contain underscores has they are XPS field separators.
0.7: is the specular highlight value.
20: not all render goups have a foth value. But for this Render Group, this values is the repeater for the Bump1 texture. This means that the Bump1 texture will be tilled 20 time horizontally and 20 times vertically
5:  not all render goups have a fifth value. But for this Render Group, this values is the repeater for the Bump2 texture. This means that the Bump1 texture will be tilled 5 time horizontally and 5 times vertically


Here is the official guide for all the Render groups.
xnalara.home-forum.com/t225-le…

I transcribed the Render groups here for readability
docs.google.com/spreadsheets/d…

Preparing the model

So, we have a model in Blender (made from scratch, ripped from a game, etc.) and we want to export it to XPS. We need to do a few things to make our model compatible with XPS.
  1. Only one Material per mesh
  2. The name of each part must follow the structure [render group]_[mesh name]_[value1]_[value2]_[value3]
  3. The order of the textures MUST be the order required by the Render Group
  4. Don't use pure white in your textures (R255, G255, B255). XPS will display it as fully transparent or pure black. Change it to (R254, G254, B254)
  5. The plugin will triangulate any Quad or Ngon.

1.One Material per mesh

If your mesh has more than one material, you must separate them and create one mesh for each material.
Export-001 by johnzero7


Luckily this is easy to do in blender.
Select the mesh with multiple materials and enter edit mode. Select all (Shortcut A, press it a couple of times till everything is selected). Separate (Shortcut P) and select By material. Exit edit mode.
Now the mesh splitted into as many parts as materials where used by the mesh.
Export-002 by johnzero7

2.Name the mesh

As explained previously the name of the mesh will determine how the material is constructed in XPS. So its up to us to select an appropriate Render Group. For example the bikini part, named WGT_body.001 we will rename it to 24_WGT-bikini_0.8

You can make items optional in XPS by adding a plus sign "+" (visible by default) or a minus sign "-" (hidden by default) at the begenning of the name.

For example, to make the glasses an optional item rename the frame mesh to 24_+frame_1.0 and the lense mesh to 24_+lens_1.0 then in XPS you can show or hide this items from 
Options-->Dispay accessories-->Optional Items (hotkey a)
Ungrouped by johnzero7

Some times you will want to group multiple item in a same group, in our example lets create a glasses group that will contain the frame and the lense. All you need to do is rename the meshes to 24_+glasses.frame_1.0 and 24_+glasses.lens_1.0. With this you will see a single option that will hide or show both meshes.
Grouped by johnzero7


Note
In XPS 11.0 you have the new RG 40 and 41 which only required Diffuse, Bumpmap, Specular maps. And the Normal map coordinate system (swizzle coordinates) for 40/41 is RGB X+Y+Z+. But in XPS 11.1 the Normal map coordinate system for 40/41 is back to RGB X+Y-Z+.
For XPS previous to version 11.0 you don't have RG 40/41. The most similar RG are 24/25, so were are gonna use RG 24 for the purposes of this tutorial.

As described in the previously mentioned tables, the render group 24 has 4 textures in this precise order: Diffuse, Lightmap, Bumpmap and Specular, doesn't manage alpha channel and as specular highlight.

Export-003 by johnzero7


For this example our blender material as the Diffuse, Normal and Specular maps but we are missing the lightmap. In this case we can create a solid white texture. Remember you can't use a pure white color R255,G255,B255 so use R254,G254,B254 instead.

If you are missing a Normal map, you can use a solid texture with the color R128,G128,B255.


Remeber use a power of 2 for the dimension of the textures, something like 512x512 or 1024x1024.

Now we have to sort the textures, the order is given by the render group. In this case from top to bottom Diffuse, Lightmap, Bumpmap and Specular. You see we have an extra texture in this material at the end of our list, XPS will ignore this texture as it is not requiered by the render broup. You can leave it there (remember to include the texture file or XPS while create a empty file) or remove it.
Export-004 by johnzero7

You can choose a different UV map for the lighmap and the specular map if you want.
Export-009 by johnzero7



If you don't specify the UV Map to use with a texture, the addon will export the one set as the active render one.
Export-005 by johnzero7


You can have subsurface modifiers or other modifiers, but the addon will export the original geometry.



Finaly exporting

Export-006 by johnzero7


We are ready to export the model.
Select everything you want to export (only meshes and one armature can be exported).
Go to the XPS toolshelf and click the export model button.
Choose the format to export (*.ascii / *.mesh / *.xps)

If you choose a binary format (*.mesh / *.xps) you can protect the model. This means that the addon will not be able to import this model back into Blender but will work normally in XPS.
Export-010 by johnzero7


You are done. Load Your model into XPS, enjoy you master piece and don't forget to share!!

Untitled by johnzero7





Finaly had time to do the Blender to XPS export tutorial. Guess it's better late than never.
Add a Comment:
 
:iconwjh5846:
wjh5846 Featured By Owner Apr 9, 2019  Hobbyist Digital Artist
thanks a lot for your guide. I'm able to export single mesh to xnalara. However could you please let me know how to export the whole model (including all mesh parts) to xnalara?  
Reply
:iconhitherekid2:
hitherekid2 Featured By Owner Edited Jan 31, 2019
is there a way this can be put into simple terms or a video maybe? my simple mind cant comprehend any of this.. i still dont know what a Mesh is.. and cant grasp the naming of it.. every bit of this is just confusing to me.. i blame my autism lol 
Reply
:iconmartsuia:
Martsuia Featured By Owner Jan 31, 2019  Hobbyist Digital Artist
do you have any idea why the textures here aren't showing?


Screen Shot 2019-01-31 at 8.15.17 PM by Martsuia  
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Feb 2, 2019
Looks like your light source is too strong or too close to the model
Reply
:iconmartsuia:
Martsuia Featured By Owner Feb 2, 2019  Hobbyist Digital Artist
ya, um nevermind. the textures were in alpha 
Reply
:iconrock-conqueror:
Rock-Conqueror Featured By Owner Nov 13, 2018
Thank you for your kind tutorial.

After I modified the model with blender and exported the .mesh and .xps file for Xnalara, I copied all the original texture .tga files to the same folder. The Xnalara successfully loaded everything.

However, not like the original model which can be posed freely, the modified one only has a "root" to adjust. No other parts can not adjusted like before.

Is there anything I missed? Or what should I do so that I could adjust the poses of the modified model? 
Another problem is that when I tried export .ascii file, nothing happened. Could this be due to the fact that I am using english operation system?

Thanks!
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Nov 15, 2018
Following the steps in the guide should be enough.
Send me the model and I will take a look
Reply
:iconrock-conqueror:
Rock-Conqueror Featured By Owner Nov 15, 2018
Thank you very much for your kind reply. I managed to do it. It was true that the Unicode for the program should go English.

Thank you again for this tutorial.
Reply
:iconsilkroad820420:
silkroad820420 Featured By Owner Aug 30, 2018  Student Artist
how to see the model [render group]_[mesh name]_[value1]_[value2]_[value3]?   I can't figure it out.
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Sep 2, 2018
In XPS 11.8 you can see the name of the mesh thru the material editor: Modify->Material Editor (Ctrl+T)

In blender the name of the selected mesh can be seen at the bottom left of the 3D View, in the Object properties or the Outliner
Reply
:iconsilkroad820420:
silkroad820420 Featured By Owner Sep 3, 2018  Student Artist
thank you for response, but I mean,I have a smd file which can be opened in Blender, but I don't know the model's  [render group]_[mesh name]_[value1]_[value2]_[value3],so I can't rename it ,export it to XPS,could you help me?
sorry about my bad English.
Reply
:iconxnafreak:
XnaFreak Featured By Owner Edited Sep 7, 2018
If you have a smd file, then you can use my small smd2xps tool  Valve SMD to XPS converter - with textures and RGs by XnaFreak

1) Copy all the .smd files (geometry), all .vmt (Valve Material Files) and all .vtf (Valve Texture files) of the model into a new folder.
2) Run smd2xps.exe (link in the description, currently v1.9) and select any of the .smd files
3) Wait until "Exit" is enabled

You get a "ready to use" in XPS or Blender Generic_Item.mesh.ascii file with all textures as .png. The file contains all names matching [render group]_[mesh name]_[value1]_[value2]_[value3] the  syntax

BTW:
I know that Blender can load a smd file, but the Blender SMD importer (and Blender it self) dont know anything about that a SMD texture contains the "specular map" as "Alpha channel" inside the "Normal Map" texture image. My smd2xps tool extract also the specular maps, resize and rotate the model, fix the Normal maps ...
Reply
:iconsilkroad820420:
silkroad820420 Featured By Owner Sep 7, 2018  Student Artist
Thank you very much!!!!!!!!
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Sep 3, 2018
the render group depends on the textures you want to use. You need to check in the render group table (docs.google.com/spreadsheets/d… or XNALara/XPS Render Groups) what number fits better with the textures you want to use. 

Alternatively you can use the material editor in XPS to assign the textures you want to use and see what render group it tells you to use. It will also tell you if the value1, value2 and value3 have any function for that particular render group
Reply
:iconthesinfulpuppeteer:
TheSinfulPuppeteer Featured By Owner Aug 27, 2018  Hobbyist General Artist
Another question, do the bones/armatures need to have the render group names too?
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Aug 28, 2018
No, the render group is only for the meshes
Reply
:iconthesinfulpuppeteer:
TheSinfulPuppeteer Featured By Owner Aug 23, 2018  Hobbyist General Artist
Hi.  I wanted to let you know that your tutorial really worked for me.  It took a couple of tries, but I successfully ported a 3ds file into XNA.  Keep up the good work.
Reply
:iconkimthemaster:
KimTheMaster Featured By Owner Aug 2, 2018  Hobbyist Digital Artist
I want to port Dynasty Warriors, Samurai Warriors and Warriors Orochi models, weapons, and Sencery to Xnalara.
Reply
:iconlifeissimple-tm:
lifeissimple-tm Featured By Owner Jun 28, 2018  Hobbyist Digital Artist
can you help me?
still newbie

i want to export default suzanne head to xps,
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Jul 8, 2018
what are you having trouble with?
Reply
:iconlifeissimple-tm:
lifeissimple-tm Featured By Owner Jul 12, 2018  Hobbyist Digital Artist
for example. i want to move the suzanne head in to xps

so i choose export to xps
but the xps couldnt read the file ,
couldn open mtl file
Reply
:iconletmein11:
letmein11 Featured By Owner Edited Apr 22, 2018
I can't get the textures to show up. didn't use bump maps. what is wrong here?

i.imgur.com/C0JKNDn.png   <--blender window

i.imgur.com/EyctruD.png
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Apr 22, 2018
Check you have all the textures necesary for the render group you are using.
All textures MUST be in the same folder than the model.
Try importing the exported model back into blender.
Reply
:iconspinosaurusking875:
Spinosaurusking875 Featured By Owner Apr 21, 2018  Hobbyist Digital Artist
Hey Thanks man!! I did it!
Reply
:iconangeldevil2013:
AngelDevil2013 Featured By Owner Edited Apr 20, 2018  Hobbyist General Artist
Disculpe la molestia pero no podría sacar en el español???
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Apr 22, 2018
Talvez...
Reply
:iconangeldevil2013:
AngelDevil2013 Featured By Owner Apr 22, 2018  Hobbyist General Artist
Una duda, por casualidad se debe cambiar los nombres de las texturas y la partes de modelo para exportar como xps???
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Apr 23, 2018
Los nombres de los materiales y las texturas no importan.
Los nombres de los objetos deben tener el fromato que espera XPS. Ejemplo 24_fullbodysuit_0.8_1_1
Reply
:iconangeldevil2013:
AngelDevil2013 Featured By Owner Apr 23, 2018  Hobbyist General Artist
Y donde puedo ver los objetos para así poder dar formato en xps?
Reply
:iconvendesanart:
vendesanart Featured By Owner Apr 7, 2018
I no have xps export, only xps import.
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Apr 8, 2018
Blender
File -> export -> xnalara/xps model (.ascii/.mesh/.xps)
Reply
:iconvendesanart:
vendesanart Featured By Owner Apr 8, 2018
Okay, thanks
Reply
:iconkaorok:
kaorok Featured By Owner Mar 5, 2018
Hello! Your work has been a godsend to me so far, but I've been having troubles with the model I'm currently trying to export. I keep getting the following message, can you help me figure out what's wrong with my model? I'm using the latest version of your plug-in from GitHub.

imgur.com/YD2wssn
Reply
:iconmonosis12:
monosis12 Featured By Owner Edited Oct 24, 2017
i converted my model mmd to xps but now i have  black texture problem.How can i solve it ?
Reply
:iconroronoa-minamino:
Roronoa-Minamino Featured By Owner Aug 21, 2017  Hobbyist General Artist
Hola. Disculpa, he estado teniendo problemas para exportar a Xna usando Blender desde hace un tiempo y no sé cómo solucionarlo. Ya intenté cuanto he encontrado de posibles soluciones en internet pero pues.... nada. El primer modelo que intenté convertir venía en archivos obj y mtl, si no mal recuerdo, y por si sirve de algo. Hace rato conseguí un modelo distinto que quiero pasar a xna. Es un mmd. Seguí tutoriales para importarlo correctamente y todo, toto sin mucho problema... sino hasta que llegó la hora de exportarlo. No importa lo que haga para intentar corregirlo, me sigue mandando ésta ventana de error, que es casi 100% igual a la que me daba con el primer modelo que te mencioné: i1297.photobucket.com/albums/a… Honestamente, no soy muy avanzado en Blender aún, por lo que no sé bien donde pueda estar el error a corregir y quería ver si tú me podrías ayudar aunque sea un poco a resolverlo. Gracias de antemano :D
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Aug 31, 2017
Por fin pude ver la image!
El problema es que el mesh no tiene asignado un material y estas usando una version vieja del addon. La ultima es 1.7.3
Actualiza el addon. Tambien te recomiendo que comiences importando modelos echos para XPS primero. Importalo, mira como estan echos, modificalos un poco y luego exportalos, siguendo la guia obiamente.
Reply
:iconfreestew:
freestew Featured By Owner Jul 21, 2017
I tried converting to a .mesh and it gives me an error "Unknown mesh type '<Filename>' Mesh"
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Jul 22, 2017
blender does not show that kind of error. waht are u doing???
Reply
:iconfreestew:
freestew Featured By Owner Jul 22, 2017
Might be an error on my side. I converted a model to a mesh and found that error when trying to open it in XNALara
Reply
:iconprofessionalperv-69:
professionalperv-69 Featured By Owner May 7, 2017  Hobbyist Digital Artist
For someone who is only using Blender as an intermediate to transfer from 3ds Max to XNALara and has literally no idea how to do anything of any kind in Blender, how do I know if something has more than one material?
Reply
:iconjohnzero7:
johnzero7 Featured By Owner May 7, 2017
See the image under the title "One Material per mesh"
In the red square at the bottom right you see the materials used by the active mesh.
If you dont mind the final name of the mesh, the addon separates and renames by material automatically.
Reply
:iconxnafreak:
XnaFreak Featured By Owner Edited Mar 17, 2017
Nice tool (of course ... I use an "old" Blender 2.49b)

Not sure ... but perhaps something i wrong here:
For example, to make the glasses an optional item rename the frame mesh to 24_+frame_1.0 and the lense mesh to 24_+lens_1.0 then in XPS you can show or hide this items from

Look here: comments.deviantart.com/1/6689…
+MenuItemName.MeshPartName

Should be:
For example, to make the glasses an optional item rename the frame mesh to 24_+frame.frame_1.0 and the lense mesh to 24_+lens.lens_1.0 then in XPS you can show or hide this items
???

But of course ... your 2nd example is better (and correctly)
Some times you will want to group multiple item in a same group, in our example lets create a glasses group that will contain the frame and the lense. All you need to do is rename the meshes to 24_+glasses.frame_1.0 and 24_+glasses.lens_1.0. With this you will see a single option that will hide or show both meshes.
Reply
:iconarchangel470:
Archangel470 Featured By Owner Feb 19, 2017
Trying to understand this, but I get lost during the second step: Naming the mesh.
Reply
:iconmeijin-sigma:
Meijin-Sigma Featured By Owner Feb 16, 2017  Hobbyist General Artist
Still doesn't work maybe I can send you the file and you can show me what I'm doing wrong
Reply
:iconmeijin-sigma:
Meijin-Sigma Featured By Owner Feb 15, 2017  Hobbyist General Artist
I changed the file name and sent the file to the data file in xna and still no luck
Reply
:iconmeijin-sigma:
Meijin-Sigma Featured By Owner Feb 14, 2017  Hobbyist General Artist
don't work I use blender 2.78 and nothing here worked is there any way I can get help?
Reply
:iconjohnzero7:
johnzero7 Featured By Owner Feb 15, 2017
I tested it and it all works.
Any more description?
Reply
Add a Comment:
 
×

:iconjohnzero7: More from johnzero7





Details

Submitted on
November 23, 2014
Submitted with
Sta.sh Writer
Link
Thumb

Stats

Views
26,880 (14 today)
Favourites
191 (who?)
Comments
130