Home Technical Talk

My own ZBrush questions!

MoP
polycounter lvl 18
Offline / Send Message
MoP polycounter lvl 18
Yep, now it's my turn to ask about a few things Zbrush/3dsmax related...

I'm currently working on an animated character for university, it doesn't have to be anything spectacular, but I figured I'd do a displacement map in Zbrush for the mesh so I can rig/animate the lowpoly (source mesh) and just use the displacement map on top of a Turbosmooth modifier to fake the detail.

It's working pretty well so far... I have my stack all set up nicely in Max, works fine (gotta have Morph targets for lip sync and expressions too)... this is my stack like it appears in Max...

- Displace
- Turbosmooth (viewport 1, renderer 3 iterations)
- Skin
- Edit Poly (attaches/welds the body mesh to the head)
- Morpher
- Editable Poly (just the head mesh)

Now I've got the model all working fine in Zbrush and started sculpting... whenever I wanna export the displacement map, I go to the base level, revert to the source mesh shape (with it's own UVs), and export the displacement map.

When exporting the Displacement map, I have "Adaptive" selected, "Mode" selected, "Intensity" at 0 and "Mid" at 50 ... seems to work fine in Max.

HOWEVER!! The displacement map has all sorts of tearing/jaggy artifacts around the borders of the UV segments, which is causing problems unless I set Blur to about 0.4 in the Displace modifier in Max. I'd rather not have to blur or hand-paint out the errors.

Also, on the face displacement it seems to be creating weird little bumps and displacements which don't appear to exist on the zbrush model.

I can post screenshots if they'd help.

Oh and one other (vaguely unrelated thing) .. I've tried generating a normal map from Zbrush, too... it seems to work fine except that it's easy to see each individual polygon on the normal map, it's like it was rendered in Faceted mode - is there any way to smooth that or do you just have subdivide until they're not obvious? There MUST be a way to smooth those facets out, but I've looked in every place I can think of and can't find the option... Zbrush interface is really inscrutable at times smile.gif

Oh and I just remembered another another thing... how do you delete alphas or textures from their respective palettes? There doesn't seem to be a button for it, and you can't right click on them or anything... it's not a big problem but I just wanna get rid of images I'm not using anymore.

Hope that was understandable, I'm a bit tired! tongue.gif

Thanks in advance, arshlevon wink.gif

