Far Cry 4 and Assassin’s Creed Unity: Spicing Up PC Graphics with GameWorks Andrei Tatarinov, Senior Developer Technology Engineer, NVIDIA What games are we dealing with? How to make these games look even better on PC? Agenda The Mighty Three: HBAO+, PCSS, TXAA Far Cry 4: Making the beasts look cute Far Cry 4: Illuminating Kyrat with divine light
2 Far Cry 4
Open-world action-adventure first-person shooter Set in Kyrat, a breathtaking, perilous and wild region of the Himalayas Terrain spans from lush forests to the snowcapped mountains Kyrat is home to abundant wildlife Uses Dunia Engine 2
3 Far Cry 4
Set in astounding Himalayas 4
Far Cry 4
Player finds himself in the midst of a civil war 5 Far Cry 4
Absolute freedom of movement6
Dangerous and deadly wildlife Far Cry 4
7 Assassin’s Creed Unity
Historical fiction action-adventure open world stealth video game Set in Paris during French Revolution Stunning full-scale open world city, made possible by the all-new game engine Unprecedented degree of freedom and control Uses AnvilNext engine
8 Assassin’s Creed Unity
Set in Paris during French Revolution 9
Assassin’s Creed Unity
Set in Paris during French Revolution10
Assassin’s Creed Unity
Open world 11
Assassin’s Creed Unity
Variety of moves12
Assassin’s Creed Unity
Focus on stealth action13
Cooperative mode
Assassin’s Creed Unity
14 Making PC versions look better
PC offers extra performance to add extra features NVIDIA has technology that is ready to be integrated Experience gained while working on Assassin’s Creed IV Black Flag Both Ubisoft and NVIDIA dedicate engineers for collaboration
15 What GameWorks can offer?
We played both games and thought of what can NVIDIA GameWorks offer to make them look even better NVIDIA ShadowWorks and NVIDIA PostWorks are a great fit for both Far Cry 4 and Assassin’s Creed Unity NVIDIA HairWorks and NVIDIA Godrays are a great fit for Far Cry 4
16 The Mighty Three: HBAO+, PCSS, TXAA NVIDIA ShadowWorks
Consists of different technologies to provide cinematic shadows HBAO+ Advanced Soft Shadows
18 Horizon-Based Ambient Occlusion+
State of the art SSAO approach Optimal performance Scalable
19 No AO
20 Default
21 HBAO+
22 SSBC
23 HBAO+
24 Closer look
SSBC HBAO+
25 Tuning HBAO+
Radius: Size of HBAO kernel Bias: Hides low-tessellation artifacts Exponent: Occlusion fall-off Detail occlusion: Weight of high-frequency occlusion component Coarse occlusion: Weight of low-frequency occlusion component
26 Advanced Soft Shadows
State of the art soft shadows Based on Percentage Closer Soft Shadows (PCSS) Support for cascaded shadow maps Simple, but powerful interface
27 Advanced Soft Shadows
OFF 28
Advanced Soft Shadows
ON 29
Advanced Soft Shadows
OFF 30
Advanced Soft Shadows
ON 31
Advanced Soft Shadows
OFF 32
Advanced Soft Shadows
ON 33
Tuning Advanced Soft Shadows
Light size Maximum threshold Minimal percentage Blend percent Border percent
34 Tuning Advanced Soft Shadows
Light size Maximum threshold Minimal percentage Light size Blend percent Border percent
Minimal percentage
Maximum threshold 35
Tuning Advanced Soft Shadows
Light size Maximum threshold Minimal percentage Blend percent Border percent
36 Tuning Advanced Soft Shadows
Light size Maximum threshold Minimal percentage Blend percent Border percent
37 Tuning Advanced Soft Shadows
Light size Maximum threshold Minimal percentage Blend percent Border percent
38 PCSS light leaks
39 Fixing light leaks
Light leaks occur when light size is too big PCSS kernel gets too wide and samples outside cascades Adjust border percent to limit the kernel If light leaks are still there, decrease light size and maximum threshold
40 Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
9:00AM 41
Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
10:00AM 42
Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
11:00AM 43
Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
12:00AM 44
Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
1:00PM 45
Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
2:00PM 46
Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
3:00PM 47
Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
4:00PM 48
Advanced Soft Shadows in Far Cry 4
PCSS shadows are softer at mornings and evenings and sharper at noon
5:00PM 49
Advanced Soft Shadows in Far Cry 4
PCSS shadows were too sharp and aliased at noon
Shadows = SOFT SHADOWS50
Advanced Soft Shadows in Far Cry 4
PCSS missed small- scale details
Shadows = SOFT SHADOWS51
Advanced Soft Shadows in Far Cry 4
PCSS missed small- scale details
52 Advanced Soft Shadows in Far Cry 4
PCSS missed small- Small features are scale details completely gone
Small features start disappearing
53 Advanced Soft Shadows in Far Cry 4
Original shadows handle this case properly
Shadows = ULTRA 54
Advanced Soft Shadows in Far Cry 4
Make light size depend on daytime Re-configure cascades
Shadows = SOFT SHADOWS55
Advanced Soft Shadows in Far Cry 4
Make light size depend on daytime Re-configure cascades
Shadows = SOFT SHADOWS56
Temporal Anti-Aliasing (TXAA)
Film-style anti-aliasing technique designed specifically to reduce temporal aliasing Part of NVIDIA PostWorks family
57 No AA
58 FXAA
59 4xMSAA
60 TXAA
61 Temporal Anti-Aliasing (TXAA)
TXAA requires properly generated MSAA image as input MSAA path in the engine should work correctly
Use g-buffer with MSAA
Make shading pass support MSAA
Add MSAA support for post-processing techniques
62 Summary
Five engineers were involved in integrating these features into both Assassin’s Creed Unity and Far Cry 4 One man-month per effect per title on average Experience and knowledge from past collaborations saved us a lot of time
63 Far Cry 4: Making the beasts look cute Wildlife in Far Cry 4
This is how animals of Kyrat look in real life:
65 Wildlife in Far Cry 4
This is how they look in real life:
66 Wildlife in Far Cry 4
The cutest creature in the whole game:
67 Wildlife in Far Cry 4
The cutest creature in the whole game:
68 Wildlife in Far Cry 4
The cutest creature in the whole game:
69 Wildlife in Far Cry 4
The cutest creature in the whole game:
70 NVIDIA HairWorks
Enables users to simulate and render fur to provide a truly interactive game experience HairWorks Viewer A combination of run-time library and a content creation tool
71 Actual game
HairWorks integration workflow
Get a proof-of-concept for HairWorks to be a good fit for Far Cry 4’s content
Integrate the run-time library into the engine and the level editor
Author the HairWorks assets
Add them to the game’s content
Perform the QA pass 72
Proof of concept
Perform initial experiments on assets from Far Cry 4 to see if HairWorks is a good fit for the game Experiments were performed in the HairWorks Viewer
73 Proof of concept
Perform initial experiments on assets from Far Cry 4 to see if HairWorks is a good fit for the game Yak Experiments were performed in the HairWorks Viewer
Yak (NV Fur) 74
Integration into the engine
HairWorks run-time has a customizable rendering functionality HairWorks fur properties are stored in additional textures Far Cry 4 level editor has been modified to add new properties to support HairWorks
75 Authoring the assets
HairWorks Viewer was used to create the assets that were later exported to the game
76 Authoring the assets
HairWorks Viewer was used to create the assets that were later exported to the game
77 Authoring the assets
Two days required to do the initial authoring of each asset 30 assets total were created
78 Preserving the silhouettes
Fur is “baked” into the mesh
79 Preserving the silhouettes
Fur is “baked” into the mesh
80 Preserving the silhouettes
Artifacts appear if you try to both preserve the silhouette and leave the original mesh beneath the fur
81 Preserving the silhouettes
A modified mesh should be rendered when HairWorks is active
82 Preserving the silhouettes
A modified mesh should be rendered when HairWorks is active
83 Preserving the silhouettes
A modified mesh should be rendered when HairWorks is active
84 Shading
HairWorks allows you to implement your own shading model Supports both forward and deferred shading
85 Shading in Far Cry 4
In Far Cry 4, we rely on Dunia rendering mechanics to perform shading Custom material is used HairWorks parameters are stored in g-buffer
Diffuse color, compressed 86
Shading in Far Cry 4
In Far Cry 4, we rely on Dunia rendering mechanics to perform shading Custom material is used HairWorks parameters are stored in g-buffer
Normals 87
Shading in Far Cry 4
In Far Cry 4, we rely on Dunia rendering mechanics to perform shading Custom material is used HairWorks parameters are stored in g-buffer
Specular power and scale 88
Shading in Far Cry 4
In Far Cry 4, we rely on Dunia rendering mechanics to perform shading Custom material is used HairWorks parameters are stored in g-buffer
HairWorks Fur tangents 89
Shading in Far Cry 4
In Far Cry 4, we rely on Dunia rendering mechanics to perform shading Custom material is used HairWorks parameters are stored in g-buffer
Result of deferred shading 90
Anti-aliasing
HairWorks generates a lot of tiny fur springs Shimmering can be visible on fur
91 92 Anti-aliasing
Best solution is to render HairWorks fur in a separate, anti-aliasing enabled pass In Far Cry 4 fur is rendered in the main pass and relies on global anti-aliasing
93 Anti-aliasing
Far Cry 4 relies on global anti-aliasing settings to fight shimmering
No AA applied 94
Anti-aliasing
Far Cry 4 relies on global anti-aliasing settings to fight shimmering
No AA applied 95
Anti-aliasing
Far Cry 4 relies on global anti-aliasing settings to fight shimmering
No AA applied 96
Anti-aliasing
Far Cry 4 relies on global anti-aliasing settings to fight shimmering
4xMSAA 97
Anti-aliasing
Far Cry 4 relies on global anti-aliasing settings to fight shimmering
4xTXAA 98
Summary
The animals of Kyrat now look even more realistic One man-year and three engineers were needed to add this feature
One software engineer from Ubisoft
Two technical artists from NVIDIA 30 assets were created total
99 Summary
The animals of Kyrat now look even more realistic One man-year and three engineers were needed to add this feature
One software engineer from Ubisoft
Two technical artists from NVIDIA 30 assets were created total
Most of these cuties are just too deadly!
100 101 Far Cry 4: Illuminating Kyrat with divine light 103 OFF 104ON
NVIDIA Godrays
Realistically looking sun shafts Vast opportunities for tuning Scalable performance
105 Add some color!
First integration of Godrays used the in-game color of smoke
106 Add some color!
Using the sun color showed the best results
107 Find the balance
The scene looks completely fogged In fact, it is just godrays adding too much density
108 Find the balance Make godrays intensity daytime-dependent
NOON
7:00AM 5:00PM
109 110 “ This is a very exciting feature. Above all, this one makes a big difference in image quality that is noticeable throughout the game. The drastic changes between turning it on and off can totally transform scenes in Far Cry 4.”
— HardOCP
111 Summary
One man-month and one engineer were needed to add this feature One software engineer from NVIDIA One week to perform a basic integration Three weeks to tune the effect and fix artifacts
112 Overall summary
Five effects integrated into Far Cry 4 Three effects integrated into Assassin’s Creed Unity Active phase of engagement took six months Seven engineers from Ubisoft Kiev and six engineers from NVIDIA involved
113 Special thanks to: NVIDIA: Ubisoft:
Dane Johnston Sam Kovalev Johnny Costello Roman Bobel Tim Tcheblokov Mikhail Kravets Oleg Arutyunyan Artem Kandinsky Alexey Barkovoy Aleksandr Polischuk Tae-Yong Kim Dmitry Rozovik Chad Vivoli Artem Kotsiuba Anton Remezenko 114 Thanks!