|
created [maya] froXnormal : xNormal batch exporter from maya | Now with cages and presets !
on 08-31-2012 08:13 PM
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 !
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..
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
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?
|
|
Quote:
Originally Posted by throttlekitty
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
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.
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
Sweet! Good thing for Maya users.
|
, spline,
154 Posts,
Join Date Nov 2011,
Location Ukraine
|
Pretty nice Froyok, I may check it once I get my maya license back.
|
, polycounter,
817 Posts,
Join Date Oct 2006,
Location Nantes, France
|
Awesome work, Froyok!
|
, triangle,
421 Posts,
Join Date Jun 2008,
Location Timisoara, Romania
|
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.
|
, card carrying polycounter,
2,273 Posts,
Join Date Nov 2010,
Location Halifax, NS, Canada
|
Very useful, good job froyok thanks =)
|
, line,
77 Posts,
Join Date Feb 2011,
|
Quote:
Originally Posted by passerby
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.
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
Looks great man! I'll be trying this out at work this week.
|
, Polycount.com Editor,
1,759 Posts,
Join Date May 2009,
Location Redwood City, CA
|
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.
|
, spline,
136 Posts,
Join Date Jan 2012,
Location Des Moines, IA
|
Quote:
Originally Posted by schneller
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.
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
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.
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
Quote:
Originally Posted by Froyok
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.
|
, Moderator,
8,681 Posts,
Join Date Oct 2004,
Location Iowa City, IA
|
Quote:
Originally Posted by EarthQuake
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).
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
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.
|
|
Quote:
Originally Posted by throttlekitty
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. ;)
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
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.
|
, spline,
175 Posts,
Join Date Jul 2006,
Location Amsterdam
|
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?
|
, card carrying polycounter,
2,273 Posts,
Join Date Nov 2010,
Location Halifax, NS, Canada
|
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
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.
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
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. //
|
, card carrying polycounter,
2,039 Posts,
Join Date Apr 2007,
Location Belmont, CA
|
Quote:
Originally Posted by Froyok
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.
|
, card carrying polycounter,
2,273 Posts,
Join Date Nov 2010,
Location Halifax, NS, Canada
|
Quote:
Originally Posted by Oniram
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
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).
|
, polycounter,
803 Posts,
Join Date Jun 2010,
Location Namur, Belgium
|
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.
|
, card carrying polycounter,
2,273 Posts,
Join Date Nov 2010,
Location Halifax, NS, Canada
|
I get this when I try to export
// Error: Cannot find procedure "FBXExportSkeletonDefinitions". //
|
, spline,
146 Posts,
Join Date May 2011,
Location UK
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Copyright 1998-2012 A. Risch
|