DEMO: CLICK HERE
This is an implementation of 3D-Tiles-Next using mapbox-gl/three.js (based on github/Geodan). It will be used to compare two different point-cloud compressions, based on their performance (decode time, file size, concurrency, loc).
The OaklandTrainStation pointcloud set, was converted from RCP into:
/oaklandtrainstation/draco
PNTS (Draco compressed points) used within 3D-Tiles v1.0/oaklandtrainstation/gltf
glTF (MeshOpt compressed points) used within 3D-Tiles-Next v1.1
- The 3d-tiles-next viewer uses three.js via mapbox-gl under the hood
- demostrate the minimal implementation code for displaying a point-cloud HLOD (and terrain).
- it uses mapbox to demonstrate how to
locate a glTF on the planet
- the debug mode helps with bounding box issues inside
tileset.json
- hovering over objects, connects the object geometry to meta-data (via 3DBM and glTF featureID see
layer
class)
- Start any static server
> python3 -m http.server
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
- open in a browser
> open http://localhost:8000
- Click 'Rotterdam' button and debug
Also click 'debug' to turn on AABB debug boxes.
To Download & convert PNTS files (3D Tiles v1) into glTF/glB (3D Tiles Next v1.1) use the steps below
https://gist.github.com/wallabyway/4c7de696d96edc6b57725e21d0dea374
https://gist.github.com/wallabyway/d022f97191599c5d9dde4827aecec1e5
- glTF format for point cloud tile used by 3d-tiles-next: https://github.com/wallabyway/minimal-pointcloud-gltf/blob/main/README.md
- discuss (slack glTF geospatial): https://gltfworkspace.slack.com
- original code: https://github.com/Geodan/mapbox-3dtiles
- changed to ES6 modules. no bundler is needed (rollup)
- added support for Draco PNTS decompression
- added support for GLB/GLTF tiles (ie. 3D Tiles Next)
- split up mapbox3DTiles.mjs
- cameraSync.js : isolating mapbox code. make standalone threejs version (TBD)
- tileLoader.js : seperate loaders for B3DM, PNTS, glTF, etc
- produce alternative version of cameraSync.js to use stock three.js, instead of mapbox-gl.
- the viewer can only handle PNTS files that are draco point cloud compressed.
- glb files can be either points or triangles