1. #1
    Senior Member User Gallery
    Join Date
    Jun 2011
    Location
    Jupiter_Station
    Posts
    472

    Default Z Face Generator

    Hi all,

    Ronald here,

    I'm starting to build a RandomFace Generator and Facial Animating script for ZBrush,
    I have all the folders sorted,like in FaceGen Here is the link : http://facegen.com/ it's free of use,
    I use it for my template and copying facial expressions, in the free version you can't export though,
    But thats no problem it is great for facial animation copying.

    But I want to make a plugging for ZBrush or Zscript,but I have a couple of questions:

    I'm just starting scripting,only been doing some simple macro stuff,
    But this requires some heavy scripting..

    Ok here goes:
    I need the option to get all layer names,a option to change all layers to different parameters for the random face
    And a way to have some layers do more morphing than the others perhaps,
    I need a scripting way to change layers with script,
    Also a converting way to compile a 3D layer and intensity slider setting,to a percentage var and unique ID
    Im a terrible scripter I hope you can make sence of what im talking about.

    Is this possible trough scripting?

    When the morphing part is done im going for the polycolor layer stuff.

    Some help will be greatly appreciated!



    ps here is some small macro I just made for Silhouetting,I find it very usefull:

    Silhouetting On:

    //ZBRUSH MACRO - Recorded in ZBrush version 4.42
    [IButton,???,"Press to run this macro. Macros can be aborted by pressing the esc key.",
    [IShowActions,0]
    [IConfig,4.42]
    [IColorSet,149,149,149]
    [ISet,Document:Back,149.5843]
    [ISet,Document:Range,0.85714]
    [IColorSet,0,0,0]
    [IPress,Material:Flat Color]
    [IColorSet,10,10,10]
    [IPress,Color:FillObject]
    [IPress,Brush:Move]
    ]

    ----------------------------------------------------------------------------------------
    Silhouetting OFF:

    //ZBRUSH MACRO - Recorded in ZBrush version 4.42
    [IButton,???,"Press to run this macro. Macros can be aborted by pressing the esc key.",
    [IShowActions,0]
    [IConfig,4.42]
    [IPress,Material:Flat Color]
    [IPress,Material:BasicMaterial2]
    [IColorSet,255,255,255]
    [IPress,Color:FillObject]
    [IColorSet,53,53,53]
    [ISet,Document:Back,53.20784]
    [ISet,Document:Range,0.4]
    [IPress,Brush:ClayTubes]
    [IPress,Alpha:~BrushAlpha]
    [IPress,Alpha:Alpha 01]
    ]

    Just Turn on record macro ,and click once in canvas , end macroscript,Use the ''Silhouetting On'' name,and put it in Zstartup/Macros or make a folder in there, then use the code ,to copy paste over the .txt
    The same goes for the second code,just use "Silhouetting Off" for the name.

    btw is there a way to change macro names?
    I tried to rename in the folder and do a reload but the new names don't show up...

    BFN

    Best Regards,

    Ronald
    Last edited by RonaldvanErp; 10-28-12 at 05:31 AM.

  2. #2
    Senior Member
    User Gallery
    Join Date
    Aug 2011
    Location
    Mebane, NC
    Posts
    2,350

    Default

    You have to rename the ???.txt file, then reload the macros.

  3. #3
    Senior Member User Gallery
    Join Date
    Jun 2011
    Location
    Jupiter_Station
    Posts
    472

    Default Custom menu template

    I was wondering if I could export just 1 custom menu I made,with some macros in it.
    And compact it like a script complete with a ztool in it.

    TIA

    Ronald van Erp

  4. #4
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,315

    Default

    Quote Originally Posted by RonaldvanErp View Post
    I was wondering if I could export just 1 custom menu I made,with some macros in it.
    And compact it like a script complete with a ztool in it.
    You can't do it that way. The best approach is to write a plugin rather than work with macros. Macros are a great way to get started with zscripting because you can open them up in a text editor (such as Notepad) and see how they are put together but if you want to do anything even slightly complicated you soon discover their limitations (for example they don't do switches or sliders).

    Writing a plugin is not all that difficult, once you have got to grips with the basics of zscripting. For general zscripting stuff see here: http://www.pixologic.com/docs/index.php/ZScripting

    And for plugins see here: http://www.pixologic.com/docs/index....gin_Interfaces

    As for using Layers, they are quite tricky to code for and I suggest you get to grips with scripting a little more before digging too deeply into Layers. Also there are some things you simply can't do with scripting - such as naming a Layer.

    HTH,

Tags for this Thread

Posting Permissions

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