Latest
|
Search
|
Go
Edit this page
|
Attach file
Home
|
Tutorials
|
Technical Reference
|
Runtime
|
API Documentation
|
AmbientOcclusion
ContentCreation
Reference & Documentation
TutorialVideos
RealityBuilder
MaxShaderPlugin
MaxToolsPlugin
MayaPlugin
MayaExportingGuide
Builds & Tools
RealityBinaries
Melody
Level Development
MakingYourFirstLevel
PrefabsOverview
InstancingPrefabs
LightingTutorial
IndoorOutdoorLighting
AmbientOcclusion
StaticShadowMapping
ShaderUsage
SceneOptimizations
PhysicsSystems
TerrainGuide
BreakableObjects
MultishapeActors
RigidActors
JointsEditor
SoundFX
WaterTutorial
MixMapTutorial
DynamicSkyTutorial
MiscTopics
CreatingDecals
ShaderWriting
ScriptWriting
Game Sample Programming & Objects
VSNetExpress
SharpDevelopTutorial
NovodeXPhysics
GameModules
ActorHierarchy
EvalKit
ScriptingSystem
DemoPlayer
ThirdPersonCamera
RagDolls
NetworkingSystem
ClientNetworking
ParticleSystems
PhysicsSystems
CreatingGUIs
CreatingVehicles
CreatingWeapons
Guidelines & Specifications
NormalMapping
SkinnedCharacters
SkinnedMeshes
TextureGuidelines
BumpMapping
SoundAndMusic
SphericalHarmonics
PrtGuide
HardwareGuidelines
External Links
The Art of Level Design
Common Sense vs Level Design
Creating Normal Maps with ATI Tools
Ambient Occlusion
Tutorial Author:
Clifton Poli
Description
Workflow
Global Illumination
Description
Workflow
Description
Ambient occlusion is a simulated indirect illumination, or you could say a very crude (0th order, or average) approximation to full global illumination. This tutorial is for 3ds max 8.
Types of assets that you should use AOM on: Most any standard prefab, large, medium, and small depending on complexity. Physics object models, large, medium, and small (if they are complex enough that using AOM would improve their appearance).
Types of assets that you should not use AOM on: Anything that is animated, anything that is so small and simplistic that you cannot tell if there is an AOM on it or not.
Workflow
1.
Export geometry/prefabs from RB, import into 3ds max. (this step is not needed if you already have the asset's original max files)
2.
Use the Unwrap UVW modifier to Unwrap the 2nd channel uvs as necessary. No overlapping, no tiling, no mirroring, 0 to 1 ratio only.
3.
Open up the render dialog window (f10). Click on the Common tab. Under the Assign Renderer option drop down list change the production option to mental ray renderer.
4.
Select the object you want to create an aom for, open up the render to texture dialog (0). Under the Mapping Cordinates section make sure the Object option is set to 'use existing channel', and set it to Channel 2.
rendertotextureexample1.png:
5.
Now scroll down to the Output section, click on the Add button and select the Ambient Occlusion (MR) option, click add elements.
6.
Now under the Selected Element Common settings, choose your filename and save directory, and your texture size. Now under the Selected Element Unique settings you will see options for the ambient occlusion renderer. The settings I have found to be good is, 64 for rays, and 1 for spread. Note that falloff only works if you are also using the Max dist. setting.
7.
Under the Baked Material section, check the Render To Files Only box. Now hit render. Once it is done you are ready to open up the texture in photoshop to save it as l8 dds format, and then to load it up into a lightmap.fx shader and apply it to your prefab in RB.
rendertotextureexample2.png:
Here is some examples of the rendered output, and an example of it displayed in RB on the prefab:
aomtutexample1.png:
aomtutexample2.png:
Global Illumination
Description
Since the Mental Ray Ambient Occlusion renderer does not support opacity/transparency maps we have to use a different method when generating AO on prefabs that use alphablend/test textures. That method is radiosity aka global illumination. This method results in more detailed and smoother shadows and includes the ability to render shadows from opacity/transparent textures/shaders, however this is at the expense of greatly increased rendering output times.
Workflow
1.
Export geometry/prefabs from RB, import into 3ds max. (this step is not needed if you already have the asset's original max files)
2.
Use the Unwrap UVW modifier to Unwrap the 2nd channel uvs as necessary. No overlapping, no tiling, no mirroring, 0 to 1 ratio only.
3.
If the object is using alpha textures, open up those textures in PS, and save out the alpha channel to its own texture file, any uncompressed format that max supports will do. Then in max, open up the material editor and create materials for each unique material id and add the opacity texture you created too the opacity slot under the maps section. Apply these materials to the proper material ids on the object. You should then see them being displayed correctly in the viewport.
4.
Add a skylight too the scene, set its skycolor setting to pure white. The position, and orientation of the skylight has no bearing on the output.
5.
Open up the render dialog window (f10). Click on the Common tab. Under the Assign Renderer option drop down list change the production option to Default Scanline Renderer. Then go to the Advanced Lighting tab and select Radiosity as the advanced lighting technique. Under the Radiosity Meshing Parameters make sure Shoot Direct Lights, and Include Skylight options are checked, and that all other options are unchecked. Then under Rendering Parameters make sure Render Direct Illumination is selected.
6.
Select the object you want to create an aom for, open up the render to texture dialog (0). Under the Mapping Cordinates section make sure the Object option is set to 'use existing channel', and set it to Channel 2.
7.
Now scroll down to the Output section, click on the Add button and select the ShadowsMap option, click add elements.
8.
Now under the Selected Element Common settings, choose your filename and save directory, and your texture size.
9.
Under the Baked Material section, check the Render To Files Only box. Now hit render. Once it is done you are ready to open up the texture in photoshop to save it as l8 dds format, and then to load it up into a lightmap.fx shader and apply it to your prefab in RB.
Tip
It is possible to render multiple objects at once, simply set up each object's render to texture settings, and then select all of the objects, and hit render. It will then proceed to render each one in a row, or sometimes even 2 at once. This should not effect the output. (this applies to both techniques)
In these example pictures you can see a final GI texture, and the last picture shows (from left to right), prefab without GI texture, prefab with GI texture and white diffuse, final prefab with correct diffuse and GI texture.
aomtutexample3.png:
aomtutexample4.png:
Attachment
Action
Size
Date
Who
Comment
rendertotextureexample1.png
manage
9.3 K
10 Jan 2006 - 22:11
Main.guest
rendertotextureexample2.png
manage
11.0 K
10 Jan 2006 - 22:11
Main.guest
aomtutexample1.png
manage
175.6 K
10 Jan 2006 - 22:11
Main.guest
aomtutexample2.png
manage
338.4 K
10 Jan 2006 - 22:12
Main.guest
aomtutexample3.png
manage
148.1 K
10 Jan 2006 - 22:13
Main.guest
aomtutexample4.png
manage
407.0 K
10 Jan 2006 - 22:14
Main.guest
AmbientOcclusion
Edit
|
Attach
|
Ref-By
|
Printable
|
Diffs
| r1.1 |
More