Skip to content

bpodgursky/uncharted

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project is an attempt at a 3D visualization of Earth’s solar neighborhood out to 75 light years, rendered in the browser using WebGL (via the three.js library). This includes all known stars and known exoplanets.

All star and exoplanet scale and positions are accurate to the extent possible. Color, orbits, and rendering are accurate where data exists (where missing, it is replaced by creative guesswork).

I am not an astronomer, so I can’t make any promises that anything I say or do here is accurate or reasonable. I’d like it to be, so all feedback and corrections are welcome.

The site is hosted here:

http://uncharted.bpodgursky.com/

screenshot

Data sources

  • All star data comes from the HYG database hosted here. The only stars not displayed are those with unknown coordinate or parallax data. All other missing data is replaced via scientifically dubious estimates.

  • All exoplanet data comes from the NASA Exoplanet catalog. Exoplanet radii, orbit distance, inclination and eccentricity are used if available, and use arbitrary defaults if not.

  • Data about our own solar system and its planets are from Wikipedia.

Rendering

Star rendering borrows heavily from the Seed of Andromeda procedural star rendering guide, trimmed down substantially so it can (attempt) to render in real-time. The glsl shader is found here. There are some noise functions to try to make it look cool, but the important part is that temperature (estimated from BV index if present, and stellar class if not) is mapped to color.

The main thing I’ve added over the SoA guide is that instead of varying a fixed star color using a noise function, I vary the temperature and then map that to color. So the range of colors differs from our sun:

sun

from hotter stars:

sirius

Exoplanet rendering is extremely dumb: if the exoplanet is > 10% the mass of Jupiter, it uses a fake vaguely gassy shader. Otherwise it uses a fake vaguely rocky shader. I’d love for this to be more realistic based on distance from parent star (so it can include temperature, etc).

Rocky:

rocky

Gas:

gas

Scale / Visibility

Since stars are, in the grand scheme of things, very tiny, I needed additional rendering to make them visible at huge distances. So the actual visible stars are not the stars themselves, but large transparent meshes with a similar color to the parent star:

visible

This is a work in progress, since the visibility here only loosely correlates with the star’s real luminosity.

Planets are even smaller and harder to see, so they are marked by an a spoke from the sun to the planet’s location at perhelion:

uranus

Controls

Movement

Controls are hopefully intuitive, with two modes, “orbit“ and “free look” (controlled in the upper left)

controls

In both modes:

  • clicking on a star or planet changes the focus to that object (and zooms to it)
  • mousing over a star or planet brings up a tooltip
  • scrolling in / out zooms forward and back

Orbit mode always maintains a slow orbit around the object in focus, and clicking + dragging rotates the view around that object. In free look mode there is no fixed target.

Highlights

Only a fraction of stars have known exoplanets, so the “Exoplanets” highlight marker adds highlight markers on any stars with known exoplanets.

highlights

Render Radius

Show only stars within 10 / 25 / 50 / 75 light years of our own sun.

Project

The JavaScript code in his project is truly appalling. I’m not saying this in a humble-brag / fishing-for-compliments way -- it is truly a horror show. I’m not a JavaScript developer, this is a side project, please don’t judge me for it (but any suggestions or cleanup is super welcome).

The Java is also pretty gross, but I have no excuses for that.

I tried pretty hard to keep performance reasonable even on limited hardware, but it will still probably set your laptop on fire.

Suggestions / improvements / feedback / bug reports always are always welcome.

About

Visualization of our solar neighborhood using three.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published