cosmoscout / cosmoscout-vr

:milky_way: A virtual universe which lets you explore, analyze and present huge planetary datasets and large simulation data in real-time.
Other
347 stars 27 forks source link

Advanced Atmospheres #330

Closed Schneegans closed 1 year ago

Schneegans commented 1 year ago

This PR adds the possibility to add alternative atmospheric models to CosmoScout VR. As an example, it adds the excellent scattering model by Eric Bruneton.

For reviewing these changes I would suggest to use the GitHub diff only for the files not in plugins/csp-atmospheres. All files in plugins/csp-atmospheres were nearly rewritten so that it may be easier to look at them as a new plugin.

The csp-atmospheres plugin received a major refactoring. Here are the main consequences:

Other changes:

This should be discussed:

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4447331638


Changes Missing Coverage Covered Lines Changed/Added Lines %
plugins/csp-atmospheres/src/models/bruneton/Model.hpp 0 1 0.0%
plugins/csp-atmospheres/src/models/cosmoscout/Model.hpp 0 1 0.0%
plugins/csp-stars/src/Stars.cpp 0 1 0.0%
plugins/csp-atmospheres/src/Atmosphere.hpp 0 2 0.0%
plugins/csp-atmospheres/src/models/bruneton/internal/Model.hpp 0 2 0.0%
plugins/csp-atmospheres/src/models/cosmoscout/Model.cpp 0 48 0.0%
plugins/csp-atmospheres/src/models/bruneton/Model.cpp 0 56 0.0%
plugins/csp-atmospheres/src/Plugin.cpp 0 76 0.0%
plugins/csp-atmospheres/src/Atmosphere.cpp 0 169 0.0%
plugins/csp-atmospheres/src/models/bruneton/internal/Model.cpp 0 417 0.0%
<!-- Total: 0 773 0.0% -->
Files with Coverage Reduction New Missed Lines %
src/cs-graphics/SetupGLNode.hpp 1 0%
src/cs-utils/TestImageCompare.hpp 1 0%
plugins/csp-atmospheres/src/Plugin.cpp 2 0%
src/cs-utils/FrameStats.hpp 2 0%
plugins/csp-atmospheres/src/Atmosphere.cpp 3 0%
src/cs-utils/DefaultProperty.hpp 3 0%
src/cs-graphics/SetupGLNode.cpp 6 0%
src/cs-utils/utils.cpp 12 23.68%
src/cs-utils/Property.hpp 15 0%
src/cs-utils/TestImageCompare.cpp 31 0%
<!-- Total: 125 -->
Totals Coverage Status
Change from base Build 4366064776: -2.0%
Covered Lines: 193
Relevant Lines: 16915

💛 - Coveralls
JonasGilg commented 1 year ago

When the sun is over the horizon, but behind some terrain these artifacts come up.

image

This also happens in non HDR mode, although less intense:

image

JonasGilg commented 1 year ago

On Mars there seems to be a very hard cutoff with HDR enabled:

image

Schneegans commented 1 year ago

On Mars there seems to be a very hard cutoff with HDR enabled:

This is due to the lack of multi-scattering in the Cosmoscout model. This should be the same as in the main branch.

Schneegans commented 1 year ago

When the sun is over the horizon, but behind some terrain these artifacts come up.

This is a limitation of the Bruneton model. It is the result of floating point precision issues. Maybe we can improve this in a custom model in the future!