[maya] froXnormal 0.6 : a batcher/exporter for Maya


This script is now unsupported.
I will not take in account any bug or request anymore.


Update : Download version 0.7.1

Changelog :
[version 0.7.1]
-updated the Cage slider : now a field with a +/- buttons (more precise and scalable)
-updated the SBM export, now totally silent (without the OK dialog after the export)
-fixed the export of the cage when using the SBM format

[version 0.7]
-added a button to open the export folder
-added possibility to bake non-square textures.
-added “check nGons” button to check manually n-gons on a selected mesh.
-added a check before calling xNormal to see if LP/HP mesh have been exported
-updated the export path button, removed a conflic with the “froTools” script.
-updated the checkbox “Convert HP smth” to be false by default
-fixed an error about the WindowPref command when you load the script
-fixed the missing settings for the Curvature map (UI, preset and xNormal xml)
-fixed an error with the export path of the low poly mesh in the SBM format.
-fixed the crash when setting the xNormal path.

[version 0.6.1]
-added Smoothing group and Tangent/Binormals options for the FBX export.
-fixed FBX Triangulate problem when using an older plugin verison (FBX 2011 and before)

Hello folks ! I’m back with a new script ! This time about xNormal.
I’m a big user of this software. Mostly because xNormal is very fast when you work with it. However, xNormal has a big concern : its ugly and slow interface.

Fortunately, xNormal offer the possibility to batch via an xml file some settings. This is where my script comes : directly from Maya you can export and bake your meshes without dealing with the xNormal UI. It’s faster and easier to use. You have access to most of the maps that xNormal allow to bake and you can save the UI settings and share it easily. Enjoy ! 🙂

How to use it ?

Basic use :
1 –Set your export path inside the UI and the path to your xNormal program.
2 –Setup correctly your low poly mesh and your high-poly mesh
3 –Hit the export button at leats one time for eahc mesh
4 –Use “Bake texture(s)” to launch xNormal

Explanation of some check box :
-“HP out of scene” : You can set your HP as “out of the scene”, this way you don’t need to load it inside Maya. To use this feature you must respect the nomenclature : xxx_hp.format. Your mesh file must finish with “_hp”. Don’t forget to change the format of your meshes in the UI

-“Use blocker” : if you have specified a blocker if the field above, this one will be used for the baking. If you uncheck this or leave the field blank, nothing will happen for the blocker.

-“Use Cage” : Same idea as the blocker file.

-“”Always new xml” : If checked, it will force the script to delete the “export.xml” file generated and create a new one. You can use this is you want to be sure that your xml is clean.

-“Convert HP smooth” : If checked, the HP mesh will be set to the smoothed preview (aka the 3 key on the numpad) and then this preview will be converted to true geometry and exported as-is. After the export, the mesh will be back to normal. It’s a shortcut to avoid to manually convert your smoothed mesh into geometry.

“Export HP” and “Export LP” buttons
You have two buttons to export your mesh. I made it this way in case you have a very heavy high-poly mesh and you just want to export and update your low-poly mesh. This way it will be faster rather than exporting everything. The “Export LP” button also export the cage and the blocker mesh.

Can I use multiple mesh ?
Yes and no, you can’t specify multiple mesh individually. However you can make a group and specify it as a LP or HP mesh. This way the exporter will combine them and export all of them.

“Create cage” button
This button allow you to create something similar to the Maya envelope. Once created, you can use the slider at the right of the button to inflate the cage. If you reload you scene or the script later, simply put the name of the cage in the corresponding field and you will be able to use the slider again.


To easily save and share the settings of the script’s UI you have access to the “presets” buttons. Saving the UI will simply make a Maya group with all the scripts settings as attributes saved on it. You can then save your scene and re-open it latter or export the group as an FBX file to share it. Simply select the group and click on “Reload” to get back all your settings.

Note that you can edit the settings directly in the “Extra Attributes” of the group. However, I don’t recommend you do do this, it’s better to reload the preset, udpate the script Ui and then re-save the preset.

Download, Install and launch

Download :
Download the last version : froXnormal version 0.7-1

Install :
Put the content of the folder “frox-0-x” inside your maya folder.
Ex : “My Documents\maya\2011-x64\”

How to launch ?
Call the command “source froXno.mel; froXno();” in the mel command line for the first time.
You can use the “Add to Shelf” button to make a shelf button in your current shelf.

Changelog :

//version 0.6
-cage support added (custom and maya envelope)
-fixed a bug with the clear button (now working when nothing is selected);
-added preset support

//version 0.5
-curvature and prt map added
-n-gon filter added when exporting meshes
-fixed some misspellings
-added a new Tab : settings for the different maps
-fixed errors with the creation and the writing of the xml file
-fixed error when fbx plugin is not loaded (export automaticaly in obj)
-changed the export button to 2 button (one side HP mesh, other side LP/Blocker)
-new export maps added (height map, PRTpn, Curvature, Base texture)
-new options to force the writing of the xml file
-added an option to automatically convert HP from smooth preview to geometry at export

//version 0.4
-Xml file automatically generated in the export folder (when not already existing)
-n-gons detector on the low-poly before export
-fbx update : support update 2013 of the fbx plugin

//version 0.3
-Fix for the changes in the FBX command
-Fix for the blocker exporter, now really working

//version 0.2
-Initial version
-Support XML generation + xNormal export

24 responses to [maya] froXnormal 0.6 : a batcher/exporter for Maya

  1. Alex Fuller says:

    Thank you for this! I made a tool that used xnomal from maya but it was specific & locked to a game project I worked on in the past but your one looks a lot more flexible. I’m running it on linux and it works with xnormal running in wine after a small tweak.

    • Froyok says:

      I’m unable to test it with Linux, but if you meet any problems feels free to tell me so I will try to update the script. 🙂

  2. This seems really awesome, but it’s not working for me. I’m using Maya 2014 and the latest xNormal version (3.18.1). Maya crashes whenever I attempt to specify the path of xNormal.

    I tried pasting the file path into the field and that seems to work OK but I still can’t bake anything. xNormal starts but immediately closes. Maya is just saying “No xml file, generating it…”

    • Froyok says:

      Hello ! I’m very sorry, I totally forgot to update my blog, the version 0.7 is available and it fix this crash with Maya. I updated the post above with the download link.

      If xNormal start and close immediately it’s that it founds an error, and my script is not the problem. Check if everything is correclty setup (di d you forgot to epxort the meshes ?). If you want to do a quick check to find any errors, load the xml file inside xNormal and click on “Generate”. xNormal will then gives the error(s).

      • Thanks a ton!

        Apparently exporting LP and HP as SBM doesn’t work if the object is a group and not combined. The mesh file is empty. It’s working great for me now that I’ve combined the objects although I haven’t tried the other file formats.

        If I could give some suggestions, it would be nice if you could get meshes and textures exported to separate folders, maybe give an option to specify? I would be nice to see an option to pick a renderer. Also, this is very minor but it would be cool if texture size was treated as square as long as you only press the left drop down menu.

        I will be sure to tell everyone I know about this script. It’s really awesome.

        • Froyok says:

          For the SBM exporter unfortunately I can’t do anything. I have already talked about this limitation with the xNormal author however, so maybe in a future update it will be fixed… 😉

          Thanks for the suggestions, I will look into them and see what I can do !

  3. Gail Ellison says:

    Man, I have tried placing the files in any spot maya could possibly look for script in my maya2013 folder and I still get a “cannot find file froXno.mel for source statement” error. Any suggestions?

    • Froyok says:

      I strongly advise to use your “My Documents” folder to put your scripts, otherwise the script should be placed in “AutodeskMaya2013scripts”. Be sure to put the content of the ZIP archive correctly and not simply extract the archive as-is.

  4. Ignacio Guajardo Unanue says:

    Hey Piquet, this script has saved me a lot of time in school projects! Very useful!
    Here’s a recommendation: how about working on automating the baking process even more by making the explode mesh technique faster, there’s someone who has done it for 3ds max but no such thing for Maya and would go well with this script.
    Something like: Explode LP and HP into keyframes (and maybe even automatically detecting intersecting meshes). Now it’s ready for an exploded bake!

    Currently I’ve been thinking of attempting this myself but it looks like you have a lot more technical knowledge than I do.

    edit: here’s the thread that discusses the max version: http://www.polycount.com/forum/showthread.php?t=62921

    • Froyok says:

      An automated explode process might be possible. I have some ideas about it. It should be easier to perform with the next version of the script coming soon (which will support multiple meshes). I can’t promise any release date for the moment.
      I have also asked for a similar feature in xNormal, but nothing has been done (yet) unfortunately.

  5. Priyabrata Biswal says:

    Can anyone confirm if the latest version of script works in Maya 2013.5 64bit with xnormal 3.18.3 ?

      • Priyabrata Biswal says:

        hey thanks for the reply. I have followed steps and manual from here and have setup the script properly. it starts all fine. for a test render, I just did a quick setup in your script and when I pressed bake textures, xnormal starts up and a dialog box shows and seemed like it’s importing the obj but no texture is rendered. the script generates XML without any issue and it’s the same case with any other scene. don’t know where to look for the issue.

        • Froyok says:

          In case like this the fastest way to find the problem is to open xNormal and load the xml generated by my script. Then press the “generate” button, xNormal will display the error then.

          Unfortunately I can’t display the errors with the script since they are not available in batch mode.

          Most of the time, the errors are made by :
          -You forgot to export the HP/LP
          -HP doesn’t exist (if outside of Maya)
          -There are n-gons
          -You exported as SBM file format by selecting a group, which returns an empty file
          -An export gone wrong and an obj is corrupted

          • Priyabrata Biswal says:

            OK.I will check those out when I am at work tomorrow.

            • Priyabrata Biswal says:

              This is what i am getting when i am manually loading the xml in xnormal. it’s related to the cage generated from the script. I double checked the vert count and it’s identical. i dont know what seems to be the issue.

              The cage mesh Default inside “Envelope Obj location” doesnt have the same number of vertices than the mesh default inside the “ingame Obj location”

              So i turned off cage and it’s coming properly now.

            • Froyok says:

              When you create manually a cage in Maya, be sure to triangulate your mesh and you cage BEFORE inflating/shifting the cage, otherwise the triangulation direction can change (which will change the vertex order). Also, be sure to freeze/delete the history of your geometry before exporting. 🙂

            • Priyabrata Biswal says:

              Hey Froyok,
              I did triangulate the mesh before creating the cage using your script. But, ya i will keep that in mind.

  6. g00girl says:

    Hey! Thanks for making this available – this is a really useful tool. It would be especially helpful if it would be possible to define an entire folder of high res models as HP out of scene models? Seems like it’s only possible to define a single mesh as HP outside of Maya at current..?

    • froyok says:

      Very sorry for the late reply. I missed your comment.
      Specifying a full folder for loading high-poly is a good idea. I will see if I can support that.

  7. glacier says:

    Hi, this is great script. But when I export the model, no matter sbm, fbx or obj, the triangulate is wrong direction compare to the model in maya, I use maya 2015 and the display triangles to check. I know I can manually triangulate first then export, but I think I should report this bug.
    I also hope I can select newer fbx version 🙂

  8. Prajay says:

    Hey Fabrice, firstly, thank you for the plugin. Its absolutely wonderful and has saved me a lot of time and headache. Will definitely be donating! 🙂

    I had a quick question regarding the ‘Use Cage’ button. I select my HP geo and then hit Create Cage. An envelope is generated. Do I then have to check the Use Cage button ON?
    If I do check the ‘Use Cage’ button on, for some reason the plugin launches, but no Map is generated.

    When I have the Use Cage button OFF, thats the only time XNormal renders out a Normal Map for me.

    How do I know the envelope generated is being used when the Use Cage button is OFF. Is it being used at all?

    Warmest regards,


    • froyok says:

      Look at the first lines : I don’t provide support anymore for this script. Sorry.

Leave a Reply

Your email address will not be published. Required fields are marked *