1. #1
    New Member User Gallery
    Join Date
    May 2004
    Location
    Glasgow
    Posts
    9

    Post 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



    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


    Cheers,
    MacGio

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

  2. #2
    Senior Member User Gallery
    Join Date
    Oct 2005
    Location
    Vancouver, BC, Canada
    Posts
    193

    Default

    Very Cool, this should be handy. Thanks.

  3. #3
    New Member User Gallery
    Join Date
    Mar 2007
    Posts
    23

    Default

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

  4. #4
    New Member User Gallery
    Join Date
    Mar 2008
    Posts
    2

    Default thans a lot

    hai

  5. #5
    New Member User Gallery
    Join Date
    May 2004
    Location
    Glasgow
    Posts
    9

    Default

    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
    “800 really creative people in the same place has an amplification effect” John Knoll

    dtcreatures.blogspot.com

  6. #6
    New Member User Gallery
    Join Date
    Mar 2008
    Posts
    1

    Default It works!

    Yay.

    Indeed a nifty tool.

    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!

  7. #7
    Member User Gallery
    Join Date
    May 2006
    Posts
    35

    Default

    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.

  8. #8
    New Member User Gallery
    Join Date
    May 2004
    Location
    Glasgow
    Posts
    9

    Default

    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
    “800 really creative people in the same place has an amplification effect” John Knoll

    dtcreatures.blogspot.com

  9. #9
    New Member User Gallery
    Join Date
    May 2006
    Posts
    3

    Default

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

  10. #10
    New Member User Gallery
    Join Date
    Apr 2008
    Location
    UK
    Age
    54
    Posts
    4

    Default

    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

  11. #11
    New Member User Gallery
    Join Date
    May 2006
    Posts
    3

    Default

    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.

  12. #12
    New Member User Gallery
    Join Date
    Apr 2008
    Location
    UK
    Age
    54
    Posts
    4

    Default

    Thankyou jonyto for pointing that out.

    sorted it out now..(stupid me)..

  13. #13
    New Member User Gallery
    Join Date
    Nov 2006
    Location
    Jerusalem Israel
    Age
    36
    Posts
    11

    Default

    Thank you very much! This saves hours in my day

  14. #14
    New Member User Gallery
    Join Date
    May 2004
    Location
    Glasgow
    Posts
    9

    Default

    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. Sorry for not checking this sooner.

    I'm glad you guys liked it.

    Cheers,
    MacGio
    “800 really creative people in the same place has an amplification effect” John Knoll

    dtcreatures.blogspot.com

  15. #15
    New Member User Gallery
    Join Date
    Sep 2008
    Posts
    7

    Talking Happiness

    thanks a lot , bump up up up!!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •