Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Design a Voxel Rendering Engine for iOS - iOSConf.SG 2017
Shipeng Xu
October 20, 2017
Technology
1
150
Design a Voxel Rendering Engine for iOS - iOSConf.SG 2017
Design a Voxel Rendering Engine for iOS.
Shipeng Xu
October 20, 2017
Tweet
Share
Other Decks in Technology
See All in Technology
line_developers
PRO
0
2.1k
hirosys
0
140
satotakeshi
2
430
line_developers
PRO
0
150
sumi
0
480
kakka
0
3.6k
kappa4
4
2.3k
ishiayaya
PRO
0
340
masakick
0
120
layerx
1
870
clustervr
0
110
satoshirobatofujimoto
0
110
Featured
See All Featured
reverentgeek
27
1.9k
yeseniaperezcruz
302
31k
skipperchong
7
670
jasonvnalue
82
8k
jonyablonski
14
1.1k
bryan
30
3.3k
jnunemaker
PRO
40
4.5k
philhawksworth
190
17k
swwweet
206
6.8k
roundedbygravity
241
21k
marcelosomers
220
15k
matthewcrist
73
7.5k
Transcript
Design a Voxel Rendering Engine for iOS Shipeng Xu 20
Oct 2017 @1991bill
What is Voxel? • Volume Pixel • Data Structure ◦
Integral X, Y, Z coordinates ◦ Color Pokemon Voxel, Playiku, 2016
None
Voxel Rendering Engine for iOS • Rendering ◦ Beautiful •
Performance ◦ Blocks can be added or removed at interactive speeds ◦ E.g. A 64x64x64 voxel world = 262,144 voxels! Add Delete Move Change Color
Rendering - 1 Voxel 12 Triangles
Rendering - 5,911 Voxels
Rendering - Meshing • Naive way... • Draw a 3D
cube for each voxel. ◦ 5,911 Voxels ◦ 5,911 x 12 = 70,932 triangles
Rendering - Meshing • Skip the unseen voxels ◦ Before:
5,911 Voxels ▪ 5,911 x 12 = 70,932 triangles ◦ After: 5,868 triangles ▪ 8.2% of original
Rendering - Meshing
• Combine small faces into bigger ones Rendering - Meshing
280 Triangles 22 Triangles(7.9%!)
Rendering - Lighting
Rendering - Ambient Occlusion
Rendering - Ambient Occlusion Occlusion level 3 2 1 0
Rendering - Ambient Occlusion
X Basic Lighting X Ambient Occlusion ✔ Basic Lighting X
Ambient Occlusion ✔ Basic Lighting ✔ Ambient Occlusion Rendering - Lighting
Links • Voxel Meshing - https://0fps.net/category/programming/voxels/ • Voxel Rendering Techniques
- https://medium.com/@fogleman/voxel-rendering-techniques-fa8d869457 ca • Volume Rendering - http://bytebash.com/2012/03/opengl-volume-rendering/ • http://shipeng.studio