Hi! :)
I am going to implement (static!) Ambient Occlusion in my 3d application. I am quite new to all this stuff ... so here are my thoughts.
Here is a link for everyone interested:
Link
I know three possibilities to implement AO:
1. Calculate AO in a preprocess and store result in a texture map that I add to my geometry within my application.
2. Calculate AO in a preprocess and bake result to my geometry texture. Easiest solution because in my application I just have to load the final texture with AO already added.
3. Calculate AO in a preprocess. Store AO data (occlusion factor and bend-vector for every vertex of the mesh) in an XML file. In my application I read this XML file and add AO data to every vertex of my mesh. A shader will read this additional vertex information and render the final AO. This approach is used by the tutorial (link above).
My meshes won't be highly tesselated. So ... what technique would you recommend? Am I missing something important? Perhaps some misunderstandings (I'm an AO noob)? Advantages/disadvantages concerning the different techniques?
Thanks and greets! :)
Ambient Occlusion: Thoughts + questions
Started by idioglossia, Oct 11 2006 10:31 AM
8 replies to this topic
#1
Posted 11 October 2006 - 10:31 AM
#2
Posted 11 October 2006 - 06:20 PM
precalculate. it is slow. or well, that depends on the scene ofcourse. XML seems overkill.
#3
Posted 11 October 2006 - 06:31 PM
If your meshes are very lowpoly, you could have better results from a texture-based approach.
#4
Posted 11 October 2006 - 06:45 PM
So basically there are two approaches: store AO in texture or per-vertex (in the latter case - why XML? just store vertex colors in the mesh!). The first case is either a separate AO texture, put AO in a spare channel of some texture, or just multiply base texture with AO.
Each of those is good; what's best depends on a lot of things. Vertex-vs-texture mostly depends on whether your model is tesselated enough. Various texture options depend on whether you have some spare texture channel; whether you just want to multiply AO (or do something more advanced), etc.
In short: decide yourself! You know the situation better than anyone else here.
Each of those is good; what's best depends on a lot of things. Vertex-vs-texture mostly depends on whether your model is tesselated enough. Various texture options depend on whether you have some spare texture channel; whether you just want to multiply AO (or do something more advanced), etc.
In short: decide yourself! You know the situation better than anyone else here.
#5
Posted 12 October 2006 - 01:00 AM
Use 1.
Calculate the Ambient Occlusion into a lightmap. We've done that for a game, and the results where quite nice (we've also calculated ordinary lightmaps and combined these into one texture. If you think about it: into a DXT compressed texture you can put Ambient Occlusion, one static lightmap (monocrome) and something else.. (another lightmap for night? or a alpha factor for dirt-maps or whatever comes to mind). Buy one channel and get 3 for free. That's a lot of stuff you can play with.
Also - We've found out that low resolution ambient occlusion maps have their merits as well. When we calculated the lightmaps for draft-quality we usually lowered the resolution and just shoot a couple of rays for the lighting. This looks very nice and dirty (in a good way). If your scenes look just a bit to shiny and like plastic, this can give you the boost of fake-reality that you need.
High quality ambient occlusion maps look cool as well, but don't take the "to clean" out of the artwork.
To bad I don't have any screenshots anymore.
Calculate the Ambient Occlusion into a lightmap. We've done that for a game, and the results where quite nice (we've also calculated ordinary lightmaps and combined these into one texture. If you think about it: into a DXT compressed texture you can put Ambient Occlusion, one static lightmap (monocrome) and something else.. (another lightmap for night? or a alpha factor for dirt-maps or whatever comes to mind). Buy one channel and get 3 for free. That's a lot of stuff you can play with.
Also - We've found out that low resolution ambient occlusion maps have their merits as well. When we calculated the lightmaps for draft-quality we usually lowered the resolution and just shoot a couple of rays for the lighting. This looks very nice and dirty (in a good way). If your scenes look just a bit to shiny and like plastic, this can give you the boost of fake-reality that you need.
High quality ambient occlusion maps look cool as well, but don't take the "to clean" out of the artwork.
To bad I don't have any screenshots anymore.
#6
Posted 13 October 2006 - 10:58 AM
Hi!
Thanks for your support!
I think I will precalculate texture maps and multiply the result with my base textures. My meshes will be poorly tesselated because they are meshes used in a 3d navigation system (not THAT much processing power :no: ).
Ok, thanks again for your support, that gave me a good start. :)
Cheers!
Thanks for your support!
I think I will precalculate texture maps and multiply the result with my base textures. My meshes will be poorly tesselated because they are meshes used in a 3d navigation system (not THAT much processing power :no: ).
Ok, thanks again for your support, that gave me a good start. :)
Cheers!
#7
Posted 13 October 2006 - 11:56 AM
Hi again,
I have some problems computing my AO maps. Does anybody know or use the program "faogen" (http://www.rusteddre...net/faogen.html)?
I started creating a simple test scene in 3D Max. Everything works fine ... but if I use simple boxes in my scene, some strange things happen.
Look at my screen shots.
When I use tubes it looks like this (quite nice but needs some tweaking):

And in wireframe ...

But if I use boxes instead of tubes it looks linke this:

And in wireframe ...

Anyone with faogen experience? Any suggestions? :)
I have some problems computing my AO maps. Does anybody know or use the program "faogen" (http://www.rusteddre...net/faogen.html)?
I started creating a simple test scene in 3D Max. Everything works fine ... but if I use simple boxes in my scene, some strange things happen.
Look at my screen shots.
When I use tubes it looks like this (quite nice but needs some tweaking):

And in wireframe ...

But if I use boxes instead of tubes it looks linke this:

And in wireframe ...

Anyone with faogen experience? Any suggestions? :)
#8
Posted 13 October 2006 - 05:52 PM
That looks strange indeed. Are the normals of your cubes correct? (that's the only thing I can think of)
#9
Posted 17 October 2006 - 04:44 PM
It's strange. It seems as the cubes where flipped. That dark sides should point out in the opposite direction. Maybe the mapping or the normals are flipped.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











