What's the best way to go about baking ambient occlusion?

I’ve used some techniques, one of which didn’t take the surrounding objects into consideration, one of which has choppy edges and another one that produces artifacts such as black triangles and shit.

So what’s your favorite and hopefully (for me) problem free way of baking ambient occlusion?

I need help on this. I’m getting really frustrated with the fact that I have an awesome model that I completed several days ago but still can’t use because of this.

you want to port a model, and you want to bake them with the diffuse? if I recall HL2 never got proper support for dirt maps or AO maps…

personally I just bring it into photoshop and mult the diffuse by the AO. if the result is faded I put the textures through a few more mixes or filters. I record the actions as a macro script and reapply the operations to all relating maps with the model

That’s what I meant. I want to render the ambient occlusion to a texture so I can use it as a layer with Multiply in Photoshop. And what is the best technique for doing that?

The funny thing is that when I save the image before I render in the “Render to Texture” window, that image becomes all jaggy and glitched. But the render view is perfect. Are you supposed to use that one?

If you’re getting black triangles, that’s either something wrong with the model or the UV. Probably UV. Sometimes happens if you layer 2 faces onto the same thing in the UV editor. Try applying a 2-sided material to the model, see if that does anything for the black triangles/choppy edges.

oh I understand, your creating your own AO map, then you want to bake it with the diffuse…

ok well its slightly different if you do it that way. there are a few settings to prevent over lapping, like using supersampling and disabling antianaliasing. make sure you pad the edges and also if possible you have to eliminate UV overlapping. but with those settings you should be ok…

if your trying to generate a normal map, you would need to re-UV map the model so that there is no sysmetry. like some models have mirrored UVs…

anyway you’ll need to photoshop any baked result, its a fancy trick to pull off but its tedious if your trying to do a proper job

I did all of those things but I still get strange artifacts. There are no overlapping UVs in the mesh I want to render AO to. But that mes intersects with another model, and I think that’s the problem. But I can’t move that model. I know there is a way to render smooth AO maps from objects intersecting with other objects.

The thing I do is I assignt Mental Ray as my renderer. I increase the samples per pixel and the element unique samples to appropriate values. Then I apply a white material to my model, save as TGA and render.

I’ve heard there are other ways to achieve the same thing. Like assigning an AO material to my model or something.

What’s the best solution?

I think it depends on what method you use to bake the AO map. Usually the most errors happen with light tracer the least with mental ray.

You might want try and move the elements away from each other so that they do not intersect. Fixes a bunch of issues very often.

I thought as much. Though, I would prefer not to do that as the map will become “less correct”.

I’m still curious as to why the render view is flawless while the image I saved before rendering, is not.
Any ideas?

The UVW’s should remain completely unchanged as far as I know.