Replies

  • arshlevon
    Options
    Offline / Send Message
    arshlevon polycounter lvl 18
    never used the displace modifier.. when using displacement maps i always use mentalray for 3d displacement.. also zbrush seems to output a 32bit tiff.. and you need to convert this image from greyscale to rgb in photoshop for some reason for max to read it correctly.. so this is how i generally approach displacement maps in max using zbrush and 3d displacement..



    - Displacement map flipped vertically and resaved in Photoshop as 32-bit RGB TIF file, no compression, no color management applied or embedded profile.

    - Map loaded into material editor slot as bitmap, blur 0.01 (doesn't seem to matter with MR which ignores it, but good habit anyways to prevent banding if you use another renderer such as Vray), RGB offset -0.5 (map will look black, but it's not really and negative displacement is still there).

    - Using a second slot in the material editor, I applied a standard material with mental ray displacement shader unlocked (see heading mental ray Connection near bottom) and displacement map instanced as the extrusion map. Object Independant: checked / Displacement Length: 1.0 / Extrusion strength: 12.0(this is the value you change to make the map more or less intense, i always have to change this value depending on the model) / the rest at default.

    - For render options in the mental ray render under shadows and displacement settings - View: Checked / Edge Length: 1.0 (higher speeds thing up but lowers render quality, lower setting slows things down but improves render quality) / Max Displace: 15.0 / Max Level: 6 (play around for best speed to render quality ratio)

    whew! mush faster when you do it.. i use it this way because i have a mental ray material that lets you actally morph the displacements..(and i hate the scanline renderer) so when doing facial animation i can have a displacement for each morph target and get cool little things like wrinkles and stuff that would look dumb with a bump.. and mental ray dosent support morpher material..
    (i can share this material if you want it)

    for normal maps i generally just up the divisions until you cant notice the polygons.. its not like zbrush cares too much and it dosent take very long to generate a normal map compared to max.. they kinda suck tho unless its a small detial normal map.. like a normal map from the 3rd subdivision to the 5th or something.. going from the 1st level up comes out bad..

    i dont know about clearing alphas...i kind of want to do this too.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Awesome, Arsh. Thanks for that - Actually I forgot to mention I'm using Mental Ray anyway, so that Displacement thing sounds perfect. I'm using the SSS skin shader for translucency, does the displacement thing work with that too? Where should I put it, in the Bump slot at the top, yeah?

    I might try doing the displacement morph material too, does that mean painting different displacement maps for each morph target?
    If you could share that MR material, that'd be a great help smile.gif

    Oh and I'm saving the displacement maps from Zbrush as .BMP files, and you can just do the Y Flip in the Alpha palette of Zbrush, so I can just skip that Photoshop flip/convert step - unless images have to be TIF to be read by Mental Ray?
    Anyway, thanks man, you rock! wink.gif
  • FAT_CAP
    Options
    Offline / Send Message
    FAT_CAP polycounter lvl 18
    I think that it is only .TIF images that can be saved out of ZBRUSH as 32-bit images. I found that I got "steps" in my displacements when exporting them as either .BMP or .PSD - even though the files looked pretty much the same to the nekkid eye, the extra bit depth helps smooth out the displacement alot apparently.

    I have had these "jaggy" high contrast areas around my ZBRUSH displacements aswell and no-one on the ZBRUSH forums seemed to know what was causing it really... I will check the maps I got in the end to see if I got rid of them or just worked around them. Have you tried setting the "edge-padding" (can't remember what it is called in ZBRUSH) to a higher value perhaps?
  • Jhotun
    Options
    Offline / Send Message
    Jhotun polycounter lvl 18
    The photoshop step is unavoidable because of the Grayscale TO RGB conversion. So well, create an action to do the flip, the conversion and the save and you got it. What you never must do is to flip the max inside max, i mean, putting the Tile to -1 into the bitmap. This will for sure give you headaches laugh.gif

    I do not use the mental ray displacement modifier because of i do not know how to configure it properly to have fast renders, but the Displacement modifier works very well for me. If you want to take a look at a tutorial a made some time ago, just head on to my webpage and go to the tutorials. I´m spanish but i wrote it in english, so excuse some mistakes that could be there.

    I found that using the SSS Fast skin material, its Bump slot and the displacement modifier does a very good job for fine details without subdividing too much the mesh.

    I always use Tiff files, but i think that bmp are ok too.

    About the alphas, i think that there is no way to delete them from the palette, but well, i should not be a problem to have them there. Also, take a look at this zscript: http://www.zbrushcentral.com/zbc/showthread.php?t=30425
    It looks very useful.

    Oh, and about the seams on the uvs, just hit the Fix seams button on the geometry panel (i´m not sure it it is there, but for sure exists smile.gif)

    Hope that helps in any way laugh.gif

    Cheers
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Jhotun, FAT_CAP, thanks! smile.gif

    That was a lot of help, for a start you've fixed the seam problems - it's the "Fix Seams" button in the Texture rollout, although you have to convert the Displacement map to Texture first, but that's easy. So I just put "FSBorder" up to maximum, then hit "Fix Seam".

    JHotun, the way you describe using displacement and bump with the SSS skin material, was the way i was gonna do it anyway - ie. use Turbosmooth and Displace modifier up to 3 subdivisions to get all the main shapes, then export another displacement map from Zbrush starting at SDiv3, to get only the fine details, then apply that as a bump map in the material.

    If Arshlevon's way works faster and produces the same results though, I'll do that - I just don't know how to set up the Mental Ray Displacement thing in association with the SSS Skin material.

    I always flip the texture vertically in ZBrush before Exporting it, and the "Convert to RGB" step in Photoshop seems unnecessary, I compared the BMP exported and the TIF, and they appear to be identical... or at least so close as to make no difference. I think I'll just skip the Photoshop step entirely, except maybe when it comes to generating the "final" displacement maps.

    Thanks guys, helped a lot! smile.gif
  • Jhotun
    Options
    Offline / Send Message
    Jhotun polycounter lvl 18
    I´m glad I had helped smile.gif

    In my experience, MR has to be fine tuned to get what you want with reasonable render times, but for sure it works. In the forums at ZbrushCentral there is a very long thread with people rendering displacement maps in all kind of render engines. Just do a search there with something like "Rendering displacement maps in external renderers". For sure you will find there some more help.

    Also, i have to test to combine normal maps, bump and displacement maps. I do not know how it would end, but i do not see why it should not work smile.gif

    Oh, and about the Grayscale to RGB, well, if it works for you then it is ok, but if you find problems somewhere, that could be the first thing you should check.

    Cheers
  • FatAssasin
    Options
    Offline / Send Message
    FatAssasin polycounter lvl 18
    [ QUOTE ]
    If Arshlevon's way works faster and produces the same results though, I'll do that - I just don't know how to set up the Mental Ray Displacement thing in association with the SSS Skin material.

    [/ QUOTE ]

    There's actually an MR shader called "SSS Fast Skin Material + Displace" which I think is what you want. I haven't tried a displacement map with the skin shader, but I have tried using a normal map in the bump slot and it works good.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Ah, good point FatAssasin... I'll check that out when I get back.
    I did a quick render test with the MR Displacement thing on a standard material and the result seemed very... pixelated. I think I'll stick with Turbosmooth and Displace modifier for the time being - I don't need ridiculously fine detail anyway.
  • Jhotun
    Options
    Offline / Send Message
    Jhotun polycounter lvl 18
    hahaha, that is what i tought the first time i did it with MR " Who the hell needs displacement in MR when you can subdivide to 4 with turbosmooth!"

    Take MR with a bit of salt and a some galons of beer laugh.gif

    Cheers
  • arshlevon
    Options
    Offline / Send Message
    arshlevon polycounter lvl 18
    http://206.145.80.239/zbc/showthread.php?t=20310&page=1&pp=15

    check that out mop.. you will notice the mentalray renders blow the displacement modifier ones out of the water.. so much detail is lost with the displacment mod .. this is the main reason i wont use the displacement modifier because it seems to dumb down the maps.. and if you wait a few days the offical zbrush to max pipeline doc will be up on zbrush central.. i am sure there will be all kind of goodies in there..
  • Jhotun
    Options
    Offline / Send Message
    Jhotun polycounter lvl 18
    Zbrushcentral is a great place to stay at the top in which refers to zbrush to other 3d apps. The guys at pixologic are working very hard to make our lives easier, and you know guys, this can´t be paid with money smile.gif
    Also, there are a lot of excelent zscripters right there.

    Good times for 3d artists smile.gif

    Cheers
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    OK, I'm digging this up because I realised why the displacement map was coming out "stepped" when rendered with Mental Ray displacement.

    Basically it's because when you make a Displacement Map in ZBrush, it puts it in the Alpha palette as a 16-bit greyscale image... but then if you MakeTx on it, it converts it to 8-bit, and from what I can see there is no way round that.

    It's kinda stupid really, because to use the Fix Seams button in ZBrush, you have to MakeTx, since you can't Fix Seams on an Alpha. So then even if you convert the Tx back into an Alpha, it is of course at reduced bit-depth.

    This kinda sucks, because I wanna use the 16-bit image, but that image has nasty artifacts along the seams... when the seams are smoothed, that's fine for use in the Displace modifier in Max, but you can't use it for Mental Ray displacement.

    Bah! frown.gif

    Does anyone have a clue how I could fix the seams easily and effectively (ie without painting them all in Photoshop), without losing the bit depth of the displacement map?
  • arshlevon
    Options
    Offline / Send Message
    arshlevon polycounter lvl 18
    mop, the reason max converts it to an 8 bit image is becasue max can only read 8 bits per channel. zbrush exports image files useing 16 or 32 bits per channel.. thus your displacement map is 16-32 bits, but if take it into photoshop you will notice it only has one channel, this is why you have to convert the image to rgb, 8bits per channel.. then the image is a format max can read because its 8 bits per channel and there are no more stepping issues..(this is the way i have found around it)it dosent seem like this way should work but it does.. and i have had better results using a 32bit image to start with and then converting it to rgb..

    for seams you can use make sure smooth uv is on and if that dosent work for you then make the displacement map your texture in zbrush and go to the texture menu and hit the 'fix seam' button.


    also i got this tip from some of the other pipline docs written and it works pretty good.. delete your top 2 subdivision layers and render a displacement map, make sure your DPSubXix spinner is set to 2(in the displacement rendering settings) as to smooth the mesh 2 addtional times at render time to get rid of any pixelation that might occur in a lower subdivision model. also make sure the "MODE" button is on in the displacement map settings. if this button is on you will render a displacement map, if it is off you will render a bump map. now render your displacement map...

    then undo the delete or reopen the model and delete all the lower subdividions except the higest 3.. so if it has 6 subdivsions goto subdivision 4 and delete lower. now render another displacement map(make sure the "MODE" button is OFF) use this map in your bump channel. the results are better acuttally because some of the finer details always seem to be lost in max's displacement.. but the bumpmap method makes up for it greatly.
    try it out and see if it works for you.. i have been getting stellar results.. i also would like to try the last step but render a normal with the new zmapper because they are so sharp and crisp i think it would be way better and just using a dumb ol' bump.
Sign In or Register to comment.