MoonRTX is ray-traced, ultra-realistic Moon observatory developed in Python with the help of Claude Code. It uses PlotOptiX package and is based on PlotOptiX use example making_the_moon__displacement.
- Python
- pip (Python package manager)
- NVIDIA RTX graphics card with installed latest NVIDIA drivers (R590 or newer)
- As of now application was tested only on Windows. I have no possibility to test it under Linux. Nevertheless, it should run on Linux when PlotOptiX prerequisites for this OS are met. More details here
git clone https://github.com/albireo77/moonrtx.git # or download and unpack source code zip file
cd moonrtx
pip install -r requirements.txtMoonRTX can be run in 2 ways:
- Command line (examples):
python -m moonrtx.main --help
python -m moonrtx.main --time "2023-05-28T19:39:00" --lat 50.1 --lon 20.0
python -m moonrtx.main --time "2023-05-28T19:39:00" --timezone "America/New_York" --lat 40.7 --lon -74.0
where --time is a local wall clock and --timezone names the IANA zone it is read in, defaulting to your computer's own. The zone carries the daylight saving and historical rules, so every date gets the offset that really applied on it - including dates in another country, whose changeover days differ from yours.
python -m moonrtx.main --lat -35.1 --lon -20.4 --downscale 4 --brightness 100
python -m moonrtx.main --lat 50.1 --lon 20.0 --color-file lroc_color_poles.tif --color-downscale 2
where --color-downscale (1, 2, 4 or 8) decodes the color map at that fraction of its size. Memory needed to load it falls with the square of the factor, so raise it if a large map fails to load.
python -m moonrtx.main --init-view "2025-03-07T19.53.00+01.00_lat+50.000000_lon+20.000000_viewSNEW_par1_camAAAAAAAAyMIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA_F6dJQA"
where --init-view parameter value is taken from the screenshot default filename
- GUI launcher:
python -m moonrtx.main_gui_launcher
- On first run, around 9GB of data (most of all Lunar Orbiter Laser Altimeter elevation map) is to be downloaded so internet connection and sufficient disk space is required.
- On first Moon ephemeris calculation, MoonRTX may download a small Skyfield data set into
moonrtx/data/skyfield: the JPLde421.bspephemeris (about 16 MB) plus three small Moon orientation kernels used for the direct lunar body-frame rotation. - The bundled Skyfield Moon orientation kernels support dates from
1900-01-01T00:00:00+00:00through2051-01-01T00:00:00+00:00. - Local times are handled through IANA timezones (the
tzdatapackage), so daylight saving is followed on every date the kernels cover - including the years before it existed and the local mean time in use before standard time. - Current MoonRTX will work only with PlotOptiX 0.19.2+
- Downscaling of elevation map can take even around 1 minute depending on
--downscaleparameter value (lower value = more time). Once downscaled for the first time, file is cached as .npy file indatadirectory for future use. - Color maps beyond a few hundred megapixels can need more RAM than the machine has.
--color-downscaleavoids that: the map is decoded straight at a fraction of its size, so nothing full-size is ever held. As with the elevation map, the result is cached beside the source as an .npy file, and once it is there the source can be deleted to reclaim its space. - If you don't like default Moon colors in MoonRTX, you can download color map file (e.g. lroc_color_poles.tif from NASA SVS CGI Moon Kit with more realistic, though bland, colors) and load it with
--color-fileparameter on program start.
F1 - Help
F2 - Toggle Moon ephemeris panel
F3 - Toggle status panel (useful in full screen)
F4 - Toggle parallactic mode (maintains Moon aligned to celestial north)
F5-F8 - Change view orientation (NSWE, NSEW, SNEW, SNWE)
F9 - Set time to now (in the session timezone)
F10 - Set time to now + start auto-advance
F11 - Toggle full screen
F12 - Save image
1-9 - Create/Remove pin (when pins are ON)
0 - Toggle pins ON/OFF
X - Toggle toolbar
T - Toggle time toolbar
P - Toggle labels for all Moon features
L - Toggle standard labels
S - Toggle spot labels
G - Toggle selenographic grid
Y - Toggle markers for sub-solar and sub-Earth points, and the edge of the visible part
B - Toggle the field of view frame (set it up with Shift + B)
C - Toggle compass showing how far the view is turned (rotated) from default
R - Toggle locator showing where on the Moon the view is
D - Toggle scale bar (kilometres, at the centre of the view)
F - Search for Moon features (craters, mounts etc.) or go to lat lon
A - Find clair-obscur events (Lunar X, Lunar V, Jewelled Handle, Eyes of Clavius, Rupes Recta)
E - Find lunar eclipses
U - Chart when the Moon is up over the coming month
K - Open observation planner (terminator / libration) for Moon feature in status bar
I - Open USGS web page for Moon feature in status bar
O - Open user defined web page (Wikipedia by default) for Moon feature in status bar
Z - Tap to keep the picture; hold to see it again over the live one (blink comparator)
V - Export time-lapse video (MP4)
-/+ - Decrease/Increase brightness
[/] - Decrease/Increase gamma correction
H/J - Roll view around current view direction
Q/W - Step back/forward in time by the current time step (hold the key to animate)
N/M - Decrease/Increase the time step by 1 minute (maximum 1440 = 1 day)
Shift + N/M - Decrease/Increase the time step by 60 minutes (maximum 1440 = 1 day)
Shift + B - Set up the eyepiece / camera field of view frame
Shift + D - Toggle angular scale bar (angle as seen from Earth, at the centre of the view)
Arrows - Move view
Space - Center and fix view on point under cursor
Escape - Leave full screen; close a window (dialog)
Home - Reset camera position and time to their initial values
End - Reset camera to default position (useful after starting with --init-view parameter)
Delete - Remove labels left by Find, Observation Planner and clicks
Backspace - Remove measurement lines and the topography area
Ctrl + Z/Y - Undo/Redo a jump in time (up to 10 time positions stored)
Ctrl + Left/Right - Rotate view around Moon's polar axis
Ctrl + Up/Down - Rotate view around Moon's equatorial axis
Click left mouse button - Label Moon feature under cursor; click again to remove
Hold and drag left mouse button - Rotate the eye around Moon
Hold and drag right mouse button - Rotate Moon around the eye (move view)
Hold left Ctrl + drag left mouse button - Measure distance and elevation difference on Moon surface
Hold right Ctrl + drag left mouse button - Show Elevation and Illumination profile along the line
Hold Ctrl + drag right mouse button - Show the rectangle's topography in 3-D
Hold left Shift + left mouse button and drag up/down - Zoom out/in (more reliable)
Mouse wheel up/down - Zoom in/out (less reliable)
Sunrise over Montes Apenninus (using time stepping i.e. holding down W key)
and sunset, exported to MP4 file using V key
This export uses PlotOptiX's hardware-accelerated NVENC encoder producing high quality (noise-free, no stuttering) video. As it is not captured but generated by renderer, exporting takes considerably longer than real time.
Partial lunar eclipse on 2026-08-28
Selenographic grid and labels
Timocharis
Rima Hesiodus and the distant Rupes Recta
Maria with Blue Steel color map
Mare Smythii in 2 projections (standard and Blue Steel)
Measuring the depth Δh of Theophilus
Aristillus Elevation and Illumination profile
Alphonsus topography
Rise and set window
Observation Planner Graph window (blue line is near side boundary enabled by Y key)
Field of view frame




