ZBrushCentral

Quick Maya to ZBrush

Hi all,

After years of reading and learning a lot from this forum I make my first post with a little tool.
A few months ago I got the idea of sending a model composed of multiple objects from Maya to ZBrush without the hassle of export and name each object and in ZBrush import one at a time and then add them as subtools, again one at a time.
It’s not that it takes a long time but all the export every object seperated and naming files then import one at a time as subtools… naaaaaaa… that’s why there is scripting, to make the machine work for us :slight_smile:
So for that I created a Mel script that you can download from here mgExpObjsGrpToFolder.
In a base level it’s just a handy *.obj exporter since it exports every object with the proper name in a selection Set and gives the name of the set to the folder where the *.objs will end up. Now the new thing is that it creates a little macro script to create a tool in ZBrush that contains all the objects as subtools with proper names and the same order. Unfortunately and since this is a first release it has some bugs, it only runs on windows and the interface in ZBrush isn’t very elegant.
Planning to convert it to python in a next release.

Quick guide:
In Maya
Install


  1. Make sure you have the objExport plug-in loaded.
  2. Source the script “mgExpObjsGrpToFolder.mel” or make sure it’s installed properly.
Usage


  1. In Maya select your objects by the order you want say first head then body then legs, etc, etc ( this matters because in ZBrush the subtools will appear in this order)
  2. Now, create a selection Set and name it correctly(this will be the name of the folder where the *.objs will end up)
  3. Finally select the selection set you want to export and run mgExpObjsGrpToFolder;
  4. A browse window will appear, select where the folder containing the *.objs should be created(don’t select any path with spaces, its not supported at the moment)
  5. After you select the folder and clicked “ok” a folder with the same name as the Set will be created and the objects will be exported.
In Zbrush


  1. Go to the Zscript>Load button (or press CTRL+SHIFT+L)
  2. From the browse window select the loadmacro.txt file that was created with the *.objs
  3. A new button in the Tool menu will appear saying “import”+ the name of the Set you exported from Maya
  4. Click on this button to create the tool
  5. After this the tool is created and selected, you just need to draw it on the canvas an enter the edit mode
That’s it!! Have fun :slight_smile:

Cheers,
MacGio

PS: I know SubTool Master allows to import multiple *.objs as subtools but anyway, hope this is useful for anyone.

Very Cool, this should be handy. Thanks.

cool, how bout a quick zbrush-2-maya-autodisplace-mentalray-rendersetup script?

:cry:hai

Hi UncleDamfee,

It’s a fair request and I planned to do it until I thought of the whole displacement map export process and all the different settings that you can choose.

Another thing that came to my mind just now, there is already a script to set this up here is a link
http://www.zbrushcentral.com/zbc/showthread.php?p=429433#post429433

But I guess you where talking about a one click solution right? Give me some time and I will see what I came up with.

Cheers,
MacGio

Yay. :slight_smile: :+1:

Indeed a nifty tool. :smiley:

I was just having troubles with the normals and such. But that’s more my modeling I guess. Or the import settings in my Zbrush. Anyways. The script works! :slight_smile:

that is definitely helpful. Thanks for taking the time to make this (and share it)!
I’ve got a question for ya. I’ve got a model comprised of many subtools and I need to create a single normal map for the model. Aurick’s solution for this is to generate a seperate normal map for each one and then combine all those maps in Photoshop. But, my model has over 200 subtools, so you can see how this would not be a very nice process to go through! And what happens when I need to make a change? I’d need to do it all over again!?
Any ideas on a script or solution to make this work? I tried using a script that collapses all the subtools into one, but then I’m unable to reconstruct subdivs, thus making it impossible to generate a map.
Any help would be appreciated - I know others have bumped into this issue as well.

Hi mantella,

Glad you liked the tool. About your question I can’t help you with that, I don’t know much about the normal map workflow I only get displacement maps to render in Houdini.
I will ask to some friends and if they get something I will post it here.

Cheers,
MacGio

wow, this works realy well and easy. Thanks a lot for sharing, my life will be easyer now:+1: .

hi macgio,

I have problems with this.

I have sourced and got a shelf within maya for the mel script.

I creat a sphere box and torus.

I then slect sphere then shift select the box then torus

I then creat a quick selection and give it a name

I then goto the qick selection set and select the name.

I then click on the mgExpObjsGrpToFolder. it opens a window and i say ok and it saves

within zbrush and a fresh scene.

i click on the load zscripts and point to the folder the mgExpObjsGrpToFolder made and there is a text doc.

I click on the txt file it loads up and creates a button with Import_the name i used .

I then click on this button but only to get error reports…

error report is : Unable to open file!!! and error incountered while importing…

when i explore the folder there are 2 files in it…one txt file and the other is .zsc file named load macro

I would appreciate any help with this…

Thankyou

hornet1958, i don´t know if this is the problem but in the instructions say that you have to make a set of objects in Maya, and you are making a quick select set.

Thankyou jonyto for pointing that out.

sorted it out now…(stupid me)…:lol: :rolleyes:

Thank you very much! This saves hours in my day

Hornet1958, I think it didn’t work for you the first time, not because of it being a selection set or a quick selection set(they are the same thing, with components or objects), well assuming you are doing a set of objects and not components, the important step is to select a set before running the command to export the objs. Got a few people on work not selecting a set but the objects and ending with an empty folder:evil:. Sorry for not checking this sooner.

I’m glad you guys liked it. :slight_smile:

Cheers,
MacGio

thanks a lot , bump up up up!!

macgio, it is working fine now, thanks to jonyto for pointing out my error. thankyou macgio for this script it has cut down my work flow to seconds…thankyou

Certainly helps for people like me.

I appologise if this is slightly off topic but there seem to be some folks on this thread that might have insite.

I am base modelling dragons in maya, detailing in zbrush, exporting L1 obj from zbrush to maya, rigging in maya, putting the model in a good fighting position and exporting back to zbrush to render.

( why render in zbrush ?..becasue it is damn fast and matcaps bring out fantastic detail that are hard to bring out with mental ray and displacements maps, a bunch of passes in zbrush and compositing in photoshop gives some very nice results in a short time if you are only creating stills)

The problem:
Sub-tools and not importing in place…ie dragon is rigged with head raised but the eyes, which are exported as a separate sub-tool are not importing into place but floating where they were before rigging.

any ideas on wise ones ?

Hi, Was just about to purchase z brush 3 but I stopped dead in my tracks… I need clarification first: Zbrush - how easy is it to get used to - interface wise…I understand that riggin is not an option? Can I easily import into C4D