Skip to content
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d6e4d5d
KHR_gaussian_splatting extension
azrogers Jul 11, 2025
fe8d2f0
Merge branch 'main' of github.com:CesiumGS/cesium-native into gaussia…
azrogers Aug 15, 2025
cf5cfe0
Add SPZ extension, library
azrogers Aug 15, 2025
d687c26
Implement spz decoding
azrogers Aug 19, 2025
b6896cf
Use overlay port for spz
azrogers Aug 19, 2025
32dff5e
Merge branch 'main' of github.com:CesiumGS/cesium-native into gaussia…
azrogers Aug 20, 2025
9258a5b
Use zlib-ng for spz
azrogers Aug 20, 2025
6efafe6
Just use non-ng zlib, seems to have fewer issues
azrogers Aug 20, 2025
d2f5d78
Zlib dependency
azrogers Aug 22, 2025
99ddaec
Merge branch 'main' of github.com:CesiumGS/cesium-native into gaussia…
azrogers Aug 26, 2025
01ef36e
Rename SPZ extension
azrogers Aug 26, 2025
0d8ef62
Update to match spz2 renaming
azrogers Aug 26, 2025
0193409
SPZ test, fixes
azrogers Aug 28, 2025
2105e5b
Quietly map older versions of the SPZ extension
azrogers Aug 28, 2025
cb2c5a1
Missing a return...
azrogers Aug 28, 2025
8a72d93
Fix attribute names in SPZ loader
azrogers Aug 28, 2025
641e9f0
SPZ loading fixes
azrogers Aug 29, 2025
dc8ce97
Conform accessor types to required values
azrogers Aug 29, 2025
9da2c9c
Merge branch 'main' of github.com:CesiumGS/cesium-native into gaussia…
azrogers Sep 3, 2025
6b45940
Write colors directly as floats
azrogers Sep 12, 2025
99355d4
Merge branch 'main' of github.com:CesiumGS/cesium-native into gaussia…
azrogers Sep 24, 2025
1ca38cd
Change to how spherical harmonics are copied to the buffer.
azrogers Sep 26, 2025
fd19709
Merge branch 'main' of github.com:CesiumGS/cesium-native into gaussia…
azrogers Oct 10, 2025
fd85c8e
Merge branch 'main' of github.com:CesiumGS/cesium-native into gaussia…
azrogers Oct 14, 2025
956a382
Update CHANGES.md
azrogers Oct 14, 2025
eef757a
clang-tidy fixes
azrogers Oct 14, 2025
d5ca2ca
Fix tests
azrogers Oct 14, 2025
557f2b2
Fix clang build
azrogers Oct 14, 2025
5a28968
Will this fix it?
azrogers Oct 14, 2025
1cdb48a
Fix include style
azrogers Oct 14, 2025
fc68020
Remove explicit zlib dependency.
kring Oct 17, 2025
9c41f33
Merge remote-tracking branch 'origin/trouble-with-triplets' into gaus…
kring Oct 23, 2025
33d5640
Update spz overlay port.
kring Oct 23, 2025
34cc523
A little cmake and vcpkg cleanup.
kring Oct 23, 2025
8df7a1f
Update spz to v2.1.0.
kring Oct 28, 2025
b948b9c
Update spz overlay with latest from PR.
kring Oct 28, 2025
8c6f35b
Merge branch 'main' of github.com:CesiumGS/cesium-native into gaussia…
azrogers Oct 28, 2025
30cc969
Remove spz overlay port, draft-splat-spz branch of gltf
azrogers Oct 28, 2025
d3b0ccb
Regenerate gltf
azrogers Oct 28, 2025
90a2465
Update vcpkg commit
azrogers Oct 29, 2025
7734cff
More recent vcpkg commit for cmake fix
azrogers Oct 30, 2025
54c22fd
Add include to fix glm issue
azrogers Oct 30, 2025
097ca8c
Tell clang-tidy to not worry about it
azrogers Oct 30, 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
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
- Added `AzureMapsRasterOverlay`.
- Added `Uri::ensureTrailingSlash`, which is helpful when the `Uri` represents a base URL.

##### Additions :tada:

- Added support for the `KHR_gaussian_splatting` extension.
- SPZ payloads for `KHR_guassian_splatting` using the `KHR_gaussian_splatting_compression_spz_2` extension will now be decoded.

##### Fixes :wrench:

