Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Design a Voxel Rendering Engine for iOS - iOSCo...

Shipeng Xu
October 20, 2017

Design a Voxel Rendering Engine for iOS - iOSConf.SG 2017

Design a Voxel Rendering Engine for iOS.

Shipeng Xu

October 20, 2017
Tweet

Other Decks in Technology

Transcript

  1. What is Voxel? • Volume Pixel • Data Structure ◦

    Integral X, Y, Z coordinates ◦ Color Pokemon Voxel, Playiku, 2016
  2. 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
  3. Rendering - Meshing • Naive way... • Draw a 3D

    cube for each voxel. ◦ 5,911 Voxels ◦ 5,911 x 12 = 70,932 triangles
  4. 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
  5. X Basic Lighting X Ambient Occlusion ✔ Basic Lighting X

    Ambient Occlusion ✔ Basic Lighting ✔ Ambient Occlusion Rendering - Lighting
  6. 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