Giter Site home page Giter Site logo

josefaeti / cheetah-texture-packer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scriptum/cheetah-texture-packer

0.0 2.0 0.0 801 KB

High efficient and fast 2D bin packing tool

License: GNU Lesser General Public License v3.0

C++ 99.25% Prolog 0.75%

cheetah-texture-packer's Introduction

Cheetah Texture Packer

Just best texture packer. It uses the idea of MaxRects bin packing algorithm with aggressive heuristics.

This tool was created as research implementation and never been released. But it works and you can compile this tool for any platform you want.

If you know Russian - welcome: http://www.gamedev.ru/projects/forum/?id=161714

Watch me if you want to see changes :-)

This program uses UBFG's algorithm: https://github.com/scriptum/UBFG

Format of .atlas file (same as UBFG's .fnt):

textures: atlas_image.png --image name with packed textures
Name     X pos  Y pos   Width  Height   Xoffset  Yoffset  Orig W  Orig H   Rot
img1     0      0       0      0        3        14       3       14
img2     90     36      5      7        1        4        7       14       r
dir/img  0      41      5      9        1        2        7       14

Here:

  • Name - name of packed image with full path
  • X pos - x position of image on texture
  • Y pos - y position of image on texture
  • Width - width of image on texture (images are cropped and Width and Orig Width aren't equal)
  • Height - height of image on texture
  • Xoffset - distance on the x-axis, on which image must be shifted
  • Yoffset - distance on the y-axis, on which image must be shifted
  • Orig W - original width of image
  • Orig H - original height of image
  • Rotation - if "r" - image rotated

Additional command line features

--disable-merge //do not merge similar images
--disable-crop //do not crop images
--disable-recursion //just one folder not subfolder
--disable-border //do not make border
--enable-rotate //enable sprites rotation
--square //only square atlases
--extrude-size value //size of extrude image in pixels
--border-size value //border size in pixels
--autosize-threshold value //use autosize algorithm only if fill rate in percents < value
--min-texture-size WidthxHeight //use autosize algorithm only if last texture size > min texture size
--crop-threshold value //crop alpha threshold 0-255
--sortorder value //sort order line in interface new sort order algorithm MAX

Help image

Screenshot:

Screenshot

References:

cheetah-texture-packer's People

Contributors

newnon avatar nikolaybespalov avatar scriptum avatar

Watchers

 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.