Butterfly Effect
DirectX 11 graphic features
Erland Körner, Technical Artist, Unity Sweden
Apr 12, 2013 Page
Who am I?!
• I am Erland Körner
• Unity Stockholm, Sweden
• Graphic Artist on demo-team
• 2 decades AAA background.
EA/DICE - Battlefield and
Mirrors Edge.
2
Apr 12, 2013 Page
Unity DirectX11
Butterfly Effect
3
Apr 12, 2013 Page
Unity DirectX11
Summed up
• Realtime shortfilm using Unity.
Research project.
• Unity, Passion Pictures and
Nvidia.
• ˜25 CG Artists (0 Unity
experience), ˜5 Programmers
during 14 weeks production time.
• 40GB Data, 40 scenes, 130 shots.
Using Unity CacheServer.
• DirectX 11 and 64bit Editor.
4
Apr 12, 2013 Page
Unity DirectX11
Usages in Butterfly effect
• DX11 = Collection of Windows multimedia API’s for games. Available
in Unity 4.x.
• DirectX 11 broadens visual (GPU) scope and fidelity. Eases efforts.
• Compute shaders, Tessellation and 3D Textures
• Enabling us to have Physically based, energy conservative shaders on
environment, skin and eyes
• ...Hair rendering and tessellation
• ...Full screen Post Processing
• ...Volumetric explosions
5
Apr 12, 2013 Page
Unity DirectX11
Compute shader example 1
• +1 million particles in Unity
• Fully simulated on the GPU,
hardly no pressure on CPU.
• GPU buffer position and
velocity.
• Each particle is a generated
billboard.
6
Apr 12, 2013 Page
Unity DirectX11
Compute shader example 2
• Fluid simulation.
• Works on 3D textures and
performs simulation.
• Texture describes the density and
velocity.
• To show the result the density 3D
texture is raymarched.
• A gradient texture is also
sampled to provide different color
depending on volume thickness.
7
Apr 12, 2013 Page
Unity DirectX11
Physically based shaders
• Inspired by Mental Ray
“Architectural” (MIA) shader
• High quality offline rendering
• Suitable for hard-surface materials
• Familiar and intuitive to CG /
non-game artists.
• THE shader for everything!!!
• Energy conserving - Material
follows laws of physics!
8
Apr 12, 2013 Page
Unity DirectX11
Skin Rendering
• Physically based shading.
• Mimics offline SSS rendering tools.
Top, epidermis and subdermal skin
layers.
• Renders lighting, then blurs, combines,
and adds top- and 2 spec layers.
• Back scatter, based on translucency
layers. Adds intensities into sublayer.
Indirect light from spherical
harmonics.
• Catmull-Clark Subdivision,
not directly Dx11 tessellation.
9
Apr 12, 2013 Page
Unity DirectX11
Hair and Tessellation
• System designed to be similar
to offline systems.
• Geometry shader. Rendered
using DirectX 11 tessellation.
• Hardware hair geometry
generation.
• Hair defined by Emitter mesh
and Guide hairs in 3d package.
10
Apr 12, 2013 Page
Unity DirectX11
Filmic Post-Effects breakdown
• Heavy amounts of Post-
processing in every shot!
• ...Motionblur (Velocity blur)
• ...Depth Of Field and Bokeh
shapes
• ...Photographic tonemapping
• ...Bloom (HDR, Specular
highlights and sun reflections)
11
Apr 12, 2013 Page
Unity DirectX11
Filmic Post-Effects breakdown
• ...Color correction (3D LUT)
• ...RGB channel Noise and grain
• ...Lens distortion
• ..HBAO (Horizon Based
Ambient Occlusion)
• Some already added to Unity
4.1...
12
Apr 12, 2013 Page
Unity DirectX11
Volumetric Explosions
• Fluid simulation expensive and
hard to control.
• Procedural techniques are practical
on current-gen hardware.
• Fast render volume renderer.
• Can calculate normal as gradient of
distance field, for lighting. Gives AO
approximations.
• Detail added by offset with
“pyroclastic” (Perlin) noise. Shade
based on displacement amount.
13
Apr 12, 2013 Page
Thanks and credits
• Renaldas Zioma, Aras Pranckevičius, Ole Ciliox, Paulius Liekis, Stefan Sandberg at
Unity
• Simon Green, Jon Jansen an everyone involved of Nvidia
• Passion Pictures
14
More examples
Apr 12, 2013 Page
Unity DirectX11
Opacity Mapping example
• Fourier Opacity Mapping, for
rendering self-shadowing
effects.
• DX11 Tessellation, for
acceleration.
16
Apr 12, 2013 Page
Signed Distance Field example 1
• Similar approach as volumetric
explosions.
• Julia fractal. Distance Fields are
surfaces defined
mathematically.
• For each pixel touched is
raymarched a function that
describes the fractal.
• Cubemap and AO sampled with
the normal for added detail.
17
Apr 12, 2013 Page
Signed Distance Field example 2
• Describes whether camera is on the surface (value 0) or above or
below it.
• Morphed by other functions, like the wave (sin and cos).
18
Apr 12, 2013 Page
Signed Distance Field example 3
• Sample until reaching back of
the volume to figure out
thickness.
• Dim surface where the volume
is thicker.
19

[UniteKorea2013] Butterfly Effect DX11

  • 1.
    Butterfly Effect DirectX 11graphic features Erland Körner, Technical Artist, Unity Sweden
  • 2.
    Apr 12, 2013Page Who am I?! • I am Erland Körner • Unity Stockholm, Sweden • Graphic Artist on demo-team • 2 decades AAA background. EA/DICE - Battlefield and Mirrors Edge. 2
  • 3.
    Apr 12, 2013Page Unity DirectX11 Butterfly Effect 3
  • 4.
    Apr 12, 2013Page Unity DirectX11 Summed up • Realtime shortfilm using Unity. Research project. • Unity, Passion Pictures and Nvidia. • ˜25 CG Artists (0 Unity experience), ˜5 Programmers during 14 weeks production time. • 40GB Data, 40 scenes, 130 shots. Using Unity CacheServer. • DirectX 11 and 64bit Editor. 4
  • 5.
    Apr 12, 2013Page Unity DirectX11 Usages in Butterfly effect • DX11 = Collection of Windows multimedia API’s for games. Available in Unity 4.x. • DirectX 11 broadens visual (GPU) scope and fidelity. Eases efforts. • Compute shaders, Tessellation and 3D Textures • Enabling us to have Physically based, energy conservative shaders on environment, skin and eyes • ...Hair rendering and tessellation • ...Full screen Post Processing • ...Volumetric explosions 5
  • 6.
    Apr 12, 2013Page Unity DirectX11 Compute shader example 1 • +1 million particles in Unity • Fully simulated on the GPU, hardly no pressure on CPU. • GPU buffer position and velocity. • Each particle is a generated billboard. 6
  • 7.
    Apr 12, 2013Page Unity DirectX11 Compute shader example 2 • Fluid simulation. • Works on 3D textures and performs simulation. • Texture describes the density and velocity. • To show the result the density 3D texture is raymarched. • A gradient texture is also sampled to provide different color depending on volume thickness. 7
  • 8.
    Apr 12, 2013Page Unity DirectX11 Physically based shaders • Inspired by Mental Ray “Architectural” (MIA) shader • High quality offline rendering • Suitable for hard-surface materials • Familiar and intuitive to CG / non-game artists. • THE shader for everything!!! • Energy conserving - Material follows laws of physics! 8
  • 9.
    Apr 12, 2013Page Unity DirectX11 Skin Rendering • Physically based shading. • Mimics offline SSS rendering tools. Top, epidermis and subdermal skin layers. • Renders lighting, then blurs, combines, and adds top- and 2 spec layers. • Back scatter, based on translucency layers. Adds intensities into sublayer. Indirect light from spherical harmonics. • Catmull-Clark Subdivision, not directly Dx11 tessellation. 9
  • 10.
    Apr 12, 2013Page Unity DirectX11 Hair and Tessellation • System designed to be similar to offline systems. • Geometry shader. Rendered using DirectX 11 tessellation. • Hardware hair geometry generation. • Hair defined by Emitter mesh and Guide hairs in 3d package. 10
  • 11.
    Apr 12, 2013Page Unity DirectX11 Filmic Post-Effects breakdown • Heavy amounts of Post- processing in every shot! • ...Motionblur (Velocity blur) • ...Depth Of Field and Bokeh shapes • ...Photographic tonemapping • ...Bloom (HDR, Specular highlights and sun reflections) 11
  • 12.
    Apr 12, 2013Page Unity DirectX11 Filmic Post-Effects breakdown • ...Color correction (3D LUT) • ...RGB channel Noise and grain • ...Lens distortion • ..HBAO (Horizon Based Ambient Occlusion) • Some already added to Unity 4.1... 12
  • 13.
    Apr 12, 2013Page Unity DirectX11 Volumetric Explosions • Fluid simulation expensive and hard to control. • Procedural techniques are practical on current-gen hardware. • Fast render volume renderer. • Can calculate normal as gradient of distance field, for lighting. Gives AO approximations. • Detail added by offset with “pyroclastic” (Perlin) noise. Shade based on displacement amount. 13
  • 14.
    Apr 12, 2013Page Thanks and credits • Renaldas Zioma, Aras Pranckevičius, Ole Ciliox, Paulius Liekis, Stefan Sandberg at Unity • Simon Green, Jon Jansen an everyone involved of Nvidia • Passion Pictures 14
  • 15.
  • 16.
    Apr 12, 2013Page Unity DirectX11 Opacity Mapping example • Fourier Opacity Mapping, for rendering self-shadowing effects. • DX11 Tessellation, for acceleration. 16
  • 17.
    Apr 12, 2013Page Signed Distance Field example 1 • Similar approach as volumetric explosions. • Julia fractal. Distance Fields are surfaces defined mathematically. • For each pixel touched is raymarched a function that describes the fractal. • Cubemap and AO sampled with the normal for added detail. 17
  • 18.
    Apr 12, 2013Page Signed Distance Field example 2 • Describes whether camera is on the surface (value 0) or above or below it. • Morphed by other functions, like the wave (sin and cos). 18
  • 19.
    Apr 12, 2013Page Signed Distance Field example 3 • Sample until reaching back of the volume to figure out thickness. • Dim surface where the volume is thicker. 19