Jump to content


ambient occlusion + sun shadow


14 replies to this topic

#1 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 08 January 2012 - 09:14 PM

just thought id show this screen, looks alot like cryengine gi :)
its the simplest ao solution i could come up with, just check for cavities
and dot product it with the viewspace normal. then adding the sun and sun shadows
finishes it off, and you get this really nice ambient effect. note -> no blue used, with all
the bright light everywhere the grey just ends up looking blue. :) also its going 12 fps, without
the shadows it would go about 40, its just ive got this really stupid shadow maker at the moment i plan
on swapping to shadow maps soon. theyll come out alot better. ambient light is at 0.75f in this shot, so its pretty bright, but i like it bright!
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#2 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 08 January 2012 - 09:20 PM

from further back ->
Posted Image

i used to think ssao was pretty crappy compared to real ao, now im actually into this ssao shortcut thing. :) it looks kinda cool!
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#3 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 09 January 2012 - 06:47 AM

I can never help myself, now its going 1fps but heres one bounce of global illumination. :)
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#4 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 09 January 2012 - 07:53 AM

reduced the size of the screen and got it to 10 fps :)
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#5 David Gallagher

    New Member

  • Members
  • PipPip
  • 66 posts

Posted 09 January 2012 - 08:37 AM

I think it looks awsome, wish the effect wasn't so expensive but really nice renders. is that dx11? how many polies does your charactor have, would reducing it , using tessellation for the detail or hardware instancing be of any benefit to performance with this effect? just curious...

#6 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 09 January 2012 - 09:19 AM

thanks man! yes dx11. its about 200,000 polys i think all up, one character. id benefit probably only 5 or so fps if i reduced the character more, really all the work is the actual rendering unfortunately. but yeh, if i was rendering even more it would definitely go even slower, but the real area to optimize is the screenspace effect.
im thinking hard about how i could possibly get it to go faster, if i reduce quality it can go fast, if only i could reduct quality in a way its not so bad for the look of it?

enhanced the colour spreading. at 4fps.
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#7 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 09 January 2012 - 09:31 AM

just in case your interested, here it is going 21 fps, playable speed, its just it looks really shit, put bluntly. if only there was some way i could blur this or something... im thinking...
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#8 Stainless

    Member

  • Members
  • PipPipPipPip
  • 575 posts
  • LocationSouthampton

Posted 09 January 2012 - 10:47 AM

The way I do AO is very cheap.

I run the object through shadevis and store the AO value in the mesh data. Then just use this combined with the global ambient light setting.

It's really cheap so shouldn't slow you down at all. I think your bottle neck must be somewhere else unless you are doing the AO on the fly.

The only problem I have with shadevis is that it assumes the object is orientated with "up" in a specific direction. If your object is generated in a different coordinate system it goes wrong.

That's trivial to get around though.

What are those streaks on the ground? Maybe that's something to do with whatever is slowing your code :mellow:

#9 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 09 January 2012 - 07:24 PM

success!! 16 fps!
Posted Image

I cut rays down, added mips to the screen and read off those instead of just single pixels, sorta making "cone rays" and then used a blur technique to final gather it, and it funnily looks like subsurface scattering. :)

(note smooth ground occlusion)
Posted Image

(definitely looks best with the direct light showing)
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#10 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 343 posts

Posted 09 January 2012 - 07:43 PM

Good work rouncer!

What about trying less samples + bilateral blur (or are you actually using bilateral blur now)?
My blog about game development (and not just game development) - http://gameprogramme...y.blogspot.com/

If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D

#11 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 09 January 2012 - 08:37 PM

> then used a blur technique to final gather it, and it funnily looks like subsurface scattering

Isn't that how you would usually do sss?

#12 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 09 January 2012 - 08:37 PM

thanks Vilem! a post from you means everything!


Yeh Geon! I dont think you could get quite to realistic marble just by blurring tho...

yeh as it is, the blur is totally unoptimized and slowing it down, ive got a funny feeling this could get to 20fps :)
The blur is just a 20x20 per pixel sampler, so thats not bilateral or anything, in other words REALLY slow.

love this.... hehe
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#13 David Gallagher

    New Member

  • Members
  • PipPip
  • 66 posts

Posted 09 January 2012 - 09:19 PM

great enhancments and really like the look of it!

#14 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 09 January 2012 - 10:07 PM

thanks david!!!!!!!!

heres 1280x1024 (big guns) , running 5 fps.
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#15 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 10 January 2012 - 12:55 AM

20 fps... the blur slows it down when you go too close, this is about the right distance and it goes real nicely :)
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users