-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Proposal: Consolidate SkyAtmosphere and Globe atmosphere settings? #11681
Comments
I think the atmosphere options should be in its own object under |
@lilleyse That's a good point, I like that for 2 more reasons:
|
I made a forum post to see if the community has any further thoughts on this. |
After thinking about the above parameters, here's a proposal for how this might be structured to make the UX for adjusting lighting better, and make it easier for atmosphere and fog settings to be applied to 3D Tiles (and any future system that needs them) The tricky thing is this does involve quite a few breaking changes to the API, and deprecating things would be a bit tricky. Though at least for some of the settings, #11655 might be a good reference for determining how to deprecate settings. scene.atmosphere: Atmosphere (new)Purpose: Store common settings that affect all atmosphere rendering affects. This object does not do any rendering, but updates the Parameters:
scene.groundAtmosphere: GroundAtmosphere (new)Purpose: Store common settings that affect ground atmosphere (impacts the globe and 3D Tiles) This will update the Parameters:
scene.skyAtmosphere: SkyAtmosphere (modified)Purpose: Renderable sky atmosphere. It manages any settings specific to the sky rendering Parameters: Other details:
scene.globe: Globe (modified)Purpose: Renderable globe that handles terrain, imagery and other rendering details. It also renders the ground atmosphere and fog for terrain. The main change is to unload some of the rendering settings to Parameters: scene.fog: Fog (unchanged)I think the settings for Fog are sufficient for now. The main change is that this will now impact 3D Tiles as well. The fog color is still dependent on the ground atmosphere, but now the dedicated |
After talking with @ggetz the other day, we think that the above is a bit of overkill. A couple changes to streamline the above:
So to summarize the overall architecture
|
Some implementation details from #11744 that will need changes after we change the API: (I'll update this as I find more)
|
Some thoughts about how to make the
|
As I'm looking into #4196, one thing I notice is that the following settings exist on both
viewer.scene.skyAtmosphere
(for the sky) andviewer.scene.globe
(for ground and fog for terrain):atmosphereBrightnessShift
/brightnessShift
atmosphereHueShift
/hueShift
atmosphereLightIntensity
atmosphereMieAnisotropy
atmosphereMieCoefficient
atmosphereMieScaleHeight
atmosphereRayleighCoefficient
atmosphereRayleighScaleHeight
atmosphereSaturationShift
/saturationShift
Ultimately these impact the shader uniforms in
AtmosphereCommon.glsl
:Since the ground and sky atmosphere both represent the Earth's atmosphere, conceptually they should always use the same settings.
There's also two other benefits of combining them:
Globe
, but open to suggestions).AutomaticUniforms
, this way it's easier to implement fog for 3D Tiles.I'm curious if the community would find this to be a reasonable breaking change, or if there are use cases where configuring
SkyAtmosphere
andGroundAtmosphere
differently is helpful. I'll ask about this on the forum as well.The text was updated successfully, but these errors were encountered: