Skip to content

Commit 2c3e26a

Browse files
committed
Add 3DGS Cesium feature mapping plan
1 parent cb9b99d commit 2c3e26a

1 file changed

Lines changed: 222 additions & 0 deletions

File tree

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
# 3DGS Cesium Feature Mapping Plan — lance-graph
2+
3+
## Goal
4+
5+
Map the useful Cesium / 3D Tiles feature set into a Rust-native 3DGS geospatial runtime architecture.
6+
7+
This plan is intentionally separate from implementation wiring. It answers:
8+
9+
```text
10+
What should be borrowed from Cesium?
11+
What should be translated into Lance/Arrow/Rust?
12+
What should be outgrown?
13+
```
14+
15+
## Borrow directly
16+
17+
### 1. Tileset hierarchy
18+
19+
Cesium / 3D Tiles concept:
20+
21+
```text
22+
tileset.json
23+
root tile
24+
boundingVolume
25+
geometricError
26+
refine: ADD | REPLACE
27+
content / contents
28+
children / implicit tiling
29+
```
30+
31+
Rust mapping:
32+
33+
```rust
34+
pub struct TileNode {
35+
pub tile_id: TileId,
36+
pub bounding_volume: BoundingVolume,
37+
pub geometric_error_m: f32,
38+
pub refine_mode: RefineMode,
39+
pub content_refs: Vec<ContentRef>,
40+
pub metadata_ref: Option<MetadataRef>,
41+
}
42+
```
43+
44+
### 2. Screen-space error
45+
46+
Cesium concept:
47+
48+
```text
49+
geometricError + camera distance + viewport -> screen-space error
50+
```
51+
52+
Rust mapping:
53+
54+
```rust
55+
pub struct ScreenSpaceErrorInput {
56+
pub geometric_error_m: f32,
57+
pub distance_m: f32,
58+
pub viewport_height_px: u32,
59+
pub fovy_rad: f32,
60+
}
61+
```
62+
63+
### 3. Refinement modes
64+
65+
Borrow `ADD` and `REPLACE` semantics.
66+
67+
```rust
68+
pub enum RefineMode {
69+
Add,
70+
Replace,
71+
}
72+
```
73+
74+
### 4. Implicit tiling
75+
76+
Borrow:
77+
78+
- quadtree / octree addressing
79+
- subtree availability
80+
- tile availability bitstreams
81+
- content availability bitstreams
82+
- child-subtree availability
83+
- Morton/Z-order locality
84+
85+
Rust mapping:
86+
87+
```text
88+
crates/geo-tile-index
89+
tile_id.rs
90+
morton.rs
91+
implicit_subtree.rs
92+
availability.rs
93+
```
94+
95+
### 5. Multiple contents per tile
96+
97+
Borrow the idea that one tile can carry multiple content payloads.
98+
99+
Runtime mapping:
100+
101+
```text
102+
one tile
103+
-> mesh glTF
104+
-> 3DGS splat block
105+
-> metadata batch table
106+
-> raster/vector overlay references
107+
```
108+
109+
## Translate, do not copy
110+
111+
### 1. JavaScript object graph -> Arrow/Lance tables
112+
113+
CesiumJS uses runtime object graphs. `lance-graph` should use columnar metadata tables:
114+
115+
```text
116+
tiles
117+
contents
118+
features
119+
subtrees
120+
certificates
121+
```
122+
123+
### 2. Styling language -> query predicates
124+
125+
Cesium styling should translate into:
126+
127+
- DataFusion SQL predicates
128+
- Cypher predicates
129+
- ontology-aware filters
130+
- certified render masks
131+
132+
Example:
133+
134+
```sql
135+
SELECT tile_id FROM features
136+
WHERE class = 'building'
137+
AND confidence > 0.95
138+
```
139+
140+
### 3. Runtime cache -> durable tile graph
141+
142+
Cesium cache decisions are runtime-only. `lance-graph` should persist useful summaries:
143+
144+
- last computed error certificate
145+
- tile byte sizes
146+
- feature density
147+
- splat density
148+
- covariance stability
149+
- change-detection fingerprints
150+
151+
### 4. Renderer-driven selection -> certified decision planning
152+
153+
Cesium selects by visual error. `lance-graph` should plan with:
154+
155+
- screen-space error
156+
- statistical certificate
157+
- weak-dependence inflation
158+
- quantization error
159+
- covariance validity
160+
- query relevance
161+
162+
## Outgrow
163+
164+
### 1. Browser-first rendering assumptions
165+
166+
Do not make WebGL/CesiumJS constraints the architecture ceiling.
167+
168+
Target:
169+
170+
```text
171+
server/compiler mode
172+
WGPU optional viewer mode
173+
CPU preview/headless mode via ndarray
174+
```
175+
176+
### 2. Pure visual tiles
177+
178+
Tiles should also be queryable objects:
179+
180+
```text
181+
Tile -> Content -> Feature -> Asset -> Observation -> Certificate
182+
```
183+
184+
### 3. Heuristic-only LOD
185+
186+
Every approximation decision should be able to carry a report:
187+
188+
```rust
189+
pub struct TileDecisionReport {
190+
pub tile_id: TileId,
191+
pub action: TileAction,
192+
pub screen_space_error_px: f32,
193+
pub certified_error_px: Option<f32>,
194+
pub confidence: Option<f32>,
195+
pub reasons: Vec<TileDecisionReason>,
196+
}
197+
```
198+
199+
## Feature mapping table
200+
201+
| Cesium / 3D Tiles feature | lance-graph mapping | ndarray mapping |
202+
|---|---|---|
203+
| tileset.json | `ada-3dtiles` DTOs | none |
204+
| bounding volumes | tile metadata + traversal | SIMD culling kernels |
205+
| geometric error | tile column + SSE policy | error estimate kernel |
206+
| implicit tiling | bitstream + Morton index | SIMD availability scan |
207+
| multiple contents | content table | content-specific kernels |
208+
| glTF payload | content ref / importer | optional splat conversion only |
209+
| Gaussian splats | splat content schema | `hpc::splat3d` hot path |
210+
| metadata | Lance/Arrow tables | certificate inputs |
211+
| styling | SQL/Cypher/ontology filters | masks / block decisions |
212+
| tile cache | scheduler + durable stats | no ownership |
213+
| screen-space error | traversal policy | fast estimate kernels |
214+
| foveated SSE | policy | approximate scoring kernel |
215+
| skip LOD | policy | HHTL cascade support |
216+
217+
## Acceptance criteria
218+
219+
- Every borrowed Cesium concept has a Rust owner.
220+
- No feature is assigned to both repos without a clear boundary.
221+
- The plan supports 3D Tiles compatibility without requiring CesiumJS at runtime.
222+
- The plan supports 3DGS as first-class content, not an afterthought.

0 commit comments

Comments
 (0)