Skip to content

Commit 1f641c2

Browse files
committed
Added shape and rendering hints to base 3DGS spec
1 parent df36989 commit 1f641c2

File tree

2 files changed

+103
-30
lines changed

2 files changed

+103
-30
lines changed

extensions/2.0/Khronos/KHR_gaussian_splatting/README.md

Lines changed: 70 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,40 +50,88 @@ The extension must be listed in `extensionsUsed`:
5050

5151
Other extensions that depend on this extension such as 3D Gaussian splatting compression extensions may require that this extension be included in `extensionsRequired`.
5252

53-
### Geometry Type
53+
## Geometry Type
5454

5555
The `mode` of the `primitive` must be `POINTS`.
5656

57-
### Schema Example
57+
## Schema Example
5858

59-
Example shown below. This extension only affects any `primitive` nodes containting 3D Gaussian splat data.
59+
Example shown below including optional properties. This extension only affects any `primitive` nodes containting 3D Gaussian splat data.
6060

6161
```json
62-
"meshes": [{
63-
"primitives": [{
64-
"attributes": {
62+
"meshes": [{
63+
"primitives": [{
64+
"attributes": {
6565
"POSITION": 0,
6666
"COLOR_0": 1,
67-
"KHR_gaussian_splatting:SCALE": 2,
68-
"KHR_gaussian_splatting:ROTATION": 3,
69-
"KHR_gaussian_splatting:SH_DEGREE_1_COEF_0": 4,
70-
"KHR_gaussian_splatting:SH_DEGREE_1_COEF_1": 5,
71-
"KHR_gaussian_splatting:SH_DEGREE_1_COEF_2": 6
72-
},
73-
"mode": 0,
74-
"indices": 7,
75-
"extensions": {
76-
"KHR_gaussian_splatting": {}
77-
}
78-
}]
79-
}],
67+
"_SCALE": 2,
68+
"_ROTATION": 3,
69+
"_SH_DEGREE_1_COEF_0": 4,
70+
"_SH_DEGREE_1_COEF_1": 5,
71+
"_SH_DEGREE_1_COEF_2": 6
72+
},
73+
"mode": 0,
74+
"indices": 7,
75+
"extensions": {
76+
"KHR_gaussian_splatting": {
77+
"shape": "ellipsoid",
78+
"hints": {
79+
"sortingMethod": "cameraDistance",
80+
"projection": "perspective"
81+
}
82+
}
83+
}
84+
}]
85+
}],
8086
```
8187

82-
### Extension Properties
88+
## Extension Properties
8389

84-
The extension specifies no additional properties but must be included on a point primitive with an empty body to indicate that the primitive should be treated as a 3D Gaussian splatting field.
90+
### Shape
8591

86-
#### attributes
92+
Gaussian splats can have a variety of shapes and this has the potential to change over time. The `shape` property is an optional property that provides an indication to the renderer what these shapes may be. Typically `ellipsoid` refers to the shape generally considered to be a "splat" and this is considered the default value.
93+
94+
Renderers are free to ignore any values they do not recognize, but are encouraged to follow the non-normative list below.
95+
96+
#### Known Shapes
97+
98+
*This section is non-normative and not comprehensive. It may change over time.*
99+
100+
- `ellipsoid` _(Default Value)_
101+
- `triangle`
102+
- `quad`
103+
104+
### Rendering Hints
105+
106+
This extension provides a `hints` property that contains sub-properties that may help renderers understand how best to render the Gaussians to the screen. This property and all of it's sub-properties are optional, and renderers can choose to ignore them.
107+
108+
#### Projection
109+
110+
The `projection` property is an optional hint that specifies how the Gaussians should be projected into the image. This is typically provided by the training process for the splats. This is a freeform string field to allow new projections to be specified as they become available. The default value is `perspective`.
111+
112+
Renderers are free to ignore any values they do not recognize, but are encouraged to follow the non-normative list below.
113+
114+
##### Known Projection Methods
115+
116+
*This section is non-normative and not comprehensive. It may change over time.*
117+
118+
- `perspective` _(Default Value)_: The typical 3D perspective projection based on scene depth.
119+
- `orthographic`: A orthogonal projection of splats into a scene to preserve shape and scale and reduce distortion.
120+
121+
#### Sorting Method
122+
123+
The `sortingMethod` property is an optional hint that specifies how the Gaussians should be sorted during the rendering process. This typically is provided by the training process for the splats. This is a freeform string field to allow new sorting methods to be specified as they become available. The default value is `cameraDistance`.
124+
125+
Renderers are free to ignore any values they do not recognize, but are encouraged to follow the non-normative list below.
126+
127+
##### Known Sorting Methods
128+
129+
*This section is non-normative and not comprehensive. It may change over time.*
130+
131+
- `cameraDistance` _(Default Value)_: The distance between the center of the splat and the position of the camera.
132+
- `zDepth`: The projected z-depth in the camera projection.
133+
134+
## Attributes
87135

88136
Each 3D Gaussian splat has the following attributes. At minimum the attributes must contain `POSITION`, `COLOR_0`, `KHR_gaussian_splatting:ROTATION`, and `KHR_gaussian_splatting:SCALE`. `KHR_gaussian_splatting:SH_DEGREE_ℓ_COEF_n` attributes hold the spherical harmonics data and are not required. `POSITION` and `COLOR_0` are defined by the base glTF specification. If higher degrees of Spherical Harmonics are used then lower degrees are required implicitly.
89137

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema",
3-
"title": "KHR_gaussian_splatting glTF Mesh Primitive Extension",
4-
"type": "object",
5-
"description": "Data for a 3D Gaussian Splat primitive.",
6-
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
7-
"properties": {
8-
"extensions": { },
9-
"extras": { }
2+
"$schema": "http://json-schema.org/draft-04/schema",
3+
"title": "KHR_gaussian_splatting glTF Mesh Primitive Extension",
4+
"type": "object",
5+
"description": "Data for a 3D Gaussian Splat primitive.",
6+
"allOf": [
7+
{
8+
"$ref": "glTFProperty.schema.json"
109
}
10+
],
11+
"properties": {
12+
"shape": {
13+
"type": "string",
14+
"description": "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.",
15+
"default": "ellipsoid"
16+
},
17+
"hints": {
18+
"type": "object",
19+
"description": "Optional rendering hints for rendering the 3D Gaussian splats. Renderers are free to ignore any of these.",
20+
"properties": {
21+
"projection": {
22+
"type": "string",
23+
"description": "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.",
24+
"default": "perspective"
25+
},
26+
"sortingMethod": {
27+
"type": "string",
28+
"description": "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.",
29+
"default": "cameraDistance"
30+
}
31+
}
32+
},
33+
"extensions": {},
34+
"extras": {}
35+
}
1136
}

0 commit comments

Comments
 (0)