Skybolt is a real-time planetary environment rendering engine, designed for flight simulators, aerospace R&D, and geospatial applications. Skybolt is written in C++, based on OpenSceneGraph, and supports CIGI for communicating with host applications. Skybolt also features a Python API for easy integration with science and engineering research tools.
The Skybolt repository includes Sprocket, a GUI application providing a sandbox for interactive scenario execution and testing.
- Realistic environment rendering at a range of levels of detail, from ground level through to outer space
- Tile streaming from geospatial data sources
- Atmospheric scattering
- Volumetric clouds
- 3D Vegetation based on tree coverage data
- FFT-based ocean wave simulation and rendering
- Extensible entity component framework
- CIGI support
- JSBSim flight dynamics model integration
- Bullet physics integration
- Python API
- Sprocket GUI application, a sandbox for interactive scenario execution and testing
Skybolt created and maintained by Matthew Reid. To submit a bug report, please raise an issue on the GitHub repository. For other queries, please use the contact form on the Piraxus website.
This project is licensed under the Mozilla Public License Version 2.0 - see the License.txt file for details.
// Create engine
auto params = EngineCommandLineParser::parse(argc, argv);
std::unique_ptr<EngineRoot> root = EngineRootFactory::create(params);
// Create camera
EntityFactory& entityFactory = *root->entityFactory;
World& world = *root->simWorld;
EntityPtr simCamera = entityFactory.createEntity("Camera");
world.addEntity(simCamera);
// Attach camera to window
auto window = std::make_unique<StandaloneWindow>(RectI(0, 0, 1080, 720));
osg::ref_ptr<vis::RenderTarget> viewport = createAndAddViewportToWindowWithEngine(*window, *root);
viewport->setCamera(getVisCamera(*simCamera));
// Create input
auto inputPlatform = std::make_shared<InputPlatformOsg>(window->getViewerPtr());
std::vector<LogicalAxisPtr> axes = CameraInputSystem::createDefaultAxes(*inputPlatform);
root->systemRegistry->push_back(std::make_shared<InputSystem>(inputPlatform, window.get(), axes));
root->systemRegistry->push_back(std::make_shared<CameraInputSystem>(window.get(), simCamera, inputPlatform, axes));
// Create entities
world.addEntity(entityFactory.createEntity("SunBillboard"));
world.addEntity(entityFactory.createEntity("MoonBillboard"));
world.addEntity(entityFactory.createEntity("Stars"));
EntityPtr planet = entityFactory.createEntity("PlanetEarth");
world.addEntity(planet);
// Point camera at planet
auto cameraController = simCamera->getFirstComponentRequired<CameraControllerComponent>()->cameraController;
cameraController->setTarget(planet.get());
// Run loop
runMainLoop(*window, *root, UpdateLoop::neverExit);
import skybolt as sb
window = sb.StandaloneWindow(sb.RectI(0,0,800,600))
engine = sb.createEngineRootWithDefaults()
camera = engine.entityFactory.createEntity("Camera")
engine.world.addEntity(camera);
sb.attachCameraToWindowWithEngine(camera, window, engine)
engine.world.addEntity(engine.entityFactory.createEntity("SunBillboard"))
engine.world.addEntity(engine.entityFactory.createEntity("MoonBillboard"))
engine.world.addEntity(engine.entityFactory.createEntity("Stars"))
earth = engine.entityFactory.createEntity("PlanetEarth")
engine.world.addEntity(earth);
controller = camera.getFirstComponentOfType("CameraControllerComponent").cameraController
controller.setTarget(earth)
controller.selectController("Globe")
sb.render(engine, window)
This repository contains multiple projects, described below, which can be enabled/disabled in CMake. Each project has a different set of dependencies. You only need to obtain dependencies for projects you wish to build. Header-only dependencies can be obtained from the SkyboltDependenciesHeaderOnly repository for convenience.
The core engine libraries. Requires:
Python bindings for Skybolt. Requires:
Skybolt plugin providing a rigid body dynamics component for entities by integrating the Bullet physics engine. Requires:
Skybolt plugin providing a means for host applications to drive the simulation via the Common Image Generator Interface (CIGI). Requires:
Skybolt plugin simulating ocean waves with FFT. Requires:
Skybolt plugin providing an aircraft dynamics component for entities by integrating the JSBSim dynamics engine. Requires:
GUI application for creating, editing and running simulation scenarios, and performing analysis. Requires:
Experimental plugin providing a GUI for editing animated sequences. Requires:
Application for converting Open Street Map data to Skybolt feature tile format.
Use CMake to configure and generate a build. Optional projects within the repository can be enabled/disabled with CMake BUILD_xxx properties as desired.
At runtime, Skybolt uses assets such as meshes, textures, and shaders. These assets are organized into packages. Each package is a folder containing a hierarchy of asset files on disk.
Skybolt searches for asset packages in these locations:
- /Assets
- Paths in the SKYBOLT_ASSETS_PATH environment variable
To run Skybolt, you must ensure the required packages are avilable to Skybolt using either of the above mechanisms.
Skybolt cannot run without the Core package. It is located under /Assets in this repository.
Additional packages for running the example applications are located in the SkyboltAssets repository. SkyboltAssets uses DVC for remote storage and retrieval of large files which are not stored in the git repository itself.
To checkout the SktboltAssets repository:
- If you do not already have DVC installed, run
pip install dvc[s3]
to install with pip - Clone SkyboltAssets and checkout desired git branch/tag
- Run
dvc pull
command in the SkyboltAssets root directory to fetch the remote files
Land cover tiles for USA. Used by Skybolt to place trees on terrain in forest areas. This package can be downloaded here.
Map features (buildings, roads, lakes etc) for the city of Seattle. These features were generated from OpenStreetMap data using the MapFeaturesConverter tool. This package can be downloaded here.
Engine settings are stored in a json file, which may be manually edited with a text editor, or edited in Sprocket with the Tools->Settings dialog. An example settings file template is available in this repository under src/SkyboltExamples/ExamplesCommon/ExampleSettings.json.
The settings file can be loaded by example applications with the --settingsFile commandline option. If the option is not specified, a default Settings.json in the Operating System user's home directory will be used. On windows, this is located at C:/Users//AppData/Local/Skybolt/Settings.json.
By default, the PlanetEarth entity uses mapbox for albedo and elevation data. To use mapbox, you must acquire an API key from https://mapbox.com Without an API key, the tiles will not download, the the planet will not render correctly. If desired, PlanetEarth can be edited to use Bing maps for albedo instead. A bing key can be obtained from https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-maps-key Keys are stored in the engine json settings file (see above).