Apresentação do PowerPoint · Step 2 – Render the scene from light source’s viewpoint; SHADOW...
Transcript of Apresentação do PowerPoint · Step 2 – Render the scene from light source’s viewpoint; SHADOW...
HARD SHADOW ANTI-ALIASING FOR
SPOT LIGHTS IN A GAME ENGINE
MÁRCIO C. F. MACEDO ([email protected])
ALMIR V. S. TEIXEIRA ([email protected])
ANTONIO L. APOLINÁRIO JR. ([email protected])
KARL A. AGUERO ([email protected])
PGCOMP (UFBA –BRAZIL)
AGENDA
Introduction;
Shadow Mapping;
Revectorization-based Shadow Mapping;
Results and Discussion;
Conclusion and Future Works.
2
INTRODUCTION 3
CONTEXT
4
Shadows are important
in games because:
they improve the visual
perception of the player;
Dynamic Shadows on Mass Effect 3. Available in https://www.geforce.com/whats-new/guides/mass-effect-3-tweak-guide#6
No Shadow Shadows
CONTEXT
Shadow Mapping [Williams1978]:
Default shadow technique for game engines;
Real-time performance;
Aliasing artifacts;
5
CONTEXT
Revectorization-based Shadow Mapping
[Macedo2016]:
Shadow anti-aliasing;
High visual quality;
Minimal overhead;
6
SHADOW MAPPING 7
SHADOW MAPPING
8
Step 1 – Load the scene;
SHADOW MAPPING
9
Step 2 – Render the scene from light source’s
viewpoint;
SHADOW MAPPING
10
Step 3 – Generate a shadow map;
SHADOW MAPPING
11
Step 4 – Compute the real-time shadows;
REVECTORIZATION-BASED
SHADOW MAPPING 12
REVECTORIZATION-BASED SHADOW
MAPPING
This technique aims to solve the aliasing problem
generated by shadow mapping;
13
REVECTORIZATION-BASED SHADOW
MAPPING
Step 1 – Render the aliased shadow;
14
REVECTORIZATION-BASED SHADOW
MAPPING
Step 2 – Evaluate visibility of neighbourhood;
15
REVECTORIZATION-BASED SHADOW
MAPPING
Step 3 – Detect aliasing directions;
16
REVECTORIZATION-BASED SHADOW
MAPPING
Step 4 – Traverse the aliased shadow boundary;
17
REVECTORIZATION-BASED SHADOW
MAPPING
Step 5 – Normalize distance to aliasing;
18
REVECTORIZATION-BASED SHADOW
MAPPING
Step 6 – Revectorize the shadow boundary;
19
REVECTORIZATION-BASED SHADOW
MAPPING
Step 7 – Render the anti-aliased shadow;
20
REVECTORIZATION-BASED SHADOW
MAPPING
21
Shadow Mapping RBSM
RESULTS AND DISCUSSION 22
EXPERIMENTAL SETUP
Hardware:
NVIDIA GeForce GTX Titan X graphics card;
Intel CoreTM i7-3770K CPU (3.50 GHz);
8GB RAM;
Software:
Unity3D Pro version 5.6.0.f3;
23
RESULTS
Visual Quality:
24
Shadow Mapping RBSM
RESULTS
Visual Quality:
25
Shadow Mapping
RESULTS
26
Visual Quality:
RBSM
RESULTS
Visual Quality:
27
Shadow Mapping RBSM
RESULTS
Rendering Time:
28
0
1
2
3
4
5
6
720p 1080p 2160p Pro
cessin
g T
ime (
ms)
Varying Output Resolution
Shadow Mapping RBSM
0
1
2
3
4
5
6
256² 512² 1024² 2048² Pro
cessin
g T
ime (
ms)
Varying Shadow Map Resolution
Shadow Mapping RBSM
RESULTS
Rendering Time:
29 0
1
2
3
4
5
6
720p 1080p 2160p Pro
cessin
g T
ime (
ms)
Varying Output Resolution
Shadow Mapping RBSM
0
1
2
3
4
5
6
256² 512² 1024² 2048² Pro
cessin
g T
ime (
ms)
Varying Shadow Map Resolution
Shadow Mapping RBSM
RESULTS
Rendering Time:
30
0
1
2
3
4
5
6
720p 1080p 2160p Pro
cessin
g T
ime (
ms)
Varying Output Resolution
Shadow Mapping RBSM
0
1
2
3
4
5
6
256² 512² 1024² 2048² Pro
cessin
g T
ime (
ms)
Varying Shadow Map Resolution
Shadow Mapping RBSM
CONCLUSION AND FUTURE
WORK 31
FINAL CONSIDERATIONS
Conclusion:
We have shown that, by the use of the proposed implementation of RBSM, we are able to minimize the aliasing artifacts, generating high-quality hard shadows at little additional cost;
Due to the limited source code access provided by Unity, we were not able to implement RBSM for other types of light sources;
We could not implement RBSM for soft shadows that simulate the penumbra effect;
Future Work:
The implementation of RBSM using the full Unity source code;
The implementation of RBSM in other game engines; 32
REFERENCES
[Williams1978] – L. Williams. “Casting Curved
Shadows on Curved Surfaces”. In Proceedings of
the ACM SIGGRAPH, pages 270-274, 1978;
[Macedo2016] – M. Macedo and A. Apolinário.
“Revectorization-based Shadow Mapping”. In
Proceedings of the Graphics Interface, pages 75-
83, 2016.
33