From 3f23e6efb2b1aa168d77c9995e8a313b7e3a49cf Mon Sep 17 00:00:00 2001 From: Congrong Xu <50019703+KevinXu02@users.noreply.github.com> Date: Sat, 27 Jan 2024 11:27:49 -0800 Subject: [PATCH] Fix the background color bug when exporting video with the "random" background option (#2831) patch #2815 --- nerfstudio/models/splatfacto.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nerfstudio/models/splatfacto.py b/nerfstudio/models/splatfacto.py index 6ce5c164f..84000e73c 100644 --- a/nerfstudio/models/splatfacto.py +++ b/nerfstudio/models/splatfacto.py @@ -222,7 +222,9 @@ class SplatfactoModel(Model): self.crop_box: Optional[OrientedBox] = None if self.config.background_color == "random": - self.background_color = torch.rand(3) + self.background_color = torch.tensor( + [0.1490, 0.1647, 0.2157] + ) # This color is the same as the default background color in Viser. This would only affect the background color when rendering. else: self.background_color = get_color(self.config.background_color)