Skip to content

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

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

Merged
merged 39 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 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
3a4f9fd
Honor glTF ordering in voxel metadata
Feb 6, 2025
3a29c60
Merge branch 'main' into voxel-gltf
Feb 6, 2025
b8a9c84
Clean up types for voxel providers
Feb 6, 2025
d75be24
Clarify input data order for glTF voxels
Feb 8, 2025
339755a
Use smaller functions in Megatexture constructor
Feb 12, 2025
b57a4c9
Clean up dimensions and padding in VoxelPrimitive
Feb 12, 2025
20c5f6a
Simplify VoxelTraversal constructor signature
Feb 13, 2025
bece016
Minor cleanup in VoxelTraversal
Feb 13, 2025
b09d98d
Add metadataOrder property to VoxelProvider
Feb 13, 2025
093dd1a
Compute voxel input coordinate in Octree
Feb 19, 2025
74d9deb
Add voxel inputDimensions uniform
Feb 19, 2025
be1f3de
Update Voxel Sandcastle data, fix glTF sampling
Feb 28, 2025
db13aea
Minor documentation cleanup
ggetz Feb 28, 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
Binary file not shown.
7 changes: 2 additions & 5 deletions Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/subtrees/0/0/0/0.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"tileAvailability": {
"availableCount": 1,
"constant": 1
},
"contentAvailability": {
"availableCount": 1,
"contentAvailability": [{
"constant": 1
},
}],
"childSubtreeAvailability": {
"availableCount": 0,
"constant": 0
}
}
105 changes: 105 additions & 0 deletions Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/0/0/0/0.gltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"asset": {
"version": "2.0"
},
"extensionsUsed": [
"EXT_primitive_voxels",
"EXT_structural_metadata"
],
"extensionsRequired": [
"EXT_primitive_voxels",
"EXT_structural_metadata"
],
"extensions": {
"EXT_structural_metadata": {
"schema": {
"classes": {
"voxel": {
"properties": {
"a": {
"type": "VEC4",
"componentType": "FLOAT32"
}
}
}
}
},
"propertyAttributes": [
{
"class": "voxel",
"properties": {
"a": {
"attribute": "_DATA"
}
}
}
]
}
},
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"nodes": [
{
"mesh": 0
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"_DATA": 0
},
"mode": 2147483647,
"extensions": {
"EXT_primitive_voxels": {
"shape": 0,
"dimensions": [
2,
2,
2
]
},
"EXT_structural_metadata": {
"propertyAttributes": [0]
}
}
}
]
}
],
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5126,
"count": 8,
"max": [
1.0, 1.0, 1.0, 1.0
],
"min": [
0.0, 0.0, 0.0, 0.0
],
"type": "VEC4"
}
],
"bufferViews": [
{
"buffer": 0,
"byteOffset": 0,
"byteLength": 128
}
],
"buffers": [
{
"uri": "a.bin",
"byteLength": 128
}
]
}

This file was deleted.

Binary file not shown.
8 changes: 4 additions & 4 deletions Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tileset.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"voxel": {
"properties": {
"a": {
"type": "SCALAR",
"type": "VEC4",
"componentType": "FLOAT32"
}
}
Expand Down Expand Up @@ -46,10 +46,10 @@
1.0
]
},
"geometricError": 0.0,
"geometricError": 16.0,
"refine": "REPLACE",
"content": {
"uri": "tiles/{level}/{x}/{y}/{z}.json",
"uri": "tiles/{level}/{x}/{y}/{z}.gltf",
"extensions": {
"3DTILES_content_voxels": {
"dimensions": [
Expand All @@ -63,7 +63,7 @@
},
"implicitTiling": {
"subdivisionScheme": "OCTREE",
"subtreeLevels": 3,
"subtreeLevels": 1,
"availableLevels": 1,
"subtrees": {
"uri": "subtrees/{level}/{x}/{y}/{z}.json"
Expand Down
Binary file not shown.
7 changes: 2 additions & 5 deletions Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/subtrees/0/0/0/0.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"tileAvailability": {
"availableCount": 1,
"constant": 1
},
"contentAvailability": {
"availableCount": 1,
"contentAvailability": [{
"constant": 1
},
}],
"childSubtreeAvailability": {
"availableCount": 0,
"constant": 0
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"asset": {
"version": "2.0"
},
"extensionsUsed": [
"KHR_implicit_shapes",
"EXT_implicit_cylinder_region",
"EXT_primitive_voxels",
"EXT_structural_metadata"
],
"extensionsRequired": [
"KHR_implicit_shapes",
"EXT_implicit_cylinder_region",
"EXT_primitive_voxels"
],
"extensions": {
"KHR_implicit_shapes": {
"shapes": [
{
"type": "cylinder region",
"extensions": {
"EXT_implicit_cylinder_region": {
"minRadius": 0,
"maxRadius": 1,
"height": 2
}
}
}
]
},
"EXT_structural_metadata": {
"schema": {
"classes": {
"voxel": {
"properties": {
"a": {
"type": "VEC4",
"componentType": "FLOAT32"
}
}
}
}
},
"propertyAttributes": [
{
"class": "voxel",
"properties": {
"a": {
"attribute": "_DATA"
}
}
}
]
}
},
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"nodes": [
{
"mesh": 0
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"_DATA": 0
},
"mode": 2147483647,
"extensions": {
"EXT_primitive_voxels": {
"shape": 0,
"dimensions": [
2,
2,
2
]
},
"EXT_structural_metadata": {
"propertyAttributes": [0]
}
}
}
]
}
],
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5126,
"count": 8,
"max": [
1.0, 1.0, 1.0, 1.0
],
"min": [
0.0, 0.0, 0.0, 0.0
],
"type": "VEC4"
}
],
"bufferViews": [
{
"buffer": 0,
"byteOffset": 0,
"byteLength": 128
}
],
"buffers": [
{
"uri": "a.bin",
"byteLength": 128
}
]
}

This file was deleted.

Binary file not shown.
Loading