A Python tool that automatically generates custom boss textures from standard Minecraft player skins, eliminating manual UV mapping.
Python | Image Processing (Pillow)
This tool was developed to accelerate the boss creation pipeline for the Pirate-Era project. Since most boss models shared a similar shape, a generalized UV map was created. This Python script automates the texturing process by reading a standard player skin, identifying all relevant pixel colors, and mapping them to the correct (x, y) coordinates on a new texture template that fits the custom boss's UV layout. This reduced a task that took hours of manual art effort down to seconds.
Analyzed boss model similarities to establish a generalized UV map that could be shared across multiple boss types.
Developed a mapping algorithm in Python to read a source Minecraft skin and identify key pixel regions (e.g., head, torso, arms, legs).
Wrote a script to programmatically create a new texture file by translating the extracted skin pixels to the correct coordinates on the boss UV template.
Completely automated the texture creation process, removing the bottleneck of manual UV mapping and re-texturing for each new boss.
def create_boss_skin(minecraft_skin_path):
# Open the original 64x64 image
original_skin = Image.open(minecraft_skin_path)
# Create a new 128x128 canvas
result_image = Image.new("RGBA", (128, 128), (0, 0, 0, 0))
result_image = add_head(original_skin, result_image)
result_image = add_upper_torso(original_skin, result_image)
result_image = add_lower_torso(original_skin, result_image)
result_image = add_belt(original_skin, result_image)
result_image = add_right_arm(original_skin, result_image)
result_image = add_left_arm(original_skin, result_image)
result_image = add_right_leg(original_skin, result_image)
result_image = add_left_leg(original_skin, result_image)
result_image = add_groin(original_skin, result_image)
return result_image
def add_head(skinimage, image):
skin_head = skinimage.crop((0, 0, 64, 16))
image.paste(skin_head, (0, 0))
return image