1 / 35

Postmortem: Deferred Shading in Tabula Rasa

Postmortem: Deferred Shading in Tabula Rasa. Rusty Koonce NCsoft September 15, 2008. Topics Covered. Introduction Background Technical Highlights Performance Player Metrics Demonstration Questions and Answers. Introduction. What is deferred shading?. Introduction.

mlong
Download Presentation

Postmortem: Deferred Shading in Tabula Rasa

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Postmortem: Deferred Shading in Tabula Rasa Rusty Koonce NCsoft September 15, 2008

  2. Topics Covered Introduction Background Technical Highlights Performance Player Metrics Demonstration Questions and Answers

  3. Introduction What is deferred shading?

  4. Introduction What is deferred shading? Deferred shading is a technique for lighting a scene as a post process. Typically forward shading is used, where lighting is applied to each vertex or pixel as it is rendered. With deferred shading, material properties about each pixel are rendered and per-pixel lighting is applied as a post process after the scene has been rendered.

  5. Introduction What is Tabula Rasa?

  6. Introduction What is Tabula Rasa? Tabula Rasa is a massively multiplayer online role-playing game. It is set in a near future sci-fi setting, taking the player to alien worlds. The pace of the game is fast and similar to a 3rd person shooter.

  7. Background Engine features wanted by art/design

  8. Background Engine features wanted by art/design Shadows and ability to create dramatic lighting (not necessarily in real-time -- lightmaps were acceptable)‏ Dynamic light support Interior and exterior settings -- with support for mixing both within the same map Support for many objects (players/creatures/NPCs) moving into view at once

  9. Background Constraints

  10. Background Constraints Pre-existing forward shading engine that supported basic dynamic lighting only A lot of art and many shaders already created for existing engine Minimum system requirements of NVidia FX or ATI 9600 class hardware

  11. Background Decision

  12. Background Decision The existing DX9 based engine would be retrofitted to support both forward and deferred shading. Forward shading would be the fallback for lower end hardware, with deferred shading being the preferred render pipeline on higher end hardware. All existing art assets could be leveraged as-is, without the need to update them.

  13. Technical Highlights Benefits of deferred shading

  14. Technical Highlights Benefits of deferred shading Lighting cost is proportional to the number of lights and is not proportional to the geometric complexity of the scene Only visible pixels have lighting computations executed on them Shaders can have lighting computations cleanly separated from the material rendering Depth and material properties such as surface normals become accessible from shaders All lighting is done in real-time. No time required to build precomputed light data in the map build process; designers can see their changes in real-time.

  15. Technical Highlights Issues with deferred shading

  16. Technical Highlights Issues with deferred shading High GPU memory bandwidth utilization High VRAM utilization No hardware FSAA support (DX9)‏ Very limited hardware alpha blending support

  17. Technical Highlights Implementation Detail (Deferred)‏

  18. Technical Highlights Implementation Detail (Deferred)‏ Material MRT Layout

  19. Technical Highlights Implementation Detail (Deferred)‏ FSAA 1) Fake: Detect edges and blur them 2) Emulation: Super-sample by rendering to a larger render target and then use the hardware to filter the final image down to the desired size

  20. Technical Highlights Implementation Detail (Deferred)‏ Alpha Blending 1) Flora/ground cover rendered with alpha test; scaling is used to transition it in and out 2) Hair is alpha tested; helmets are common place in game 3) Alpha blended geometry is rendered after deferred shading of opaque geometry completes; this blended geometry typically does not receive lighting and if it does it is not exactly the same

  21. Technical Highlights Implementation Detail (Deferred)‏ Shadows 1) All shadows use shadowmaps; every shadow is a true volumetric shadow 2) All lights can cast shadows 3) Artists control if a light casts a shadow if if that shadow updates in “real-time” or not 4) Shadowmap rendering is throttled and done based on light priority 5) The number of shadows active within a single frame is capped

  22. Technical Highlights Implementation Detail (Deferred)‏ Video Memory Management 1) All render targets are allocated before most other resources 2) A shadowmap cache is used; a fixed number of shadowmaps are allocated for the duration of play 3) A render target and depth buffer cache is used

  23. Performance Compatibility

  24. Performance Compatibility Deferred Shading (Our Min Requirements)‏ 256MB VRAM Pixel Shader 3.0 MRT Support (4 simultaneous)‏ Deferred Shading (Recommended Requirements)‏ 320+MB VRAM 50+ GB/s GPU Memory Bandwidth (8800 GT, X1900)‏

  25. Performance Scalability

  26. Performance Scalability Deferred lighting performance is most closely tied to the GPU memory bandwidth. The more bandwidth, the better the performance. Unlike forward shading, deferred shading performance is significantly tied to the resolution at which the game is played. Fortunately, today's GPUs are catching up. Sub-$200 video cards are offered now by ATI and NVidia that well exceed 50GB/s in memory bandwidth.

  27. Performance NV Perf HUD Profile 8800 GTS (64 GB/s Memory Bandwidth)‏ Max Graphics Settings (FSAA off)‏ 1680 x 1050 Approximate Resolution

  28. Performance

  29. Performance

  30. Player Metrics Hardware

  31. Player Metrics Hardware

  32. Player Metrics Graphics Settings

  33. Demonstration Hardware: NVidia 9600 GT 512MB (~$120, 57.6 GB/s)‏ Intel Core2 Quad Q6600 @ 2.40 GHz Vista 64 4GB RAM

  34. Questions and Answers Contact Info: Rusty Koonce jrkoonce@yahoo.com

More Related