Skip to main content

A command-line utility to generate 2D and 3D isometric renders of Minecraft skins from a player's username, UUID, or skin hash.

Project description

Minecraft Avatar Generator

A command-line utility to generate 2D and 3D isometric renders of Minecraft skins from a player's username, UUID, or skin hash.

3D Head Render

This tool can fetch Minecraft skin textures and generate several types of avatars, including simple 2D faces and high-quality 3D isometric renders of either the player's head or their full body.

Table of Contents

Background

The core 3D rendering logic in skin_renderer.py is derived from the excellent skinpy library by t-mart. The code was copied and adapted for local use in this project to provide additional features and modifications.

Install

Install the tool from PyPI using pip:

pip install minecraft-avatar-generator

Usage

The script provides several command-line options to specify the input, render type, and output.

mc-avatar
usage: mc-avatar [-h] (--hash HASH | --username USERNAME | --uuid UUID) -o OUTPUT [-t {texture,face,overlay,avatar,isometric}] [-s SIZE] [--part {full,head}]

Minecraft avatar generator from a texture hash, username, or UUID.

options:
  -h, --help            show this help message and exit

Input:
  --hash HASH           The texture hash.
  --username USERNAME   A Minecraft player username.
  --uuid UUID           A Minecraft player UUID.

Output options:
  -o OUTPUT, --output OUTPUT
                        Output file path (.png).
  -t {texture,face,overlay,avatar,isometric}, --type {texture,face,overlay,avatar,isometric}
                        Type of render to generate.
  -s SIZE, --size SIZE  Side length in pixels for square outputs like 'avatar' and 'isometric'. (default: 2048)
  --part {full,head}    For isometric renders, choose which part of the skin to render.

Examples

3D Isometric Head Render (default 2048px)

Command:

python render_skin.py --username Siphano -o examples/head_render.png -t isometric --part head

Result:

3D Head Render


3D Isometric Full Body Render (default 2048px)

Command:

python render_skin.py --username Siphano -o examples/full_render.png -t isometric --part full

Result:

3D Full Body Render


2D Avatar (128px)

Command:

python render_skin.py --username Siphano -o examples/avatar.png -t avatar -s 128

Result:

2D Avatar

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

This project does not currently have a license. You are free to add one, for example, MIT.

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

minecraft_avatar_generator-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minecraft_avatar_generator-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file minecraft_avatar_generator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for minecraft_avatar_generator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6664f58874f7c016ce8a06bd1913e8014c22a8e0888344e8ea02c5a0de36883a
MD5 d7d6e57db2454ee114a9eafc36431c39
BLAKE2b-256 271e93d275f7dfba1ec0b83e76e1a163d0f164ec73eddf4ff734e2a38a71608d

See more details on using hashes here.

File details

Details for the file minecraft_avatar_generator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for minecraft_avatar_generator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18193a7dc810d0314ea3dc49e9245ab9b0c959afbfbdb2732febadc8dde69f93
MD5 03ba9998478c209610f1890a6c458888
BLAKE2b-256 24e7969ae2dfa6d2a35afe294b9b654cf95b9f6ceb3c9b0351010936899a6193

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page