You are on page 1of 17

Static Lighting Tricks In Halo 4

Mike Boulton
Principal Engineer, Microsoft
GDC 2013
Overview
Today Ill give a brief summary of the pros and cons of
our GPU-based light mapper.

Ill also give an overview of two techniques we used to
improve static lighting fidelity
1. GPU light mapper takeaways
Our in-house light mapper was written in DirectX11 on the
PC
Ran on DX10.0+ hardware
Used standard rasterization techniques for direct lighting
Used hemi-cube rendering for indirect
Ran pretty fast
Typically less than a minute for draft direct, less than five minutes
for draft indirect
1. GPU light mapper takeaways
PROS
Ran fast allowed artists to
iterate on static lighting in a
reasonable time
Generated high quality results
Draft mode was an honest
representation of final results

CONS
You quickly find that fast is
never fast enough
Non-workstation graphics cards
melt frequently
Nightmare to debug problems
with drivers


2. High-efficiency texture packer
One way to improve fidelity is to focus on
efficiency

A better texture packer helps a lot here
2. High-efficiency texture packer
Good results
Very fast
< 30 seconds typically
Very efficient
> 85% pixel utilization typically
10,000 charts
>85% efficiency
Packed in 15s
Correct for bilinear
32,000 charts
>90% efficiency
Packed in 25s
Correct for bilinear

2. High-efficiency texture packer
Collapses UVs of narrow charts
2. High-efficiency texture packer
Uses greedy transactional multi-threaded model
Supports constraints
E.g. Constraining number of charts per 4x4 aligned block
to help with DXT compression artefacts
Also used by character artists for packing UVs
Few seconds automated vs. hours manual
Typically gave 10%+ space efficiency improvements over
hand-packing

Proceeds from top left to bottom right
Like a typewriter
If two CPUs collide we pack one and
restart the other
Number of collisions actually rather low
3. Sparse refinement of lighting intensity
3. Sparse refinement of lighting
intensity
The direct intensity at each light map texel could
be refined down to a 4x4 sub-block
So a 1024x1024 light map could be 4096x4096, in
places
Overlay texture used to point to optional
refinement block for each pixel
Shadow boundaries much sharper

3. Sparse refinement of lighting
intensity
An algorithm automatically shared out pre-
defined amount of memory
Refinement blocks were actually 5x5 so we
could handle filtering
And were packed into a DXT3A texture
Questions?
mboulton@microsoft.com

You might also like