Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support voxel tilesets containing glTF tiles using the EXT_primitive_voxels extension #12432

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a91a15a
Preliminary support for EXT_primitive_voxels
Dec 19, 2024
639f532
Adjust type info to fix build error
Jan 8, 2025
f9306a7
Use smaller functions in VoxelTraversal
Jan 10, 2025
aee9302
Use smaller functions in VoxelTraversal
Jan 11, 2025
bd74f9c
Update voxel test datasets and specs to latest format
Jan 15, 2025
b79ca16
Add separate Sandcastle for Voxels in 3D Tiles
Jan 16, 2025
e5c2373
Fix spec
Jan 16, 2025
4542ae7
Clean up voxel provider error handling
Jan 22, 2025
10d30e2
Use smaller functions in Cesium3DTilesVoxelProvider
Jan 22, 2025
20ac82c
Move glTF handling from Cesium3DTilesVoxelProvider to VoxelContent
Jan 22, 2025
1b42873
Update VoxelContent from the update loop in VoxelTraversal
Jan 23, 2025
0182394
Cleanup from self-review
Jan 23, 2025
04ab29a
Fix type errors, add VoxelContent.fromMetadataArray
Jan 23, 2025
3efe3b0
Fix specs
Jan 24, 2025
f648114
Merge branch 'main' into voxel-gltf
Jan 24, 2025
41dbe65
Update CHANGES.md
Jan 25, 2025
b247ba6
Use glTF propertyAttribute to map voxel property names to attributes
Jan 29, 2025
c1aea43
Update VoxelCylinderShape to use radius, angle, height ordering
Jan 29, 2025
3957db7
Update VoxelCylinderShapeSpec
Jan 29, 2025
078c98e
PR feedback part 1
Jan 29, 2025
dbabb8d
Clean up types in VoxelProvider and Cesium3DTilesVoxelProvider
Jan 31, 2025
e5da997
Fix type in VoxelProvider
Jan 31, 2025
8e5ee3a
Merge branch 'main' into voxel-gltf
Jan 31, 2025
156b200
Fix postPassesUpdate in VoxelTraversal
Jan 31, 2025
6671b94
PR feedback part 2
Feb 1, 2025
b8dd5a1
Merge branch 'main' into voxel-gltf
Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"id": "voxel",
"classes": {
"voxel": {
"properties": {
"a": {
"type": "SCALAR",
"componentType": "FLOAT32",
"required": false
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"asset": {
"version": "2.0"
},
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"nodes": [
{
"mesh": 0
}
],
"meshes": [
{
"primitives": [
{
"mode": 2147483648,
"attributes": {
"_a": 0
},
"extensions": {
"EXT_primitive_voxels": {
"dimensions": [
2,
2,
2
]
},
"EXT_structural_metadata": {
"propertyAttributes": [0]
}
}
}
]
}
],
"extensionsUsed": [
"EXT_primitive_voxels",
"EXT_structural_metadata"
],
"extensionsRequired": [
"EXT_primitive_voxels",
"EXT_structural_metadata"
],
"extensions": {
"EXT_structural_metadata": {
"schemaUri": "../../../../schema.json",
"propertyAttributes": [
{
"class": "voxel",
"properties": {
"a": {
"attribute": "_a"
}
}
}
]
}
},
"accessors": [
{
"bufferView": 0,
"type": "SCALAR",
"componentType": 5126,
"min": [
0.0
],
"max": [
1.0
],
"count": 8
}
],
"bufferViews": [
{
"buffer": 0,
"byteLength": 32
}
],
"buffers": [
{
"uri": "a.bin",
"byteLength": 32
}
]
}

This file was deleted.

16 changes: 2 additions & 14 deletions Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tileset.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,7 @@
"asset": {
"version": "1.1"
},
"schema": {
"id": "voxel",
"classes": {
"voxel": {
"properties": {
"a": {
"type": "SCALAR",
"componentType": "FLOAT32"
}
}
}
}
},
"schemaUri": "schema.json",
"statistics": {
"classes": {
"voxel": {
Expand Down Expand Up @@ -49,7 +37,7 @@
"geometricError": 0.0,
"refine": "REPLACE",
"content": {
"uri": "tiles/{level}/{x}/{y}/{z}.json",
"uri": "tiles/{level}/{x}/{y}/{z}.gltf",
"extensions": {
"3DTILES_content_voxels": {
"dimensions": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"id": "voxel",
"classes": {
"voxel": {
"properties": {
"a": {
"type": "SCALAR",
"componentType": "FLOAT32",
"required": false
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"asset": {
"version": "2.0"
},
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"nodes": [
{
"mesh": 0
}
],
"meshes": [
{
"primitives": [
{
"mode": 2147483650,
"attributes": {
"_a": 0
},
"extensions": {
"EXT_primitive_voxels": {
"dimensions": [
2,
2,
2
]
}
}
}
]
}
],
"extensionsUsed": [
"EXT_primitive_voxels",
"EXT_structural_metadata"
],
"extensionsRequired": [
"EXT_primitive_voxels",
"EXT_structural_metadata"
],
"extensions": {
"EXT_structural_metadata": {
"schemaUri": "../../../../schema.json",
"propertyAttributes": [
{
"class": "voxel",
"properties": {
"a": {
"attribute": "_a"
}
}
}
]
}
},
"accessors": [
{
"bufferView": 0,
"type": "SCALAR",
"componentType": 5126,
"min": [
0.0
],
"max": [
1.0
],
"count": 8
}
],
"bufferViews": [
{
"buffer": 0,
"byteLength": 32
}
],
"buffers": [
{
"uri": "a.bin",
"byteLength": 32
}
]
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,7 @@
"asset": {
"version": "1.1"
},
"schema": {
"id": "voxel",
"classes": {
"voxel": {
"properties": {
"a": {
"type": "SCALAR",
"componentType": "FLOAT32"
}
}
}
}
},
"schemaUri": "schema.json",
"statistics": {
"classes": {
"voxel": {
Expand Down Expand Up @@ -53,7 +41,7 @@
"geometricError": 0.0,
"refine": "REPLACE",
"content": {
"uri": "tiles/{level}/{x}/{y}/{z}.json",
"uri": "tiles/{level}/{x}/{y}/{z}.gltf",
"extensions": {
"3DTILES_content_voxels": {
"dimensions": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"id": "voxel",
"classes": {
"voxel": {
"properties": {
"a": {
"type": "SCALAR",
"componentType": "FLOAT32",
"required": false
}
}
}
}
}
Loading