Skip to content

Commit a129f06

Browse files
authored
Merge pull request #13010 from CesiumGS/remove-splat-deprecation
Remove support for the legacy splats extension
2 parents 96c4ca3 + caf297d commit a129f06

File tree

9 files changed

+15
-265
lines changed

9 files changed

+15
-265
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
- `scene.drillPick` now uses a breadth-first search strategy instead of depth-first. This may change which entities are picked when
1010
using large values of `width` and `height` when providing a `limit`, prioritizing entities closer to the camera.
11+
- Removed support for 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`. Please re-tile existing Gaussian splatting 3D Tiles [#12837](https://github.com/CesiumGS/cesium/issues/12837)
1112

1213
#### Additions :tada:
1314

Documentation/Contributors/ReleaseGuide/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ There is no one release manager; instead, [our community shares the responsibili
2121
- If `prettier` needs updated you _should_ still update it but keep the version pinned. If you run `npm install prettier@latest` you must remove the `^` in `package.json`. If the number of changes when running `npm run prettier` is large it may be worth opening a separate PR for only those.
2222
3. Verify each update. If an update can be resolved, open a PR with your changes. If an update is incompatible, open an issue. Check the [`dependencies` label](https://github.com/CesiumGS/cesium/issues?q=is%3Aissue+is%3Aopen+label%3Adependencies) for any open issues pinning versions.
2323
4. Check the [`priority - next release` issues and PRs](https://github.com/CesiumGS/cesium/labels/priority%20-%20next%20release). If there are any outstanding items, post a message to the `CesiumJS` channel in Teams to figure out what needs to be addressed before we can release.
24-
5. Ensure you've generated valid [end to end testing snapshots](../TestingGuide/README.md) against a previous release tag with `npm run test-e2e-update`.
24+
5. Check the [`remove in [this version number]` issues](https://github.com/CesiumGS/cesium/labels?q=remove) and open PRs to address any deprecations.
25+
6. Ensure you've generated valid [end to end testing snapshots](../TestingGuide/README.md) against a previous release tag with `npm run test-e2e-update`.
2526

2627
## Release testing and packaging
2728

-1.08 MB
Binary file not shown.

Specs/Data/Cesium3DTiles/GaussianSplats/tower_legacy/tileset.json

Lines changed: 0 additions & 66 deletions
This file was deleted.

packages/engine/Source/Scene/GaussianSplat3DTileContent.js

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,30 +125,27 @@ GaussianSplat3DTileContent.tilesetRequiresGaussianSplattingExt = function (
125125
tileset,
126126
) {
127127
let hasGaussianSplatExtension = false;
128-
let hasLegacyGaussianSplatExtension = false;
129128
if (tileset.isGltfExtensionRequired instanceof Function) {
130129
hasGaussianSplatExtension =
131130
tileset.isGltfExtensionRequired("KHR_gaussian_splatting") &&
132131
tileset.isGltfExtensionRequired(
133132
"KHR_gaussian_splatting_compression_spz_2",
134133
);
135134

136-
hasLegacyGaussianSplatExtension = tileset.isGltfExtensionRequired(
137-
"KHR_spz_gaussian_splats_compression",
138-
);
139-
}
140-
141-
if (hasLegacyGaussianSplatExtension) {
142-
deprecationWarning(
143-
"KHR_spz_gaussian_splats_compression",
144-
"Support for the original KHR_spz_gaussian_splats_compression extension has been deprecated in favor " +
145-
"of the up to date KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions and will be " +
146-
"removed in CesiumJS 1.135.\n\nPlease retile your tileset with the KHR_gaussian_splatting and " +
147-
"KHR_gaussian_splatting_compression_spz_2 extensions.",
148-
);
135+
if (
136+
tileset.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")
137+
) {
138+
deprecationWarning(
139+
"KHR_spz_gaussian_splats_compression",
140+
"Support for the original KHR_spz_gaussian_splats_compression extension has been removed in favor " +
141+
"of the up to date KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions" +
142+
"\n\nPlease retile your tileset with the KHR_gaussian_splatting and " +
143+
"KHR_gaussian_splatting_compression_spz_2 extensions.",
144+
);
145+
}
149146
}
150147

151-
return hasGaussianSplatExtension || hasLegacyGaussianSplatExtension;
148+
return hasGaussianSplatExtension;
152149
};
153150

154151
Object.defineProperties(GaussianSplat3DTileContent.prototype, {

packages/engine/Source/Scene/GltfLoader.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,11 +1999,6 @@ function fetchSpzExtensionFrom(extensions) {
19991999
return spz;
20002000
}
20012001

2002-
const legacySpz = extensions?.KHR_spz_gaussian_splats_compression;
2003-
if (defined(legacySpz)) {
2004-
return legacySpz;
2005-
}
2006-
20072002
return undefined;
20082003
}
20092004

packages/engine/Source/Scene/Model/ModelUtility.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ ModelUtility.supportedExtensions = {
370370
KHR_texture_transform: true,
371371
KHR_gaussian_splatting: true,
372372
KHR_gaussian_splatting_compression_spz_2: true,
373-
KHR_spz_gaussian_splats_compression: true,
374373
WEB3D_quantized_attributes: true,
375374
};
376375

packages/engine/Specs/Scene/GaussianSplat3DTileContentSpec.js

Lines changed: 0 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -184,112 +184,3 @@ describe(
184184
},
185185
"WebGL",
186186
);
187-
188-
describe(
189-
"Scene/GaussianSplat3DTileContent_Legacy",
190-
function () {
191-
const tilesetUrl =
192-
"./Data/Cesium3DTiles/GaussianSplats/tower_legacy/tileset.json";
193-
194-
let scene;
195-
let options;
196-
197-
beforeAll(function () {
198-
scene = createScene();
199-
});
200-
201-
afterAll(function () {
202-
scene.destroyForSpecs();
203-
});
204-
205-
beforeEach(function () {
206-
RequestScheduler.clearForSpecs();
207-
scene.morphTo3D(0.0);
208-
209-
const camera = scene.camera;
210-
camera.frustum = new PerspectiveFrustum();
211-
camera.frustum.aspectRatio =
212-
scene.drawingBufferWidth / scene.drawingBufferHeight;
213-
camera.frustum.fov = CesiumMath.toRadians(60.0);
214-
215-
options = {
216-
cullRequestsWhileMoving: false,
217-
maximumScreenSpaceError: 1,
218-
};
219-
});
220-
221-
afterEach(function () {
222-
scene.primitives.removeAll();
223-
ResourceCache.clearForSpecs();
224-
});
225-
226-
it("loads Gaussian Splat content", function () {
227-
return Cesium3DTilesTester.loadTileset(scene, tilesetUrl, options).then(
228-
function (tileset) {
229-
scene.camera.lookAt(
230-
tileset.boundingSphere.center,
231-
new HeadingPitchRange(0.0, -1.57, tileset.boundingSphere.radius),
232-
);
233-
234-
return Cesium3DTilesTester.waitForTileContentReady(
235-
scene,
236-
tileset.root,
237-
).then(function (tile) {
238-
const content = tile.content;
239-
expect(content).toBeDefined();
240-
expect(content instanceof GaussianSplat3DTileContent).toBe(true);
241-
242-
const gltfPrimitive = content.gltfPrimitive;
243-
expect(gltfPrimitive).toBeDefined();
244-
expect(gltfPrimitive.attributes.length).toBeGreaterThan(0);
245-
const positions = ModelUtility.getAttributeBySemantic(
246-
gltfPrimitive,
247-
VertexAttributeSemantic.POSITION,
248-
).typedArray;
249-
250-
const rotations = ModelUtility.getAttributeBySemantic(
251-
gltfPrimitive,
252-
VertexAttributeSemantic.ROTATION,
253-
).typedArray;
254-
255-
const scales = ModelUtility.getAttributeBySemantic(
256-
gltfPrimitive,
257-
VertexAttributeSemantic.SCALE,
258-
).typedArray;
259-
260-
const colors = ModelUtility.getAttributeBySemantic(
261-
gltfPrimitive,
262-
VertexAttributeSemantic.COLOR,
263-
).typedArray;
264-
265-
expect(positions.length).toBeGreaterThan(0);
266-
expect(rotations.length).toBeGreaterThan(0);
267-
expect(scales.length).toBeGreaterThan(0);
268-
expect(colors.length).toBeGreaterThan(0);
269-
});
270-
},
271-
);
272-
});
273-
it("Create and destroy GaussianSplat3DTileContent", async function () {
274-
const tileset = await Cesium3DTilesTester.loadTileset(
275-
scene,
276-
tilesetUrl,
277-
options,
278-
);
279-
scene.camera.lookAt(
280-
tileset.boundingSphere.center,
281-
new HeadingPitchRange(0.0, -1.57, tileset.boundingSphere.radius),
282-
);
283-
const tile = await Cesium3DTilesTester.waitForTileContentReady(
284-
scene,
285-
tileset.root,
286-
);
287-
288-
scene.primitives.remove(tileset);
289-
expect(tileset.isDestroyed()).toBe(true);
290-
expect(tile.isDestroyed()).toBe(true);
291-
expect(tile.content).toBeUndefined();
292-
});
293-
},
294-
"WebGL",
295-
);

packages/engine/Specs/Scene/GaussianSplatPrimitiveSpec.js

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -214,71 +214,3 @@ describe(
214214
},
215215
"WebGL",
216216
);
217-
218-
describe(
219-
"Scene/GaussianSplatPrimitive_Legacy",
220-
function () {
221-
const tilesetUrl =
222-
"./Data/Cesium3DTiles/GaussianSplats/tower_legacy/tileset.json";
223-
224-
let scene;
225-
let options;
226-
227-
beforeAll(function () {
228-
scene = createScene();
229-
});
230-
231-
afterAll(function () {
232-
scene.destroyForSpecs();
233-
});
234-
235-
beforeEach(function () {
236-
RequestScheduler.clearForSpecs();
237-
scene.morphTo3D(0.0);
238-
239-
const camera = scene.camera;
240-
camera.frustum = new PerspectiveFrustum();
241-
camera.frustum.aspectRatio =
242-
scene.drawingBufferWidth / scene.drawingBufferHeight;
243-
camera.frustum.fov = CesiumMath.toRadians(60.0);
244-
245-
options = {
246-
cullRequestsWhileMoving: false,
247-
maximumScreenSpaceError: 1,
248-
};
249-
});
250-
251-
afterEach(function () {
252-
scene.primitives.removeAll();
253-
ResourceCache.clearForSpecs();
254-
});
255-
256-
it("loads a Gaussian splats tileset", async function () {
257-
const tileset = await Cesium3DTilesTester.loadTileset(
258-
scene,
259-
tilesetUrl,
260-
options,
261-
);
262-
scene.camera.lookAt(
263-
tileset.boundingSphere.center,
264-
new HeadingPitchRange(0.0, -1.57, tileset.boundingSphere.radius),
265-
);
266-
expect(tileset.hasExtension("3DTILES_content_gltf")).toBe(true);
267-
expect(
268-
tileset.isGltfExtensionUsed("KHR_spz_gaussian_splats_compression"),
269-
).toBe(true);
270-
expect(
271-
tileset.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression"),
272-
).toBe(true);
273-
274-
const tile = await Cesium3DTilesTester.waitForTileContentReady(
275-
scene,
276-
tileset.root,
277-
);
278-
279-
expect(tile.content).toBeDefined();
280-
expect(tile.content instanceof GaussianSplat3DTileContent).toBe(true);
281-
});
282-
},
283-
"WebGL",
284-
);

0 commit comments

Comments
 (0)