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

Fixed CI build error #2241

Merged
merged 9 commits into from
May 3, 2024
Merged

Fixed CI build error #2241

merged 9 commits into from
May 3, 2024

Conversation

AlexandruPopovici
Copy link
Contributor

@AlexandruPopovici AlexandruPopovici commented May 2, 2024

Description & motivation

This fixes the CI build error caused by #2239
Turns out the culprit was the new hdri size of 8.3Mb which we include into the viewer build as base64 in order to avoid external fetches. After reducing the image size to the same as the old one (1024x512) the size was still 5.7Mb. Considering the old HDRI of identical size was only 1.1Mb a 5X increase in viewer build size is not really acceptable.

So we applied DWLB compression to the hdri via oiiotool CLI. This compression algorithm is lossy, but there is no visible tradeoff. That's mostly because we're not using the HDRI as is, but rather we're generating a small PMREM based on it and that's what we sample at runtime.

Because there is no visible reduction in quality, I'd say that a 3X reduction in size compared to the old HDRI and a 18X reduction compared to the PIZ lossless compression is definitely worth it.

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

…hdri image.Now our IBL sources are finally straight not tilded 90 deg anymore. Added artificial shininess to all objects configurable in real time from the sandbox.
…pdated the sandbox to reflect the required AEC Aesthetics properties
…on, contrast and shininess are now in the 'post' folder and the hdri dropdown in the 'indirect light' folder. Cleaned up and renamed the available hdris to their descriptive names. The 'Mild' hdri is not set as the default one at library level
…lemented the artificial shininess as a real thing that the user can control
…e (8.3Mb) which is compiled together with the viewer library as base64 that was throwing something off. Because resizing the hdri to the old one's size (1025x512) was not enought (still amounted to 5.8Mb), we also applied a lossy compression algorithm namely DWAB to the image. This reduced the size to 330Kb with no visible tradeoff.
@didimitrie didimitrie mentioned this pull request May 3, 2024
6 tasks
@didimitrie didimitrie merged commit 2ba6b24 into main May 3, 2024
20 of 23 checks passed
@didimitrie didimitrie deleted the alex/compressed-hdri branch May 3, 2024 16:02
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.

3 participants