ZBrushCentral

Normal Map is Abnormal!

After three days of trying every possible combination and permutation, I can’t, for the life of me, generate an artifact-free normal map in ZBrush2. So, at my wits end, I have documented my miserable attempts in the hopes that someone in the community may be able to offer some insight.

The Specs:

I am using Maya’s native renderer which I have succesfully tested using the shading network included in the Killeroo file made available by the kind folks at Headus. (http://www.headus.com/au) I’m therefore quite confident that the shading network is not to blame as it works with a proper normal map.

The Workflow:

I modelled a low-polymesh tree stump in Maya, imported to Zbrush, stored a morph target, subdivided 7 times (with Smooth UVs on) and then proceeded to paint all the high freq detail. I then generated I normal map using Adaptive tiles at 2048K. (See screenshot with settings)

Finally, back in Maya, I converted the polygonal mesh into a subdivided surface applying the shading network from Killeroo and rendered using its native renderer.

The Problem:

The normal map suffers from abrupt interruptions that coincide with the polygonal edges of the base mesh. Curiosly, this phenomenon is not uniform - there are portions which span several faces where the texture is continuous. For example, note the portion that begins under the branch and continues upwards. This entire section is perfect and is what I am potentially after for the entire model… Any ideas? Your help is greatly appreciated.

The Images:

settings.jpg

HELP!

Attachments

base_mesh.jpg

subD_base.jpg

normal_as_color.jpg

zbrush_hi.jpg

normal_map.jpg

It looks to me like when you import the model back into Maya, the points are being reordered. This in turn causes the UV mapping to be changed, and affects how the texture wraps.

If you go to the FAQ>Other Applications section of ZBC, there is a thread about Maya. The tutorial in there by Paul Hourmouzis tells how to prevent Maya from reordering the points when you import your model.

Personally I’ve found it best to make the UVs in maya first before importing to ZBrush :slight_smile: The normal maps will then use the UV texture that came in.

Also what are you using to generate the normal shader in Maya 6? Or are you using 5 still?
HK

Thanks aurick, for your suggestion, I’ll try that and post my results, though I think the problem lies in the actual generation of the normal map within Zbrush as the map itself exhibits these discontinuities… I will also try the same on a model that is generated entirely in Zbrush to see if there is any difference.

HK - I’ll try your suggestion as well (I want to get to the bottom of this) though it would be sadly inconvenient if had to do the UV layout in Maya and not be able to take advantage of the automated and distortion-free adaptive-tile mapping in ZBrush! The shading network I’m using in Maya 6 is included in the attached file.

Thanks - I’ll post back with results.

Maya .obj export not compatible with ZBrush?

I followed Paul’s tutorial to the letter, but I was still unable to generate a non-fragmented normal map that would work in Maya. The discontinuities are obvious as soon as the map is generated in ZBrush, so I’m assuming that the the .obj file that Maya exports is missing some information that is necessary for ZBrush to calculate normal maps.

In order to corroborate this hypothesis, I went about creating a normal map for a model created entirely within ZBrush, eliminating Maya from the equation.

I used the 3Dterrain tool, converted it into a polymesh, detailed at level 6, and created a normal map.

As soon as the generated texture was wrapped around my base mesh it was immediately clear that this map had none of the discontinuity problems of my previous Maya attempts as the details were consitently smooth all the way around the model.

Next, I exported my base mesh and the texture, and got these files back into Maya. Curiously, attaching the normal map’s color channel directly into the shader’s normal camera, and selecting High Quality Render in the view port, works correctly. That is to say, that the Maya Hardware renderer can use this normal map information as is, without having to utilize a rectified shading network.

Here is an image of the result applied directly to the poly base mesh:
skin_normal1.jpg
Much better, the contrast is back.

In conclusion, it is strange that the best image is to be gotten from Maya’s Hardware renderer, though the corrected network yields acceptable results. Nevertheless, I am still unable to generate normal maps from a model that originates from Maya! This is less than satisfactory as even models that I create in ZBrush with ZSpheres, etc. always need some animation-friendly re-edging in Maya.

Anyone have any ideas? For other Maya users, do these results reflect what you have been getting?

My next test will be to export the Maya model .obj into Wings3D then re-export to see if this “missing info” is somehow recovered in the process…

For those who are interested, I’ll post the results of this test in a forthcoming post.

Attachments

skin_normal2.jpg

skin_normal3.jpg

skin_normal4.jpg

Here are the results of the aforementioned test: Though the final outcome appears better, I’m still getting faceting. :frowning:

trunk_img.jpg

Has anyone else has this problem? If so, how did you resolve it?

My next test will be to originate in Wings and see if I get the same results, also I’m curious to see what happens if I do the UV assignment inside maya instead of inside ZBrush…

Here are the tests assigning clean UVs from within Maya before exporting the model:

trunk_clean_checker.jpg

While it is not readily apparent, due to the softening of the jpeg compression, if you look carefully along the seams of the UV maps, those persky artifacts still show up. It would seem that ZBrush isn’t interpreting the edges of the UV shells correctly… So long as they’re sewn up, there is no problem, otherwise the texture gets fragmented along the edges.

Needless to say this is extremely frustrating. I purchased ZBrush hoping to include it in a workflow that originates with a model created in Maya. At present, given my results, it seems that my only alternative is to model exclusively in ZBrush…

If anyone has met with success in this area (applying normal maps, that is) utilizing Maya 6 I’d love to hear from you and see your results.

Thanks.

Attachments

trunk_cleanUV.jpg

trunk_cleaUV_super.jpg

For the record, I thought I’d try one last thing for today which was to take the previous 3DTerrain model - given that it works - and try to manipulate some vertices, cut some edges and extrude some faces then export that from Maya back into ZBrush for detailing to see if would be a suitable workaround.

Result? The normal map works fine in the faces that were unaltered, but all the faces I modified within Maya exhibit faceting. ZBrush just doesn’t seem to want to cooperate with Maya…

To conclude my battery of tests, I tried exporting a model created in Wings for detailing in ZBrush. Though it looks better to me than the same created in Maya, the faceting is still there! See for yourself:

wings_original.jpg

I believe I truly have tried every possibility I could think of with no clear solution in sight… Again, I renew my plea for help to all Maya users out there.

Attachments

wings_normal.jpg

so i’ve been using maya->mental ray with some degree of success. this is the shading-network i’m using:

http://www.headus.com/au/samples/norm-MR/

can you post an image of the uv’s you’re using? so, the normal map faceting is just along the seams? are you generating normal maps with smoothUV turned on in ZBrush? are you smoothing the polygonal model in maya, with smoothUV’s checked?

what are the zBrush settings you’re using for the normal maps? i’m using normal maps for objects that deform/animate, so i create tangent maps, with the adaptive button checked, and at a resolution of 4K. i also then export the lower subdivided model out of zBrush, back into maya, and then apply the normal map onto that model.

cheers,
-sunit

has anyone found a solution to this. i have the same problem. i’m using a mesh generated in maya. i import it -apply a 4k texture -generate AUVtiles -check texture with UV to Tex(perfect no broken seems) then when i generate the normalMap(tangent, adaptive 4k) i get facets i tried with and with out smoothUV same results. i’m not smoothing the object or UVs at render time.

help us zbrush gods

Have you applied the normal map in your rendering engine? Very often, facets that are visible on the normal map do not appear in the actual render.

thanks!
when rendering -the normal map looks far less faceted than i thought it would. but there are still some facets when you really scrutinize a still. when the model is moving it is really hard to see. – i’ll try to do more tests and post some pics. it’s good enough this way to get the green light on the production i’m involved in tho. doing cell shader stuff and it’s not noticeable at all.

seems to me the higher rez the normal maps are the less noticable the facets would be. what are your thoughts on that aurick? how many 4k maps would it take for a film rez humanoid character for no facets? or is it not such a big factor?