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

Separate atmosphere preprocessor #374

Merged
merged 39 commits into from
Jul 15, 2024

Conversation

Schneegans
Copy link
Member

This extracts the preprocessing code of the Bruneton atmosphere model into a separate binary. This allows us to precompute the scattering data offline and thus improve the startup time of CosmoScout VR significantly.

The precomputed data is stored in Tiff files and is available in this repository which is used as a submodule in CosmoScout VR.

@JonasGilg
Copy link
Member

I get the following error, when I try to compile with Visual Studio 2019:

[...]/plugins/csp-atmospheres/src/models/bruneton/Model.cpp(65): error C2079: "file" verwendet undefiniertes class "std::basic_ifstream<char,std::char_traits<char>>"
[...]/plugins/csp-atmospheres/src/models/bruneton/Model.cpp(65): error C2440: "Initialisierung": "std::basic_string<char,std::char_traits<char>,std::allocator<char>>" kann nicht in "int" konvertiert werden

@Schneegans
Copy link
Member Author

I get the following error, when I try to compile with Visual Studio 2019:

[...]/plugins/csp-atmospheres/src/models/bruneton/Model.cpp(65): error C2079: "file" verwendet undefiniertes class "std::basic_ifstream<char,std::char_traits<char>>"
[...]/plugins/csp-atmospheres/src/models/bruneton/Model.cpp(65): error C2440: "Initialisierung": "std::basic_string<char,std::char_traits<char>,std::allocator<char>>" kann nicht in "int" konvertiert werden

I fixed some other msvc-related issues. However, this error I do not get (also Visual Studio 2019) and the CI builds do not complain either. Do you have an idea what could be the reason?

@JonasGilg
Copy link
Member

JonasGilg commented Jun 26, 2024

Okay, I got it to compile. If I start it now I get the following error, when the atmospheres plugin loads:

[I] csp-atmospheres ... Loading plugin...
../share/resources/atmosphere-data/earth/phase.tif: Deflate compression support is not configured.
../share/resources/atmosphere-data/earth/phase.tif: Deflate compression support is not configured.
../share/resources/atmosphere-data/earth/phase.tif: Deflate compression support is not configured.
../share/resources/atmosphere-data/earth/transmittance.tif: Deflate compression support is not configured.
../share/resources/atmosphere-data/earth/transmittance.tif: Deflate compression support is not configured.
../share/resources/atmosphere-data/earth/transmittance.tif: Deflate compression support is not configured.

Edit: Seems that libtiff needs to be compiled with zlib support in Windows to resolve this.
Edit 2: We need libdeflate AND zlib to get this running on Windows.

@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@Schneegans
Copy link
Member Author

Yeah, I simply use textures without compression now. Seems to be the easier approach, I guess.

@Schneegans
Copy link
Member Author

You'll need a git submodule update to fetch the new textures.

@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@cosmoscout cosmoscout deleted a comment from coveralls Jun 28, 2024
@coveralls
Copy link

coveralls commented Jul 1, 2024

Pull Request Test Coverage Report for Build 9743267682

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 130 (0.0%) changed or added relevant lines in 4 files are covered.
  • 10 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.04%) to 1.181%

Changes Missing Coverage Covered Lines Changed/Added Lines %
plugins/csp-atmospheres/src/models/cosmoscout/Model.cpp 0 1 0.0%
plugins/csp-atmospheres/src/Atmosphere.cpp 0 2 0.0%
plugins/csp-atmospheres/src/models/bruneton/Metadata.cpp 0 6 0.0%
plugins/csp-atmospheres/src/models/bruneton/Model.cpp 0 121 0.0%
Files with Coverage Reduction New Missed Lines %
plugins/csp-atmospheres/src/models/bruneton/Model.hpp 2 0.0%
plugins/csp-atmospheres/src/Atmosphere.cpp 3 0.0%
plugins/csp-atmospheres/src/models/bruneton/Model.cpp 5 0.0%
Totals Coverage Status
Change from base Build 9006373097: 0.04%
Covered Lines: 193
Relevant Lines: 16347

💛 - Coveralls

@Schneegans Schneegans merged commit 38a95b3 into main Jul 15, 2024
12 checks passed
@Schneegans Schneegans deleted the feature/separate-atmosphere-preprocessor branch July 15, 2024 11:46
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

3 participants