Skip to main content

MoonTex is a noise-based texture generator that creates realistic grayscale moon phase images.

Project description

MoonTex v0.1.0

MoonTex Moon Phases

MoonTex is a noise-based texture generator that creates realistic grayscale moon phase images with customizable lighting, crater intensity, and export options for use in games, apps, and procedural art.

  • Powered by Python, Pillow, and Noise.
  • Creates 8 lunar phases from a single API.
  • No dependencies beyond core libs + 2 lightweight packages.

Dependency Installation

pip install -r requirements.txt

How to Generate a Single Moon Phase Texture

#Initialize Generator
generator = moontex.MoonTex()

#You can specify the output directory if you want. Specify a moon phase name.
generator.export_moon_phase_image(output_dir=".", phase="Full")

How to Generate All Moon Phase Textures

#Initialize Generator
generator = moontex.MoonTex()

#You can specify the output directory if you want. Specify a moon phase name.
generator.export_all_moon_phase_images(output=".")

Customization Options

MoonTex(
	image_size=300,          # int or (width, height)
	bg_color=(5, 5, 20),     # background RGB
	noise_scale=0.01,
	octaves=3,
	persistence=0.5,
	lacunarity=3,
	seed=0,
	intensity=0.4,           # crater contrast 0-1
	invert_crater_noise=True,
	brightness=(50, 230),    # grayscale min/max
)

Valid Phases

  • "New"
  • "Waxing Crescent"
  • "First Quarter"
  • "Waxing Gibbous"
  • "Full"
  • "Waning Gibbous"
  • "Last Quarter"
  • "Waning Crescent"

Related Libraries

  • CQCalendar: A lightweight, tick-based time and calendar system for Python games and simulations.
  • TerraForge: A versatile Python toolset for procedural map generation.

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

moontex-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

moontex-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file moontex-0.1.0.tar.gz.

File metadata

  • Download URL: moontex-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for moontex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f04d2816e9036a8bc3e33ac630effbb4751594e80b792912b62b5b9cfe24d8b6
MD5 679785d5c4a66387ab4c16f69124e233
BLAKE2b-256 78176279c163fc12cca1e14afbb0a2f9cd91bd64e8191f7f268dcbe740ade932

See more details on using hashes here.

File details

Details for the file moontex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: moontex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for moontex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cf960ae756a801f71d15a4b77a38f2501faf082e51e49b6b9f35045334e24e6
MD5 d06a575beea208c36afdb681f8e101da
BLAKE2b-256 1dbdc26193790154e7cb48d38cbd05d0f4519f37b919eb39459a2793b3c2e21b

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