Skip to content

Latest commit

 

History

History
34 lines (18 loc) · 1.83 KB

README.md

File metadata and controls

34 lines (18 loc) · 1.83 KB

SceneKit Volumetric Weather

Overview

This project demonstrates how to create volumetric effects from map data using a Metal shader with SCNProgram. It's a companion to this post about volumetric weather.

The example uses the most recent data from Real Earth to render volumetric clouds over San Francisco.

Example of app running on iPhone

Installation

Install the Mapbox SceneKit using Carthage:

  1. Clone this repo.

  2. Run carthage update --platform iOS to build the iOS dependencies.

  3. Follow instructions 3-5 of Carthage’s iOS integration instructions. Your application target’s Embedded Frameworks should include MapboxSceneKit.framework and MapboxMobileEvents.framework.

  4. Add your access token to the MGLMapboxAccessToken field in info.plist.

Troubleshooting

  1. Because the sample uses up-to-date satellite imagery, clouds won't appear on clear days or after dark. To view a specific time of day, you can modify the tile request using RealEarth's documentation.

  2. The volumetric rendering is done using a Metal shader, and isn't compatible with the iOS simulator. Build to a physical device for the best results.

License

scenekit-volumetric-weather is licensed under BSD2. If you build something with this code, please mention it in your readme so that others can learn about the resource.