This tutorial walks you through a workflow that I have developed that allows you to create perfectly tiled normal maps on perfectly tiled lowpoly geometry, especially useful for cliff faces and rough stone surfaces.
Stage 1- create a height map in ZBRUSH
– First create a Ztool, I created a simple beveled cube in maya, then stamped some shapes into it in Zbrush and saved it out as a tool.
– Create a new document at the size of your intended map.
– Load the tool in and start drawing them on the canvas, draw them in empty space but don’t go over the edge of the document.
– Use the Tilde key(~ or @ if in the UK) to offset the canvas (hold it down and move the canvas so the centre is offset to the edges).
– Fill the space in the middle.
– Repeat until canvas is filled making sure no gaps are left.
– Click on “alpha” on the right hand side of screen and “grab doc”, this will give you a height map
– Export this to PS
– In photoshop double the size of the canvas and then copy the heightmap into the space so that you have a map that tiles twice
Stage 2- apply heightmap to flat plane
– Create “plane3d” and convert to polymesh
– Subdivide with “smt” off to roughly 1 mill or above for a 512* or 4 mill for a 1024
– Go into edit mode
– Import the doubled up map
– Making sure the alpha is in the alpha slot open the displacement dropdown in the tool menu
– Type in a value into intensity (I used ten, seems to give you roughly the same height as the document you made the heightmap in) and press the “apply displacement” button
– Export the tool as an obj at the top level and at the bottom level
Stage 3- re-jigging the LP
There are two methods for this and it depends on the shapes your making. and how optimised you need the finished mesh, for large cliffs then method 1 is generally fine, but method 2 takes longer but will provide more optimised and better shapes.
– Import the LowPoly into your package, im going to use maya but all the principles are the same across packages
– Select the centre quarter polys in the UV map (in maya I do this by selecting the four dead centre polys then expanding the selection till the correct polys are selected)
– Seperate these UVs
– Invert selection and move these outside 0-1
– Reselect the central UVs and normailse them so they fit exactly 0-1
– Re-export the OBJ
– Export a medium tiling mesh from Zbrush, something that your 3d app can cope with (say 20k polys)
– Build an optimised mesh over the top of this using it as a guide to get the shapes right, just model the centre section
– Instance the mesh 9 times one on each side and corener of the central mesh moving each one 64 units for accuracy
– Snap all the edge verts together, and merge the objects into one mesh
– Delete all the faces beyond the central tiling section leaving an extra poly on each side for correct seamage
– Setup uvs like in method 1 making sure the extra polys are outside 0-1
Stage 4- baking
Use whatever program to bake out the textures you need
Stage 5- re-jigging the low poly (again)
– Reload the objs, and apply the new maps you have
– Select all the faces outside 0-1 in the Uvs and delete
– Instance the objects and create and continuous tiling mesh
– Merge all the verts and smooth all normal
There you have it, a continuous tiling mesh.
Tip on speeding the workflow up
– Delete faces in the HP that you dont need beyond the centre section of the obj, being carefull to leave an overlap, this will speed up rendering times no-end