- Fixed a bug in `GoogleMapTilesRasterOverlay` that tried to parse credits from an erroneous viewport service response.
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ set(PACKAGES_PUBLIC asyncplusplus expected-lite fmt glm rapidjson spdlog stb ada
set(PACKAGES_PRIVATE
abseil draco ktx modp-base64 meshoptimizer openssl s2geometry
libjpeg-turbo sqlite3 tinyxml2 libwebp zlib-ng picosha2
earcut-hpp cpp-httplib[core] libmorton zstd
earcut-hpp cpp-httplib[core] libmorton zstd spz zlib
)

# asmjit needed by blend2d on non-iOS platforms (iOS doesn't support JIT)
Expand Down Expand Up @@ -326,6 +326,7 @@ find_package(meshoptimizer CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(s2 CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)
find_package(spz CONFIG REQUIRED)
find_package(tinyxml2 CONFIG REQUIRED)
find_package(unofficial-sqlite3 CONFIG REQUIRED)
find_package(WebP CONFIG REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <CesiumGltf/ExtensionKhrGaussianSplattingHintsValue.h>
#include <CesiumGltf/Library.h>
#include <CesiumUtility/ExtensibleObject.h>

#include <optional>
#include <string>

namespace CesiumGltf {
/**
* @brief Data for a 3D Gaussian Splat primitive.
*/
struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final
: public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
static constexpr const char* TypeName = "ExtensionKhrGaussianSplatting";
/** @brief The official name of the extension. This should be the same as its
* key in the `extensions` object. */
static constexpr const char* ExtensionName = "KHR_gaussian_splatting";

/**
* @brief The shape of the Gaussian to render. Gaussians may be available in
* different shapes, so this is a freeform field that defaults to ellipsoid.
* See the extension specification for futher known types.
*/
std::string shape = "ellipsoid";

/**
* @brief Optional rendering hints for rendering the 3D Gaussian splats.
* Renderers are free to ignore any of these.
*/
std::optional<CesiumGltf::ExtensionKhrGaussianSplattingHintsValue> hints;

/**
* @brief Calculates the size in bytes of this object, including the contents
* of all collections, pointers, and strings. This will NOT include the size
* of any extensions attached to the object. Calling this method may be slow
* as it requires traversing the object's entire structure.
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(ExtensionKhrGaussianSplatting));
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
int64_t(sizeof(CesiumUtility::ExtensibleObject));
accum += int64_t(this->shape.capacity() * sizeof(char));
if (this->hints) {
accum +=
this->hints->getSizeBytes() -
int64_t(sizeof(CesiumGltf::ExtensionKhrGaussianSplattingHintsValue));
}
return accum;
}
};
} // namespace CesiumGltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <CesiumGltf/Library.h>
#include <CesiumUtility/ExtensibleObject.h>

#include <cstdint>

namespace CesiumGltf {
/**
* @brief Compressed data for SPZ v2 primitive.
*/
struct CESIUMGLTF_API ExtensionKhrGaussianSplattingCompressionSpz2 final
: public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
static constexpr const char* TypeName =
"ExtensionKhrGaussianSplattingCompressionSpz2";
/** @brief The official name of the extension. This should be the same as its
* key in the `extensions` object. */
static constexpr const char* ExtensionName =
"KHR_gaussian_splatting_compression_spz_2";

/**
* @brief The index of the bufferView.
*/
int32_t bufferView = -1;

/**
* @brief Calculates the size in bytes of this object, including the contents
* of all collections, pointers, and strings. This will NOT include the size
* of any extensions attached to the object. Calling this method may be slow
* as it requires traversing the object's entire structure.
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(ExtensionKhrGaussianSplattingCompressionSpz2));
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
int64_t(sizeof(CesiumUtility::ExtensibleObject));

return accum;
}
};
} // namespace CesiumGltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <CesiumGltf/Library.h>
#include <CesiumUtility/ExtensibleObject.h>

#include <string>

namespace CesiumGltf {
/**
* @brief Optional rendering hints for rendering the 3D Gaussian splats.
* Renderers are free to ignore any of these.
*/
struct CESIUMGLTF_API ExtensionKhrGaussianSplattingHintsValue final
: public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
static constexpr const char* TypeName =
"ExtensionKhrGaussianSplattingHintsValue";

/**
* @brief Provides a hint specifying how to project the Gaussians to achieve a
* perspective correct value. This is a freeform field that defaults to
* perspective. See the extension specification for further known types.
*/
std::string projection = "perspective";

/**
* @brief Provides a hint specifying how to sort the Gaussians during
* rendering. This is a freeform field defaulting to cameraDistance. See the
* extension specification for further known types.
*/
std::string sortingMethod = "cameraDistance";

/**
* @brief Calculates the size in bytes of this object, including the contents
* of all collections, pointers, and strings. This will NOT include the size
* of any extensions attached to the object. Calling this method may be slow
* as it requires traversing the object's entire structure.
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(ExtensionKhrGaussianSplattingHintsValue));
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
int64_t(sizeof(CesiumUtility::ExtensibleObject));
accum += int64_t(this->projection.capacity() * sizeof(char));
accum += int64_t(this->sortingMethod.capacity() * sizeof(char));
return accum;
}
};
} // namespace CesiumGltf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct CESIUMGLTF_API ExtensionTextureWebp final
static constexpr const char* ExtensionName = "EXT_texture_webp";

/**
* @brief The index of the images node which points to a WebP image.
* @brief The index of the WebP image.
*/
int32_t source = -1;

Expand Down
1 change: 1 addition & 0 deletions CesiumGltfReader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ target_link_libraries(CesiumGltfReader
meshoptimizer::meshoptimizer
modp_b64::modp_b64
KTX::ktx
spz::spz
WebP::webp WebP::webpdecoder
$<IF:$<TARGET_EXISTS:libjpeg-turbo::turbojpeg>,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <CesiumGltf/ExtensionKhrGaussianSplattingCompressionSpz2.h>
#include <CesiumGltfReader/Library.h>
#include <CesiumJsonReader/JsonReader.h>
#include <CesiumJsonReader/JsonReaderOptions.h>

#include <rapidjson/fwd.h>

#include <span>
#include <vector>

namespace CesiumGltf {
struct ExtensionKhrGaussianSplattingCompressionSpz2;
} // namespace CesiumGltf

namespace CesiumGltfReader {

/**
* @brief Reads \ref CesiumGltf::ExtensionKhrGaussianSplattingCompressionSpz2
* "ExtensionKhrGaussianSplattingCompressionSpz2" instances from JSON.
*/
class CESIUMGLTFREADER_API ExtensionKhrGaussianSplattingCompressionSpz2Reader {
public:
/**
* @brief Constructs a new instance.
*/
ExtensionKhrGaussianSplattingCompressionSpz2Reader();

/**
* @brief Gets the options controlling how the JSON is read.
*/
CesiumJsonReader::JsonReaderOptions& getOptions();

/**
* @brief Gets the options controlling how the JSON is read.
*/
const CesiumJsonReader::JsonReaderOptions& getOptions() const;

/**
* @brief Reads an instance of ExtensionKhrGaussianSplattingCompressionSpz2
* from a byte buffer.
*
* @param data The buffer from which to read the instance.
* @return The result of reading the instance.
*/
CesiumJsonReader::ReadJsonResult<
CesiumGltf::ExtensionKhrGaussianSplattingCompressionSpz2>
readFromJson(const std::span<const std::byte>& data) const;

/**
* @brief Reads an instance of ExtensionKhrGaussianSplattingCompressionSpz2
* from a rapidJson::Value.
*
* @param value The value from which to read the instance.
* @return The result of reading the instance.
*/
CesiumJsonReader::ReadJsonResult<
CesiumGltf::ExtensionKhrGaussianSplattingCompressionSpz2>
readFromJson(const rapidjson::Value& value) const;

/**
* @brief Reads an array of instances of
* ExtensionKhrGaussianSplattingCompressionSpz2 from a rapidJson::Value.
*
* @param value The value from which to read the array of instances.
* @return The result of reading the array of instances.
*/
CesiumJsonReader::ReadJsonResult<
std::vector<CesiumGltf::ExtensionKhrGaussianSplattingCompressionSpz2>>
readArrayFromJson(const rapidjson::Value& value) const;

private:
CesiumJsonReader::JsonReaderOptions _options;
};

} // namespace CesiumGltfReader
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <CesiumGltf/ExtensionKhrGaussianSplattingHintsValue.h>
#include <CesiumGltfReader/Library.h>
#include <CesiumJsonReader/JsonReader.h>
#include <CesiumJsonReader/JsonReaderOptions.h>

#include <rapidjson/fwd.h>

#include <span>
#include <vector>

namespace CesiumGltf {
struct ExtensionKhrGaussianSplattingHintsValue;
} // namespace CesiumGltf

namespace CesiumGltfReader {

/**
* @brief Reads \ref CesiumGltf::ExtensionKhrGaussianSplattingHintsValue
* "ExtensionKhrGaussianSplattingHintsValue" instances from JSON.
*/
class CESIUMGLTFREADER_API ExtensionKhrGaussianSplattingHintsValueReader {
public:
/**
* @brief Constructs a new instance.
*/
ExtensionKhrGaussianSplattingHintsValueReader();

/**
* @brief Gets the options controlling how the JSON is read.
*/
CesiumJsonReader::JsonReaderOptions& getOptions();

/**
* @brief Gets the options controlling how the JSON is read.
*/
const CesiumJsonReader::JsonReaderOptions& getOptions() const;

/**
* @brief Reads an instance of ExtensionKhrGaussianSplattingHintsValue from a
* byte buffer.
*
* @param data The buffer from which to read the instance.
* @return The result of reading the instance.
*/
CesiumJsonReader::ReadJsonResult<
CesiumGltf::ExtensionKhrGaussianSplattingHintsValue>
readFromJson(const std::span<const std::byte>& data) const;

/**
* @brief Reads an instance of ExtensionKhrGaussianSplattingHintsValue from a
* rapidJson::Value.
*
* @param value The value from which to read the instance.
* @return The result of reading the instance.
*/
CesiumJsonReader::ReadJsonResult<
CesiumGltf::ExtensionKhrGaussianSplattingHintsValue>
readFromJson(const rapidjson::Value& value) const;

/**
* @brief Reads an array of instances of
* ExtensionKhrGaussianSplattingHintsValue from a rapidJson::Value.
*
* @param value The value from which to read the array of instances.
* @return The result of reading the array of instances.
*/
CesiumJsonReader::ReadJsonResult<
std::vector<CesiumGltf::ExtensionKhrGaussianSplattingHintsValue>>
readArrayFromJson(const rapidjson::Value& value) const;

private:
CesiumJsonReader::JsonReaderOptions _options;
};

} // namespace CesiumGltfReader
Loading
Loading