Skip to main content

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

Project description

MoonTex v0.1.2

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.2.tar.gz (5.6 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.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moontex-0.1.2.tar.gz
  • Upload date:
  • Size: 5.6 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.2.tar.gz
Algorithm Hash digest
SHA256 22ff4d03f9e9cf30bde792a0b805dd4d464d8f440688c33f94155bdf0e5c0f26
MD5 138991985cfddfc937e11683668d0e1f
BLAKE2b-256 63628ed796628d2787d4c80bf83d2c350d6504b88d34cf6544a96fe121ab8fc0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moontex-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b65eb0b4186b9c637a6bf654e89488fa3ca0f6feb3f14e1632735b2dc904a1b0
MD5 3d4f4c868a3c189470d0212dc9fe62e6
BLAKE2b-256 645ee87f7e668f086df5c7860a3b871389229882da7514fa835be226e5791ca7

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