-
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 
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
- Make sure you have the objExport plug-in loaded.
- Source the script "mgExpObjsGrpToFolder.mel" or make sure it's installed properly.
Usage
- 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)
- Now, create a selection Set and name it correctly(this will be the name of the folder where the *.objs will end up)
- Finally select the selection set you want to export and run mgExpObjsGrpToFolder;
- 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)
- 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
- Go to the Zscript>Load button (or press CTRL+SHIFT+L)
- From the browse window select the loadmacro.txt file that was created with the *.objs
- A new button in the Tool menu will appear saying "import"+ the name of the Set you exported from Maya
- Click on this button to create the tool
- 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 
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?
-
thans a lot
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/sho...433#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
-
-
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
.
-
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.
-
-
Thank you very much! This saves hours in my day
-
-
Happiness
thanks a lot , bump up up up!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules