1. #1
    New Member Follow User Gallery
    Join Date
    Mar 2011
    Posts
    9

    Default GoZ 2 Vray for 3dsMax

    Hi guys, I've been fed up with GoZ switching renderer back to Mental ray each time you use it.

    So I decided to get in the code to make some changes. I'm not a scripter at all but so far, this is what I got :

    _ No more renderer switch (GoZ will now keep Vray active with all the current setup )

    BUT unfortunately,

    _ No material import yet and not soon from me I guess ( it's the tricky part, too many lines of code for many divers cases and for my poor knowledge moreover

    That means you'll be able to change geometry and textures as you wish in Zbrush and still use GoZ to send geometry back in Max, BUT have to manually save diffuse, normal and displacement from Zbrush to custom paths and having those paths assigned in your Vray material.

    You'll update your Vray shader by simply overwriting assigned maps which is for me way less frustrating than resetting up my renderer everytime !

    Still a quick beta version, tested quickly but it seems to work so far.

    This is it for now. I'm scary by the amount of code I have to go through to make it importing maps as well, so I can't promise anything.


    Installation :

    First, make a copy of your Macro_GoZ.ms located in C:\Program Files\Autodesk\3ds Max 2011\Scripts\Startup, I personnally renamed it Macro_GoZ.msSAV so it's not recognized anymore.
    And copy in the same location this new one.

    Note that I'm using Max 2011, I don't know if this will work in other versions. But let me know if you have questions or troubles.



    There is a parallel thread on cgtalk and as I dunno how to upload the file on zbrushcentral, here is the link to the

    cgtalk thread :http://forums.cgsociety.org/showthre...13#post6949313
    modified script : http://forums.cgsociety.org/attachme...hmentid=161209


    Hope this can help some people around.
    Feedback welcome or if you want to help coding this a bit further, I may need your help. I don't know much about Maxscript.

    Thanks

  2. #2
    Member Follow User Gallery
    Join Date
    Dec 2008
    Location
    Gran Canaria, Spain
    Posts
    50

    Default

    thanks! the renderer change with GoZ is actually really annoying...

  3. #3
    New Member Follow User Gallery
    Join Date
    Oct 2011
    Location
    UK
    Posts
    9

    Default

    Thank you!!!
    Stefan Tsvetkov

  4. #4
    Senior Member Follow User Gallery
    Join Date
    May 2005
    Location
    germany
    Age
    37
    Posts
    583

    Default

    Very old it seems, but Zbrush R7 foz still messes up the render settings for Vray. Any update on a fix? or a way around it?
    Abdenour Bachir
    Lead Character artist at Crytek


    Stuff




  5. #5
    Senior Member Follow User Gallery
    Join Date
    Feb 2011
    Posts
    702

    Default

    This version from Pär Amsen works for me. It is from 2013.
    The link doesn't seem to work any more

    https://plus.google.com/115884916707...ts/89Q5wtqsvc8


    I include the original page (not available any more) and the script.

    I can not guaranty it will work for you, it works for me.
    GoZ to Vray script by P***228;r Amsen.zip

  6. #6
    New Member Follow User Gallery
    Join Date
    Nov 2013
    Location
    Johannesburg, South Africa
    Posts
    19

    Default

    It does not work in Max2017.

    I am going to re-code the script to a Vray version that will do the same but instead of forcing Mentalray, it will force Vray. That way I dont have to change the scripts logic only the functional references to anything Mentalray.
    "Open Source educates the world."

  7. #7
    New Member Follow User Gallery
    Join Date
    Mar 2011
    Posts
    9

    Default

    Back around after many years,

    I'm still thinking about diving back into it.
    I'm keeping an eye onto this thread.

    I'll have a second look at this this afternoon.
    ( Don't cheer up, I'm still a noob at coding )

  8. #8
    Senior Member Follow User Gallery
    Join Date
    Feb 2011
    Posts
    702

    Default

    Perhaps I'm wrong, but the current version of GOZ for Max 2017 doesn't quite work. It is possible to send one or two subtools but after that does nothing from Zbrush to Max. The workaround is sending back to Zbrush a mesh and then GOZ works again, only one time. Then is possible to send more with this system, but it is obviously cumbersome.

    It would be great if this is solved.

  9. #9
    New Member Follow User Gallery
    Join Date
    Mar 2011
    Posts
    9

    Default

    Edit : Some infos below may be incorrect !

    Altea :
    All seems to work fine for me (max 2017.1 and zbrush 4r7). It seemed to me that yeah sometimes, the script gets stucked somehow. But From this morning test, evreything seems allright. Either with the GOZ button, the ALL button for sending all subtools, and simple and multiple selection from max.

    About the renderer switch, in the Macro_GoZ.ms located in ...\maxroot folder\scripts\startup, there is a "global s_forceMentalRay = true" line 32.
    Setting this variable from "true" to "false" deactivates the renderer switching to mental ray.

    The next step is :
    - else to simply bypass the material creation for each object but you won't get the maps update (diffuse, normal, displacement) from Zbrush.
    - else to find a way to just update the maps on the materials whatever they are (this way you could be in fstorm, corona, arnold, art or any other and you would keep your materials edits)

    Other problem is that each and every renderer handle displacement a different way so ultimately, the script would read which is the current renderer and apply the dispmap the proper way according to the current renderer.
    Plus different workflows are possible for displacement setup (at least in vray) (via vray disp modifier or via material disp slot or via "turbosmooth at render time + displace" method)

    Anyway, it involves quite a bit of code. I think I just can't code that properly. I may find some help from friends but can't say when and if this will happen.

    Anyway, if ... and I think that's the case ... GoZ deletes and re-import objects, it wont be able to just update the maps only because the link object-material would be killed. It should indeed store the material based on which object (name) and reasign it to the new one (the maps would update automatically as they are object name based and situated in a bridge directory.

    Lastly, Pär Amsen site seems down. I sent a mail to him. I'm currently waiting for a reply. Do any of you still have his version of the script, I'd like to check it.

    Thx

  10. #10
    New Member Follow User Gallery
    Join Date
    Mar 2011
    Posts
    9

    Default

    Just found out that if you send a zbrush object without maps to max, then create maps in zbrush, and re-send it to max, geo would update but no maps are imported.

    Workaround, delete your object in max and re-send it from zbrush.

    This may mean that actually object isn't deleted or else, that it is but there is no material change check.

    The workaround all that big thing is finally to model and sculpt first, then retopo and render after. So you don't care about renderer switch and all that sh.. but yeah sometimes you want tools to be polished the way it should ^^

  11. #11
    New Member Follow User Gallery
    Join Date
    Mar 2011
    Posts
    9

    Default

    Did some more tests, and surprisingly, it seems to work ok just by setting the renderer switch to false !!!
    Else I bugged earlier, else there is a kind of "random" or non identified yet bug. I was pretty sure it would switch material but it doesn't anymore.

    So here is the workflow :

    - edit Macro_GoZ.ms :
    switch line 32 from "global s_forceMentalRay = true "to "global s_forceMentalRay = false"

    - restart max (script located in startup folder)

    - start a model in max and GoZ it as you want for modeling / sculpting

    - assign at some point texture map, normal, and displace in ZB

    - GoZ it to create the 3 maps in the bridge folder

    - in Max, apply a VrayMtl, link the 3 maps manually from the bridge folder

    - That's it

    At some point we could make a script to auto assign maps to objects in maps based on the name (simple script I may write)

    Just that in some cases, and I don't know why, the link is broken between Z and max.
    In that case, quicksave the tool in ZB, Kill ZB, restart ZB, load last quicksave from lightbox, GoZ it => link restored

    It's not perfect but it does not bother me as much as before.

  12. #12
    Senior Member Follow User Gallery
    Join Date
    Feb 2011
    Posts
    702

    Default

    GoZ to Vray script by P***228;r Amsen.zip

    This is the script GoZ to Vray script by Pär Amsen, including also his page.

    In my case when the connection is broken between Max and Zbrush only happens from Zbrush to Max and not vice versa. If I send to Zbrush one mesh that comes previously from Zbrush is restored temporarily.

Posting Permissions

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