Friday 28 February 2014

ZBrush Sculpting and Texture Maps


Sculpting in ZBrush


          Whilst preparing to animate once I had received the environment sent to me from David, I began finishing off the character sculpt I started several days ago. All that is left is to do the sculpting for the sword a little later on.

I began the process by importing the meshes separately as sub-tools so that I could work with high levels of subdivisions without having tens of millions of polygons on the screen at the same time; I just hid the sub-tools that I wasn't working on.  I would like to say I recognise that although my mesh is far from being organic, I don't think what I was doing could be strictly defined as hard-surface sculpting, as that tends to include the use of slicing into a mesh at hard angles using slice, curve and clipping tools in ZBrush, however the final result I was aiming for wasn't organic by any means.


I had been advised by David that the best brushes to work with for the type of stone ageing and damaged effect were 'clay tubes' and 'mallet fast'. These brushes worked great, and I also discovered a technique for making cracks using the 'dam standard' brush to make sharp and deep cuts into the mesh, and to then use the 'pinch' brush to pull the edges in, making it even more sharp. I'd then chip away at these cuts with clay tubes brush to make it look more stone like. Using these brushes I worked over the whole character.

The higher amounts of detail and more realistic cracks were put in through the use of alphas in ZBrush. ZBrush had no alphas that were helpful to my character, therefore I had to learn to make my own. Taking a few different types of cracked textures from a Google image search and placing them into Photoshop, I played with the levels and contrast until the cracks were dark and the rest of the information was washed out. Once imported to ZBrush I used the 'inflate' brush on the character as to not affect the mesh structure and push the alpha through onto it.


Cracked Alpha 1

Cracked Alpha 2
Whilst sculpting there was an issue with the reversed side (or back face) of the mesh being affected if I sculpted too deeply into the front of the mesh. I tried smoothing out the side that I didn't want to be affected, but this removed the details I wanted on the front side too. Thankfully I have a friend, Josh Williams, who does character modelling and uses ZBrush a lot for it. After speaking with him he suggested turning on 'back-face masking', an option hidden in the brush menu. This solved the issue instantly and there was no longer accidental sculpting on both sides of a mesh.
Another issue I had was only found after I had baked out the normal map. I was using a feature in ZBrush called 'noise' in the surface sub-menu. With a bit of tweaking on the graph this feature was great for producing tiny chips. I didn't realise that you had to press the apply to mesh button, and until you do the feature was only visually represented within ZBrush and would not be included in the actual mesh export. I noticed it when I couldn't see the detail in the normals, and so had to apply the noise in ZBrush and re-export the meshes and re-do the normals. It wasted about an hour, but at least I've learnt this for next time.

Inside ZBrush
Inside ZBrush
Normals applied to Low Poly

Normals applied to Low Poly

Normals applied to Low Poly



Texture Maps


          For the diffuse map I plan on using ZBrush's poly painting tool. For everything else xNormal was used. The size of the maps will be x2048 as I plan to carry as much detail from the sculpting across as possible, without using excessive sizes like x4096.

For the normal map I checked the results of xNormals on default (see fig. 1). They were decent but I found a few issues, such as stepping in lines caused by only a 1x Anti-Aliasing as well as information from a different part of the character leaking onto another part. I realised this was because they were in very close proximity of each other. To better this I changed the Anti-Aliasing to x4, the edge padding to 8 (16 seemed excessive) and the 'maximum frontal and rear ray distance' both to 1 instead of 0.5 (see fig. 2).

Fig. 1  Normal map with issues highlighted in red. - xNormals on default settings
Fig. 2 Normal map, issues resolved. - xNormals with 4xAA and Ray Distance set to 1
The AO map has similar issues, with ray information being applied to other close proximity meshes (fig. 3). This was solved by the ray distance being set to 1 just like in the normal maps. For the AO I looked at a guide found on the internet which suggests good settings to work with for the best results, which indeed did produce better, more detailed results (fig. 4).

Fig. 3 AO issues highlighted in red - poor detail and mesh clipping
Fig. 4 AO with solved mesh clipping and much greater detail.

Finally I produced a cavity map extracted from the normal map. I'll be applying this and the AO to the diffuse once I've created that using poly painting.

Fig. 5 Cavity map extracted from the normal map
          Animation is my priority since I have now received the environment models and package for UDK. I will be working on the animation and alpha-state diffuse textures ready for the coming presentation.

Bibliography

Donald Phan. (N/A). Ambient Occlusion in xNormal. Available: http://www.donaldphan.com/tutorials/xnormal/xnormal_occ.html. Last accessed 28th Feb 2014.

No comments:

Post a Comment