Realtime global illumination and reflections in Dust 514

51
Realtime global illumination and reflections in Dust 514 On the PS3, in 1080p. Hugh Malan / CCP Newcastle

description

Realtime global illumination and reflections in Dust 514. On the PS3, in 1080p. Hugh Malan / CCP Newcastle. Motivation. Motivation. Results. The basic idea. Reflection term. Indirect term. Ideal. Environment. Realtime. Requirements for Dust 514. Layers. Layers. - PowerPoint PPT Presentation

Transcript of Realtime global illumination and reflections in Dust 514

Page 1: Realtime  global illumination  and reflections in Dust 514

Realtime global illumination and reflections in Dust 514

On the PS3, in 1080p.

Hugh Malan / CCP Newcastle

Page 2: Realtime  global illumination  and reflections in Dust 514

Motivation

Page 3: Realtime  global illumination  and reflections in Dust 514

Motivation

Page 4: Realtime  global illumination  and reflections in Dust 514
Page 5: Realtime  global illumination  and reflections in Dust 514
Page 6: Realtime  global illumination  and reflections in Dust 514

Results

Page 7: Realtime  global illumination  and reflections in Dust 514

The basic idea

Page 8: Realtime  global illumination  and reflections in Dust 514

Reflection term

Page 9: Realtime  global illumination  and reflections in Dust 514

Indirect term

IdealEnvironment Realtime

Page 10: Realtime  global illumination  and reflections in Dust 514
Page 11: Realtime  global illumination  and reflections in Dust 514

Requirements for Dust 514

Page 12: Realtime  global illumination  and reflections in Dust 514

Layers

Page 13: Realtime  global illumination  and reflections in Dust 514

Layers

Page 14: Realtime  global illumination  and reflections in Dust 514

Raytracing the heightfield

Page 15: Realtime  global illumination  and reflections in Dust 514

Ray bias

Page 16: Realtime  global illumination  and reflections in Dust 514

Heightfield refinement

Page 17: Realtime  global illumination  and reflections in Dust 514

Heightfield refinement

Page 18: Realtime  global illumination  and reflections in Dust 514

Heightfield refinement

Page 19: Realtime  global illumination  and reflections in Dust 514

Heightfield refinement

Page 20: Realtime  global illumination  and reflections in Dust 514

Heightfield refinement

Page 21: Realtime  global illumination  and reflections in Dust 514

The entire trace procedure

• Compute up/down biased ray vectors• Sample packed heightfield at ray origin• Compute intersection point for each layer• Compute mip bias for each layer• Sample the four layer textures and sky texture• Composite the results to produce an up and down color

Sky, ceiling, bridge below Floor, bridge above

• Blend up/down colors based on query ray direction

Page 22: Realtime  global illumination  and reflections in Dust 514

Refinements

• Timeslice layer update• Reuse CSM for shadows• Fadeout at edges• Quantized movement

Page 23: Realtime  global illumination  and reflections in Dust 514

Walls

Page 24: Realtime  global illumination  and reflections in Dust 514

Summary

+ Provides universal indirect term+ Provides universal reflection term with variable blur+ Fast- Can’t support scenes with arbitrary height complexity- In general, can’t cope with walls and vertical surfaces- Dynamic objects won’t contribute to indirect or reflection- Limited reflection quality

Page 25: Realtime  global illumination  and reflections in Dust 514

Multiple projections

Page 26: Realtime  global illumination  and reflections in Dust 514

1920x1080, with AA

Page 27: Realtime  global illumination  and reflections in Dust 514

Background

Page 28: Realtime  global illumination  and reflections in Dust 514

More background

Page 29: Realtime  global illumination  and reflections in Dust 514

More background

Page 30: Realtime  global illumination  and reflections in Dust 514

More background

Page 31: Realtime  global illumination  and reflections in Dust 514

The last of the background stuff

For each pixel in the final image…• Is that part of the image static or changing?• If it’s static, blend in the current render• If it’s changing, immediately show the current render

Page 32: Realtime  global illumination  and reflections in Dust 514

Upscaling

Page 33: Realtime  global illumination  and reflections in Dust 514

Upscaling

Page 34: Realtime  global illumination  and reflections in Dust 514

Upscaling

Page 35: Realtime  global illumination  and reflections in Dust 514

Accumulated and low-res images

Page 36: Realtime  global illumination  and reflections in Dust 514

Triple buffering with two buffers

Page 37: Realtime  global illumination  and reflections in Dust 514

Static or changing?

Page 38: Realtime  global illumination  and reflections in Dust 514

Accumulation step

Page 39: Realtime  global illumination  and reflections in Dust 514

Abrupt change

Page 40: Realtime  global illumination  and reflections in Dust 514

Results

Page 41: Realtime  global illumination  and reflections in Dust 514

Results

Page 42: Realtime  global illumination  and reflections in Dust 514

Improvements with more budget

• Motion blur• Better static vs changing decision; eg analyze a larger

neighbourhood• Better AA for abrupt change case, eg FXAA

Page 43: Realtime  global illumination  and reflections in Dust 514

Thanks to…

• Anders Caspersson• Chris McClure• Dominic Goulding• Halldor Fannar• Lee Clark• Richard Smith

Page 44: Realtime  global illumination  and reflections in Dust 514

?

Page 45: Realtime  global illumination  and reflections in Dust 514

Bonus slides!

Page 46: Realtime  global illumination  and reflections in Dust 514

Heightfield refinement details

half4 incremental_heightfield_update(float2 curr_uv, sampler2D last_heightfield, sampler2D raw_heightfield_from_scene,half enforced_gradient)

{half new_height=tex2D(raw_heightfield_from_scene, curr_uv)).r;for(float2 direction in +X, -X, +Y, -Y){for(float step_distance in 1, 4){float2 query_uv=curr_uv+(direction*step_distance);new_height=max(new_height, old_height(query_uv).r-step_distance*enforced_gradient);}}return new_height;

}

Page 47: Realtime  global illumination  and reflections in Dust 514

Area lights and shadows

Page 48: Realtime  global illumination  and reflections in Dust 514

Greater height complexity

Page 49: Realtime  global illumination  and reflections in Dust 514

Space distortion for folding walls

Page 50: Realtime  global illumination  and reflections in Dust 514

Post-projection transform calibration

Page 51: Realtime  global illumination  and reflections in Dust 514