Giter Site home page Giter Site logo

stylerhall / flipbook-packer Goto Github PK

View Code? Open in Web Editor NEW
15.0 0.0 3.0 7.67 MB

A useful utility that helps artists pack image sequences into texture atlases or sprite sheets.

Home Page: https://www.pixill.com

License: MIT License

Python 96.51% Batchfile 3.49%
artist atlas flipbook game game-development gamedev python sprite spritesheet spritesheet-animation spritesheet-packer texture vfx blender command-line command-line-tool houdini maya unity unreal

flipbook-packer's Introduction

Flipbook Packer

Python tool for VFX artists to aid in different methods of texture flipbook atlasing.

Current methods are your default full RGB(A) flipbook tiled for VFX playback. There are currently 3 flavors of packing; Atlas, Super, and Stagger.

Super Packing and Stagger Packing both allow you to pack a minimum of 192 frames across the RGB channels or 256 frames across the RGBA channels. The way the images are packed into the channels is what makes them different.


Required Packages

This tool is built with Python 3.12 using the Pillow 10.2.0 package.


Command Line Usage

Under the bin folder, there are 3 bat files that will help you create the desired flipbook layout via the command line.

Atlas Layout

After the atlas_pack.bat filename, the first int arg is the rows, then the columns, and finally, the path to the images you want to pack.

atlas_pack.bat 6 6 "c:\path\to\images"

Stagger Packed Layout

After the stagger_pack.bat filename, the only required argument is the path to the images you want to pack. Note that in order to pack this type of atlas, you must have either 192 or 256 images.

stagger_pack.bat "c:\path\to\images"

The final atlas is laid out as such:

  • SourceImage 1-4 = TextureAtlas.001.RGBA
  • SourceImage 5-8 = TextureAtlas.002.RGBA
  • SourceImage 9-12 = TextureAtlas.003.RGBA
  • SourceImage 13-16 = TextureAtlas.004.RGBA

Super Packed Layout

After the super_pack.bat filename, the only required argument is the path to the images you want to pack. Note that in order to pack this type of atlas, you must have either 192 or 256 images.

super_pack .bat "c:\path\to\images"

The final atlas is laid out as such:

  • Source Image 1-64 = TextureAtlas.R
  • Source Image 65-128 = TextureAtlas.G
  • Source Image 129-192 = TextureAtlas.B
  • Source Image 193-256 = TextureAtlas.A

Examples

Under the examples module, you will find a few examples of how to call the flipbook packing methods from within your own Python scripts.

flipbook-packer's People

Contributors

stylerhall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.