KHR_gaussian_splatting: Editorial review#2567
KHR_gaussian_splatting: Editorial review#2567lexaknyazev wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
79f7b66 to
a021aa4
Compare
a021aa4 to
f0d3146
Compare
javagl
left a comment
There was a problem hiding this comment.
I did not verify the math.
The inlined comments are mainly about typos or wording details.
Some of the comments may be subjective, and may not have to be addressed.
The most "important" one is probably about which attribute semantics are 'Required'. Iff we agreed on making them all required, then that's OK. But I think that it could make sense to point out that they are only required for the specific case (ellipse kernel) that is covered here.
f0d3146 to
820e8fa
Compare
|
Regarding the clamping discussion:
|
Clamping should not depend on the encoding differences between these two options because both of them are defined only for the Please see the current language at the end of the "Splat Lighting" section. |
The point is, that display referred is an image working space and needs a conversion to the final display format anyway. In common case, usually srgb to srgb, we can clamp if really required. If srgb to another display format, there also a conversion is required. |
|
Furthermore, as we do have display referred data, we are working in the display image space: For scene referred and lighting, this will come in another extension. So, you can remove the lighting in this section, as this needs to be solved differently. |
|
If one is really nitpicking, the display referred data is not allowed to be used in scene referred space. |
flowchart TD
A[lin_rec709_display] <--> B[encoding and decoding]
B <--> C[srgb_rec709_display]
C --> D[SRGB Display]
|
It's not a real scene lighting; "Splat Lighting" there means computing the final color from SH values. This term was used in the previous spec draft so it's still there; feel free to propose a better option. The whole clamping issue addresses a completely separate topic. Imagine a splat containing only SH0 values (for brevity) and the SH0 values are like |
This can not happen, as the values were trained in a given range. |
|
Can not happen to srgb, and if trained for linear, please look at the image above |
Training process is irrelevant. The spec describes what to do with input data and there are only three possible options:
|
Training process is relevant, as we are reproducing input images. |
|
We are doing a glTF extension for 3D Gaussian Splatting, so training is relevant. |
|
None of the test data sets in #2562 was created with a training process. The spec is supposed to say how input data is handled, regardless where and how it has been created. |
Then ignore these test assets except the real world data ones, also shared there. |
|
We are doing a 3D Gaussian Splatting glTF extension related to the paper and not splat everything. |
|
So, if one is creating 3D Gaussian Splatting data manually, one has to take the training algorithm into account. |
|
I'll just point to #2490 (comment) , so that you can discuss this with the person who wrote that comment, and assume that you're OK with clamping the resulting values. |
|
Maybe I was wrong at that point of time and learned a little bit. |
|
So, for display referred and current color spaces |
|
I implemented something similar a few years ago at UX3D from scratch to understand the color conversion pipeline. Maybe in this code, there is a bug. |
|
After further review, the clamping issue seems far from just nitpicking. Not specifying this step may lead to severe output differences when using alpha-premultiplied blending. Consider the following input:
Clamping the SH sum
Implicit clamping when rendering to a normalized color buffer
|
|
For 3D Gaussian Splatting, this should not happen. Because the original images color values were between 0 and 1. So, the sum has to be between 0 and 1. So, if we have something like 1.0000000001, I would consider as valid data. However, if the sum is e.g. 2.0, the data is for sure incorrect. |
|
I took an implicit "TODO (when I'm really bored)" to check this, but maybe someone knows from the tip of their head: The specification currently allows implementations to ignore the higher-degree spherical harmonics. Can there be a case where a color component becomes smaller by taking the higher-degree coefficients into account? Or as pseudocode: Can there be a case where I think that this can be the case, given that the coefficients can be negative, and how they are mushed together in the shader, but I haven't confirmed. |
You can try it out e.g. in the https://superspl.at/editor Sorry, do not want to be impolite. Let me check. Or what do you not understand when asking AI? |
|
@NorbertNopper-Huawei I think we have agreed on clamping in principle already. The final confirmation is where exactly it happens:
If we do (1), then (2) is not needed. If we do only (2), then blending would have to be done with alpha-premultiplied values to avoid very convoluted workarounds. Note that (2) technically allows premultiplied color values exceeding the corresponding alpha values, which is generally incorrect but that's what some viewers do today, maybe by mistake. |
|
@lexaknyazev What do you suggest? I mean, and I am wondering, why now these questions do pop up now. I do not know it at the moment, do you know a solution? I try to provide one as well. Looking at my code. |
|
@lexaknyazev Can you please share the links of these viewers, where this happens? Want to look at the code and understand. |
|
I do not have the clamp in my code, let's look at the original paper, as this is the ground truth. |
|
Let's ask my good old friend R2D2, ... |
|
... seems in the original paper and implementation, there is no clamp at all. So, a perfect pipeline would not need it. However, I suggest to just tolerate the current implementations and provide a guide, how to do in a correct way. |
|
Of course, maybe someone else should look at this as well. |
|
@NorbertNopper-Huawei Your viewer performs color clamping implicitly, like described in (2) above because:
You could try adding |
|
@lexaknyazev The links to the viewers, please. |
|
Of course, this is a glTF community decision and we will adapt after internal clarifications. |
|
The original research paper provides both sides of the pipeline so it does not need to explicitly call out potential cross-vendor portability issues. Standards like glTF are generally one-sided in that sense. By "your viewer" I mean the one currently located in the Khronos internal GitLab. |
Yes, it would clamp but it does not, as the data itself is in the 0 to 1 range. This is the reason, that (1) and (2) implementors should consider (0) - the original paper implementation - where no clamping is done and required. |
Maybe both sides need to make changes in their implementations? That is also an option. |
|
A compromise. Also, future proof for scene referred data. |
|
It is assumed, that the 3DGS data in the glTF is valid, of course. And again, the viewer does not clamp, as the values are not above 1 or below 0. |
Unless we provide an exhaustive SH data validity definition, including free view direction selection and toggling of the higher degrees (see Marco's comments above), all SH data is considered as valid. |
|
We could add a note, where we say, that by purpose we are not clamping, as a) we rely on the original paper where no clamping happens and b) there are several approaches to handle this issue, not just clamping, and glTF does not want to mandate this. Also, this is a general problem to 3DGS data itself, so not just related to 3DGS in glTF. |
|
If we would have perfect data, the data does not need to be clamped, as in the 0 to 1 range. However, as this can not be guaranteed, there are several approaches to handle this issue, where clamping is one of them. |
This is not a valid argument. Research papers are not concerned with interoperability. If you want to treat the reference rasterizer as the ground truth, then three rules should be followed:
|
Then please make a proposal how you would do it and I trust you, that it will be accepted by everyone. |
dcbb237 to
7827abe
Compare

No description provided.