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

Limit output SH bands #320

Merged
merged 3 commits into from
Dec 9, 2024
Merged

Limit output SH bands #320

merged 3 commits into from
Dec 9, 2024

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented Dec 9, 2024

This PR updates the exporter to respect the current VIEW OPTIONS "SH bands" setting to limit the number of bands written to output ply and compressed.ply files.

Code changes are as follows:

  • place the splat data extraction and transform logic into SingleSplat class
  • SingleSplat reads the data for a gaussian and transforms it ready for output as follows:
    • convert between the scene SH bands and chosen output SH bands (currently non-used bands are just dropped, but in future we hope to add SH baking as an option).
    • applies the palette transform
    • rotates spherical harmonics
    • applies color/tint adjustments
  • update the output code to use SingleSplat exclusively for accessing scene data

Notes:

  • SuperSplat currently pads spherical harmonics to 3 bands at load time even if there are only 1 or 2 loaded. This means loading a model with 1 band and then saving directly will add 2 more bands. This will be addressed in future.
  • The selection of output bands should be an option on an export dialog. This will be added soon.

@slimbuck slimbuck added bug Something isn't working enhancement New feature labels Dec 9, 2024
@slimbuck slimbuck requested a review from a team December 9, 2024 12:02
@slimbuck slimbuck self-assigned this Dec 9, 2024
@slimbuck slimbuck merged commit 0dcc6be into playcanvas:main Dec 9, 2024
2 checks passed
@slimbuck slimbuck deleted the serialize-dev branch December 9, 2024 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants