global light baking soft ftware Sp Speaker Na Name Speaker Title - - PowerPoint PPT Presentation

global light baking soft ftware
SMART_READER_LITE
LIVE PREVIEW

global light baking soft ftware Sp Speaker Na Name Speaker Title - - PowerPoint PPT Presentation

How to create a second level Session Title global light baking soft ftware Sp Speaker Na Name Speaker Title & Company Li Li Wen enyao Game engin gine researcher, Netease Game Outline Session Title Development background Sp


slide-1
SLIDE 1

Session Title

Sp Speaker Na Name

Speaker Title & Company

How to create a second level global light baking soft ftware

Li Li Wen enyao Game engin gine researcher, Netease Game

slide-2
SLIDE 2

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Development background
  • Baking direct lighting
  • Baking indirect lighting

Outline

slide-3
SLIDE 3

Session Title

Sp Speaker Na Name

Speaker Title & Company

Starting point 1——Global lighting

Direct lighting Direct lighting + Indirect lighting

slide-4
SLIDE 4

Session Title

Sp Speaker Na Name

Speaker Title & Company

Starting point 1——Global lighting

𝑀𝑝 𝑦, 𝜕𝑝 = 𝑀𝑓 𝑦, 𝜕𝑝 +

𝛻

𝑔

𝑠 𝑦, 𝜕𝑝, 𝜕𝑗 𝑀𝑗 𝑦, 𝜕𝑗 |cos 𝜄𝑗| 𝑒𝜕𝑗

slide-5
SLIDE 5

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • SSAO [Kajalin09, Bavoil08; Filion08, Mittring07]
  • SSIL [RGS09]

Exploration of real-time global lighting

slide-6
SLIDE 6

Session Title

Sp Speaker Na Name

Speaker Title & Company

Exploration of real-time global lighting

Reflective shadow maps Radiance volume gathering

VPL VPL VPL

Discretize initial VPL distribution by the regular grid and SH Iterative propagation Propagate light iteratively going from

  • ne cell to another

A set of regularly sampled VPLs of the scene from light position

slide-7
SLIDE 7

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Sparse Voxel Octree + Cone Trace

Exploration of real-time global lighting

LPV (37ms) SVO (32ms)

slide-8
SLIDE 8

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Real-time global lighting is a next

next generation technology

  • Light Map——Precomputed lighting

Light Map

slide-9
SLIDE 9

Session Title

Sp Speaker Na Name

Speaker Title & Company

Art production Baking software Real-time rendering

slide-10
SLIDE 10

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • We hope the frame rate of games running

with integrated graphics can reach 30 frames

  • Deferred Lighting
  • Forward Lighting
  • Light

t Map ap + + Forwa ward

 For 3D mobile games, light map is

the only option

  • Power VR G6450, 249.6 GFLOPS

Starting point 2——low-end graphics

slide-11
SLIDE 11

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Commercial baking software currently available on the market

Why developed by ourselves?

Very slow baking Patch more than one G Fixed material

slide-12
SLIDE 12

Session Title

Sp Speaker Na Name

Speaker Title & Company

CloudGI panorama

CloudGI

Cloud Scene

each model

Direct Lighting Indirect Lighting

Google Protobuffer Client

slide-13
SLIDE 13

Session Title

Sp Speaker Na Name

Speaker Title & Company

Video Demo 1

slide-14
SLIDE 14

Session Title

Sp Speaker Na Name

Speaker Title & Company

Baking direct lighting

100 point light sources casting shadows? Deferred Shading

slide-15
SLIDE 15

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Strategies for camera frustum are not

longer effective

  • Strategies for perspective are not

longer effective

Sunlight shadow

slide-16
SLIDE 16

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Every model has a ShadowMap
  • A huge ShadowMap
  • 10000X10000 = 200M graphics memory
  • Memory for Cache + Shadow Mask

Sunlight shadow

5000 X 4000

slide-17
SLIDE 17

Session Title

Sp Speaker Na Name

Speaker Title & Company

LightMap crack

slide-18
SLIDE 18

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Continuous in the world space,

discontinuous in the uv space

LightMap crack

slide-19
SLIDE 19

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Continuous in the world space,

discontinuous in the uv space

LightMap crack

 Gutter, using the color of nearest baking point to fill the

background

slide-20
SLIDE 20

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • 在世界空间连续,在uv空间不连续

LightMap crack

slide-21
SLIDE 21

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • 在世界空间连续,在uv空间不连续

LightMap crack

slide-22
SLIDE 22

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Fine edge in lightmap is smaller than
  • ne pixel
  • Super Sample->Gutter->Down Sample

LightMap crack

slide-23
SLIDE 23

Session Title

Sp Speaker Na Name

Speaker Title & Company

Point Cloud based GI

𝑀𝑝 𝑦, 𝜕𝑝 = 𝑀𝑓 𝑦, 𝜕𝑝 +

𝛻

𝑔

𝑠 𝑦, 𝜕𝑝, 𝜕𝑗 𝑀𝑗 𝑦, 𝜕𝑗 |cos 𝜄𝑗| 𝑒𝜕𝑗

slide-24
SLIDE 24

Session Title

Sp Speaker Na Name

Speaker Title & Company

Point Cloud based GI

Raytrace O(n*mk) * O(s)

  • Can do all the effects
  • Exponential growth
  • Noise
slide-25
SLIDE 25

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Radios
  • sity

ty

  • Does

Does not t disti tingu guish l ligh ght and nd ob

  • bject
  • Every

y sur urfel is l lighte ted b by all ll th the

  • ther

r sur urfels

Point Cloud based GI

slide-26
SLIDE 26

Session Title

Sp Speaker Na Name

Speaker Title & Company

slide-27
SLIDE 27

Session Title

Sp Speaker Na Name

Speaker Title & Company

slide-28
SLIDE 28

Session Title

Sp Speaker Na Name

Speaker Title & Company

2 bounce

slide-29
SLIDE 29

Session Title

Sp Speaker Na Name

Speaker Title & Company

16 bounce

slide-30
SLIDE 30

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Radios
  • sity

ty

Point Cloud based GI

O(n*n*k)

  • Linear growth
  • Without noise
  • Only can do diffuse reflectance GI effects
slide-31
SLIDE 31

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Radios
  • sity

ty

  • How to

to ca calcu culate e vis isibl ble dia iagra ram o

  • f sur

urfel el

Point Cloud based GI

Hemicube, raster 5 times

slide-32
SLIDE 32

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Radios
  • sity

ty

  • How

How to to ca calcu culate e vis isibl ble dia iagra ram o

  • f sur

urfel el

Point Cloud based GI

Hemispherical, raster one time

slide-33
SLIDE 33

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Point cloud generation
  • Creation of Octree
  • Calculation of indirect lighting

Point Cloud based GI

slide-34
SLIDE 34

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • How to generate a point cloud
  • Same as direct lighting

Point Cloud Generation

Deferred Shading

DX11 Unordered Access View + Atomic Add CUDA Memory

slide-35
SLIDE 35

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • How to calculate Area?

Point Cloud Generation

Geometry Shader

Area =

Triangle Area

UV Area UV per pixel

slide-36
SLIDE 36

Session Title

Sp Speaker Na Name

Speaker Title & Company

Video Demo 2

slide-37
SLIDE 37

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • CPU top, from top to bottom
  • Unfriendly concurrency
  • Dynamic memory allocation
  • Need synchronization or atomic operation

Octree Building

slide-38
SLIDE 38

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • CPU top, from bottom to top
  • Natural concurrency
  • Does not need synchronization
  • Graphics memory is not wasted

Octree Building

slide-39
SLIDE 39

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Creation of leaf node
  • 3 bits for one layer coding, so 32-bit means 10 layers

Octree Building

7 1 1 5 3 5 7 3 7 1 1 3 3 5 5 7 7 7

key sort

1 1 3 3 5 5 7 7 7

unique

1 3 5 7

compact

1 3 5 7

leaf node Key << 3

Thrust——CUDA based STL

slide-40
SLIDE 40

Session Title

Sp Speaker Na Name

Speaker Title & Company

Video Demo 3, Octree

