Show realistic lighting and shadows for a given time of day.

Use case
You can use realistic lighting to evaluate the shadow impact of buildings and utility infrastructure on the surrounding community. This could be useful for civil engineers and urban planners, or for events management assessing the impact of building shadows during an outdoor event.
How to use the sample
Select one of the three lighting options to show that lighting effect on the SceneView. Select a time of day from the slider (based on a 24hr clock) to show the lighting for that time of day in the SceneView.
How it works
- Create a
Sceneand display it in aSceneView. - Create a
Calendarto define the time of day. - Set the sun time to the scene view using the
sunDate(_:)modifier. - Set the sun lighting of the scene view to
off,light, orlightAndShadowsusing thesunLighting(_:)modifier.
Relevant API
- Scene
- SceneView
- SceneView.SunLighting
Tags
3D, lighting, realism, realistic, rendering, shadows, sun, time