Reply
Reply
 
Thread Tools Display Modes
Froyok's Avatar
Old (#1)

So what is it ? Well this script simply edit an xml file based on the settings you chose on the UI and send the information to xNormal to generate the maps that you want.


The big advantage is that you don't have to launch xNormal to do that, the script do it for you. So you can work directly from Maya ! The script support the export of your low poly, high poly and a blocker mesh. You can of course tell to the script to use an external file as you high-poly (from example is you use a very big mesh from zBrush).


New version !

froXnormal 0.7

Download : froXno version 0.7



Quote:
1# How to install ?
======================
Put the content of the folder "frox_XX" inside your maya folder.
Ex : "My Documents\maya\2011-x64\"


2# How to launch ?
======================
Call the command "source froXno.mel; froXno;" in the mel command line for the first time.
You can use the "Make Shelf Button" to make a shelf button in your current shelf.


3# How to 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
The Export and the Bake are 2 separated part, no need to re-export when you just change one setting in the UI. To avoid errors and project management all the maps are generated inside your export folder. It's a voluntary choice to avoid to set multiple paths.


You can read the full explanation of the settings here : http://www.froyok.fr/blog/2012-10-ma...orter-for-maya




Changelog :
Quote:
//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)

//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

Last edited by Froyok; 02-01-2013 at 07:34 AM..
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

throttlekitty's Avatar
Old (#2)
Lovely, thanks!

Do we need to suffix with _hp if the highpoly is within the same scene?
Will you include an option to export a low poly cage?
Offline , polycounter, 954 Posts, Join Date Dec 2008, Location South Dakota Send a message via ICQ to throttlekitty Send a message via AIM to throttlekitty Send a message via Yahoo to throttlekitty  
   Reply With Quote

Froyok's Avatar
Old (#3)
Quote:
Originally Posted by throttlekitty View Post
Do we need to suffix with _hp if the highpoly is within the same scene?
Nope, only if the HP is not in the current scene.

Quote:
Originally Posted by throttlekitty View Post
Will you include an option to export a low poly cage?
By low-poly you mean a cage for the low-poly mesh ? If yes then yes I will include this in the future.
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

SPYFF's Avatar
Old (#4)
Sweet! Good thing for Maya users.
Offline , spline, 154 Posts, Join Date Nov 2011, Location Ukraine Send a message via MSN to SPYFF Send a message via Skype™ to SPYFF  
   Reply With Quote

BeatKitano's Avatar
Old (#5)
Pretty nice Froyok, I may check it once I get my maya license back.
Offline , polycounter, 817 Posts, Join Date Oct 2006, Location Nantes, France  
   Reply With Quote

InProgress's Avatar
Old (#6)
Awesome work, Froyok!
Offline , triangle, 421 Posts, Join Date Jun 2008, Location Timisoara, Romania Send a message via MSN to InProgress  
   Reply With Quote

passerby's Avatar
Old (#7)
thanks pretty nice, havent used it yet, but a good feature could be to have it automatically place the xml file, into the export path.

in may case i always export to the projects data folder, so maybe when firring up the script it could copy the xml there etc.

also the out of scene HP thing is pretty cool.
Offline , card carrying polycounter, 2,273 Posts, Join Date Nov 2010, Location Halifax, NS, Canada  
   Reply With Quote

romy's Avatar
Old (#8)
Very useful, good job froyok thanks =)
Offline , line, 77 Posts, Join Date Feb 2011,  
   Reply With Quote

Froyok's Avatar
Old (#9)
Quote:
Originally Posted by passerby View Post
in may case i always export to the projects data folder, so maybe when firring up the script it could copy the xml there etc.

also the out of scene HP thing is pretty cool.
It's possible, I will see how I can do that.
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

Sean VanGorder's Avatar
Old (#10)
Looks great man! I'll be trying this out at work this week.
Available for full time and freelance work
Tweeeet
Bloog
Offline , Polycount.com Editor, 1,759 Posts, Join Date May 2009, Location Redwood City, CA Send a message via AIM to Sean VanGorder Send a message via Skype™ to Sean VanGorder  
   Reply With Quote

schneller's Avatar
Old (#11)
Thanks Froyok, looks handy!

Are you planning to let the user use xNormal's ray distance calc tool via the plugin? I use that a lot for baking simple things, so it would be a nice feature.
Offline , spline, 136 Posts, Join Date Jan 2012, Location Des Moines, IA  
   Reply With Quote

Froyok's Avatar
Old (#12)
Quote:
Originally Posted by schneller View Post
Are you planning to let the user use xNormal's ray distance calc tool via the plugin? I use that a lot for baking simple things, so it would be a nice feature.
I'm not sure if it's possible, not all the simple tools are available with a batch. I will try anyway.
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

Froyok's Avatar
Old (#13)
http://eat3d.com/forum/questions-and-feedback/batch
Quote:
Nope, currently only the simple ao tool and the typical render process can be triggered using the command line.
Hmmm, looks like it's not possible.
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

EarthQuake's Avatar
Old (#14)
Quote:
Originally Posted by Froyok View Post
By low-poly you mean a cage for the low-poly mesh ? If yes then yes I will include this in the future.
Yeah or the "envelope" as maya calls it. Its easy to export the cage from max with the default .SBM exporter but I haven't figured out a way to do it in Maya, would be really useful.
Offline , Moderator, 8,681 Posts, Join Date Oct 2004, Location Iowa City, IA  
   Reply With Quote

Froyok's Avatar
Old (#15)
Quote:
Originally Posted by EarthQuake View Post
Yeah or the "envelope" as maya calls it. Its easy to export the cage from max with the default .SBM exporter but I haven't figured out a way to do it in Maya, would be really useful.
The SBM exporter for maya doesn't have an option for exporting the envelope with the LP mesh. From my tests however it's possible to export it as a separated mesh. So the process will be similar in the end (mesh in SBM, cage in OBJ, something like that).
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

throttlekitty's Avatar
Old (#16)
Maya (afaik) always looks for a [meshname]EnvelopeShape in the scene first before creating a new one, could probably script from that. As-is, I typically export both as obj separately. (and I totally forgot about sbm until your post, thanks)

Also, by default, envelopes get added as a child to the original, which does bork up exporting as obj until you separate them.
Offline , polycounter, 954 Posts, Join Date Dec 2008, Location South Dakota Send a message via ICQ to throttlekitty Send a message via AIM to throttlekitty Send a message via Yahoo to throttlekitty  
   Reply With Quote

Froyok's Avatar
Old (#17)
Quote:
Originally Posted by throttlekitty View Post
Maya (afaik) always looks for a [meshname]EnvelopeShape in the scene first before creating a new one, could probably script from that. As-is, I typically export both as obj separately. (and I totally forgot about sbm until your post, thanks)

Also, by default, envelopes get added as a child to the original, which does bork up exporting as obj until you separate them.
Yep I saw that, but it's not a problem, some quick lines in the script and it will works as expected. ;)
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

Bertmac's Avatar
Old (#18)
Nice very nice tool
thank you so much.
Come give some comments on my work, I probably will give some on yours (Current thread).
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Muezli.com with yoghurt and lots of fresh fruits.
Offline , spline, 175 Posts, Join Date Jul 2006, Location Amsterdam  
   Reply With Quote

passerby's Avatar
Old (#19)
dont know much about the batch xnormal thing, but is there a way to just enter the ray distance from the maya script, and maybe sometime down the road build a maya tool to calculate it?
Offline , card carrying polycounter, 2,273 Posts, Join Date Nov 2010, Location Halifax, NS, Canada  
   Reply With Quote

Froyok's Avatar
Old (#20)
I noted that the "export" button doesn't work for the blocker file, I will fix the problem as soon as possible. For the moment you have to export it manually.

Quote:
Originally Posted by passerby View Post
dont know much about the batch xnormal thing, but is there a way to just enter the ray distance from the maya script, and maybe sometime down the road build a maya tool to calculate it?

You can already set the ray distance (the Ray parameters on the UI). Otherwise, the ray calculator in mel is a bad idea. MEL is too slow for doing manual raycast. At least I don't have found native functions for that.
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

Oniram's Avatar
Old (#21)
trying this out at work now. i loaded up my hp and lp (multiple objects) as groups. set my export path, then hit export. i get this error

Code:
// Error: FBXExportCharacter is now deprecated. Use FBXExportSkeletonDefinitions. //
Offline , card carrying polycounter, 2,039 Posts, Join Date Apr 2007, Location Belmont, CA Send a message via Skype™ to Oniram  
   Reply With Quote

passerby's Avatar
Old (#22)
Quote:
Originally Posted by Froyok View Post
I noted that the "export" button doesn't work for the blocker file, I will fix the problem as soon as possible. For the moment you have to export it manually.




You can already set the ray distance (the Ray parameters on the UI). Otherwise, the ray calculator in mel is a bad idea. MEL is too slow for doing manual raycast. At least I don't have found native functions for that.
maybe in a month or 2 when i got lots of free time, i might start working on prototypeing a calculator in python, than moving it over to c++ if it works and i need to speed boost.

even just plain old python, using the maya.cmds is faster than mel, iv been building a my own smd exporter for the source engine in python, and it even with it's limited functionality functions way faster than the current mel one that is floating around.
Offline , card carrying polycounter, 2,273 Posts, Join Date Nov 2010, Location Halifax, NS, Canada  
   Reply With Quote

Froyok's Avatar
Old (#23)
Quote:
Originally Posted by Oniram View Post
trying this out at work now. i loaded up my hp and lp (multiple objects) as groups. set my export path, then hit export. i get this error

Code:
// Error: FBXExportCharacter is now deprecated. Use FBXExportSkeletonDefinitions. //
Yeah, it's because my FBX plug-in is a 2012 version, it looks like some commands were changed since this version. I have updated my version and the script to fix that. Also funny fact : the command in the doc is "FBXExportSkeleton" (which doesn't work).

I also noted that the command "FBXExportFileVersion" which I use to set the FBX file format version will be disabled in a next update. Great.

Haaaa, Autodesk...


Anyway, here is the updated script : https://dl.dropbox.com/u/13564647/maya/frox_0-3.zip
(No new features, only bug fix)

Quote:
Originally Posted by passerby View Post
maybe in a month or 2 when i got lots of free time, i might start working on prototypeing a calculator in python, than moving it over to c++ if it works and i need to speed boost.

even just plain old python, using the maya.cmds is faster than mel, iv been building a my own smd exporter for the source engine in python, and it even with it's limited functionality functions way faster than the current mel one that is floating around.
Well, if you could do that it would help not only this script but an other one that I'm working one (my retopo tools).
Offline , polycounter, 803 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

passerby's Avatar
Old (#24)
Ya would be willing to try my hand at it but I wouldn't expect anything too quickly, I got pretty long work weeks, for the next while, and something like this would require a lot of research on my part even before I write any code.

Still would be a fun little project that can teach me a new side of 3d.
Offline , card carrying polycounter, 2,273 Posts, Join Date Nov 2010, Location Halifax, NS, Canada  
   Reply With Quote

Gheromo's Avatar
Old (#25)
I get this when I try to export

// Error: Cannot find procedure "FBXExportSkeletonDefinitions". //
Online , spline, 146 Posts, Join Date May 2011, Location UK Send a message via Skype™ to Gheromo  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch