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
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!
Thanks in advance, arshlevon
Replies
- 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.
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
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!
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?
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 )
Hope that helps in any way
Cheers
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!
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
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
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.
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.
Take MR with a bit of salt and a some galons of beer
Cheers
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..
Also, there are a lot of excelent zscripters right there.
Good times for 3d artists
Cheers
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!
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?
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.