how do I make a geometry dependant dirt material?

I know what I /want/ to do, I just don’t know how to do it- Is there a way, in blender, to get a material to look at the underlying geomety’s convexity or concavity and map it out using a either a user defined gradient or a plain old black-to-white gradient?
Or any other thing that has the same effect would be good. what I want is for the bits with the strongest outwards angles to be one colour, faded off to the bits with the strongest inwards angles another colour.
If there isn’t can someone tell me how to go about setting up ambient occlusion so it can be baked for use as a basis of a texture in another program?
:slight_smile: sorry if these are stupid questions :slight_smile:
Thankyou very much for any help :smiley:

edit I was looking for ambient occlusion in the wrong place, I’ve got that working nicely now

I think this thread might have the answers you seek.
http://blenderartists.org/forum/showthread.php?t=106425

ahh, thankyou! that was really helpful :slight_smile: