DOOM 3 : The guts of a rendering engine

Similar documents
Render-To-Texture Caching. D. Sim Dietrich Jr.

Optimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June

Rendering and Radiosity. Introduction to Design Media Lecture 4 John Lee

Lecture 17: Shadows. Projects. Why Shadows? Shadows. Using the Shadow Map. Shadow Maps. Proposals due today. I will mail out comments

Volume Shadows Tutorial Nuclear / the Lab

Shadows in the graphics pipeline

Computergrafik. Matthias Zwicker. Herbst 2010

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

MAXIS-mizing Darkspore*: A Case Study of Graphic Analysis and Optimizations in Maxis Deferred Renderer

The Application Stage. The Game Loop, Resource Management and Renderer Design

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

Computer Graphics. Shadows

Deferred Rendering Due: Wednesday November 15 at 10pm

Computer Graphics 10 - Shadows

Shadow Rendering EDA101 Advanced Shading and Rendering

CS 354R: Computer Game Technology

Physically-Based Laser Simulation

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Guide Contents Introduction Useful Information Navigating the Scene Hotkeys Placing and Manipulating Objects The Builder Cube Builder Cube Edit

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

Dominic Filion, Senior Engineer Blizzard Entertainment. Rob McNaughton, Lead Technical Artist Blizzard Entertainment

What for? Shadows tell us about the relative locations. Vienna University of Technology 2

Surface Detail Maps with Soft Self- Shadowing. Chris Green, VALVE

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

Table of Contents. Questions or problems?

LEVEL 1 ANIMATION ACADEMY2010

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Getting fancy with texture mapping (Part 2) CS559 Spring Apr 2017

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog

The Graphics Pipeline

Topic 10: Scene Management, Particle Systems and Normal Mapping. CITS4242: Game Design and Multimedia

POWERVR MBX. Technology Overview

Texture Mapping. Images from 3D Creative Magazine

Textures. Texture coordinates. Introduce one more component to geometry

PowerVR Performance Recommendations The Golden Rules. October 2015

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Abstract. 2 Description of the Effects Used. 1 Introduction Phong Illumination Bump Mapping

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

Wed, October 12, 2011

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Let s start with occluding contours (or interior and exterior silhouettes), and look at image-space algorithms. A very simple technique is to render

Game Architecture. 2/19/16: Rasterization

PowerVR Performance Recommendations. The Golden Rules

Bringing Hollywood to Real Time. Abe Wiley 3D Artist 3-D Application Research Group

FAQ - Podium v1.4 by Jim Allen

character design pipeline) callum.html

Chapter 9- Ray-Tracing

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Applications of Explicit Early-Z Culling

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Deferred Splatting. Gaël GUENNEBAUD Loïc BARTHE Mathias PAULIN IRIT UPS CNRS TOULOUSE FRANCE.

Atmospheric Reentry Geometry Shader

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Hardware Displacement Mapping

LOD and Occlusion Christian Miller CS Fall 2011

Simpler Soft Shadow Mapping Lee Salzman September 20, 2007

Intel Core 4 DX11 Extensions Getting Kick Ass Visual Quality out of the Latest Intel GPUs

9. Illumination and Shading

Real-Time Shadows. André Offringa Timo Laman

Shadow Mapping and Visual Masking in Level of Detail Systems 1

Gaël Guennebaud Loïc Barthe, Mathias Paulin IRIT UPS CNRS TOULOUSE FRANCE Gaël Guennebaud Cyprus June 2006

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

Shadows for Many Lights sounds like it might mean something, but In fact it can mean very different things, that require very different solutions.

Texture Mapping and Special Effects

The Traditional Graphics Pipeline

Attention to Detail! Creating Next Generation Content For Radeon X1800 and beyond

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Working with Metal Overview

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

Here s the general problem we want to solve efficiently: Given a light and a set of pixels in view space, resolve occlusion between each pixel and

Shaders in Eve Online Páll Ragnar Pálsson

Rendering Grass Terrains in Real-Time with Dynamic Lighting. Kévin Boulanger, Sumanta Pattanaik, Kadi Bouatouch August 1st 2006

Microsoft Direct3D Devices 1. Device Types. Devices 2. Creating a Device

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.

Computer Graphics (CS 543) Lecture 10: Normal Maps, Parametrization, Tone Mapping

Occluder Simplification using Planar Sections

High Performance Visibility Testing with Screen Segmentation

CS451Real-time Rendering Pipeline

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

GLOBAL ILLUMINATION IN UNITY 5

4.6 Normal Mapping Simplifying Meshes for Normal Mapped Objects. CHAPTER 4 Surfacing

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

Surface Rendering. Surface Rendering

Announcements. Written Assignment 2 is out see the web page. Computer Graphics

