1 / 37

A Real Time Radiosity Architecture for Video Games

A Real Time Radiosity Architecture for Video Games. Sam Martin, Per Einarsson Geomerics , DICE. Radiosity Architecture. Hot topic : real time radiosity Research focus on algorithms Several popular “categories” of algorithm Architecture Structure surrounding the algorithm

Download Presentation

A Real Time Radiosity Architecture for Video Games

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. A Real Time Radiosity Architecture for Video Games Sam Martin, Per Einarsson Geomerics, DICE

  2. Radiosity Architecture • Hot topic: real time radiosity • Research focus on algorithms • Several popular “categories” of algorithm • Architecture • Structure surrounding the algorithm • Use case: Integration in Frostbite 2

  3. Agenda • Enlighten • Overview • Architectural Features • Frostbite • Overview • Pipelines • Demo • Summary / Questions

  4. Overview: Goals And Trade-offs

  5. Four Key Architectural Features • Separate lighting pipeline • Single bounce with feedback • Lightmap output • Relighting from targetgeometry

  6. “Arches”

  7. Enlighten Pipeline

  8. Runtime Lighting Pipeline Point Spot Directional Environment Area User-specified + radiosity from previous frame Standard lighting On target mesh Direct Light Sources Final GPU composite On detail mesh + indirect specular Point-sampled input to Enlighten

  9. Direct Lighting

  10. Point Sampled Direct Lighting

  11. Enlighten Output (Target)

  12. Enlighten Output (Detail)

  13. Final Composite

  14. Model single bounce with feedback Bounce feedback scale = 1.0 Bounce feedback scale = 0.0

  15. Enlighten Lightmap Output “Spherical” 106 x 106 texels 90% coverage “Directional Irradiance”

  16. Target Geometry Has simple UV surface area Tri count not important Various authoring options

  17. Detail Geometry UVs generated by projection No additional lighting data “Off-axis” lighting comes from directional data in lightmap Does not interact with radiosity

  18. Example UV Projection

  19. Recap: Architectural Features • Separate lighting pipeline • Single bounce with feedback • Lightmap output • Relighting from target geometry

  20. Agenda • Enlighten • Quick overview, Key decisions, The future • Frostbite • Motivation • Pipeline • Runtime • Demo • QA?

  21. Motivation • Why real-time radiosity in Frostbite? - Workflows and iteration times - Dynamic environments - Flexible architecture

  22. Precompute pipeline • Classify static and dynamic objects • Generate radiosity systems • Parametrize static geometry • Generate runtime data

  23. 1. Static & dynamic geometry • Static objects receive and bounce light - Uses dynamic lightmaps • Dynamic object only receive light - Samples lighting from lightprobes Transferred lighting Input scene Mesh classification Underlying geometry

  24. 2. Radiosity systems • Processed and updated in parallel • Input dependencies control light transport • Used for radiosity granularity Systems Input dependencies

  25. 3. Parametrization • Static meshes uses target geometry • Target geometry is used to compute radiosity • Project detail mesh onto target mesh to get uvs • Systems packed into separate uv atlases Automatic uv projection System atlases

  26. 4. Runtime data generation • One dataset per system (streaming friendly) • Distributed precompute with Incredibuild’s XGI • Data dependent on geometry only (not light or albedo) Distributed precompute pipeline generates runtime datasets for dynamic radiosity updates

  27. Rendering • Separate direct light / radiosity pipeline - CPU: radiosity - GPU: direct light & compositing • Frostbite uses deferred rendering - All lights can bounce dynamic radiosity • Separate lightmap / lightprobe rendering - Lighmaps rendered in forward pass - Lightprobes added to 3D textures and rendered deferred

  28. Runtime pipeline • Radiosity pass (CPU) • Update indirect lightmaps & lightprobes • Lift lightprobes into 3D textures • Geometry pass (GPU) • Add indirect lightmaps to separate g-buffer • Use stencil buffer to mask out dynamic objects • Light pass (GPU) • Render deferred light sources • Add lightmaps from g-buffer • Add lightprobes from 3D textures

  29. Direct lighting Radiosity

  30. Direct light

  31. Lightmaps

  32. Lightprobes

  33. Final composite

  34. Demo

  35. Summary / Questions? • Thanks! • per.einarsson@dice.se • sam.martin@geomerics.com

  36. Bonus Extras! Enlighten Future • Replace lightmaps? • Shift more towards data parallel? • Incremental update vs fixed cost? • Split lighting integral by distance?

More Related