Skip to content

Clamped color gradient [Volinga]#1394

Open
Ediolot wants to merge 2 commits into
MrNeRF:masterfrom
Volinga:feat_4572_clamped_color
Open

Clamped color gradient [Volinga]#1394
Ediolot wants to merge 2 commits into
MrNeRF:masterfrom
Volinga:feat_4572_clamped_color

Conversation

@Ediolot

@Ediolot Ediolot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

I have found the following behaviour where gaussians with a strongly negative SH0 color will stop updating their colors. Colors outside [0, max_blend_color] get a 0 gradient factor and can never climb out of black leaving permanently dark gaussians. The issue seems to be mitigated (and hidden) since position, scale, rotation and opacity are still updated.

This fix changes the clamp on the gradient for the backward pass (forward still clamps as before).

I also ran a few fast tests on the truck dataset (MCMC, 500K splats, 10K iter, resize factor = 2). There are no big changes to the naked eye but the average loss seems to be better. All runs took a similar amount of time.

+-----+----------------+------------------+
| Run | Loss with fix  | Loss without fix |
+-----+----------------+------------------+
| 1   | 0.030854       | 0.052152         |
| 2   | 0.033743       | 0.047833         |
| 3   | 0.032813       | 0.048883         |
| 4   | 0.040502       | 0.046050         |
| 5   | 0.035585       | 0.054314         |
+-----+----------------+------------------+
image

Copilot AI review requested due to automatic review settings July 7, 2026 15:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the backward-pass gradient gating for clamped colors in the FastGS rasterization training kernel so that Gaussians with strongly negative SH0-derived colors can still receive gradients and recover from black, while preserving the existing forward-pass clamp behavior.

Changes:

  • Modifies the backward-pass color_grad_factor so gradients are only blocked above config::max_blend_color, not below 0.
  • Keeps the forward-pass color clamp to [0, config::max_blend_color] unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants