Ambient Occlusion?

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Ambient Earth showcases sound effects from all across the United States.
  • Hi,

    I was wondering if anyone is capable of making an fx shader performing an ambient occlusion post process effect.

    Basically, ambient occlusion is this:

    <img src="http://www.independentdeveloper.com/images/ambient-occlusion.jpg">

    or http://www.independentdeveloper.com/images/ambient-occlusion.jpg

    What the shader should do is something like "desaturate the initial image, blur it, and output the image in multiply or adding blend i think, with an intensity", so more intensity less opacity and viceversa.

    Would someone please make it for me, since i'm not able to do it?

    And it can also be added to the Construct default FXs.

    Thanks in advance.

  • This really wouldn't be possible without 3D geometry and there's no effective - or efficient - way to simulate it.

  • Then, can be made something just remotely similar?

  • Ambient Occlusion is not a post-process effect, it's complex 3d light calculations, and is for 3d renderers only. It's never used in real time because it's very cpu intensive. There's no way to do this to a 2d picture.

  • It needs a 3D model, yes.

  • Actually these days they're finding ways to do ambient occlusion in realtime.

    http://news.developer.nvidia.com/2008/0 ... -upda.html

    Even though it requires a 3d model, you could probably do what you described (blur, multiply, etc.) via a canvas and pixel shaders.

  • Hmm... what about the height map? It could be merged into actual image to simulate shadows. A hacky solution, but hey, it works.

  • Yeah, you could do that with preprocessed images, hardly worth attempting real time as you would need multiple maps for multiple positions. Not to mention what it would cost in processing power.

  • Yeah I know the ambient occlusion in real time thing, also most next gen games and 3d engine feature it (saints row, crysis..). Anyway I know there's the need of 3D models, because of the Z Depth Map i think..

    No problem, I was just wondering if something similar could've been done in real time in 2D.

    p.s.: Because I played Crysis Wars just after I got this idea

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • the 2D equivalent of screen space ambient occlusion is..... drop shadow!

    so just do a drop shadow. Maybe a drop shadow .fx would be nice?

    Edit: I think there is one already.

  • a soft drop shadow with alpha shapes instead of bounding box would be pretty

  • actually it can be done in 2d, i read up a bit on AO and it seems like it actually wouldnt be too hard to implement using events, but i need a clear example of what exactly ur going for with AO, because in 2d the lightsource can be from the viewsource or from a skylight. and getting the effect to look right largely depends on what you'd be trying to do

  • The lightsource is surely the skylight. Well, the effect should be small, covering something like 48x48 and 64x64 (or more) size in pixels.. How can it be done using events?

    I would like a very soft drop shadow as a post-rendering effect on the entire scene.

  • should be a fairly easy effect, although for softness you could run into sampling issues, just like blurs, since you're taking alpha into account you can't just do it with distances.

    I can prolly whip it up as a mod of my blur plugins. Will give it a go later.

  • I'm hitting arithmetic instruction limits for PS2 when blurring the shadow with a 5x5 kernel.

    Blurs should really be done in two passes

    Since the kernel is symmetric, I'll try storing a quarter of it then doing each op four times.

    with less taps it would be useless.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)