https://github.com/justalittlewolf/connectedtexturesgenerator
A python script to quickly generate basic connected textures for Minecraft
https://github.com/justalittlewolf/connectedtexturesgenerator
Last synced: 2 months ago
JSON representation
A python script to quickly generate basic connected textures for Minecraft
- Host: GitHub
- URL: https://github.com/justalittlewolf/connectedtexturesgenerator
- Owner: JustAlittleWolf
- License: gpl-3.0
- Created: 2022-03-30T18:46:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-10T10:03:20.000Z (over 1 year ago)
- Last Synced: 2025-04-15T15:05:11.580Z (2 months ago)
- Language: Python
- Homepage:
- Size: 363 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ConnectedTexturesGenerator
This python script provides a quick and easy way to generate connected textures for Optifine (using **ctm**) with minimal effort.
## Usage
In order to use this script you need to store both `generator.py` and `alignments.json` locally. Additionally you need to provide an image from which the script s going to create the connected textures. This image can either be a multiple of 16x16 (e.g. 32x32, 64x64, 128x128) or a multiple of 32x16 (e.g. 64x32, 128x64, 256x128).
To generate the connected textures simply create a texture as described in [Image Format](##Image-Format). Then run the `generator.py` with `python generator.py`. When prompted, enter the location of your texture. The generated textures will be located in `/texure_name` where the `generator.py` is located. Only thing left to do is put the generated folder inside `assets/minecraft/mcpatcher/ctm` of a texture pack. Ideally the name of the provided texture should be the same as the Minecraft block name. If that isn't the case simply rename the folder and the `.properties` file inside to match the block name.
## Dependencies
- [Python](https://www.python.org/) needs to be installed
- [Pillow](https://pillow.readthedocs.io/en/stable/) needs to be installed (`python -m pip install Pillow`)## Image Format
For using the most basic version (16x16) you have to uniquely paint each of the corners of the image.

The image above is an example of how to split the texture.The top left corner (1) is what a corner in the final version will look like.
The bottom left corner (2) is what the edge of a block in the final version will look like.
The top right corner (3) is what a block with no connections diagonally will look like.
The bottom right corner (4) is what a fully surrounded block will look like.Here is what the 4 sectors look like after using the script to make a texture pack:
**The 16x16 Format only works well for symmetrical block textures** *e.g. `glass.png`*
There is also the option of using a 32x16 texture, the first 16x16 pixels function the same way as previously. The second 16x16 area (5) is used to fill transparent pixels from areas 1, 2, 3 and 4 after the textures have been generated. This method is useful for generating **non-symmetrical block textures**, the version used to generate the image above looks as follows:

A clean version of this image *`hardened_clay_stained_yellow.png`* was used to create *`ExampleTexturePack.zip`*