Home Technical Talk

Styx - Zbrush/Maya/Max tool

kmdan
null
Offline / Send Message
Pinned
kmdan null




Hi!
I created this Zbrush/Maya/Max script package which makes it faster importing-exporting files between the programs, the creating blendshapes, editing geometries, etc. 
For more, visit my gumroad page: 
https://gum.co/iDdF


I guess the main question here is, what's the difference from GoZ?
Goz as far as I experienced, can be tricky. It did messed up my subtools sometimes, goes crazy if there is some accidental name-matching happening. So I started to work on my solution for the problem, and with times, it started to get many blendshape-helping functions.
So yeah, it's less then GoZ and a little bit more.  And it isn't working between 2 softwares, but rather as many as you want (at least between Maya-Max-Zbrush).

My solution is waay simliper that GoZ, but this way a little bit more predictable. It basically saves out the active subtool's active subdiv level to the C:\temp folder.
The main function is this, and all the smaller functions supports this process.
And because every software overwrites the same obj file, communicates through the some "channel", the communication is not between two programs, rather whatever you want. You can open this obj with other softwares. (For example if you open this obj in unfold, it will remember it, so you just relead/save it.)

This way, you can work in maya/max/zbrush/uveditors etc the same time. I mean relatively speaking. You don't have to be sad about that "i could do this easier in *** software, ahh, never mind".
You just circle the same geometry through the softwares.
And because of GoZ is a closed process, you can't hook in other softwares.
I work at Digic Pictures, and on a daily basis we use maya,max,zbrush, headus,unfold, etc. So this script was the best solution yet.
And yeah, it's limited because of the obj format, but also it's a little bit safer because the OBJ don't let too much strange thing to happen.
I hope you will give it a try and have a good feeling about it.

Daniel

