Skip to content

JustinMeans/scenekit-volumetric-weather

 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 51.0%
  • Metal 49.0%