Skip to main content

A pipeline for converting images into stylized game sprites with style transfer, enhancement, and sprite sheet generation.

Project description

pip install sprite-pipeline

You download images to a folder

image

⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️

sp_group --style painting.png -H 100 downloaded/

image

⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️

You open output.psd, resize layers, fix perspective, patch.

⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️

sp_pack

image image

Congrats! You get packed spritesheet and UV coordinates in .txt

Features

  • Foreground extraction
  • Light correction
  • Style transfer
  • PSD building
  • Spritesheet packing

CLI args

sp_group

sp_group folder_name/ --style STYLE_IMAGE -W MAX_WIDTH -H MAX_HEIGHT -f STYLE_FORCE -b BLUR -s SHADOW_INCREASE -o OUTPUT_PSD

Creates PSD file containing group folder_name where each layer is a processed image with the specified maximum dimensions.

sp_pack

sp_pack psd_file.psd -o OUTPUT_DIR --format SPRITESHEET_IMAGE_FORMAT

For each group in PSD creates packed spritesheet image and UV coordinates file named group_name.fmt and group_name_uvs.txt.

Details

  1. BiRefNet to extract foreground
  2. RetinexNet to fix lights
  3. nst_vgg19 for Neural Style Transfer
  4. RealESRGAN_MtG to improve quality
  5. OpenCV to other filters and algorithms

preview

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

sprite_pipeline-0.1.4.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

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

sprite_pipeline-0.1.4-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file sprite_pipeline-0.1.4.tar.gz.

File metadata

  • Download URL: sprite_pipeline-0.1.4.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sprite_pipeline-0.1.4.tar.gz
Algorithm Hash digest
SHA256 efdcdc7c5f3044f3e2d3702460f5b173309291391c76ec7573eb9017bcc98d84
MD5 98b78ffa748d43d92b7fe156f291dfb5
BLAKE2b-256 c4ffc386624312f315182b9c68157176a6db5178a6872b24ef82b0d0ef414ec0

See more details on using hashes here.

File details

Details for the file sprite_pipeline-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for sprite_pipeline-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fa8aecffca6868f14f1a00f1e3a764abd33133509afd18504df52e9c31ce5ec0
MD5 a1892ffa934e1e70e66a9a8ad376dc76
BLAKE2b-256 c6f98648e14f17a26eb9e3a2167abae589c026a5df01d4951167b168f2825312

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