How to do an AO texture in Autodesk Maya 3d

Game Version: FS11 and later
GE Version: ? and later

Modding Index | Modding Tools Tutorials

In this tutorial I'll show you my way of doing AO texturing in Maya. NOTE: if you want to be able to properly use this on a mod a little knowledge of a detailed image editor (for example photoshop, or gimp) is required.

What programs do you need? [list] [li]Autodesk Maya 3D 2011 - 2012 - 2013 (I use the 2011 version)[/li] [li]An image editor like Photoshop or GIMP (I use Adobe Photoshop CS5.1 Extended Edition)[/li] [/list]

Okay, so for this tutorial I'm using an abstract shape of what looks like a car. The complexer your model the harder it is to texture it in your image editor.

Step1: First you will have to UV map your model. If it isn't too complex automatic mapping works fine. But to UV map a tractor you will have to use a different kind of mapping as you will have lots and lots of surfaces. Select the 'Polygon' menu bar, go to 'Create UV's and click on the kind of mapping you are going to use. If you need another type of mapping you might want to search the interwebz for some tutorials on how to do this.

Step 2: Now you have to apply the AO material to your model, go to 'Window > Rendering Editors > Hypershade'

When the hypershade is opened you have to click on 'Surface Shader'

then you go to the 'textures category in the 'mental ray' section and you click on 'mib_amb_oclusion'. Now you hold the 'ctrl' key on your keyboard and you drag the AO (ambient oclusion) layer onto the 'surface shader'. ATTENTION use your MIDDLE mouse button to drag the layer, that scroll-wheel on your mouse. If you don't have one you have to press both the right and left mouse buttons.

Now, left-click the AO layer, open the attributes editor and change the 'samples' to 256.

LEft-click your model and then right-click and drag on the 'Surface Shader' and chose the 'Assign Material to Selection' option. Now close the hypershade, you don't need it anymore.

Step 3: Go to 'Window > Outliner' and click on the 'persp' camera. Open the attributes menu and set the environment to white.

Step 4: Go to 'Window > Rendering Editors > Render Settings'. Change the 'render using' to 'mental ray', open the 'quality' tab and set the 'Quality Pressets' to 'production'. Now set the 'Filter' to 'Lanczos'. This will change the 'Quality Pressets' to 'Custom', don't worry about that ;) Close the render settings.

Step 5: Now you have to set the project folder, do this by going to 'File > Project > Set'. Then select the folder you want as project folder, your texture image will go in there. Then press 'Set'.

Step 6: Now we're going to batch bake the texture, open the 'Rendering' menu bar and go to 'Lighting/Shading'. Then click on the small square next to 'Batch Bake (mental ray)'.

Now set all the settings like shown here: Select your model and click 'Convert and Close'.

Step 7: Open the Polygon menu bar again and go to 'Edit UVs > UV Texture Editor', put the mode on your model to 'Face' and select all the surfaces.

Now put the UV Texture Editor window into full screen mode and zoom in so the square showing your texture map just fits into the grey 'viewzone'. Make sure you see orange lines on the shown texture map. Now take a screenshot, open your image editor (I use Photoshop), paste the screenshot and cut out the texture map shown on your screenshot. Now resize it to the exact size you set for your batch bake. I used 512x512px so I resize mine also to exact 512x512px. Now it should look like this:

Now open the baked texture image found here: '*PROJECTFOLDER*\renderData\mentalray\lightMap' and copy the resized image onto it. This will help you to find where every face is on the texture map/image and will make texturing easier. From here on it's just texturing/graphic works.

NOTE: I realy suggest an image editor like Photoshop, where you can save files while still keeping all the layers seperate. If you don't have Photoshop download GIMP, it's free ;)

Original Author: ar1g3 | Date: February 05, 2013

Modding Index | Modding Tools Tutorials