wallabyway / minimal-pointcloud-gltf

minimal example of viewing point-cloud with glTF (3DTiles-next)
MIT License
8 stars 1 forks source link

minimal-pointcloud-gltf

a gltf 'profile' for an open format Point-cloud standard, leveraging glTF and 3d-tiles-next.

Point-Cloud profile

Recommended extensions:
Creating a glb Tile:
  1. point primitives only
  2. only one node
  3. single buffer
  4. required buffer view for VEC3 positions (max size uint32) (do not break up into 65k buffer chunks)
  5. optional buffer view for VEC4 RGB colors (max size uint32) (do not break up into 65k buffer chunks)
  6. optional buffer view for VEC3 normals (max size uint32) (do not break up into 65k buffer chunks)
  7. single material using extension 'KHR_materials_unlit'
  8. finally, compress glb with GLTF_EXT_meshopt_compression (ie. try glTFpack )
Unlit Material example:
"materials": [
    {
      "name": "unlit",
      "extensions": {
        "KHR_materials_unlit": {}
      },
    }
  ],
Flower

Flower_point-cloud_linear_unlit_MeshOpt.JPG

single position & color buffer example:
"bufferViews": [
    {
      "buffer": 0,
      "byteLength": 200789448,
      "byteOffset": 0,
      "byteStride": 12,
      "name": "floatBufferViews",
      "target": 34962
    },
    {
      "buffer": 0,
      "byteLength": 267719264,
      "byteOffset": 200789448,
      "byteStride": 16,
      "name": "floatBufferViews",
      "target": 34962
    }
  ],
References

Demo

Add point-cloud to mapbox, via 3d-Tiles/glTF pointcloud file set

(watch this space)

three.js (ebeaufay) Cesium (experimental)
3d-tiles-next cesium-gltf-zeux-3d-tiles-next