Vous êtes sur la page 1sur 11

Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

SEARCH: LOGIN:

Game Artist Forums > Main > Spotlight Articles


Tutorial: Ambient Occlusion in Maya - by Alchemist101

Register FAQ Forum Rules Members List Calendar

Page 1 of 5 1 2 3 > Last »

LinkBack (27) Thread Tools Display Modes

01-02-2007, 05:09 PM #1 (permalink)

benclark Tutorial: Ambient Occlusion in Maya - by Alchemist101


Industry Artist
AMBIENT OCCLUSION IN MAYA8 and
PHOTOSHOP
This tutorial covers the basics of how to setup and bake ambient occlusion maps in Maya8. The process is similar for
previous versions of Maya only the menu names will be different.

2,319 - 362 As with most things in Maya there are probably many different ways to do this but this method works well for me and is
reasonably quick to setup.

1. SETTING UP THE SHADER NETWORK

- First open the hypershade window and from the Maya nodes list MMB drag a Surface Shader node into the work area

1 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

- Now click on the "Create Maya Nodes" button at the top of the nodes list and change it to MentalRay nodes.

- Then under the textures tab MMB drag an 'mib_amb_occlusion' node onto the work area

- Now connect the 'OutValue' of the Occlusion node to the 'OutColor' of the surface shader. This is the default
connection between these 2 nodes so you can do this by simply holding down Ctrl and MMB dragging the occlusion
node over the shader node.

2. SETTING UP YOUR SCENE

- In order to get good results from Ambient Occlusion the scene environment must be white. To do this open the
Outliner window and select the Persp camera. In the attribute editor under the Environment tab slide the Background
Color to 100% white

2 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

- Now open the Render Globals window and select MentalRay as your renderer and Production as the quality preset.
Now change the multi-pixel filter to "Lanczos".
(this will automatically change your Quality preset to 'Custom' like in the picture)

- Now close the render Globals window and assign the 'Surface Shader' you have setup to your model. It should turn
the model completely black.

[/size]

3. TWEAKING

- Frame your model and hit render. It should render quickly and look quite grainy and crap at this stage, like this....

3 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

- Now we need to tweak the settings a little. Open the attribute editor and then in the Hypershade window click on the
Ambient Occlusion node. The Occlusion node's attributes will now appear in the attribute editor. These are the settings
I use for most objects...

- The first setting to change is 'Samples'. Increasing this will remove the grainy look but will drastically increase render
times. 256 samples is good for most objects.

- Do not change the 'Bright' and 'Dark' settings. These affect how light/dark the occlusion value is, but it is a lot better
to render with the default extremes and tweak them in Photoshop at a later stage if you need to.

- The spread setting affects how far the occlusion shadow spreads over the surface. Again the default setting of 0.800 is
good for most objects, any lower tends to be too extreme, and a high spread can cause darkening problems when it is
multiplied over your colour layers in Photoshop.

This image has been resized. Click this bar to view the full image. The original image is sized 800x279.

4. BAKING TO TEXTURE

4 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

Once you have the occlusion looking good in a render, the next stage is to bake it to a texture.

- First make sure you have specified a project folder. To do this select File> Project > Set, and select a file. This file is
where your baked texture will automatically be saved. If you forget to set a project folder the bake will be saved in your
default projects file in your My Documents folder.

- Make sure that you have UV mapped your model.


- Make sure you check the face normals of your model are facing the right way or the bake will produce a black picture
- Make sure you have softened the edges of your model and created hard edges where needed
- Save a copy of your scene at this stage as Maya can crash while baking to texture
- Now choose the rendering menu set and select Lighting/Shading > Batch Bake (Mental Ray) > Options box
These are settings that I use and have never had to change them, so they should work for most objects.....

- Select your object in the viewport and hit the 'Convert and Close' button to start baking the occlusion. When you do
this Maya will not respond to any clicking, sometimes the screen will go blank and it generally looks like it has crashed
but don't worry it will come back eventually. This can take anywhere from a few minutes to a few hours depending on
how complex the scene is.

5. USING YOUR BAKED OCCLUSION MAP

- Once the bake is completed open the project file that you specified earlier.

- In that folder select RenderData > MentalRay > Lightmap > select your baked texture file and open this with
Photoshop.

5 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

- Drag the Occlusion bake on top of your model's texture layer(s) and select Multiply as the layer blending mode. You
may also want to apply a slight Gaussian blur to your occlusion layer, especially if it being used on an organic surface.
For hard sharp edged surfaces like this one no blur was applied.

This picture shows the object and a basic 3-light setup with and without occlusion in the texture.
The effect of the AO map is to fake GI lighting in real time.

This image has been resized. Click this bar to view the full image. The original image is sized 713x387.

6. BAKING OCCLUSION FROM HIGH RES TO LOW


RES MODELS

Ambient occlusion maps can also be used to compliment normal maps. The occlusion values from a high poly model
can be baked to the UV layout of a low poly model. This helps to sell the normal mapped details if used in a subtle way.

This function is found in the transfer maps window under lighting/shading in the Render menu set.

6 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

As an example I will use this alien head model with normal map already extracted......

This image has been resized. Click this bar to view the full image. The original image is sized 720x440.

Now we will bake an ambient occlusion map to compliment the normal map...

In the Transfer Maps window....

1. Select your low poly mesh in the viewport and click add selected to load your target mesh

2. Do the same for your high poly mesh

3. Click the "Ambient" box

4. Use the settings shown (remember to specify a folder to save the map into)

7 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

The resulting Occlusion map looks like this....

8 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

Baking occlusion larger than 512x512 using this method can take forever so be prepared to wait a while

This map can then be taken into Photoshop and multiplied over the model's texture in the same way as before....

This image has been resized. Click this bar to view the full image. The original image is sized 799x470.

__________________
www.benjaminclark.net
My Sketchbook

The Following 25 Users ahriman, chinese_lover, CopticMike, Daltons, DigitalPutty, Dubbler, IchII3D, Jessart, jidus, JMChristopher, Kathar,
Say Thank You to benclark koogorah, llpsweetie, maxxart, MrTwister, requiem2d, SebastianK, ShoT, Taehoon, Talon, Thonz, tkaza, Vamediah,
For This Useful Post: yoyomon, ZASkaggs

02-02-2007, 10:52 AM #2 (permalink)

Thonz Wow, verry nice tutorial.


I'm a max user, but it helped me understand AO a lot better.
Senior Member Thanks!

234 - 13

02-02-2007, 04:27 PM #3 (permalink)

CopticMike AAAHHHH THank you SOOO MUCH!!! Im a maya user, and you really helped me out, now the occulsion mystery, has
been demystified! Thank you again
Senior Member __________________
To make your dreams come true, You MUST first wake up.

151 - 6

02-02-2007, 07:05 PM #4 (permalink)

st0lve To me, this looks kinda like a lighting map from 3ds max's render to texture feature, if you use a skylight that is.
Is there any difference? :O
Amateur Artist __________________
Lasse Pedersen | st0lve.net~ |Insurgency 2D\3D artist
85 - 1

03-02-2007, 12:07 PM #5 (permalink)

9 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

|Buddy| More like MR render AO in RTT but yeah You're right.


__________________
Frequenter She says the jungle... it just came alive and took him.

www.buddypowered.com

132 - 9

04-02-2007, 09:19 AM #6 (permalink)

SpaceRabbit Dumb question, but does your hi-res model require UV mapping, or just the low res. I was reading the documentation
for this in Maya 7 and they kept stressing that both models had to have cleam UV mapping which seems like such a
New Member waste of time to have to UV both your hi-res and low res.

Thanks for the info, and great tutorial!


3- 0

04-02-2007, 02:54 PM #7 (permalink)

benclark Thanks for the feedback guys, SpaceRabbit - nope you dont have to lay out the UVs on the high poly model

Industry Artist

2,319 - 362

04-02-2007, 08:20 PM #8 (permalink)

SpaceRabbit Snap, thats what I wanted to hear! Thanks Alchemist!


New Member

3- 0

05-02-2007, 07:36 AM #9 (permalink)

ghib Anyone have any ideas whether it's possible to bake an AO map from a normal or displacement map rather than using
a hi-res mesh. Current version of Illuminate Labs Turtle is able to do this as it bakes maps at rendertime. Would be
New Member handy to do this instead of importing massive polycount objects into maya.

3- 0

05-02-2007, 07:59 AM #10 (permalink)

