View on GitHub Sample viewer app

Changes the appearance of the atmosphere in a scene.

Image of change atmosphere effect

Use case

Atmospheric effects can be used to make the scene view look more realistic.

How to use the sample

Select one of the three available atmosphere effects. The sky will change to display the selected atmosphere effect.

How it works

  1. Create an ArcGISScene and display it in a SceneView.
  2. Change the atmosphere effect with sceneView.setAtmosphereEffect(atmosphereEffect).

Relevant API

  • ArcGISScene
  • AtmosphereEffect
  • SceneView

Additional information

There are three atmosphere effect options:

  • Realistic - A realistic atmosphere effect is applied over the entire surface.
  • Horizon only - The atmosphere effect is applied to the sky (horizon) only.
  • None - No atmosphere effect. The sky is rendered black with a starfield consisting of randomly placed white dots.

Tags

atmosphere, horizon, sky

Sample Code

module-info.java module-info.java ChangeAtmosphereEffectSample.java
/*
* Copyright 2022 Esri.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module com.esri.samples.change_atmosphere_effect {
// require ArcGIS Maps SDK for Java module
requires com.esri.arcgisruntime;
// handle SLF4J http://www.slf4j.org/codes.html#StaticLoggerBinder
requires org.slf4j.nop;
// require JavaFX modules that the application uses
requires javafx.graphics;
exports com.esri.samples.change_atmosphere_effect;
}