Thomas 
 
 
		
			Frictional Games 
			
			
			
 
			
	Posts: 2,634 
	Threads: 184 
	Joined: Apr 2006
	
 Reputation: 
68
		
	 | 
	
		
			
Thomas, 2008-07-10, "SSAO" 
			 
			
				I recently implemented SSAO which the acronym for "Screen Space Ambient Occlusion", which in turn is a way of simulating ambient occlusion in screen space.  
 
Normally real time games only light that directly hits a surface is used in lighting calculations. However, in the real world light bounces of surfaces and interacts with the environment in a multitude of ways. Ambient occlusion is a way of simulating all this bouncing around by estimating how much light will be able to reach a point in the world. This was something only used in offline (non real time) rendering and only used in games as precalculated light maps or similar. 
 
Now that graphical processors can crunch billions of calculations per second it is finally possible to try things like Ambient Occlusion in real time. The way it works is simply by using the depth map (which stores distance from screen to pixel) of the rendered scene and on a per pixel basis checking neighboring pixels if they are in front or behind the current. By doing this for enough pixels one can determine an occlusion value for the current pixel and use that as a value for the ambient occlusion.  
 
Because ambient occlusion in itself is an approximation of a global lighting model, ssao is an approximation of an approximation. So in my approach I have tried to make it as nice and fast as possible and ignored trying to copy any proper formulas. The result is a quite fast algorithm that gives less then 20% drop in frame rate (at the time, still more things to imporove!) and gives a pretty nice results! It also allows the artists to skip alot of extra lights that have previously been added only to simulate ambient occlusion and might therefore even improve the frame rate in the end! 
 
See below for an attached screenshot.
			 
			
			
			
		 |  
	 
 | 
 
	| 07-10-2008, 01:36 PM  | 
	
		
	 | 
 
 
	
		
		WindexGlow 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,108 
	Threads: 70 
	Joined: Mar 2007
	
 Reputation: 
-5
		
	 | 
	
		
			
RE: Thomas, 2008-07-10, "SSAO" 
			 
			
				Oh my, that is really cool.  I realize that this is still a work in progress; but you will improve fine-ness right?  You can see shadow-blocks on those balls!
			 
			
			
 
Please  -REP me. 
Honestly, please do.  I want to see how low I can go!! 
Ignore that error message too.  Just ignore it and keep going to give me -rep.  
			
		 |  
	 
 | 
 
	| 07-10-2008, 01:44 PM  | 
	
		
	 | 
 
 
	
		
		Thomas 
 
 
		
			Frictional Games 
			
			
			
 
			
	Posts: 2,634 
	Threads: 184 
	Joined: Apr 2006
	
 Reputation: 
68
		
	 | 
	
		
			
RE: Thomas, 2008-07-10, "SSAO" 
			 
			
				Shadow smoothing is something that I will give more time later on.
			 
			
			
			
		 |  
	 
 | 
 
	| 07-10-2008, 01:59 PM  | 
	
		
	 | 
 
 
	
		
		WindexGlow 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,108 
	Threads: 70 
	Joined: Mar 2007
	
 Reputation: 
-5
		
	 | 
	
		
			
RE: Thomas, 2008-07-10, "SSAO" 
			 
			
				Btw, any luck with doing a "HPL1, HPL2 without SSAO, HPL2 with SSAO   comparison pics? 
Same scene, same angle, and the such?  Would be cool to see how far you guys have gotten.
			 
			
			
 
Please  -REP me. 
Honestly, please do.  I want to see how low I can go!! 
Ignore that error message too.  Just ignore it and keep going to give me -rep.  
			
		 |  
	 
 | 
 
	| 07-10-2008, 04:52 PM  | 
	
		
	 | 
 
 
	
		
		Thomas 
 
 
		
			Frictional Games 
			
			
			
 
			
	Posts: 2,634 
	Threads: 184 
	Joined: Apr 2006
	
 Reputation: 
68
		
	 | 
	
		
			
RE: Thomas, 2008-07-10, "SSAO" 
			 
			
				I'll see what we can do later. Would be fun to do once all features are in.
			 
			
			
			
		 |  
	 
 | 
 
	| 07-10-2008, 05:26 PM  | 
	
		
	 | 
 
 
	
		
		Yuhaney 
 
 
		
			Hello Friends! 
			
			
			
 
			
	Posts: 3,466 
	Threads: 100 
	Joined: Mar 2007
	
 Reputation: 
64
		
	 | 
	
		
			
RE: Thomas, 2008-07-10, "SSAO" 
			 
			
				Hmm... This looks good! Keep up the good work, Thomas!   
			 
			
			
 
			
		 |  
	 
 | 
 
	| 07-25-2008, 01:01 AM  | 
	
		
	 | 
 
 
	 
 |