Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
});

try {
const left = await Cesium.Cesium3DTileset.fromIonAssetId(3591160);
const left = await Cesium.Cesium3DTileset.fromIonAssetId(3667784);
viewer.scene.primitives.add(left);
left.splitDirection = Cesium.SplitDirection.LEFT;

Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/3D Tiles Gaussian Splatting.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
const viewer = new Cesium.Viewer("cesiumContainer");

try {
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(3591124);
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(3667783);
viewer.scene.primitives.add(tileset);
viewer.zoomTo(
tileset,
Expand Down
8 changes: 6 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
#### Fixes :wrench:

- Removes the minimum tile threshold of four for WMTS. [#4372](https://github.com/CesiumGS/cesium/issues/4372)
- Fixed a crash that could happen when loading PNTS (point cloud) data that contained a batch table without a binary part [#11166](https://github.com/CesiumGS/cesium/issues/11166)

#### Additions :tada:

- Added support for the [EXT_mesh_primitive_restart](https://github.com/KhronosGroup/glTF/pull/2478) glTF extension. [#12764](https://github.com/CesiumGS/cesium/issues/12764)

#### Fixes :wrench:
#### Deprecated :hourglass_flowing_sand:

- Fixed a crash that could happen when loading PNTS (point cloud) data that contained a batch table without a binary part [#11166](https://github.com/CesiumGS/cesium/issues/11166)
- Deprecated support of the `KHR_spz_gaussian_splats_compression` extension in favor of the latest 3D Gaussian Splatting extensions for glTF, `KHR_gaussian_splatting` and `KHR_gaussian_splatting_compression_spz_2`. The deprecated extension will be removed in version 1.135. Please retile your existing 3D Tiles using Gaussian splatting before that time. [#12837](https://github.com/CesiumGS/cesium/issues/12837)

## 1.132 - 2025-08-01

Expand Down Expand Up @@ -2475,6 +2476,7 @@ _This is an npm-only release to fix a publishing issue_.
tileset.boundingSphere.center,
);
```

- This also fixes several issues with clipping planes not using the correct transform for tilesets with children.

### Additions :tada:
Expand Down Expand Up @@ -4320,6 +4322,7 @@ _This is an npm-only release to fix a publishing issue_.
isStopIncluded : true,
data : data
});

- `TimeInterval.fromIso8601` now takes a single options parameter. Code that looked like:

TimeInterval.fromIso8601(intervalString, true, true, data);
Expand All @@ -4332,6 +4335,7 @@ _This is an npm-only release to fix a publishing issue_.
isStopIncluded : true,
data : data
});

- `interval.intersect(otherInterval)` -> `TimeInterval.intersect(interval, otherInterval)`
- `interval.contains(date)` -> `TimeInterval.contains(interval, date)`

Expand Down
Binary file modified Specs/Data/Cesium3DTiles/GaussianSplats/tower/0/0.glb
Binary file not shown.
126 changes: 64 additions & 62 deletions Specs/Data/Cesium3DTiles/GaussianSplats/tower/tileset.json
Original file line number Diff line number Diff line change
@@ -1,66 +1,68 @@
{
"asset": {
"extras": {
"ion": {
"georeferenced": true,
"movable": true
}
},
"version": "1.1"
"asset": {
"extras": {
"ion": {
"georeferenced": true,
"movable": true
}
},
"extensions": {
"3DTILES_content_gltf": {
"extensionsRequired": [
"KHR_spz_gaussian_splats_compression"
],
"extensionsUsed": [
"KHR_spz_gaussian_splats_compression"
]
}
},
"extensionsUsed": [
"3DTILES_content_gltf"
],
"geometricError": 14.76778488662848,
"root": {
"boundingVolume": {
"box": [
1.2307894825935364,
-0.6764951944351196,
186.9346923828125,
2.405353009700775,
0.0,
0.0,
0.0,
2.5862385034561157,
0.0,
0.0,
0.0,
6.484405517578125
]
},
"content": {
"uri": "0/0.glb"
},
"geometricError": 0.0,
"refine": "REPLACE",
"transform": [
-0.14382095244935905,
0.9896037255571338,
0.0,
0.0,
-0.7120020847592599,
-0.1034765889935951,
0.6945110703428119,
0.0,
0.6872907426519194,
0.09988524362332703,
0.7194820172674795,
0.0,
4391456.686631473,
638218.5788113032,
4566368.395700517,
1.0
]
"version": "1.1"
},
"extensions": {
"3DTILES_content_gltf": {
"extensionsRequired": [
"KHR_gaussian_splatting",
"KHR_gaussian_splatting_compression_spz_2"
],
"extensionsUsed": [
"KHR_gaussian_splatting",
"KHR_gaussian_splatting_compression_spz_2"
]
}
},
"extensionsUsed": [
"3DTILES_content_gltf"
],
"geometricError": 76.94345372195917,
"root": {
"boundingVolume": {
"box": [
0.759602474620948,
-1.6211592734702087,
2566.3544788548998,
8.432663940269968,
0.0,
0.0,
0.0,
8.127358416707006,
0.0,
0.0,
0.0,
36.64573633729674
]
},
"content": {
"uri": "0/0.glb"
},
"geometricError": 0.0,
"refine": "REPLACE",
"transform": [
0.9984683783609064,
-0.0553253776610889,
0.0,
0.0,
0.038789672094630565,
0.7000451263203326,
0.7130443060946077,
0.0,
-0.03944944552377324,
-0.7119521920057605,
0.7011189753145034,
0.0,
-252040.29496225834,
-4548622.6254820945,
4449422.940203034,
1.0
]
}
}
Binary file not shown.
66 changes: 66 additions & 0 deletions Specs/Data/Cesium3DTiles/GaussianSplats/tower_legacy/tileset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"asset": {
"extras": {
"ion": {
"georeferenced": true,
"movable": true
}
},
"version": "1.1"
},
"extensions": {
"3DTILES_content_gltf": {
"extensionsRequired": [
"KHR_spz_gaussian_splats_compression"
],
"extensionsUsed": [
"KHR_spz_gaussian_splats_compression"
]
}
},
"extensionsUsed": [
"3DTILES_content_gltf"
],
"geometricError": 14.76778488662848,
"root": {
"boundingVolume": {
"box": [
1.2307894825935364,
-0.6764951944351196,
186.9346923828125,
2.405353009700775,
0.0,
0.0,
0.0,
2.5862385034561157,
0.0,
0.0,
0.0,
6.484405517578125
]
},
"content": {
"uri": "0/0.glb"
},
"geometricError": 0.0,
"refine": "REPLACE",
"transform": [
-0.14382095244935905,
0.9896037255571338,
0.0,
0.0,
-0.7120020847592599,
-0.1034765889935951,
0.6945110703428119,
0.0,
0.6872907426519194,
0.09988524362332703,
0.7194820172674795,
0.0,
4391456.686631473,
638218.5788113032,
4566368.395700517,
1.0
]
}
}
23 changes: 7 additions & 16 deletions packages/engine/Source/Scene/Cesium3DTileContentFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,28 +93,19 @@ const Cesium3DTileContentFactory = {
const dataView = new DataView(arrayBuffer, byteOffset);
const byteLength = dataView.getUint32(8, true);
const glb = new Uint8Array(arrayBuffer, byteOffset, byteLength);
let hasGaussianSplatExtension = false;
if (tileset.isGltfExtensionRequired instanceof Function) {
hasGaussianSplatExtension = tileset.isGltfExtensionRequired(
"KHR_spz_gaussian_splats_compression",
);
}
if (hasGaussianSplatExtension) {

if (
GaussianSplat3DTileContent.tilesetRequiresGaussianSplattingExt(tileset)
) {
return GaussianSplat3DTileContent.fromGltf(tileset, tile, resource, glb);
}

return Model3DTileContent.fromGltf(tileset, tile, resource, glb);
},
gltf: function (tileset, tile, resource, json) {
const forceGaussianSplats =
tileset.debugTreatTilesetAsGaussianSplats ?? false;
let hasGaussianSplatExtension = false;
if (tileset.isGltfExtensionRequired instanceof Function) {
hasGaussianSplatExtension = tileset.isGltfExtensionRequired(
"KHR_spz_gaussian_splats_compression",
);
}
if (forceGaussianSplats || hasGaussianSplatExtension) {
if (
GaussianSplat3DTileContent.tilesetRequiresGaussianSplattingExt(tileset)
) {
return GaussianSplat3DTileContent.fromGltf(tileset, tile, resource, json);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/engine/Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ import ImageryLayerCollection from "./ImageryLayerCollection.js";
*
* @alias Cesium3DTileset
* @constructor
* @experimental Support for loading Gaussian splats content encoded with SPZ compression using the draft glTF extension {@link https://github.com/KhronosGroup/glTF/pull/2490 | KHR_spz_gaussian_splats_compression} is experimental and is subject change without Cesium's standard deprecation policy.
* @experimental Support for loading Gaussian splats content encoded with SPZ compression using the draft glTF extensions {@link https://github.com/CesiumGS/glTF/tree/draft-splat-spz/extensions/2.0/Khronos/KHR_gaussian_splatting | KHR_gaussian_splatting} and {@link https://github.com/CesiumGS/glTF/tree/draft-splat-spz/extensions/2.0/Khronos/KHR_gaussian_splatting_compression_spz_2 | KHR_gaussian_splatting_compression_spz_2} is experimental and is subject change without Cesium's standard deprecation policy.
* @param {Cesium3DTileset.ConstructorOptions} options An object describing initialization options
*
* @exception {DeveloperError} The tileset must be 3D Tiles version 0.0 or 1.0.
Expand Down
40 changes: 39 additions & 1 deletion packages/engine/Source/Scene/GaussianSplat3DTileContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import GaussianSplatPrimitive from "./GaussianSplatPrimitive.js";
import destroyObject from "../Core/destroyObject.js";
import ModelUtility from "./Model/ModelUtility.js";
import VertexAttributeSemantic from "./VertexAttributeSemantic.js";
import deprecationWarning from "../Core/deprecationWarning.js";

/**
* Represents the contents of a glTF or glb using the {@link https://github.com/CesiumGS/glTF/tree/draft-spz-splat-compression/extensions/2.0/Khronos/KHR_spz_gaussian_splats_compression|KHR_spz_gaussian_splats_compression} extension.
* Represents the contents of a glTF or glb using the {@link https://github.com/CesiumGS/glTF/tree/draft-splat-spz/extensions/2.0/Khronos/KHR_gaussian_splatting | KHR_gaussian_splatting} and {@link https://github.com/CesiumGS/glTF/tree/draft-splat-spz/extensions/2.0/Khronos/KHR_gaussian_splatting_compression_spz_2 | KHR_gaussian_splatting_compression_spz_2} extensions.
* <p>
* Implements the {@link Cesium3DTileContent} interface.
* </p>
Expand Down Expand Up @@ -80,6 +81,43 @@ function GaussianSplat3DTileContent(loader, tileset, tile, resource) {
this._transformed = false;
}

/**
* Performs checks to ensure that the provided tileset has the Gaussian Splatting extensions.
*
* @param {Cesium3DTileset} tileset The tileset to check for the extensions.
* @returns {boolean} Returns <code>true</code> if the necessary extensions are included in the tileset.
* @static
*/
GaussianSplat3DTileContent.tilesetRequiresGaussianSplattingExt = function (
tileset,
) {
let hasGaussianSplatExtension = false;
let hasLegacyGaussianSplatExtension = false;
if (tileset.isGltfExtensionRequired instanceof Function) {
hasGaussianSplatExtension =
tileset.isGltfExtensionRequired("KHR_gaussian_splatting") &&
tileset.isGltfExtensionRequired(
"KHR_gaussian_splatting_compression_spz_2",
);

hasLegacyGaussianSplatExtension = tileset.isGltfExtensionRequired(
"KHR_spz_gaussian_splats_compression",
);
}

if (hasLegacyGaussianSplatExtension) {
deprecationWarning(
"KHR_spz_gaussian_splats_compression",
"Support for the original KHR_spz_gaussian_splats_compression extension has been deprecated in favor " +
"of the up to date KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions and will be " +
"removed in CesiumJS 1.135.\n\nPlease retile your tileset with the KHR_gaussian_splatting and " +
"KHR_gaussian_splatting_compression_spz_2 extensions.",
);
}

return hasGaussianSplatExtension || hasLegacyGaussianSplatExtension;
};

Object.defineProperties(GaussianSplat3DTileContent.prototype, {
/**
* Gets the number of features in the tile. Currently this is always zero.
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/Source/Scene/GaussianSplatPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function createGaussianSplatTexture(context, splatTextureData) {
/** A primitive that renders Gaussian splats.
* <p>
* This primitive is used to render Gaussian splats in a 3D Tileset.
* It is designed to work with the KHR_spz_gaussian_splats_compression extension.
* It is designed to work with the KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions.
* </p>
* @alias GaussianSplatPrimitive
* @constructor
Expand Down
Loading