slide-41
SLIDE 41

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Why to build Octree
  • O(n*n*

n*k)->O( O(n*log

  • gn*k

*k)

  • What is the area and color of this node?

Octree Building

Hemispherical, raster 1 time

slide-42
SLIDE 42

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Spherical Harmonics
  • A set of orthogonal basis functions defined in the sphere
  • 𝑍

𝑚 𝑛 𝜄, 𝜒 = ⋯ ; 𝑚 ∈ 𝑂, −𝑚 ≤ 𝑛 ≤ 𝑚

Octree Building

𝑔 𝜄, 𝜒 ≈

𝑚=0 𝑜 𝑛=−𝑚 𝑚

𝑔

𝑚 𝑛𝑍 𝑚 𝑛 𝜄, 𝜒

𝑔

𝑚 𝑛 = 𝑔 𝜄, 𝜒 𝑍 𝑚 𝑛 𝜄, 𝜒 𝑒𝜕

slide-43
SLIDE 43

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Spherical Harmonics
  • Turn one function 𝑔 𝜄, 𝜒

into several parameters

  • Turn sum of two functions into sum of several parameters

Octree Building

𝑔 𝜄, 𝜒 ≈

𝑚=0 𝑜 𝑛=−𝑚 𝑚

𝑔

𝑚 𝑛𝑍 𝑚 𝑛 𝜄, 𝜒

𝑔

𝑚 𝑛 = 𝑔 𝜄, 𝜒 𝑍 𝑚 𝑛 𝜄, 𝜒 𝑒𝜕

𝑏𝑚

𝑛 = 𝐵𝑗|𝑒𝑝𝑢

𝑒, 𝑜 | 𝑍

𝑚 𝑛 𝜄, 𝜒 𝑒𝜕

𝑞𝑚

𝑛 = 𝐶𝑗𝐵𝑗𝑒𝑝𝑢

𝑒, 𝑜 + 𝑍

𝑚 𝑛 𝜄, 𝜒 𝑒𝜕

slide-44
SLIDE 44

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Calculation of indirect lighting
  • Get id map by examining the whole Octree
  • calcRadianceFromID
  • Average * PI

Indirect Lighting

𝑔 𝜄, 𝜒 ≈

𝑚=0 𝑜 𝑛=−𝑚 𝑚

𝑔

𝑚 𝑛𝑍 𝑚 𝑛 𝜄, 𝜒

Hemispherical, raster 1 time

slide-45
SLIDE 45

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Baking a small scene needs half an

hour!!!

  • Baking accuracy == Indirect lighting accuracy
  • 1 oversampled lightmap has 16 million point

clouds

  • Separate baking accuracy, indirect

lighting accuracy

  • K-near interpolation, considering normal,

position

  • Preset threshold

Algorithm Optimization

slide-46
SLIDE 46

Session Title

Sp Speaker Na Name

Speaker Title & Company

Video Demo 4

slide-47
SLIDE 47

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • 1000W point clouds=400M
  • A square of 1000m×1000m
  • 4G graphics memory

 Block baking is necessary

Block Baking

The whole scene, rough point cloud Within the block + safe area, fine point cloud

slide-48
SLIDE 48

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • 1 line of code is enough
  • surfel.area *= alpha;

 Translucent shadow

  • Traditional method is using two shadow maps
  • Write depth map with alpha probability

Translucent material

0.5/4 1.5/4 2.5/4 3.5/4

slide-49
SLIDE 49

Session Title

Sp Speaker Na Name

Speaker Title & Company

Translucent material

slide-50
SLIDE 50

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • The calculation time of Radiosity has nothing to

do with the complexity of material

Custom material

slide-51
SLIDE 51

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Real-time GI is a next next generation

technology

  • CloudGI is faster than cpu raytrace by

1000 times

  • Practical function suitable for online games (real-

time preview, minpatch, custom material)

 Use Octree to accelerate Radiosityal

gorithm

 K-near interpolation acceleration

 Block baking solves the problem of

graphics memory

Summary

slide-52
SLIDE 52

Session Title

Sp Speaker Na Name

Speaker Title & Company

  • Per H. Christensen, Point-Based Approximate Color Bleeding, Pixar Animation Studios.
  • KUN ZHOU, MINMIN, XIN , and BAININ 2010. Data-Parallel Octrees for Surface Reconstruction.

References

slide-53
SLIDE 53

Session Title

Sp Speaker Na Name

Speaker Title & Company

Thank you