Realtime AO based on Zbuffer (Crytek tech doc.)

(look the pdf link on the top)

I discovered this idea years ago… Nobody believe me that is really working method…
Now Crytek made it…

Hehe … I had a working ao-like setup with negative lamp, hemi, array of shadow-only spots and a hemi-headlamp which rendered sub-30sec PAL on 733-800MHz PIII’s.
In a way, I don’t feel cheated (wow, what a word), partly because I nicked some ideas from some C4D light-rig :slight_smile:

It would be awsome if Blender eventually gets GLSL enabled hardware-agnostic hardware-accelerated final renderer with all such realtime bells and whistles.

Crossing fingers …

This realtime AO can be programmed with nodes I think. So it can be used non-realtime render too.

I’ll see whether or not someone does this with nodes, I know one of the newer nodes gives us some camera information. (camera node)

tsk - tsk …

what I was (still am ) hoping is that those GLSL guys figure out how to hardware accelerate Blender’s internal renderer (and not only the viewport), so it would use any suitable OGL card (nv/ati …) to add speedup and use GLSL shaders for non-realtime final render. In effect, this could offer a massive speedup …

(God, do you hear me?)
… good.

admittedly this is sort-of OT regarding your post, so I’ll dissapear from here.

This technique can be made with nodes I think.
I think internal renderer can not be mixed with hw render.
And dont forget: this is a fake AO technique, not comparable with real AO that Blender uses.

I think internal renderer can not be mixed with hw render.

the freebee has it (look at the fast-time rendering, ~~ 2/3 down the page). Would be cool if the GLSL guys could do that in Blender … near realtime hardware accelerated AO with OGL shaders … without having to mess with complicated lightrigs - wohooo mamma …

that’s what I’m talking about.

This Crytek realtime fake AO is a post process effect, so I think it can be fast with CPU as with GPU.

I’m sorry because I’m sortof intruding with stuff here - I suspect getting it implemented in software-only would be easier and faster, however it struck me because if this could be harware-accelerated there would be a possibility to use some sort of self-shadowing PLUS the fakeAO method, no? If that could be offloaded onto GPU for final render …

o.k. wishful thinking.

OK, back to the article at hand.

There is some great information and techniques in that paper, and it would be very nice to see some of these features in blender. I will go do some experimenting with the node system and see what I can come up with. Could be fun:)

I’ve also tried screenspace AO with only Z value as input, havn’t had much luck. It turns out to be more like a sharpening filter. Matt ebb tried the same approach, with only limited success. I’d love to see Crytek’s algorithm.

n: the normalized random per pixel vector from the texture
i: one of the 3D sample positions in a sphere
float3 reflect( float3 i, float3 n ) { return i - 2 * dot(i, n) * n;

cp in the pdf

Would it be possible to plug that code into a py node? I really don’t know much about python, so no clue if thats even possible:spin:

At least the possibilty of putting the GLSL output into a nodes render layer updating as you make frame or 3d changes would put Blender one step closer to being an unbeatable motion graphics and compositing solution…

Here is the image from the Crytek pdf. Look: the AO is really fake but looks good… and realtime…

endi, you said you had the same idea years ago, I’d love to see how you approach this problem.

I tried various setups with the blender node editor, most of them centered around an edge detection filter on the Z buffer (or sometimes 1/z). But I can’t never get a decent result.

Anyone want to give it a try in blender?

looks like no one answer my challenge to re-create screenspace AO with blender, so here it is! My very own fake ambient occlusion using nothing but nodes!


I might be stupid but i can’t find the .blend or a node setup :smiley:

WOW!!! Very good! Crytek has a better version, but your version is very good as first try!

Ooo! Please share the node setup That is looking sweet for the speed cost