Skip to content

Comments

Update exporter.py to export sh_degree 0 case#3371

Closed
bell-one wants to merge 1 commit intonerfstudio-project:mainfrom
bell-one:main
Closed

Update exporter.py to export sh_degree 0 case#3371
bell-one wants to merge 1 commit intonerfstudio-project:mainfrom
bell-one:main

Conversation

@bell-one
Copy link
Contributor

Current exporter with sh_degree 0 gives color values instead of spherical harmonics coefficients

Which cannot be rendered with sh_degree 0 renderers such as WebGL Viewer by antimatter15

Current exporter's ply
image

Edited exporter's ply
image

If directly reference shs_0 value with model.shs_0, it makes infinity values and check

If a model trained with sh degree 0 is directly referenced as model.shs_0 in the exporter,
an infinite value occurs, so the cases are divided and recover sh value with colors.

Current exporter with sh_degree 0 gives color values instead of spherical harmonics coefficients
@bell-one bell-one closed this Aug 19, 2024
@bell-one bell-one deleted the main branch August 19, 2024 10:26
brentyi added a commit that referenced this pull request Aug 28, 2024
* Update exporter.py for sh_degree 0

Change to write sh coefficients instead of color values

* Add flag for use_sh0_renderer

Add sh0 renderer case for model.config.sh_degree == 0

* fix ruff

* add warning if use_sh0_renderer is used when higher order of SH is available

* fix rgb export for color-only training

* use ply_color_mode

* better handling ply_color_mode=='rgb' when sh_degree>0

* clean RGB2SH

* fix issues

* update description

---------

Co-authored-by: bell-one <bellone1991@gmail.com>
Co-authored-by: Jianbo Ye <jianboye@amazon.com>
Co-authored-by: Brent Yi <yibrenth@gmail.com>
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.

1 participant