/Create2DTextureArray

Concatenates single image textures into into a 2D texture array. Useful for creating animated textures in Unity.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Create2DTextureArray

Concatenates individual image textures into into a 2D texture array. Useful for creating animated textures in Unity.

Usage

CreateTexArray.py is best for concatenating all textures into a single texture array.

python3 CreateTexArray.py IMGs/1.png IMGs/2.png IMGs/3.png IMGs/4.png output.png

The result is a new image output.png which contains all images 1 through 4 in a vertically arranged sequence.

Main.py batches the texture array creation process by grouping the provided images based on their shared prefixes. Given the following file structure...

textures ->
 -> eyes1.png
 -> eyes2.png
 -> eyes3.png
 -> face1.png
 -> face2.png
 -> face3.png

...and a JSON file containing the prefixes "eyes" and "face", the following script will create 2 texture arrays, one for the eyes and one for the face.

python3 Main.py <PATH TO YOUR TEXTURES> <YOUR PREFIXES JSON FILE> <OUTPUT PATH>