Gaia Sky

Crash course

Toni Sagristà Sellés

tsagrista@ari.uni-heidelberg.de

DPAC Consortium Meeting, Nice (France)
March 2024

Find this presentation at:

tiny.cc/gaiasky-crashcourse

gaia.ari.uni-heidelberg.de/gaiasky/presentation/gaiasky-crash-course/

Written notes (Gaia Sky quick start guide):

gaia.ari.uni-heidelberg.de/gaiasky/docs/master/Quick-start-guide.html

Introduction

What is Gaia Sky?

Gaia Sky

  • 3D Universe software platform similar to Celestia or OpenSpace
  • Multiplatform Linux, Windows, macOS
  • Open source and libre
  • Focus on Gaia and its data
  • Outreach material production

Gaia Sky Features


  • 4 camera modes
  • Seamless navigation
  • 6D exploration $x$ + $\mu$
  • Full VR support OpenXR API
  • Interactivity with Gaia data LOD
  • Panorama, planetarium, orthosphere
  • Stereoscopic mode (3D)
  • Sparse virtual textures
  • Elevation representation
  • Ray-marched objects
  • External datasets VOTable, FITS, csv
  • Filtering and color mapping
  • SAMP integration
  • Camera paths and keyframing
  • Scripting API
  • Many more...

Operation

Basic Controls and Modes

Welcome Screen

  • Access to dataset manager
    • Download datasets
    • Enable/disable datasets
    • Update datasets
    • Delete datasets
  • Preferences, help, etc.

Basic Movement

Drag mouse to rotate, scroll to move, hold to roll

Also, use the cursors to move:

Object Selection

Select objects by:

  • Double-clicking on them
  • Search by name (press )

User Interface

Control and Information Panes

UI Overview

Control Panes

  • Time   
  • Camera   
  • Visibility   
  • Visual Settings   
  • Datasets   
  • Location Log
  • Bookmarks   

Time Pane

  • Start/pause time   
  • Change time warp    and
  • Set and reset time   +

Camera Pane

Camera modes:

  • Free   
  • Focus   
  • Game   
  • Spacecraft   

Visibility Pane

  • Turn on/off object types
  • Control individual object visibility

Datasets Pane

Datasets Pane

  • Show/hide datasets
  • Highlight datasets
  • Delete datasets
  • Per-dataset point size (when applicable)
  • Dataset preferences

External Information

External Information

  • Wikipedia
  • Gaia Archive
  • Hipparcos Catalog
  • Simbad (opens in browser)

Videos

Video Creation Tools

Frame Output System

  • Export every frame to an image file +ffmpeg
  • start/stop recording frames
  • Optional: arbitrary resolution export
  • Warning SLOW

Camera Paths

Record and play back camera paths

Camera Paths

  • Record camera paths to .gsc files
  • Play back camera path files

Keyframes System

  • Define camera paths visually
  • Smoothing, time normalization, etc.
  • Save keyframes file to .gkf file
  • Export to .gsc file

Keyframes System

Scripting

  • Gaia Sky API Python via Py4j
  • Modify settings
  • Manipulate camera
  • Control time
  • Add, remove, modify objects and datasets
  • Run code snippets after every frame
  • Much more: later in session

Modes

of Operation in Gaia Sky

Operation Modes

  • Desktop, single-view mode
  • Virtual Reality
  • Panorama ($360^\circ$)
  • Planetarium
  • Orhtosphere
  • Stereoscopic (3D)
  • Multiple projectors with MPCDI

Gaia Sky VR

  • VR mode using the OpenXR API directly
  • Full feature set of base desktop app
  • Minimalist approach:
    • As similar as possible to base Gaia Sky
    • Free navigation using VR controllers
    • Point&shoot for object selection
    • In-scene control panel

Gaia Sky VR

Session with Valve Index

Panorama Mode

  • Render 6 scenes with $fov=90^\circ$
    • +X, -X, +Y, -Y, +Z, -Z
  • Use those to create a cubemap
  • Project to screen:
    • Equirectangular (spherical)
    • Cylindrical
    • Hammer

Panorama Mode

Equirectangular projection

Planetarium Mode

  • Single projector setup
    • Uses cubemap from panorama mode
    • Azimuthal equidistant projection (Domemaster)
    • Configurable FOV Can be greater than $180^\circ$
  • Multi-projector setup
    • MPCDI (Multiple Projection Common Data Interchange)
    • Defines warp, frustum, etc. for each projector

Planetarium Mode

Single projection

Orthosphere Mode

  • Also use cubemap
  • Render two halves of sphere
      Use azimuthal equidistant
  • Blend them together
  • Wrap scene around in a sphere

Orthosphere

Wrap the scene around in a sphere

Stereoscopic Mode

  • 7 profiles:
    • 3DTV horizontal
    • 3DTV vertical
    • Anaglyph red/cyan and red/blue
    • Cross-eye, parallel view
    • VR simulation

Datasets

Types of datasets and catalogs in Gaia Sky

Dataset Types

  • Stars positions + other star attributes
  • Variable stars same as stars + light curves
  • Particles positions only
  • Other catalogs clusters, nebuale, iso-surfaces, etc.
  • Custom objects models, billboards, ray-marched, etc.
  • SVTs Sparse Vritual Textures

Star Datasets

$\alpha$, $\delta$, $\varpi$, $\mu_{\alpha}$, $\mu_{\delta}$, $\rho$, magnitudes, colors, names, constellations, etc.

  • Regular datasets thousands to a few million objects
  • LOD (level-of-detail) billions of objects
Gaia DR3 cut, 50M stars
Hipparcos, 120K stars

Regular Star Datasets

  • Gaia-based:
    • DR3 tiny 2.5M stars, 1%/0.01% bright/faint pllx. rel. err.
    • DR3 weeny 1.9M stars, 0.8%/0.01% bright/faint pllx. rel. err.
    • DR3 variables 186K Cepheid and RR Lyrae
    • eDR3 white dwarfs 359K WDs
    • eDR3 GCNS 300K stars within 100 pc
  • Other sources:
    • Hipparcos (new reduction) 120K stars
    • CNS5 5931 nearby stars, eDR3 + Hipparcos
    • SAMP, VOTable, CSV, etc. Load your own datasets

LOD Datasets (DR3)

Name Criteria Count Size
Default 20% / 01.5% 15 M 1.13 GB
Small 10% / 00.5% 8.2 M 0.61 GB
Medium 30% / 05.0% 49.9 M 3.72 GB
Large 50% / 12.5% 122.1 M 9.11 GB
Very large 50% / 50.0% 466.1 M 34.79 GB
Extra large 95% / 95.0% 707.1 M 52.78 GB
Bright 90% / 01.0% 11.2 M 0.84 GB
RUWE ruwe <= 1.4 111.8 M 7.1 GB
Fidelity fidelity > 0.5 393.6 M 29.35 GB
Phot. dist GSP-Phot distances 470.8 M 35.15 GB
Full (geodist) N/A 1.5 B 109.32 GB

Table: DR3 Gaia Sky datasets (compressed sizes)

More info

Exoplanets and Systems

  • Gaia BH2, GI876, HD114762, HD40503, J0805+4812, etc.
  • NASA Exoplanet Archive (3.6.0+)
Gaia BH2 system
NASA Exoplanet Archive

Galaxies

  • NEARGALCAT 875 close-by galaxies
  • SDSS high-redshift galaxies and objects
    • DR12 327K
    • DR14 3M
    • DR17 2.8M
    • DR18 3.6M

Star Clusters

MWSC (~3K), OCDR2 (~2K), Hunt-Reffert (~7K)

Asteroids

From orbital elements 150K DR3 asteroids

Maps

Iso-density surfaces for hot stars, HII regions, dust clouds

Maps

Inner view of dust (black), hot-stars (blue) and HII (red)

Sparse Virtual Textures (SVT)

  • Earth
    • Surface (NASA VE) 128K
    • Topography (USGS) 128K
    • Clouds (Van Vliet) 32K
  • Moon
    • Surface (Van Vliet) 64K
    • Topography (LRO WAC DTM) 8K
  • Mars
    • Surface (Van Vliet) 64K
    • Topography (MOLA/USGS) 64K

SVT in Gaia Sky

Earth topography and surface SVTs

SAMP Integration

  • Gaia Sky is a SAMP client
  • Send datasets from Topcat, Aladin, etc.
  • Tables mapped to 3D cart. or sph. coords + mags + colors
  • Selection works both ways

Wrapping up

Documentation, Repository, etc.

Interested in Gaia Sky?

Workshop scripts
Video tutorials
Mastodon
Bluesky
Twitter

Home Page

zah.uni-heidelberg.de/gaia/outreach/gaiasky

Documentation

gaia.ari.uni-heidelberg.de/gaiasky/docs

Source Repository

codeberg.org/gaiasky/gaiasky

Thank You

System

and Tech

System Overview

  • User interface
  • Event manager
  • Object model
  • Rendering system
  • Scripting engine

Language Breakdown

As of November 2023

              --------------------------------------------------------------------------------------
              Language                      files          blank           comment              code
              --------------------------------------------------------------------------------------
              Java                           1174          27765             40274            172917
              GLSL                            150           2546              2175             10026
              Properties                       18           1130              8537              8618
              JSON                             11              6                 0              7124
              XML                               4              2                 4              6277
              Python                           87           1744              1037              4779
              Markdown                         12            765                 0              3065
              YAML                              4             46               744               640
              Gradle                            3            113                76               621
              Bourne Again Shell                9            102               137               286
              Bourne Shell                      6             45               134               171
              HTML                              2              7                 0                91
              --------------------------------------------------------------------------------------
              SUM:                           1493          34350             53164            217137
              --------------------------------------------------------------------------------------
            

LOD Datasets

Problem: billions of stars in real time!

Our approach: MS-LOD (Magnitude-Space LOD)

  • Star flux decreases with $r^2$
  • Organize stars in an (oc)tree
    • Sorted by magnitude, descending
    • Brighter stars at top levels
    • Fainter stars deep down

Physical node size proprotional to magnitude

Use solid angle from camera $\phi$ to determine visibility

Octree Traversal

  • Visibility condition: $\theta_i \leq \Theta$
    • $\theta_i$ — solid angle of octant $i$
    • $\Theta$ — user-defined draw distance setting
  • Octant size proportional to brightness of contained stars
  • Pop-ins avoided via magnitude-based star shading and small $\Theta$ setting
  • Otherwise, avoided by $\theta$-based linearly interpolated blending

Octree Traversal

  • Different distance to camera
  • Same octant size
  • Same distance to camera
  • Different octant size

MS-LOD Octree

DR3 default dataset (15M stars)

Camera – Challenges

  • Seamless navigation over vast range of distances
    • From spacecraft to high-$z$ galaxies

Camera – Challenges

  • Limited floating-point precision
    • Subtraction of similar large values catastrophic cancellation
  • Gaia at only 1200 km from the origin
  • Jittering due to catastrophic cancellation

Camera – Our Approach

  • Floating camera
  • Maintain camera at origin $\vec{0}$
  • Move rest of scene in reverse
  • Typical approach: transform camera
  • Our approach: transform scene

Camera – Our Approach

  • Compute $\mathbf{M}_{mv}$ on CPU with arbitrary precision
  • Instead of $\mathbf{M}_{model}$ and $\mathbf{M}_{view}$, send $\mathbf{M}_{mv}$ to GPU
$\mathbf{p}_{clip} = \mathbf{M}_{proj} \cdot \mathbf{M}_{view} \cdot \mathbf{M}_{model} \cdot p_{obj} = \mathbf{M}_{proj} \cdot \mathbf{M}_{mv} \cdot p_{obj} $

Camera – Our Approach

add node at the top of the scene graph with camera $\vec{pos}^{-1}$

Camera – Caveats

  • $\mathbf{M}_{mv}$ computed on CPU with arbitrary precision
    • Computationally more expensive than using floating point
  • Only for needed objects (panets, asteroids, etc.)
  • Most stars are very far from the camera
    • CPU-based approach for close-by stars
    • Standard approach for remaining stars