A Reconfigurable Architecture for Load-Balanced Rendering

Real Time Rendering of Expensive Small Environments Colin Branch Stetson University

Transcription:

DOOM 3 : The guts of a rendering engine

Introduction Background Game Design Techniques Tradeoffs Problems and Solutions

Background Doom One of the most successful PC games of all time Kicked off First Person Shooter and Deathmatch games Visually stunning (at the time) Doom III Remake of DOOM using modern rendering technology Why do we care? Lots to learn One of the first games to really push modern rendering hardware Several interesting design choices and tradeoffs Id Software very open about technology It's one of the few non-radical games that we can talk knowledgeably about

Game design decisions You always need to look at your game design to pick the best mix or rendering features For Doom Mood : dark, scary Environment : Military base on Mars, Hell Game-play : FPS, with shades of survival horror, single-player focus Slower paced and fewer enemies than original What does that mean? Environment is constrained, few big vistas Also, few organic environments Some performance can be sacrificed for look Lighting is crucial for generating atmosphere

Game design decisions (cont'd) Example : Survival horror Want to be able to surprise player Why is that wall a different colour? problem Solution : Uniform surface rendering All models in game are rendered the same way Problems In most games, statics and dynamics are dealt with quite differently Need to select general purpose techniques Lightmaps great for statics, but awful for dynamics

Techniques Uses several important techniques that fit together well Stencil volume shadows Bump mapping Projected texture lights Pass per light Ignores other important techniques that are not a good fit Static lighting (light maps) Shadow buffers Projected texture shadows Height fields LOD Hardware vertex processing

Stencil volume shadows Draw extruded shadow volumes Use z-test, write to stencil buffer Advantages Consistent can apply to dynamics and statics Light maps don't work for dynamics Projected shadows don't work for statics Handles self shadowing Fully dynamic lighting at reasonable cost Disadvantages Requires relatively low polygon count models Lots of CPU vertex processing High fill rate requirement No soft shadows Can only shadow from one light

Bump mapping Store normal information for a surface in texture Advantages Adds lots of detail without adding polygons Fits well with stencil shadows, stencil shadows need low polygon counts, bump mapping fills in details Scalable Can be turned off with reasonable quality loss Disadvantages Burns texture memory, read bandwidth Needs sophisticated pixel processing Or lots of passes on older hardware Content generation is a real pain Can only handle one light

Projected texture lights Don't use standard directional/point/spot lights at all For each light define a projector frustum and texture Use projective UV co-ordinate generation to map onto surfaces

Projected texture lights (cont'd) Advantages Allows artists to shape light Flashlight beam Stained glass Can be used to fake certain effects that stencil shadows preclude Build soft/complex shadow into light Disadvantages Lights will appear on back of objects Not a problem with universal stencil shadowing Uses lots of texture read bandwidth Can only handle one light

Pass per light Bump mapping, stencil shadows and projected lights all have a big problem The can only deal with one light at a time Solution : Do a rendering pass for every light First Draw world into z-buffer Simplifies stencil processing to have opaque world in z-buffer first For each light Calculate shadow extrusions for all meshes for current light Render shadow volumes to stencil buffer Render each surface with stencil using current lights projected texture and sum to frame buffer Problem Lights become very expensive This is okay for a dark, moody world Problem

Other stuff In rendering pass for each light, other stuff can be layered on for glitz Specular Environment map Glow Etc.

Tradeoffs What these techniques get Extremely flexible lighting Consistent surface response High detail appearance inside polygons What they cost Need low polygon environments and objects Lots of CPU work on vertices No soft shadowing So it's good for dark, dramatically lit interior environment Surprise, surprise

Problems & solutions Problem : Lights get expensive Need to extrude shadow volumes for each light Need to render large shadow polygons for each light Solutions Need to determine occluding set for each light, as well as visible set for scene Minimise rendering cost associated with each light Discard meshes that are fully in shadow Minimise fill rate by using the Fill the z-buffer first trick Educate artists In FPS engines of the last five years, lights have been quite low cost, thanks to lightmaps Artists need to understand the costs associated with adding a light in a system like this

Problems & solutions (cont'd) Problem : Creating bump maps is a problem Building them by hand in very unintuitive Solution : Calculate them Build geometry at high resolution Use a tool to generate the bump map and a low resolution mesh from the geometry For characters, that's it For environments, generated bump map is then applied to world by level designer

Problems & solutions (cont'd) Many more How to manage decals Caching extruded shadow edges Accelerating some vertex operations with hardware Decomposing into multiple passes for older rendering hardware Etc.

Conclusions Consider game design issues when selecting rendering techniques Some techniques may compliment each other Don't be afraid to lose a feature that you don't really need to gain something else Zombies are scary