Skip to main content

Skinpy Extended

2D Texture   ➔   Verified Render   ➔   2D Texture

A Python library for Minecraft skins, focusing on high-fidelity rendering, texture reconstruction, and bi-directional mapping.

Motivation

This project is a fork and extension of the archived skinpy library. We aim to revitalize the project with advanced features inspired by modern high-performance renderers like nmsr-rs.

Our core goal is to provide a simple, Pythonic way to bridge the gap between 2D skin textures and 3D renders, enabling seamless mapping in both directions.

AI Dataset Preparation

Modern AI models require high-quality, structured data. By providing bi-directional mapping between 2D textures and 3D renders, Skinpy Extended acts as a powerful tool for dataset preparation in the field of skin generation and processing.

  • Automated Dataset Generation: Efficiently create thousands of consistent perspective renders from raw skin textures to feed into training pipelines for GANs, Diffusion models, or Vision Transformers.
  • Bi-directional Ground Truth: Leverage the ability to reconstruct textures from renders to validate model performance and calculate loss between generated renders and original textures.
  • Structured Mapping: Streamlining the process of preparing datasets that help models understand Minecraft's unique texture-to-model mapping, enabling high-fidelity regeneration based on AI-processed outputs.

Features

  • 2D to 3D Mapping: Render high-quality isometric views of any Minecraft skin.
  • 3D to 2D Reconstruction: Reconstruct original 64x64 skin textures from rendered images.
  • Granular Control: Access and modify pixels at the skin, body part, or individual face level using 3D coordinates.
  • Dataset Preparation: Perfect for generating large-scale, consistent datasets of skin renders and their corresponding textures.
  • CLI & API: Use the built-in command-line tool or integrate the flexible Python API into your own projects.

Installation

pip install skinpy-extended

Quickstart

Loading and Saving

from skinpy import Skin

# Load a skin from a file
skin = Skin.from_path("steve.png")

# Save the skin texture back to a file
skin.to_image().save("steve_copy.png")

Rendering a Perspective View

from skinpy import Skin, Perspective

skin = Skin.from_path("steve.png")

# Create a perspective (Front-Right-Up)
perspective = Perspective.new(
    x="right",
    y="front",
    z="up",
    scaling_factor=20
)

# Render and save
skin.to_isometric_image(perspective).save("render.png")

Reconstructing a Skin from a Render

from PIL import Image
from skinpy import Skin

# Load a combined render (e.g. front and back views)
render_img = Image.open("render.png").convert("RGBA")

# Map the render back to a 3D Skin object
skin = Skin.from_combined_render(render_img, scale=20)

# Extract the original 2D texture
skin.to_image().save("reconstructed.png")

Coordinate System

Skinpy uses a coordinate system with the origin at the left-down-front of the skin from the perspective of an observer looking at the skin.

coordinate system

Development & Contributing

We welcome contributions to expand the library's capabilities! Areas of interest include:

  • Support for Slim (Alex-style) models.
  • Support for secondary layers (overlays/hats).
  • Improved rendering performance.

Feel free to open issues or submit pull requests.

Credits

License

MIT

Metadata

Release files for skinpy-extended 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skinpy-extended 1.0.1
File Size Uploaded
skinpy_extended-1.0.1.tar.gz 238.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for skinpy-extended 1.0.1
File Interpreter ABI Platform
skinpy_extended-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 251.5 kB

Release files / skinpy_extended-1.0.1.tar.gz

Download URL skinpy_extended-1.0.1.tar.gz
Size 238.6 kB
Tags Source
SHA-256 checksum
How to use checksums
84f9665dfb4c67eb88f9c6b16f57c2d07dd58009e63c34a34853eb054784e879
BLAKE2b-256 checksum
How to use checksums
e8dc7dc5d9fbbef4e46f46fcdc9e69e18a85e45e48ec3de80c4b1b462242f049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / skinpy_extended-1.0.1-py3-none-any.whl

Download URL skinpy_extended-1.0.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3dbf97ad345c0155c5f0d5653b3f1af334625bf41d78766dfd0acf35a031dad6
BLAKE2b-256 checksum
How to use checksums
6d2f6c260c041e9845708844a3ebb9a2c92a8880aa1f938d917a3fff0943da6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page