Replies

  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Brilliant! My Saturday afternoon is reserved for Styx :) But before buying and trying I have to ask: is the scale 1:1? This is my only gripe with GoZ, the huge difference in scale factor.(thankfully MentalRay automatically being assigned as the renderer in Max will soon be a thing of the past)

    I'm a Max/ZB/Headus user and constantly jump between Max/ZB and Max/Headus(bridge script) so being able to jump between all 3 would be fantastic.

    About bloody time somebody created this tool!  And I love the name. Very appropriate. :)
  • kmdan
    Offline / Send Message
    kmdan null
    Hi!
    Thanks. Yeah, at work we use multiple softwares. Even multiple modeling softwares simultaneously. One of my coworkers did the export-import for years by hand, and I was too lazy for that, so tried this solution. Worked so well, we would probably never go back. The great thing is, after a while you just doesn't think about softwares, rather problems and solutions. I just jump here and there, based on which software offers the better solution for that problem I'm working on.

    Scaling issue: I'm not completely sure, but I guess you can change the maya OBJ import-export settings when you import/export something by hand.
    I know that it is available for Max (you just hand export, import an OBJ and save the settings). So for Maya, I use the default settings, for Max, I import the models at 0.1 scale, and export them with 10.

    I hope it helps.

    Daniel


  • thomasp
    Offline / Send Message
    thomasp hero character
    i wrote myself a bunch of scripts with this sort of functionality that i have on a shared hotkey in all the packages i work with and agree that it seems far preferable to work with OBJ and in this transparent fashion over some plugin magic that even locks you into using specific app releases or tricks you into playing version roulette with FBX.

    however one problem i never managed to solve is that the connection 3ds max->zbrush does not keep vertex order well. it was reliable for me in old versions but hit and miss in all my tests ever since max shipped with that upgraded (bought-in) OBJ exporter that i can see in your video, no matter what settings (optimize,etc) is chosen. how do you get around that issue?


  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    kmdan said:
    Hi!.

    Scaling issue: I'm not completely sure, but I guess you can change the maya OBJ import-export settings when you import/export something by hand.
    I know that it is available for Max (you just hand export, import an OBJ and save the settings). So for Maya, I use the default settings, for Max, I import the models at 0.1 scale, and export them with 10.

    I hope it helps.

    Daniel


    yes thanks, I'll definitely check it out. The main thing for me would be consistency of scale, eliminating the guesswork that plagues GoZ. I'll let you know how I fare. :)
  • kmdan
    Offline / Send Message
    kmdan null
    thomasp said:
    i wrote myself a bunch of scripts with this sort of functionality that i have on a shared hotkey in all the packages i work with and agree that it seems far preferable to work with OBJ and in this transparent fashion over some plugin magic that even locks you into using specific app releases or tricks you into playing version roulette with FBX.

    however one problem i never managed to solve is that the connection 3ds max->zbrush does not keep vertex order well. it was reliable for me in old versions but hit and miss in all my tests ever since max shipped with that upgraded (bought-in) OBJ exporter that i can see in your video, no matter what settings (optimize,etc) is chosen. how do you get around that issue?


    If you want to automate the whole process of exporting with the standard obj exporter, that will be cause. As far as I could dig into it.
    So in maxscript, in import you can use the #nopromt flag (I guess that's the name of it), witouth any trouble, but if you use it while exporting, it will mess up the vertex order. So I simply didn't use the #nopromt at export. This will make the user make 2 more buttonclicks but I didn't went after the causes... Try it out! I hope it helps. (I can't even imagine what's causing it...)
  • beefaroni
    Offline / Send Message
    beefaroni sublime tool
    Will this hold creases from Maya into Zbrush?
  • thomasp
    Offline / Send Message
    thomasp hero character
    kmdan said:
    If you want to automate the whole process of exporting with the standard obj exporter, that will be cause. As far as I could dig into it.
    So in maxscript, in import you can use the #nopromt flag (I guess that's the name of it), witouth any trouble, but if you use it while exporting, it will mess up the vertex order. So I simply didn't use the #nopromt at export. This will make the user make 2 more buttonclicks but I didn't went after the causes... Try it out! I hope it helps. (I can't even imagine what's causing it...)
    riiiiight. that sounds worth investigating next time i'm in front of 3ds max. pretty sure i'm skipping the prompts in the script. thanks for the tip!

  • Indik
    Offline / Send Message
    Indik polycounter lvl 9
    Great script! Thank you. Previosly I was using the same workflow but in manual mode (exporting by hand).
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    Very nice tool, thanks! Now it's way easy to switch between apps, which really streamlines the workflow. Extremely helpful indeed!
  • kmdan
    Offline / Send Message
    kmdan null
    Thanks! Share it if you think it's useful. My main purpose with it to make it easier to use already great softwares/techniques/workflows. For exapmle: http://polycount.com/discussion/168610/proboolean-dynamesh-hardsurface-workflow-tutorial
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    Daniel, your tool is great, but after some time of using your tool, I found one weak spot in this tool, which can be fixed for sure. The point is that after exportin model to maya and getting it back to ZBrush I'm loosing all my polygroups, which is very disappointing. PGs are very important for my certain workflow steps and I don't wanna loose them. Previously I've just used a couple of scripts that exported and imported stuff from and into maya. And my code preserved polygroups just fine, bacause on importing to maya they were converted into sets. So I have one mesh with few sets which hold my PGs. Exporting to ZBrush goes by just fine too, I just have to turn on "Convert mats to polygroups" option in brush.

    Export code:
    file -force -options "groups=1;ptgroups=1;materials=1;smoothing=1;normals=1" -typ "OBJexport" -pr -es "C:/temp/mesh.obj";

    Import code:

    file -import -type "OBJ"  -ignoreVersion -ra true -mergeNamespacesOnClash false -namespace "ZB" -options "mo=0"  -pr "C:/temp/mesh.obj";
    

    The main disadvantage of my workflow is that I have to manually export each subtool one by one to obj, which is obviously slow. So I was expecting your toolset to help me :) I was wondering if you could find a way to preserve polygroups and hope my code can be somehow helpful.

    UPD: I have replaced your export commands with my ones in StyxMayaImport and StyxMayaExport respectively. Also I've commented the lines 14-83 in export procedure and it looks like now all the polygroups are transferring correctly.

  • kmdan
    Offline / Send Message
    kmdan null
    Hi!
    Using sets for the polygroups actually a great idea. I'll look into it.

    The problem is here: I chose the type of communication between maya-zbrush-max-etc to be one single obj file is to make it more simple. So for example using obj files per geometry would be harder to implement in Zbrush. Zbrush now has some folder-checking zscript options, but not the best. (There is the layerimporter in my script which actually imports all the objs from the 'blend' folder and make them separete layers in zbrush).

    So I'm thinking in the process of using only one file, exported.obj, and put every necessary stuff into it. Actually, the maya export script creates an additional file too to rewrite some stuff in the exported.obj.
    But this way, only one file used, I can simply throw around multiple geos. UV edit in Headus, go to max, change it, check the end result in maya.

    With exporting the polygroups, the process would be a layer deeper into complexity.
    Actually one of the main problems is, how to keep vertex order while keeping the polygroups and keeping the "only one obj" process. One of my problems is actually in zbrush obj writing solution.
    So the obj is a file format but there is no police to regulate it. Maya has one solution. (Maya uses groups in the obj format. As far as I know, no one else is. So when maya exports geos, actually writes before the name of the geo the name of the group in which the geo is. Great. The problem is, even maya doesn't uses this information on import. And could cause hell of a mess in other programs.)
    Zbrush has a different problem, which comes in with polygorups. So the polygroup thing should be as simple as exporting multiple geos at once. The problem is the obj format has this sequence in the line writing/reading. Verticies, vertex coordinates, vertex normals, faces, group name (this will be usually the object name). Plain and simple. The problem is, Maya uses the standard as follows: vt, vtx, vn, faces, group name, and if you have more objects selected, repeat this.  In zbrush it looks like this: ALL vt, ALL  vtx, ALL vn, faces, groups and if you have more objects (or in our case polygroups) repeat the "face, groups" part, and list the relations between them.
    This is not a problem if you are handeling single objects, or if you are exting subtools with only one polygroup. But this will as soon as you want to do multiple geos.

    Sorry for the long answer, but wanted to share that I discovered this far into the problem. I can see some simple solutions to get around it. So thanks for mentioning your method, I will definitaley look into it.

    Usually in work we doesn't bother that much with the lost polygroups. I usually use the autogroup by uv or the Groups by normals.
    Other view on the problem, but if you want to keep the polygroups in zbrush after updatating a geometry from Maya, you can use the "Polypaint from polygroups", import, "Groups from Polypaint" buttons. This will save the polygorups into the vertex color, importing the geo (if the imported geo has the same vertex order Zbrush will assign it as a vertex offset, and will keep the vertex colors), and reassign te polygroups.
    Actually, maybe this could be a solution for the Zbrush->Maya process too, just save out the polygroups into the vertex color slot... Hm. I will look into it. Thanks. (This would keep intact the vertex ordering too...)
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Hey Daniel, just purchased the script and set it up. Works like a charm. :)

    I did have a strange occurance at one stage when the import scale had to be set at 100 for real-world to work, but haven't been able to reproduce it and everything's working as it should at import scale 10.

    If anyone's interested in setting the scale up perfectly for real-world from Max to ZB I'll just post it here:  (just to clarify what you've said above)

    Adjust the settings in the .obj plugin for both export and import, and make sure to make it permanent by setting it in the dialogue box(to the right of the preset dropdown) within the floating dialogue. Set Import=10 - Export=0.1

    That's it. Now 3dsMax and Zbrush are essentially the same application....:)

    Also, to note: my ZB install path was the Startup folder directly within the program files>pixologic folder, rather than the deeper sub-folder layer shown in your install video.

    Tiny request....would be great if the 'overwrite file' prompt could be bypassed with an auto-yes in the script upon Max export.

    Thanks again, loving this.


  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    kmdan said:
    So I'm thinking in the process of using only one file, exported.obj, and put every necessary stuff into it. Actually, the maya export script creates an additional file too to rewrite some stuff in the exported.obj.
    But this way, only one file used, I can simply throw around multiple geos. UV edit in Headus, go to max, change it, check the end result in maya.

    With exporting the polygroups, the process would be a layer deeper into complexity.
    I have also looked into ZScript expM and commented your custom post-processing block (lines 16-89) and right now it looks like ZB exports everything correctly too (at least in terms of only ONE subtool). Because I noticed that when I import groups from your processed ZB obj, maya imports incorrect groups. But exporting from maya to ZB went by flawlessly.
    kmdan said:

    Actually one of the main problems is, how to keep vertex order while keeping the polygroups and keeping the "only one obj" process. One of my problems is actually in zbrush obj writing solution.
    Actually, vertex order stays untouched - with just a standard exporting from ZB. The main problem is to have multiple objects exported from ZB simultaneously! In this case the vertex order can be actually ruined - just because otherwise there will be a mess of different vertexIDs and the app will have to re-order them (like in transpose master in ZB, which makes one tool from multiple).
    kmdan said:

    So the obj is a file format but there is no police to regulate it. Maya has one solution. (Maya uses groups in the obj format. As far as I know, no one else is. So when maya exports geos, actually writes before the name of the geo the name of the group in which the geo is. Great. The problem is, even maya doesn't uses this information on import.
    This is a tricky part. Actually, polygroups from ZB are preserved correctly on OBJ import / export. In Maya there's no problem too! Maya exports sets and imports them back correctly (see video in attached archive). But when it comes to "export from maya import to ZB" the groups gets messy due to the reasons yo mentioned, the obj file format has some misconceptions. And this is the point that sould be pre-/post-processed. But what is more interesting, "export from ZB import to Maya" works just fine always, and even more - object originally exported from ZB never loose their polygropus, and it doesn't matter how many times I can export import them between maya-maya, maya-zbrush.
    kmdan said:
    And could cause hell of a mess in other programs.)
    Zbrush has a different problem, which comes in with polygorups. So the polygroup thing should be as simple as exporting multiple geos at once. The problem is the obj format has this sequence in the line writing/reading. Verticies, vertex coordinates, vertex normals, faces, group name (this will be usually the object name). Plain and simple. The problem is, Maya uses the standard as follows: vt, vtx, vn, faces, group name, and if you have more objects selected, repeat this.  In zbrush it looks like this: ALL vt, ALL  vtx, ALL vn, faces, groups and if you have more objects (or in our case polygroups) repeat the "face, groups" part, and list the relations between them.
    This is not a problem if you are handeling single objects, or if you are exting subtools with only one polygroup. But this will as soon as you want to do multiple geos.

    Sorry for the long answer, but wanted to share that I discovered this far into the problem. I can see some simple solutions to get around it. So thanks for mentioning your method, I will definitaley look into it.

    Usually in work we doesn't bother that much with the lost polygroups. I usually use the autogroup by uv or the Groups by normals.
    Other view on the problem, but if you want to keep the polygroups in zbrush after updatating a geometry from Maya, you can use the "Polypaint from polygroups", import, "Groups from Polypaint" buttons. This will save the polygorups into the vertex color, importing the geo (if the imported geo has the same vertex order Zbrush will assign it as a vertex offset, and will keep the vertex colors), and reassign te polygroups.
    Actually, maybe this could be a solution for the Zbrush->Maya process too, just save out the polygroups into the vertex color slot... Hm. I will look into it. Thanks. (This would keep intact the vertex ordering too...)
    In intense workflow loosing PGs is not a way to go actually. I can everytime import previously saved obj from ZB with correct PGs and then switch MTs, but it's a very tedious and time consuming.
     Thanks in advance for your struggling to make this useful piece of software even better :) Looking forward to see and imporved version!
  • CreativeSheep
  • kmdan
    Offline / Send Message
    kmdan null
    PASHA_SEVEZ : Thanks man, this is really great! I will implement it into my code and update the plugin. As far as I tested, it works great! I think I will test it for a week on my own, and make an update on it. Great addition, thanks for that.


  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    Daniel, any good new about the updated version of Styx ? ))
  • kmdan
    Offline / Send Message
    kmdan null
    I tried out your method. The problem is that my zbrush import script reads out the first group name from the obj and renames the imported subtool. (Otherwise the name of the subtool would be 'exported' all the time.) So when the set's are on, in maya export, the imported zbrush subtool's name ends up with the set's name and the group name. After a couple of import<->export this will add up. So I should look into the zbrush importer script, more so the part where the actual renaming happens.  The problem is that zscripting is a little problematic... And I'm usually slow to change something that already works :D 
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    Ok, ic, ic! Yes, I noticed, that I constantly get "Exported" subtool name ) It doen't hurt if I have just a couple of subtools, but it does matter when dealing with tens or hundreds of subtools. I hope and believe, that you'll manage to overcome this complication and we'll have a cool bridge that supports both subtools names and preserves polygroups as well :) So, good luck and stay in touch. You're welcome to get some help or testing from me - if needed )
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    Hey i'm assuiming this doesn't work with maya 2017?

  • Ootrick
    Offline / Send Message
    Ootrick polycounter lvl 6
    Working with Max 2017, really nicely too! all I had to do was install and add a Temp folder to C: Thanks my man! SO much faster than GoZ 
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    @kmdan: Daniel, any new on an update? 
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    @sunray yes, it does. I just installed it.

    @pasha_sevez I've just been emailing Daniel and he says he's planning on updating/expanding it soon. He also may have a substance Painter bridge script on the cards. :)
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    @pasha_sevez I've just been emailing Daniel and he says he's planning on updating/expanding it soon. He also may have a substance Painter bridge script on the cards. :)
    Awesome! Thank you very much for this info!
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    @sunray yes, it does. I just installed it.

    @pasha_sevez I've just been emailing Daniel and he says he's planning on updating/expanding it soon. He also may have a substance Painter bridge script on the cards. :)

    I hope he goes with sp also topogun would be nice.
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    getting this error when trying to install to maya


    source StyxInstallShelf; installShelf();
    // Warning: string $parentPopupMenu = `popupMenu`;
     //
    // Warning: "C:/Users/Sunray/Documents/maya/2017/scripts/StyxInstallShelf.mel" line 8.38 : Redeclaration of variable "$parentPopupMenu" shadows previous declaration at line 4. Previous value will be overwritten by explicit initializer. //
    // Warning: string $parentPopupMenu = `popupMenu`;
     //
    // Warning: "C:/Users/Sunray/Documents/maya/2017/scripts/StyxInstallShelf.mel" line 13.38 : Redeclaration of variable "$parentPopupMenu" shadows previous declaration at line 4. Previous value will be overwritten by explicit initializer. //
    // Warning: string $parentPopupMenu = `popupMenu`;
     //
    // Warning: "C:/Users/Sunray/Documents/maya/2017/scripts/StyxInstallShelf.mel" line 17.38 : Redeclaration of variable "$parentPopupMenu" shadows previous declaration at line 4. Previous value will be overwritten by explicit initializer. //
    // Warning: string $parentPopupMenu = `popupMenu`;
     //
    // Warning: "C:/Users/Sunray/Documents/maya/2017/scripts/StyxInstallShelf.mel" line 21.38 : Redeclaration of variable "$parentPopupMenu" shadows previous declaration at line 4. Previous value will be overwritten by explicit initializer. //

    anyone know why please help I can't live without this plugin any more.

  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    The way I got it to work (by Daniel's own advice) is to go in the 'plan B' folder that comessage with the download. It's called 'mayainstallfix' or something like that, copy the actual text from within each .txt file and paste it to the Maya Mel script editor (with whatever shelf you want it Installed to active), evaluate ,  button appears on shelf. Repeat for each script. Make sure it's Mel, and save all scripts.
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    @pasha_sevez I've just been emailing Daniel and he says he's planning on updating/expanding it soon. He also may have a substance Painter bridge script on the cards. :)
    Awesome! Thank you very much for this info!
    No problem, mate. you're welcome.
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    The way I got it to work (by Daniel's own advice) is to go in the 'plan B' folder that comessage with the download. It's called 'mayainstallfix' or something like that, copy the actual text from within each .txt file and paste it to the Maya Mel script editor (with whatever shelf you want it Installed to active), evaluate ,  button appears on shelf. Repeat for each script. Make sure it's Mel, and save all scripts.
    Yeah I got it to work I asked him just drag the text to the shelf and hit mel.
  • shogunato
    Offline / Send Message
    shogunato polycounter lvl 12
    Would be nice to add blender. It is possible ?



  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    Finally got this, and am impressed. New version up-coming?
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    cptSwing said:
    Finally got this, and am impressed. New version up-coming?
    I wouldn't feel I were exaggerating if I said it was the best script I have.... :)

    No word yet on an update.
  • BMWVED
    Offline / Send Message
    BMWVED polycounter lvl 3
    It is possible add Styx for houdini - zbrush ? 
  • OccultMonk
    Offline / Send Message
    OccultMonk interpolator
    Please make it universal! So import and export to and from: Zbrush, 3ds max, Maya, Modo, Houdini, Blender
  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    Ah yes, now that everybody is eyeing Blender again, an extended version of Styx'd be nice :)
  • shogunato
    Offline / Send Message
    shogunato polycounter lvl 12
    Here is a free alternative for a bunch of softwares (including blender, houdini)


  • Altea
    Offline / Send Message
    Altea polycounter lvl 6
    It would cool if it could support sending multiple subtools simultaneously, specially now that Max 2018 doesn't support GOZ (and viceversa)
    Working with single objects is a pain.
    Also Shogunato I guess that free script has the same limitation.
  • walter
    Offline / Send Message
    walter polycounter lvl 15
    With Subtool Master we can export all the subtools simultaneously.
    And in Maya I use the script rd_browser (by Rich Diamant) to manage my batch import/export OBJ, very usefull.
    I never really used GOZ.
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    shogunato said:
    Here is a free alternative for a bunch of softwares (including blender, houdini)


    Thanks for pointing out!
  • Altea
    Offline / Send Message
    Altea polycounter lvl 6
    Walter , GOZ is a lot faster and has some advantages. FBX export-import can also export-import subtools simultaneously.
  • Altea
    Offline / Send Message
    Altea polycounter lvl 6
    pasha_sevez   After digging a bit about that plugin OD_CopyPasteExternal  it seems it is in very early stages. Doesn't support Zbrush 4.8, only 4.7 and for MAX won't export UVs.
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    cptSwing said:
    Ah yes, now that everybody is eyeing Blender again, an extended version of Styx'd be nice :)
    Just wanted to update this since messaging Daniel(the Styx dev) Here's his reply to my inquiry about porting this to Blender:

    Hey man!
    Yeah, I’m also thinking about going into Blender.
    I can’t promise anything, but I think I will have some to the Blender version also.
    Thnaks for the feedback.

    Dan





  • Gigantoad
    Offline / Send Message
    Gigantoad polycounter lvl 5
    I'll throw Houdini into the wishlist.
  • Life3d
    Hi guys! Anyone tried it with maya and zbrush 2019? thx a lot!
  • pOgOstyle
    Offline / Send Message
    pOgOstyle polycounter lvl 8
    still working!
Sign In or Register to comment.