SSAO for monkeys (28 posts)

Topic tags: SSAO
  • Profile picture of nehon nehon590p said 1 year, 9 months ago:

    hi monkeys.

    I've been working on an SSAO post filter for JME3 based on that article by Jos

  • Profile picture of Momoko_Fan Momoko_Fan366p said 1 year, 9 months ago:

    Very nice! I am sure the sponza model would look excellent with it.
    Perhaps you want developer access so you can include all those great filters in jME3?

  • Profile picture of erlend_sh erlend_sh132p said 1 year, 9 months ago:

    Awesome! This'll make for a very picturesque blog update :D You might actually make it in for alpha-2.

  • Profile picture of nehon nehon590p said 1 year, 9 months ago:

    And there it is : Sponza with shadows and SSAO

    the same but without SSAO

    Just the AO channel

    Note that there still no additional blur pass. The frame rate cries a little bit…no vsync here. geforce gtx 275, But actually PSSM is taking the biggest part of it.

    Another shot

    I have some clean up to do in the code, once it's done, i'll post it.

    Enjoy

  • Profile picture of InfernoZeus InfernoZeus1p said 1 year, 9 months ago:

    Wow, that looks really great! Should make a great blog post, perhaps to coincide with the new website launch?  ;-)

  • Profile picture of normen normen1271p said 1 year, 9 months ago:

    Awesome!

  • Profile picture of Momoko_Fan Momoko_Fan366p said 1 year, 9 months ago:

    Simply kick ass.

  • Profile picture of Bonechilla Bonechilla1p said 1 year, 9 months ago:

    Brilliant!!!

  • Profile picture of nehon nehon590p said 1 year, 9 months ago:

    Thank you guys ;)

  • Profile picture of matxgamier matxgamier said 1 year, 9 months ago:

    wow!.. I can't wait to try this out

  • Profile picture of johncl johncl13p said 6 months, 2 weeks ago:

    Awakening this thread as it would be really cool to use this. I have tried the filter and its rather fps expensive if you want a good visible effect (the default settings is btw hardly noticeable in my scene). Any particular reason why a game like Minecraft has a very smooth ambient occlusion with rather high framerates? Are they using some trickery and not the same kind of algorithm?

    A standard problem with all 3d games is that objects are not “rooted” and you have to paint shadow maps or a “darkness” layer to give them the look of being part of the scenery and not “floating”. Ambient Occlusion seems to do the trick for getting a similar effect and saves a lot of work. :) – Hoping there will be some more development on this if possible.

  • Profile picture of nehon nehon590p said 6 months, 2 weeks ago:

    @johncl said:
    Any particular reason why a game like Minecraft has a very smooth ambient occlusion with rather high framerates?

    I almost spilled my coffee on the screen reading this.
    Minecraft has vertex color…at best

    Ambient occlusion is expensive, and ours is one of the fastest implementation i have seen. reed this http://jmonkeyengine.org/2010/08/16/screen-space-ambient-occlusion-for-jmonkeyengine-3-0/ there is a link to the original paper and implementation by José Maria Mendez.

    I have some papers on nice implementation that give better results, but for similar frame rate. What ever you do…SSAO is expensive.

  • Profile picture of johncl johncl13p said 6 months, 2 weeks ago:

    Hehe, sorry to ruin your screen with coffee, but for a long time a mod added ambient occlusion (BetterLight):

    http://www.minecraftforum.net/topic/52079-mrmmods-betterlightgrass-simplemap-181/

    And then Minecraft got a similar looking shading, but I guess its a type of shading that is is only calculated once and locally updated now and then (whenever you remove/add blocks) for shading the polygons and not something done on every frame of rendering like a true Ambient Occlusion thingy.

    I just think it looks good, and wonder if it would be possible to do something similar in jMonkeyEngine for static objects? Its basically precomputed shadowing to make stuff look more “rooted” and get a feeling of ambience without turning to shadowmaps but by simple polygon shading. But I guess it will only look good for areas with high polygon count where this kind of shadowing feels “local”?

  • Profile picture of johncl johncl13p said 6 months, 2 weeks ago:

    To elaborate a bit more. Would it be possible for objects that are placed on a terrain mesh to affect shading on polygons on the terrain in such a way that it looks like the effect of ambient occlusion, sort of like a shadow map but only affecting shading of the nearby polygons using simple gouraud/phong shading techniques? Likewise the same happening on the object itself for polygons near the surface of the terrain.

  • Profile picture of johncl johncl13p said 6 months, 2 weeks ago:

    I think I found an article describing what I was thinking of:

    http://www.iquilezles.org/www/articles/pervertexao/pervertexao.htm

    Its a process that can be calculated quickly when the scene is set up and “just” requires a material that can store shadow values per vertex to be used for interpolation. The main problem is that the objects should have a fair amount of polygons unless its possible to weigh the “distance shadow should travel out on the polygon”.

    It looks to me also that the Type.Color vertex buffer could be used for this effect. I see Lighting shader has a UseVertexColor. Hmm, challenge then is finding an algorithm that creates these color buffers depending on closeness to other objects.