Skip to main content

Generate synthetic lunar images using Blender

Project description

LuNaSynth logo

Synthetic Generation of Lunar Terrain (LuNaSynth)

This project has tools to generate images of lunar terrain for navegation testing.

Quick Start

  • If you are using a dataset generated with Lunasynth, go to dataset generation tutorial "Using the dataset". You can take a look at the dataset analysis for examples of how to use the data.
  • If you want to create renders, install the tools by following the instructions in Install section, and run the dataset generation tutorial
  • If you want to contribute to Lunasynth development, read the Development section

Overview

Lunasynth gets a base Digital Elevation Map (DEM) from the Moon, adds rocks and craters, and renders the terrain from different perspectives.

The objective of Lunasynth is to generate the detail from the maximum resolution of the input DEM (5mpix for the polar regions) up to the desired pixel size, which ranges from 1m to 1cm, depending on the application.

Overview of lunar terrain image generation

  • Base Meshes: The base meshes are the starting point for the terrain generation. They are used to create the terrain geometry.
  • Rock Field Distribution: The rock field distribution is used to place rocks on the terrain. The rocks are placed on the terrain based on the CFA distribution
  • Crater Field Distribution: Similar to rock field. For each crater, the mesh is modified based on the crater parametrization
  • Render Case: the configuration of the camera and sun position for each render

Install Lunasynth Package

Current system dependencies are:

  • to use provided assets you need git-lfs (make sure to pull lfs objects with git lfs pull after cloning)
  • to execute gdal_create.sh you need gdal and imagemagick

Execute install_dependencies.sh to install all system-wide dependencies. Currently only macos and debian-based distributions are supported.

Python dependencies are declared in pyproject.toml. Install them using

[lunasynth]$ python3 -m pip install -e .

If you use poetry (reconmmended for development), install all dependencies on its own virtual environment

[lunasynth]$ poetry install

Once you install the dependencies, append poetry run to any command to use the dependencies installed in the virtual environment. Alternatively, you can activate the virtual environment with

[lunasynth]$ poetry shell

Check that the installation was successful by running the tests

(lunasynth) [lunasynth]$ pytest

It should report that all tests passed.

Usage

To generate a dataset of lunar terrain renderings, use generate_enhanced_moon_terrain_dataset.py with a configuration file. For example, to generate the nominal orthographic dataset, run

(lunasynth) [lunasynth]$ python3 src/lunasynth/cli/generate_enhanced_moon_terrain_dataset.py --dataset-config config/datasets/ortho_nominal.yaml 

Follow the instructions in the dataset generation tutorial for more details on how to define the configuration file and use the dataset.

Some steps are exposed as command line tools (CLI) scripts, see files in src/lunasynth/cli/ for more details, and run them with --help to see the available options. Check tutorials in src/tutorials/ for examples of how to use the tools.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lunasynth-0.8.0.tar.gz (62.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lunasynth-0.8.0-py3-none-any.whl (79.2 kB view details)

Uploaded Python 3

File details

Details for the file lunasynth-0.8.0.tar.gz.

File metadata

  • Download URL: lunasynth-0.8.0.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic

File hashes

Hashes for lunasynth-0.8.0.tar.gz
Algorithm Hash digest
SHA256 0ad97d92a706c23db487b791f1e34466e0298a553f2c8c6aa2a7546698d03b91
MD5 a34bbd233681cb557350b2f819c2dc95
BLAKE2b-256 5814f7cb3faf5095c3d6cf506288783888de541b1af5da155c7add66b4fea57c

See more details on using hashes here.

File details

Details for the file lunasynth-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: lunasynth-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 79.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic

File hashes

Hashes for lunasynth-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3b0c1958c3363ca810e52dd7e1492f0b6ebdb1df37a44ecf789e936ba5f3b25
MD5 a01375cfbded2f46ac46a9a2bf239a7c
BLAKE2b-256 6f0b43e1574c210c2986314976c73858a6892346e6c039bb1e5c7e92c35b6a1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page