MoonTex is a noise-based texture generator that creates realistic grayscale moon phase images.
Project description
MoonTex v0.1.0
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.1.tar.gz
(5.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moontex-0.1.1.tar.gz.
File metadata
- Download URL: moontex-0.1.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00e417c38718bfb9c8d69fc33095e8bc868c6fee0cfd58db26fc7a765873849b
|
|
| MD5 |
773a1fc3d808d8b4fcd2a5203d95f182
|
|
| BLAKE2b-256 |
0a004087062e322a91e0e40832cf48bffe2a950718da8914e40a8e4de6c132b1
|
File details
Details for the file moontex-0.1.1-py3-none-any.whl.
File metadata
- Download URL: moontex-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c629b85dccfc46b464c3275bcf54146651b7f4930b66234035abbd30f754c8f
|
|
| MD5 |
72538b793fbe8d6a990159414dfa8566
|
|
| BLAKE2b-256 |
1e8c98546016668ea3f0d6eac9caf4ddbbb200a6365ed87a09d5bd34331934a4
|