Ambient Occlusion

Blitz3D Forums/Blitz3D Programming/Ambient Occlusion

DareDevil(Posted 2008) [#1]
1° test for ambient occlusion this is a immage!!

the system is not completed this is a image test


http://www.blitzitalia.altervista.org/modules/xcgal/displayimage.php?pid=38&fullsize=1


OJay(Posted 2008) [#2]
yeah, i can do that too: http://www.radioactive-software.com/urbanempires/October11/Crysis_SSAO.jpg
isnt that lovely?

a bit more information how thats gonna work in blitz3d (dx7) wouldnt be too bad, would it?


puki(Posted 2008) [#3]
I'm on the fence with ambient occlusion.

Still, at least it is something to get reasonably excited about.


DareDevil(Posted 2008) [#4]
the test have a object pre-elaborated in ambient occlusion, this system i very slow have a 36 interation for point and print text "Statistics" is the time for create scene...


ok bye


John Pickford(Posted 2008) [#5]
What is ambient occlusion?


sswift(Posted 2008) [#6]
Ambient occlusion is darkening parts of a model which can see less of a sphere of ambient light surrounding them.

In other words, any concave part of a model will be able to see less than a full hemisphere of ambient light hitting it. So you figure out how much they can't see and darken those portions of a model appropriately.

If your model doesn't animate, then you could get this effect just by applying a lightmap to your model or even painting the texture directly.

If it does animate, then the shape of the surfaces will change and the lighting will need to change accordingly.

OJay's link there is Screen Space Ambient Occlusion. That's different. That's calculating ambient occlusion just using the z-values of the pixels on the screen. It's less accurate, and prone to artifacts like the background glowing around the tank turret you see in that image. But it's a lot faster.


Doiron(Posted 2008) [#7]
The timescale is in milliseconds? A modeller can create an occlusion map for such a scene in a few seconds: if that's the case and it required roughly two minutes even reducing the time and improving quality it's still better to just create and save an occlusion/light map with an existing tool. It could be a start if your intend to create your own lightmapper though. What baffles me is that looks more like vertex lighting then a per-pixel map.

To speed up the rendering you could use a random distribution instead of going through every iteration, and then blur the resulting map to reduce the noise (most occlusion systems let you adjust rendering's precision).


John Pickford(Posted 2008) [#8]
@sswitft. Thanks for that. So it's essentially refining the concept of ambient light to something a bit more realistic.

Is this used in any games? It sounds like something that would be a bit cpu intensive for realtime use. Does it make scenes look better?


Rroff(Posted 2008) [#9]
Yeah it helps to give more depth to the scene which makes it look more real/immersive... tho theres better ways to go about faking it up for video games.


Doiron(Posted 2008) [#10]
@JP: it is more like a cheap replacement for radiosity, since basically ambient occlusion darkens the areas of an object surrounded by other geometry. Without ambient occlusion, diffused lighting is obtained with radiosity, where each surface emits light and basically casts lots of rays which bounce in the scene, and obviously convex areas are less hit since only direct rays reach these spots. With ambient occlusion however you obtain a similar effect using a very simple formula instead of running such a heavy simulation. It has been used widely to reduce rendering times in CG, and only lately implemented in next gen game engines thanks to modern GPU capabilities (you can see screen ambient occlusion in Crysis, for example, though the routine uses a few optimization tricks).


John Pickford(Posted 2008) [#11]
So it's only used in one game?

Why not drop the concept of ambient altogether?


Doiron(Posted 2008) [#12]
Is this used in any games? It sounds like something that would be a bit cpu intensive for realtime use. Does it make scenes look better?

Without it you are forced to use lightmaps to give diffuse lighting in a scene. Of course a lightmap can be rendered with excellent tools and gives better results overall. However, detailed maps need a lot of vram, and preprossing requires time. By processing maps in realtime you can apply them everywhere even when working with vast maps, and also use lighting maps in certain spots if needed. Also, the result would not be static, so the lightmap would change in realtime if - for example - a wall rumbles down or a truck parks near a wall.

It will be more and more used during time, as it happened with radiosity in CG. Prototyping becames a lot faster as well, if you don't have to fake everything and process lots of maps.

Why not drop the concept of ambient altogether?

But we have ambient light in the real world too. So far it was faked, and technology is taking its first baby steps into realtime simulations of it.


Gabriel(Posted 2008) [#13]
There's a nice article about Ambient Occlusion ( not the Screen-Space kind ) in GPU Gems, which is freely available online now :

http://developer.download.nvidia.com/books/HTML/gpugems/gpugems_ch17.html


_33(Posted 2008) [#14]
DareDevil, I wish you all the luck!