Ambient Occlusion

Someone please whip up an ambient occlusion shader :-)…pretty please.

While it is possible in small applications I doubt it would run fast enough in a full size of game. NVIDIA has a example on real time ambient oc I think that is written in there fx composer which is CG so you could get it to run in unity with some tweaking. I doubt this will be a practical thing in games for a long time though. Best bet right now would to be baking ambient oc into your texture with some custom lighting. Any ways, there it is if you want to get it to run in Unity.

Bill

Ha! Yeah I remember that one. I think it would be awesome to have a shader that darkend the cracks and corners of objects without being dynamic. Sort of like “dirt” baking. Often time I will bake an object in a dome light setting just to get a luma map to darken the edges of objects and pop the texture a bit. Then I will composite that with the texture map.

Better yet, run an ambient occlusion pass on the whole scene for just one frame and bake the result to the objects in game…that would be sweet.

Do you want a static (baked/precomputed) AO shader or something towards “dynamic” side?

Static AO is not much different from just using a lightmapped shader. I’d bake an AO texture in the 3D package if it directly supports that; otherwise I’d place a lot (i.e. a thousand or so) lights around the scene, with small intensities and shadows on. Then bake a lightmap from that.

Most “dynamic” AO techniques that exist nowadays are still way too slow for production use. They’re nice if your scene is a couple of objects and there’s no game running as well, so AO computation can take the whole CPU&GPU just for it’s own needs. Some of the techniques can’t be implemented in Unity at this very moment (we don’t have floating point render textures for example, but that is coming in the future).

I was thinking of the “calculate shadows” feature that is in Torque. You can bring in your models and asseble your scene, then hit “calculate shadows” and it will shadow map your scene. That’s pretty cool. But if you were to bake in an ambient occlusion pass as well, that would be even cooler. I’t not dynamic, but a neat feature.

Most 3d rendering packages will let you bake AO or light maps.

Hi, I need help with this visual style Dropbox Its is created in cinema4d using Ambient oclusion with low blur. I was trying to replicate it in Unity but it end up realy shity. is there way to create something like this in unity? thanks.