Final Presentation

338 views

Published on

Final presentation for my dissertation.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
338
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Final Presentation

  1. 1. Has the sun set on forward rendering?
  2. 2. Project Aims <ul><ul><li>Deferred rendering </li></ul></ul><ul><ul><ul><li>What is it? </li></ul></ul></ul><ul><ul><ul><li>How does it work? </li></ul></ul></ul><ul><ul><ul><li>Is it useful? </li></ul></ul></ul><ul><li>  </li></ul><ul><ul><li>Atmospheric scattering </li></ul></ul><ul><ul><ul><li>What is it? </li></ul></ul></ul><ul><ul><ul><li>How does it work? </li></ul></ul></ul><ul><ul><ul><li>Is it viable? </li></ul></ul></ul>
  3. 3. Deferred Rendering - What is it? <ul><ul><li>Hargreaves introduced the concept for games in 2005 </li></ul></ul><ul><li>  </li></ul><ul><ul><li>Flexible rendering system </li></ul></ul><ul><li>  </li></ul><ul><ul><li>Allows programming of special effects </li></ul></ul><ul><ul><ul><li>Atmospheric scattering! </li></ul></ul></ul><ul><li>  </li></ul><ul><ul><li>Used in games like KillZone and Crysis effectively. </li></ul></ul>
  4. 4. Deferred Rendering - How does it work? <ul><ul><li>Render scene into off-screen buffer </li></ul></ul><ul><ul><li>Buffer stores info in textures </li></ul></ul><ul><ul><li>Render full-screen quad </li></ul></ul><ul><ul><li>Apply textures to quad </li></ul></ul><ul><ul><li>Add cool effects in pixel shader! </li></ul></ul>
  5. 5. Deferred Rendering - Is it useful? <ul><ul><li>Short answer - Yes! </li></ul></ul><ul><ul><li>Long answer... </li></ul></ul><ul><ul><ul><li>Has issues, like inability to alpha blend </li></ul></ul></ul><ul><ul><ul><li>Memory bandwidth hogging: </li></ul></ul></ul><ul><ul><ul><ul><li>I use just two textures for colour and depth -1.83MB </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Killzone used 4 textures - 9MB! </li></ul></ul></ul></ul><ul><ul><ul><li>Outweighed by benefits: </li></ul></ul></ul><ul><ul><ul><ul><li>50+ lights in one scene </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Only geometry rendered - no lights </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Means we can push more triangles per model! </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Also add really fancy lighting like... </li></ul></ul></ul></ul>
  6. 6. Atmospheric Scattering - What is it? <ul><ul><li>It is the light interacting with the particles in the air </li></ul></ul><ul><li>  </li></ul><ul><ul><li>It is the reason we have dramatic sunsets/sunrises </li></ul></ul>Image taken from http://sidramushtaq.wordpress.com/2009/02/
  7. 7. Atmospheric Scattering - How does it work? <ul><ul><li>Calculate Rayleigh and Mie coefficients for all wavelengths </li></ul></ul><ul><ul><li>Fire a ray into the scene and find where it intersects the atmosphere. </li></ul></ul><ul><ul><li>Integrate over this ray to find the optical depth </li></ul></ul><ul><ul><ul><li>This gives us attenuation due to out-scattering </li></ul></ul></ul><ul><ul><ul><li>Also adds light through in-scattering </li></ul></ul></ul><ul><ul><li>  Scale the result by the phase function </li></ul></ul><ul><ul><ul><li>Using angle between camera and sun vectors </li></ul></ul></ul><ul><ul><li>Result: </li></ul></ul><ul><ul><ul><li>Blue skies when sun is high </li></ul></ul></ul><ul><ul><ul><li>Redening of the horizon when sun is setting/rising </li></ul></ul></ul>
  8. 8. Atmospheric Scattering - Is it viable? <ul><ul><li>Own research has proven only semi-successful </li></ul></ul><ul><ul><ul><li>Forward rendered version barely runs. </li></ul></ul></ul><ul><ul><ul><li>Deferred rendering version incomplete. </li></ul></ul></ul><ul><li>  </li></ul><ul><ul><li>It is very complex to code </li></ul></ul><ul><li>  </li></ul><ul><ul><li>Must be coded carefully due to nature of equations </li></ul></ul><ul><li>  </li></ul><ul><ul><li>Crysis includes sky light, but no aerial perspective </li></ul></ul><ul><ul><ul><li>Perhaps soon the model will be complete? </li></ul></ul></ul>
  9. 9. Results <ul><ul><li>Deferred Rendering: </li></ul></ul><ul><ul><ul><li>Very flexible system </li></ul></ul></ul><ul><ul><ul><li>Works for 3D effects as well! </li></ul></ul></ul><ul><ul><ul><ul><li>  Position can be reconstructed using depth texture </li></ul></ul></ul></ul><ul><ul><ul><li>Not perfect - alpha blending </li></ul></ul></ul><ul><ul><ul><ul><li>Forward/Deferred hybrid solution </li></ul></ul></ul></ul><ul><li>  </li></ul><ul><ul><li>Atmospheric Scattering </li></ul></ul><ul><ul><ul><li>Own implementation unsuccessful... </li></ul></ul></ul><ul><ul><ul><li>Very involved system </li></ul></ul></ul><ul><ul><ul><li>Has been proven to work well in deferred rendering </li></ul></ul></ul><ul><ul><ul><li>Very realistic - ideal for vast virtual worlds </li></ul></ul></ul>
  10. 10. Conclusion <ul><ul><li>Deferred rendering is here to stay </li></ul></ul><ul><ul><li>Most engines support this system </li></ul></ul><ul><ul><li>More and more games use it </li></ul></ul><ul><ul><ul><li>KillZone, Crysis, Tabula Rasa and many more </li></ul></ul></ul><ul><li>  </li></ul><ul><ul><li>Atmospheric scattering remains sparsely used </li></ul></ul><ul><ul><li>It has been discarded by games in the past </li></ul></ul><ul><ul><ul><li>Kameo </li></ul></ul></ul><ul><ul><li>Decision to include this feature must be well thought out </li></ul></ul><ul><ul><ul><li>It is time consuming to code </li></ul></ul></ul><ul><ul><ul><li>Almost impossible to debug... </li></ul></ul></ul>
  11. 11. Questions?  

×