Nysuatro So people use a ambiant occlusion for having shadows in there texture?

Amateur Artist

467 - 31

Page 1 of 5 1 2 3 > Last »

Bookmarks

Digg del.icio.us StumbleUpon Google

LinkBacks (?)
LinkBack to this Thread: http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambient-occlusion-maya-alchemist101.html
Posted By For Type Date

Ambient Occlusion For Maya Users :) - DVXuser.com -- The online community for filmmaking This thread Refback 07-05-2008 01:24 PM

Gamestepper Forums • View topic - How to Bake Ambient Occlusion in Maya 8.5 This thread Refback 21-04-2008 05:16 PM

occulusion map - cgTantra Forums This thread Refback 24-03-2008 06:11 AM

10 of 11 2010/01/10 08:23 PM
Tutorial: Ambient Occlusion in Maya - by Alchemist101 - Game Artist ... http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambi...

LinkBacks (?)
LinkBack to this Thread: http://www.game-artist.net/forums/spotlight-articles/1317-tutorial-ambient-occlusion-maya-alchemist101.html

Video Game Artist and Fan Community: Polycount: Maya AO maps This thread Refback 21-03-2008 11:18 PM

Gamestepper Forums • View topic - How to Bake Ambient Occlusion in Maya 8.5 This thread Refback 17-03-2008 09:29 PM

Problema de normales en un Batch Bake - CG-Node This thread Refback 17-03-2008 02:09 PM

Gamestepper Forums • View topic - How to Bake Ambient Occlusion in Maya 8.5 This thread Refback 17-03-2008 11:24 AM

2007 Brabus CL600 - Page 8 - CGCars This thread Refback 10-03-2008 04:37 PM

2007 Brabus CL600 - Page 8 - CGCars This thread Refback 10-03-2008 04:12 PM

2007 Brabus CL600 - Page 8 - CGCars This thread Refback 10-03-2008 04:12 PM

Gamestepper Forums • View topic - How to Bake Ambient Occlusion in Maya 8.5 This thread Refback 05-03-2008 06:07 PM

Video Game Artist and Fan Community: Polycount: Maya AO maps This thread Refback 04-03-2008 06:29 PM

CG-Links :: Maya :: Baking an Ambient Occlusion This thread Refback 02-03-2008 05:34 PM

Tutorial: Showcase your work with Clay Render - 3D Buzz This thread Refback 28-02-2008 08:15 PM

Team Bigun WIP Thread - Page 7 - Threedy Forums This thread Refback 17-02-2008 06:47 PM

Gamestepper Forums • View topic - How to Bake Ambient Occlusion in Maya 8.5 This thread Refback 16-02-2008 09:06 PM

CGTalk - Ambient occlusion dome lighting This thread Refback 15-01-2008 03:31 PM

Ambient Occlusion For Maya Users :) - DVXuser.com -- The online community for filmmaking This thread Refback 14-01-2008 02:25 AM

Ambient Occlusion For Maya Users :) - DVXuser.com -- The online community for filmmaking This thread Refback 05-01-2008 01:20 AM

Art-conventions - Dawn of Bugs This thread Refback 10-12-2007 02:03 PM

Ben Clark - Game Art This thread Refback 02-12-2007 02:37 PM

Tutorial: Showcase your work with Clay Render - 3D Buzz This thread Refback 25-11-2007 05:31 AM

Video Game Artist and Fan Community: Polycount: Maya AO maps This thread Refback 20-11-2007 07:31 AM

Video Game Artist and Fan Community: Polycount: Maya AO maps This thread Refback 30-10-2007 11:20 AM

Video Game Artist and Fan Community: Polycount: Maya AO maps This thread Refback 17-10-2007 04:51 AM

Video Game Artist and Fan Community: Polycount: Maya AO maps This thread Refback 12-10-2007 05:27 PM

Video Game Artist and Fan Community: Polycount: Maya AO maps This thread Refback 29-09-2007 10:00 PM

All times are GMT -5. The time now is 01:29 PM.

Contact Us - Game-Artist.net - Privacy Statement - Top

Powered by vBulletin® Version 3.7.0 Beta 4


Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2006-2008 Game-Artist.Net

11 of 11 2010/01/10 08:23 PM

Vous aimerez peut-être aussi