Adverti horiz upsell
Realistic cobblestone texture with normal, spec, AO maps using CrazyBump
Realistic cobblestone texture with normal, spec, AO maps using CrazyBump
GTJuggler, added 2009-01-02 13:56:12 UTC 36,402 views  Rating:
(3 ratings)
Page 1 of 1

Next-Gen Materials
Written by Alex Schwartz -
WPI Game Development Club

Much nicer looking PDF located here:

This tutorial will guide you through the creation of a 3d mesh in Maya that will be used for a repeating material. It will include instructions on how to create the model and then obtain a color map and normal map from said model. These files will then be used to create other advanced maps, such as a specular map, ambient occlusion map, and displacement map for use in a next generation game engine.

Section Outline
    Create the cobblestone mesh in Maya
    Render out a color map
    Render out a normal map
    Extrapolate other maps using Crazy Bump

 click for larger version


1.    Open a new document in Maya. Your grid should be set to the default settings, so there is a grid line every two units, making the grid 24 units x 24 units. Create a poly plane and make it span from corner to corner of the grid, essentially making a 24x24 grid centered on the origin. Use grid snapping as seen below to make the poly plane align perfectly to the grid lines. Name this plane grout.

2.    Hit the 6 key to switch to shaded mode. You should see your solid grout plane.

3.    Now create a poly cube that is 4x6x3 units, in the shape of a brick. With the brick selected, go to the polycube1 tab and change the Subdivisions Width to 3, Subdivisions Height to 2, and Subdivisions Depth to 3.

4.    Now we will warp this cobblestone into something more non-uniform. Select the cube, go to the Proxy menu and pick Subdiv Proxy.  This command allows the user to modify a low poly version of an object while simultaneously seeing the smoothed mesh side by side. A smooth version of your box should be created but it will be placed inside the original box. Move the un-smoothed box off to the side so you can see both the smoothed version and the angular version.

5.    Move the vertices of the low poly cube around in a random fashion to add variety and lessen the regularity of the shape. You can do this by right clicking on the cube, and picking Vertex. This will place you in vertex editing mode. From here, just select any vertex and use the W tool to move it in a direction.

6.    Once finished warping the cobblestone, duplicate it to make a second copy. Move the vertices of this new cobblestone to create a new unique stone. Create 3 or 4 different stones.

7.    Once you have a few unique stones, duplicate these to create a varied grid of stones that covers the entire length and width of the plane.  Rotate and scale the stones differently to give variation. Do not make a perfect grid of stones. Make sure to place rocks outside of the bounds, as the eventual goal of the project will be to make a repeating, tileable material. See below for an example.

click for larger version

8.    Lower all of the stones so that the plane cuts the stones evenly in half. At this point, the plane will represent the grout or dirt between the stones. Refer to the picture below if you are unsure of how this should look.

9.    At this point we will need to combine all of our rocks into a single mesh. Select all of the stones and pick Mesh -> Combine from the menus. Once you combine your mesh, now is a good time to delete history. Go to the Edit menu and pick Delete All By Type → History. This will erase the previous history regarding each separate stone. Click on your newly combined stone mesh and name it stones.

10.    Now we will apply a stone texture to the stones. Load the following sample stone texture into Maya. It can be downloaded here: https://gtproductions/files/cobblestone/cobble_stone.tga
It will be added into the Hypershade as a new Lambert texture. To do this, open the Hypershade window under Window -> Rendering Editors -> Hypershade, click on Lambert, and in the materials properties, click on the checkered box next to color and pick File.  A slot will open up for loading in a texture. Click to load in a new texture. Find the cobble_stone.tga and choose it.

11.    To apply the texture, middle-click drag the material from the Hypershade onto your stones. You can leave the plane untextured for now.

12.    Now you will need to UV-map the stone mesh. Go to the Create UV menu and pick Planar (Option box).  Pick the option for Project from the Y axis and hit Project. The texture should span equally along all of the stones. You can also apply a grout texture to the grout plane for use in the color map render.

13.    Now we can set up the camera for rendering.  Go to the Create menu and pick Cameras →  Camera.  Go to the Camera1 properties tab and enter -90 for the first (X) rotation value. This will aim the camera downward. Change the second value (Y) of the Translate field to 37. This will move the camera upwards, facing down.

14.    Modify your render settings by choosing the icon in the top right hand side of your toolbar that is highlighted below.

15.    Set your renderable camera to camera1. Go to the Image size pull-down and pick Presets: Custom. Enter 512x512 in the Width and Height. Click the Maya Software tab and choose Quality: Production Quality.

16.    Do a test render by picking the Render button as highlighted below. Make sure the stones completely fill the frame. Adjust the camera or stones to achieve what you think will be close to repeating (A stone as it goes off frame to the left should have an equivalent stone coming into frame from the right.

17.    Save your color map render by going to file save. Pick TGA as the file format and save it on the desktop as cobble_render_c.tga. The _c denotes that it is a color map.

18.    Duplicate your grout plane by hitting Ctrl-D. Move your new plane to an inch or two below the rocks mesh. Make sure it is not intersecting. Name this plane normalMapTarget.

19.    Hide your grout plane by selecting it from the outliner and hitting ctrl-H.

20.    Switch your menu set to the Render menu set. (See below)

21.    Go to the Lighting/Shading menu and pick Transfer Maps. We will set the settings to render a normal map from within here.

22.    In the Target Meshes section, you will be including the meshes you wish to transfer your normal map onto. This mesh will be the normalMapTarget plane. Select your normalMapTarget object from your outliner and then hit Add Selected.

23.    Go to the Source Meshes section, select your stones object and hit Add Selected. This will add the stones mesh as the primary source mesh for generating the normal map.

24.    Under the Output Maps section, look just below the 7 map icons. If there is a map pre-existing, hit Remove Map. We just want one normal map, so click the Normal icon and a normal map will be added.

25.    Change the File Format to TGA, check the include materials checkbox and make the map space Tangent Space. Make sure use Maya common settings is checked.

26.    Under Maya Common Output, you will see the Map width and height. Do not make these over 512 for now, as it will take a long time to generate. Change Sampling quality to High.

27.    Hit Bake and Close. This may take a minute or two to render. Check the output file to see if it looks like a proper normal map. If you dont see cobblestone shapes, try modifying the search envelope settings in the Transfer Maps window and try again.

28.    Now that you have a normal map, open up CrazyBump. You can download a free 30 day trial of CrazyBump at the developers website: You can also try out other normal map authoring tools such as ShaderMap Pro and find one that suits your needs. For this tutorial, I will be explaining how to use CrazyBump.

29.    Once CrazyBump is open, hit the Open button in the lower left hand corner. Click on Open Normal Map from file. Find your newly created normal map and select it.

30.    From here you will be presented with CrazyBumps interface. It is pretty self explanatory, but try experimenting and begin tweaking some settings and watch how the sliders change the live preview. Make sure to turn on the ambient occlusion setting in the options of your Preview window. You will be able to see your AO changes in realtime with this checked. With a few minutes of adjusting, you can make some really unique and beautiful textures. Once you are satisfied with the look of your texture, hit the save button and you can save all of the maps to your hard drive. From there, just apply them to an object in the game engine of your choice (UE3, CryEngine, Source, etc.).

Happy texturing!