Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the background color bug when exporting video with the "random" background option #2831

Merged
merged 4 commits into from
Jan 27, 2024

Conversation

KevinXu02
Copy link
Contributor

Set default bg to viser color in gs to fix strange bg color in rendering.

@bobye
Copy link

bobye commented Jan 27, 2024

Training with random background is a feature not a bug.

@KevinXu02
Copy link
Contributor Author

KevinXu02 commented Jan 27, 2024

Training with random background is a feature not a bug.

Hi! This modification won’t affect training, the background is still randomly picked. It only changes the background color when exporting video.

@KevinXu02 KevinXu02 changed the title Fix the export color bug when using "random" for training Fix the background color bug when exporting video with the "random" background option Jan 27, 2024
@jb-ye
Copy link
Collaborator

jb-ye commented Jan 27, 2024

I see. But the code here is quite confusing. Could you add some comments explaining the effect of setting this to a magic value?

@KevinXu02
Copy link
Contributor Author

I see. But the code here is quite confusing. Could you add some comments explaining the effect of setting this to a magic value?

Oh, the value is just the same background color as the one for viser. The training background logic is defined seperately, so this value would only work when it is not in training.

@jb-ye
Copy link
Collaborator

jb-ye commented Jan 27, 2024

Yeah, I know. That's what I suggested for adding those comments above the line of change.

@KevinXu02
Copy link
Contributor Author

Yeah, I know. That's what I suggested for adding those comments above the line of change.

Comments added. Thank you for your suggestion.

@kerrj
Copy link
Collaborator

kerrj commented Jan 27, 2024

This works as a patch, but what might be a more permanent fix is to propagate the background color set in viser into render crop_data so that this line gets called even if the scene isn't cropped

Copy link
Collaborator

@kerrj kerrj left a comment

Choose a reason for hiding this comment

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

fixes #2815 , but might want to revisit how background is handled in the render crop_data so that users can define a background even if the 'crop scene' option is not selected

@kerrj kerrj merged commit 3f23e6e into nerfstudio-project:main Jan 27, 2024
2 checks passed
@KevinXu02 KevinXu02 deleted the bg branch March 4, 2024 08:08
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.

None yet

4 participants