Hi all,
I’m trying to generate normal maps for use with low-poly models in a real-time game renderer. Idea is to use ZBrush to smooth a model, paint hi-freq details and export the normal maps.
The problem is that these ZB-generated normal maps appear to encode only high-frequency detail that was manually painted on the divided mesh, but not the “smoothness” obtained through the division process. I figure that these normal maps are made to apply to tesselated cages but not the cages themeselves. That’s fine for other purposes, but in a game renderer I need the normal map to also compensate for the lack of smoothness of the low-poly model.
Please tell me that this brilliant peace of software has the feature I’m looking for.
Help!
Have you tried making a single smooth group, or all the normals ‘soft’ on your low-poly object?
That should do what you require.
Hi
By default, the tangent normal-maps are created for a subdivided (smooth) cage. ZBrush can generate normal-maps for the unsubdivided (faceted) cage but this feature can only be accessed by a ZScript. I’ll write and post this ZScript+information by Monday/Tuesday.
Note: The differences between the smooth and faceted cages only impact the tangent (relative) normal-maps, world (absolute) normal-maps are not cage-depended and remain identical in both cases.
-Pixolator
Well, I can see that by Monday you will sell another copy of ZBrush.
Thanks!!!
It’s also very nice to see the mastermind helping a newcomer; hey, there are just too many positive things about ZBrush
> Note: The differences between the smooth
> and faceted cages only impact the tangent
> (relative) normal-maps, world (absolute)
> normal-maps are not cage-depended and
> remain identical in both cases.
True, but fixed normals wouldn’t help an animated video game character (somebody correct me if I’m wrong) that has to make do with one normal map through all his life.
Which raises a point about ZB that it is not very game developer-friendly. Indeed, game-related posts are few and far between on this forum. It’s a pity, considering ZB being such a revolutionary tool, of great value to both interactive and slow-rendering crowd.
Hi
Here is a ZScript which will create the tangent based, un-tessellated normal map (to be used in a real-time game engine such as the one you described).
Click here to download the ZScript, extract the zip file and place the ZScript file in the ZScript folder, then execute a mapping test and check if the map created by this script is more compatible with your real-time renderer.
Testing this script…
- Launch ZBrush.
- Create or load a tool with subdivision surface ready to be normal-mapped.
- Adjust the normal map modifiers in the tool
NormalMap subpalette. (Set NMRes and press/unpress the Adaptive button)
- Load the ZScript and press the Make RTG NormalMap in the ZScript window.
- Export the low-poly mesh and the newly created normal map and test these in the real-time renderer.
Hope this helps,
-Pixolator
Thanks for the help!
We tested the script and it does exactly what it should, and it’s fast too. Unfortunately we haven’t been able to make it suit our needs, for the reasons I will try to explain below. Since I could not trouble you to ask for more functionality, and also due to our time constraints, we had to resort to less preferable tools to do the job. However, we seem to have successfully incorporated ZBrush in our pipeline (though it’s not the most elegant one at the moment). Thanks again.
Here are the observations on using the script.
First, the generated normal maps look perfect, with no artifacts or errors where other normal mappers fail. (I guess ZB here benefits from its knowledge of the low- and high-poly data it works with, whereas other software must work with zero assumptions.)
Second obvious thing is the “faceted” appearance of the generated normal maps, with visible discontinuities along each polygon edge. As if the tangent space for which they are generated is “per face”, not per vertex; ie. it’s not averaged accross neighboring faces. Since the algorithm we use to compute tangent basis per vertex works differently, the resulting shading when combined with these normal maps is wrong.
One solution would be for the zscript to output the tangents in a separate file (perhaps a low-poly .obj file with the tangent vectors in the comments), as the simplest way to ensure compatibility between the tangents and the normal map.
Then, there might be a question with these “face” space tangents about vertex sharing. It wouldn’t be good for a game engine if they would require separate instance of the same vertex repeated for each neighboring face.
I hope that at least I clarified some issues for anyone interested in the subject. Any ideas for keeping this thread alive and useful are welcome.
Igor