Skip to content

Remote Map Services (WMS / WMTS)

OpenSpace's GlobeBrowsing engine streams multi-resolution planetary imagery and elevation tiles dynamically based on camera distance. Instead of downloading multi-terabyte global datasets upfront, you can connect RenderableGlobe nodes directly to remote WMS (Web Map Service), WMTS (Web Map Tile Service), or XYZ/TMS endpoints.


GlobeBrowsing Layer Groups

Inside any planet or moon node (Scene <Planet> Renderable Layers), datasets are organized into functional pipelines:

Layer Group Purpose Typical Data Type
ColorLayers Base planetary surface imagery, satellite mosaics, and thematic maps RGB / RGBA imagery (WMS, WMTS, GeoTIFF)
HeightLayers Elevation models that displace terrain geometry in 3D Single-channel 16-bit/32-bit float DEMs
NightLayers Textures blended onto the unlit hemisphere (e.g., Earth city lights) RGB imagery
WaterMasks Specular reflection masks separating oceans from matte land Grayscale mask (0.0–1.0)
Overlays Political borders, coordinate grids, or transparent map annotations RGBA PNG tiles

Adding a Remote Layer via .asset

Use openspace.globebrowsing.addLayer(...) inside asset.onInitialize to attach a remote map layer to an existing planet without modifying factory planet files:

local earthAsset = asset.require("scene/solarsystem/planets/earth/earth")   -- (1)!

local CustomWmsLayer = {
    Identifier = "USGS_Global_Imagery",
    Name = "USGS Global Imagery Mosaic",
    FilePath = "WMS:https://planetarymaps.usgs.gov/cgi-bin/mapserv?map=/maps/earth/earth_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=MODIS&SRS=EPSG:4326&BBOX=${west},${south},${east},${north}", -- (2)!
    Enabled = true,
    BlendMode = "Normal"
}

asset.onInitialize(function()
    openspace.globebrowsing.addLayer("Earth", "ColorLayers", CustomWmsLayer)-- (3)!
end)

asset.onDeinitialize(function()
    openspace.globebrowsing.deleteLayer("Earth", "ColorLayers", "USGS_Global_Imagery")
end)
  1. Require Target Globe: Ensures "Earth" (or "Mars", "Moon", etc.) is initialized before injecting the layer.
  2. Bounding Box Tokens: WMS URLs use ${west}, ${south}, ${east}, and ${north} placeholders; XYZ/TMS endpoints use ${z}, ${x}, and ${y} tile indices.
  3. Target Group: Specify the exact globe identifier ("Earth"), layer group ("ColorLayers"), and layer definition table.

Configuring globebrowsing.asset & Local Tile Caches

Global cache behavior and default map server definitions are controlled via globebrowsing.asset (or overridden in ${USER}/data/assets/):

  • Forward Slashes Only: Any FilePath pointing to a local XML GDAL WMS service description file (<GDAL_WMS>...</GDAL_WMS>) must use forward slashes (C:/OpenSpace_User/data/...).
  • Inspecting Active Tile Requests: Open Settings Property Visibility Developer, then expand Renderable.Layers.ColorLayers.<LayerName> to inspect tile cache hit rates, projection bounds, and HTTP error flags.

Screenshot Placeholder: globebrowsing-layers-panel.png

  • Crop: Capture the Scene panel expanded to Earth Renderable Layers ColorLayers, showing the layer stack order and opacity/blend controls.
  • Callouts: (1) Layer visibility toggle, (2) Stack order (bottom layers render on top of upper layers), (3) Opacity and BlendMode dropdown (Normal, Multiply, Color).

Layer Draw Order

In OpenSpace's GlobeBrowsing stack, layers are composited from top to bottom—meaning the lowest enabled layer in the UI list draws on top of earlier layers. Adjust Opacity or BlendMode (such as "Multiply" for hillshades) to composite multiple datasets cleanly.