Home Technical Talk

Restoring materials on zbrush objects + loading specificied user-defined materials ?

grand marshal polycounter
Online / Send Message
pior grand marshal polycounter
Hi there,

I have been messing around with Zbrush3.1 polypainting tools recently. Some parts of the workflow are quite elegant, yet many others still smell like good old ZCrap.

I painted a face using RGB information (used the 'Flat' preview rendering option for that); then tweaked and applied a fancy Matcap skin shader that I found online (from Sebcesoir, the artist making realsitic human busts, also famous for the Ubisoft hard surface sculpts on R6Vegas).

zshit_flat.jpg
zshit_shader.jpg

Then I made a slightly more shiny variant of it. and applied the new, shiny material to small localized areas of the face I wanted to look more shiny or greasy : shaved beard, tip of the nose, lips, top of the skull.
It looked fantastic as the specular was nicely appearing and disappearing in the desired areas. No pic saved sorry.

Then I Saved the 'Tool' (model), and opened it the next day.

The surfaces using the dry skin variant still look fine, however what I polypainted with the edited shiny variant of the skin material is all reverted to a plain grey material.

zshit_boo.jpg

Now I notice that when I open up the app without loading the itself, my base skin material actually is part of the small Material menu swatches.

zshit_swatches.jpg

However the variant does not show up here. Both shader files are saved in the Zstartup>Materials folder tho and they successfully show up without the need for loading them manually In both the big floating material window and the material swatches slider (who ever thought this slider was a smart UI choice btw haha)

zshit_floating.jpg

I must have been doing something good with my base skin material to make it load in the material swatches on startup. However I am unable to reproduce this behavior with its variant. Or maybe I changed the name of the variant and now its not finding it. I have the feeling that if I manage to have my skin variant loaded in this small material swatches menu automatically on startup, everything will be fine and it will show up on any loaded mesh requiring it.

On the other hand, if such required materials are *not* in the small swatches menu for some reason, how does one re-apply some materials to some specific parts of a ? Is there a way to print a list of the materials called by a given loaded ? Is there a way to select polygon faces according to their material IDs? (or in Zbrush terms, 'masking' faces according to materials, in order to apply whatever material to 'unmasked areas')

This must be a total nightmare in production : you load a and if the right material does not show up, you have to guess what material individual polygons are supposed to receive??

Maybe there is a plugin available somewhere, listing the material IDs of a given , and the material they are trying to load. And a simple browse button at the end of each line to just point to the desired material?

I am tempted to ask this on Zbrushcentral and maybe will eventually but I want to avoid ZFanboys horseshit Buddhist replies for now :P Joke aside I feel like you guys might see more clearly what I am looking for.

On a side note. Assuming that this material assignement problem eventually gets fixed, heres a great tip I found :

One drawback of polypainting is that Zbrush cannot 'blend' materials together. For instance one cannot paint a 50% opacity Toyplastic material on top of a clay-looking Matcap to make it look like a wetter clay (since materials are per-poly). However if one uses a Spray brush along with a nice alpha with little dots in it, it will produce somewhat of an airbrush mist spray. So basically you can make a smooth enough transition between different polypainted materials using this dithering technique. Works very well to handle specularity changes on a continuous surface, or other any other weird blending effects.

Also , what does Preferences>Misc>use Zfolders do? (damn that Z letter everywhere hehe) and how do I turn off the opening splash page asking for s to load?

Sorry for the long post, thanks for the help!

Replies

  • vik
    Offline / Send Message
    vik polycounter lvl 13
    ZBC is your friend (isnt that where you got the Sebcesoir shader from ?:)) why afraid to ask them there? :)
    have the feeling that if I manage to have my skin variant loaded in this small material swatches menu automatically on startup, everything will be fine and it will show up on any loaded mesh requiring it.

    if you copy your material to the \Program Files\Pixologic\ZBrush3\ZData folder it
    should show up, but there is a limit on how many (I think?) also, did you try to save the document as well and then load it alongside the tool? some information (like materials) only stored in that way.
    how do I turn off the opening splash page

    unfortuantely, you can`t afaik. bit silly if you ask me

    as for the Zfolder thingy i thought you would appreciate a ZBC link lol http://www.zbrushcentral.com/zbc/showpost.php?p=423190&postcount=8
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    thought you could turn the splash page off, by saving a blank document as your start doc somewhere in the zfolders, sorry i cant be more precise only done it at work
  • pior
    Online / Send Message
    pior grand marshal polycounter
    Hehe thanks for the Zfolder info Vik ;) For sure I'll eventually ask up there, it's just that my question is very related to 'usual' ways of working in 3D : Material IDs, shader assignements to faces, face selection by material ID aso, and with such concepts being foreign to the Zbrush workflow I figured out I would get sharper answers here maybe.

    As for the Zstartup materials : the materials I put up there *do* show up on startup in the large floating window as seen in zshit_floating.jpg ; however I can't understand the behaviour of the smaller material swatches located in the Materials drop down menu as in zshit_swatches.jpg. Some of my custom mats stay there, some don't.

    But anyways it turned out that this swatches menu is not the problem : I managed to have some meshes showing up with their correct materials on loading without such materials being part of the swatches - so this does not dictate the correct loading of things. I guess its a matter of never ever renaming any material file. Looks like if one renames stuff, the link between an object and its material(s) is lost for good.

    And as for what polygons receive what materials I think the only way is to create polygroups to easily select later. However it's a bit sad since it seems like I can only create polygroup through 'ctrl-masking' which gives a smooth edged mask - meaning that it might not be possible to get the nice polygon mist I had on the transitions. ATM I can only have a rather plain sharp edge between the two, huh...
    wip_061.jpg

    I'll try your blank doc trick asap Shepeiro.
    Such a weird app, I hope they fix it soon!
    Any extra piece of info appreciated!
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    pior wrote: »
    Looks like if one renames stuff, the link between an object and its material(s) is lost for good.

    Well, yeah. If you renamed your material between sessions and then loaded a ZTool referencing the old material name, how is it meant to know where to look?
    The only thing ZBrush seems to use to determine a material's name is its file name, so if you change that, you break everything which ZBrush had associated with it.
  • pior
    Online / Send Message
    pior grand marshal polycounter
    Well yeah that's the problem with not having a scene structure and embedding everything in the object instead :

    In the long term, I can very well have a desire to rename material files to fit some sort of convention. In a usual 3D program it would break the link, but there would still be a way to point to the new name. I would almost expect Zbrush to save the actual material within the 'tool' to avoid such problems.

    So that's what I am looking for here : some sort of table one could access to re-link stuff. I'll definately hit ZBC to request that I guess!
  • kary
    Offline / Send Message
    kary polycounter lvl 18
    Materials don't feel very flexible yet. Nice results in the viewport, or when composited together after export, but they have the normal 'hard to get out of ZB' issue.

    The stuff that Simon Blanc has posted (some of the stuff in his sketchbook just uses the ZB rendererer) show what you can get some nice results, but the only way to have control is to composite -- which is counter intuative when you are used to getting everything into a mapped realtime asset. You can see in his tutorial that he thinks in composites, same method if he's rendering with ZB or MR.

    ZB 3.5 is supposed to be out in q4 (hah), and the rumour has them working on maps and painting as a focus (putting in AO etc). Not a helpful post... but an "I feel your pain" one :)
  • pior
    Online / Send Message
    pior grand marshal polycounter
    Oh well as a matter of fact the material thing I am worried about is mostly for 'inside Zbrush' type of images. I basically feel uneasy knowing that I could lose work easily when working on some concept bust with funky materials applied (and potentially gone for good the next day). And for sure for a complex image I would export stuff out somehow and composite things. Who would want a weird distorted perspective anyways haha.

    Polypainting and basic shader effect are all I want from Z. As a matter of fact one can already sort of bake AO within Zbrush : by turning 'Cavity masking' it just a matter of airbrushing a light pass in the cracks. Sweet result actually! And it is also possible to bake the Zbrush 'look' (matcaps, shadows aso) to a texture map by simply using MRGBZGrabber on say a front view of a face, go to projection master, fill with the grabbed image, and pickup.
  • Michael Knubben
    Haha, guess what the girl said when she saw the picture? 'Hey, that looks like Pior!'.
    Further proof that you're in love with yourself ;)
  • Funky Bunnies
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    pior wrote: »
    I would almost expect Zbrush to save the actual material within the 'tool' to avoid such problems.

    I hear that. I tweak settings on shaders almost every project and I have to constantly go back in and change them even if they're applied to certain polygons. I'd like to avoid cluttering the materials with all the minor tweaks
    I've also had the problem with shaders disappearing when I added new matcap shaders. I'm still a bit confused if it uses the filename or the material index to determine which material you're trying to use. Maybe it uses both, I don't know.
  • pior
    Online / Send Message
    pior grand marshal polycounter
    Haha Peapea as a matter of fact my dad thought it was him when he saw an earlier wip. He put it as a wallpaper on his office machine and told me he liked how the wallpaper was stretch horizontaly (wip image was a square crop originally), making him even more badass and mean hehe

    FB yeah I stopped trying figuring these things out. I have the feeling that some of this stuff might stay (or disappear) thanks to the Store UI button that somehow captures states of the interface ... but not always hehe.

    Ill post a request on ZBC soon for a Material ID<>Material assignement plugin.
  • kary
    Offline / Send Message
    kary polycounter lvl 18
    Using it that way makes sense. I always focus on getting stuff out of ZB, but staying in ZB makes sense for concepts -- especially as you'd want to be able to see it from every angle. It's fairly painless to get one piece out and compositied, but a lot of angles would be irritating (though maybe it could be scripted).

    Some of the things you can do with the cavity masking (as you said, fill with white > cav mask > invert > fill with black > quick AO) are rather neat. Great method for getting the matcap look out, thanks :)
Sign In or Register to comment.