Killzone Shadow Fall Demo Postmortem Talk

The talk I gave at Sony’s Devstation and Devcon conferences earlier this year.

Valient_Killzone_Shadow_Fall_Demo_Postmortem

This talk is about our experiences gained during making of the Killzone Shadow Fall announcement demo. We’ve gathered all the hard data about our assets, memory, CPU and GPU usage and a whole bunch of tricks. The goal of talk is to help you to form a clear picture of what’s already possible to do on PS4.

View slides on Slideshare
Download the slides in PPT format (72.4mb – includes notes and downsized videos)
Download the slides in PDF format (27.1mb)
Go to Guerrilla publications page for the original slides

Practical Occlusion Culling in Killzone 3

These are slides from the talk I gave at Siggraph 2011. It shows our SPU-based occlusion culling used in the game.

Killzone 3 features complex occluded environments. To cull non-visible geometry early in the frame, the game uses PlayStation 3 SPUs to rasterize a conservative depth buffer and perform fast synchronous occlusion queries against it. This talk presents an overview of the approach and key lessons learned during its development.

View slides on Slideshare
Download the slides

Guerrilla publications page

The Rendering Technology of Killzone 2

Here are the slides from the talk I gave at the Game Developers Conference in 2009.

This presentation gives an overview of the rendering techniques used in KILLZONE 2. We put the main focus on the lighting and shadowing techniques of our deferred shading engine and how we made them play nicely with anti-aliasing.

View slides at Slideshare
Download the presentation

Download the extended notes
Guerrilla publications page

Deferred Rendering in Killzone 2

I gave a talk about Killzone 2 deferred rendering at Develop Brighton in 2007.

Next generation gaming brought high resolutions, very complex environments and large textures to our living rooms. With almost every asset being inflated, it’s hard to use traditional forward rendering and hope for rich, dynamic environments with extensive dynamic lighting. Deferred rendering, however, has been traditionally described as a nice technique for rendering of scenes with many dynamic lights, that unfortunately suffers from fill-rate problems and lack of anti-aliasing and very few games that use it were published.

In this talk, we will discuss our approach to face this challenge and how we designed a deferred rendering engine that uses multi-sampled anti-aliasing (MSAA). We will give in-depth description of each individual stage of our real-time rendering pipeline and the main ingredients of our lighting, post-processing and data management. We’ll show how we use PS3′s SPUs for fast rendering of a large set of primitives, parallel processing of geometry and computation of indirect lighting. We will also describe our optimizations of the lighting and our parallel split (cascaded) shadow map algorithm for faster and stable MSAA output.

View slides at Slideshare
Download the slides
Guerrilla publications page

Anti-aliased Soft Shadows

Publications info:
Valient, M., “Hardware Generated Object Silhouettes“. G – Journal for Geometry and Graphics, No 3, Volume 2, Slovak Society for Geometry and Graphics, 2005, ISSN 1336-524X.

Valient, M., Bujnak, T., “GPU Friendly, Anti-aliased, Soft Shadow Mapping“. Reviewed poster. ACM Proceedings of SCCG 2005, ACM Press, October 2005, ISBN 1-59593-203-6.

How are these articles related:
The first article (Hardware Generated Object Silhouettes) describes in depth the possibility to generate object silhouettes on GPU and the second article (GPU Friendly, Anti-aliased, Soft Shadow Mapping) uses this approach to generate the soft shadows.

Abstract (Hardware Generated Object Silhouettes):
In this article, we present a high performance algorithm that renders thick object silhouettes completely on the GPU using only two passes. We present a new structure called topology aware mesh, which allows us to overcome the lack of global adjacency information during the
vertex processing on GPU. Topology aware mesh stores complete face adjacency information for each vertex and allows edge computations to be performed on graphics hardware. Topology aware mesh consumes about 0.77 times the storage of the original mesh when using 16-bit precision and stream frequency capability of current hardware and it is created only once during the linear-time pre-processing step. Our approach can be used as a replacement for many CPU based silhouette detection algorithms in NPR or shadow rendering.

