1. Select geometry. Assign custom attributes and new instance of bake_occlusion shader to each selected part. Ensure ‘cull Hidden’ and ‘Cullbacking surfaces’ are deselected under the geometry attribute. When rendering make sure all the geometry is viewable in the resolution gate.
Ensure that geometry attribute has Visibility – Diffuse Raya(Occlusion) – Shader Color and Opacity
2. Bake to unique map that derives name from object name.So under the bake_occlusion shader parameters put in e.g /Users/Username/box.bake in the bake_file address
3. do tdlmake to convert .bake to .tdl
4. In Maya, assign the .tdl file to geometry. Important enable the culling attributes again. The defaultshader can be used.

You don’t need an occLight, since the occlusion shadeop is present in the surface shader.

example AO shader
string bake_file = “”;
float maxtDist = 1;
float samples = 64;
float bias = 0.05;
extern point P;
extern normal N;

normal Nf = normalize(N);
color ao = occlusion ( P, Nf, samples, “maxdist”, maxtDist, “bias”, bias );
ao = 1 – ao;
bake ( bake_file, s, t, ao );

Ci = ao;
Oi = 1;

The conversion of the .bake file to a .tdl has to be done on the command line. e.g tdlmake -bakeres 640 /Users/Username/baketest.bake /Users/Username/baketest.tdl.

With multiple pieces of geometry – select the geometry and and set Automatic UVs Then go into edit layout UVs – layout UVs options and enable Layout multiple objects to Non-overlapping.

1 comment for “Baking

  1. carli
    November 25, 2009 at 9:28 am

    Hello. I ask how to use 3delight baking shave occlusion. Can write a small tutorial do? thanks. Effects like this

Leave a Reply

Your email address will not be published. Required fields are marked *