Abstract (GPU Friendly, Anti-aliased, Soft Shadow Mapping):
In this paper, we present an algorithm that renders anti-aliased, soft edged shadows using a modified shadow-mapping approach. Our algorithm adds the silhouette information to the shadow map, thus allowing rendering precise and continuous shadow boundaries. Soft shadows for small spherical light sources are rendered using a variation of the percentage closer filtering algorithm [Reeves 1987]. The critical improvement of our algorithm over previous approaches is that it runs completely on the GPU using only two passes. This includes the silhouette detection step which is done completely in the vertex and pixel shaders using specially generated version of the mesh.

Download the ‘Hardware Generated Object Silhouettes’
Download the ‘GPU Friendly, Anti-aliased, Soft Shadow Mapping’

Fractional-Disk Soft Shadows

Publication info:
Valient, M., W., H., de Boer., “Fractional-Disk Soft Shadows”, In: Engel, W. F., et al., “ShaderX3: Advanced Rendering With DirectX And OpenGL”, Charles River Media, November 2004, ISBN 1-58450-357-2.

Abstract:
This article describes a simple, practical, and fairly effective way to approximate soft shadows. The actual implementation is a modification of the percentage closer filtering (PCF). PCF was originally designed to address the aliasing problem inherent in shadow mapping. It also has the welcome side effect of generating soft shadow edges, which resemble simple constant-width penumbrae. In this article we show how a modified PCF algorithm can produce more realistic penumbrae. We use stochastic sampling varied per pixel to obtain reasonable results while using fewer shadow map samples.

Download the article
Download the source code

Accelerated real-time rendering

Publication info:
Valient, M., “Accelerated real-time rendering”, Master thesis, Faculty of Mathematics, Physics and Informatics, Comenius University, Bratislava, April 2003.

This publication also contains parts from:
Valient, M., “Advanced lighting and shading with Direct3D 9″, In: Engel, W. F., et al., “ShaderX2 – Shader Introduction & Tutorial”, Wordware Inc., October 2003, ISBN 155622902X.
Valient, M., “Shadow mapping with Direct3D 9″, In: Engel, W. F., et al., “ShaderX2 – Shader Introduction & Tutorial”, Wordware Inc., October 2003, ISBN 155622902X.
Valient, M., “Advanced lighting and shading with Direct3D”, CESCG 2003 poster, April 2003.

Abstract:
Advanced real-time lighting and shading techniques are presented in this thesis. We begin with the per pixel Phong lighting, then explain and implement the bumpy environmental mapping enhanced with a Fresnel term, both with pixel shaders 1.4 and 2.0. After this prelude, advanced lighting models are described. Oren-Nayar lighting is used for rough surfaces such as clay. We implement it with shaders 2.0. Cook- Torrance model is mainly used for shiny metallic surfaces and we show version for pixel shader 1.4 and 2.0. Thesis ends with implementation of soft edged shadows created with the improved shadow mapping technique.

Download the thesis
Download the poster
Download the code

Per-pixel shading and optimizations for Direct3D 8

This is my article from November 2002 about the implementation of per-pixel Phong shading on DX8 class of hardware. Available with the source code.

I re-viewed the article in 2004 and corrected some bugs and grammar.

Also contains:
- Description of the lighting equation
- Description of tangent space
- How to implement a spotlights
- Various implementations for multiple lights per pass.

Download the article
Download the source code

3D Engines in Games

My article from 2001 where I tried to describe what a nice engine should contain, what was the history of 3D games, APIs, what is the point of view of the gamer…

Here is the foreword:
Real-time rendering is one of the most dynamic areas in the computer graphics (later only CG). Three dimensional computer games are in other way one of the most profitable commercial applications of the real-time rendering (and CG as whole). Real-time rendering attracts more and more people every year. With every generation of 3D accelerators we see nicer and more realistic games with new effects and more complex models. This article is meant to be a small introduction to the field of real-time graphics for computer games.
The article is divided into several sections
- History of 3D games – a brief history of real-time 3D games, accelerators and API’s.
- Game engine scheme – parts of generic game engine with description.
- 3D API basics – very basic description of the pipelines.
- World of games – describes the specific world of games, point of view of the gamer and point of view of the programmer.

Download the article