blockbench icon indicating copy to clipboard operation
blockbench copied to clipboard

[Suggestion] Sprite Sheet based on layers

Open Raiguri opened this issue 2 years ago • 0 comments

Detailed description of your suggestion

Function

Create a function that exports a sprite sheet using layers.

Sprite Sheet is an image that consists of several smaller images. Combining small images(frames/sprites) into one big image "grid"(sprite sheet).

Explanation

For example we have an image where character parts (Also it can be used for sprite sheet animation of character) are on separate layers. image

When we use a sprite sheet function we can see the dialog where we can adjust settings for your sprite sheet. image

We can change this settings (Also it would nice to preview what we are changing):

Layout:

Sheet types: Horizontal strip(Each frame side by side); Vertical strip(Each frame one below the other); by Rows(create one row for each layer); by Columns(create one column for each layer) and Packed(try to fit all frames in the best possible way) (How sheet is created) Constraints: none; fixed width; fixed height; fixed size. (Special constraints for the sprite sheet. E.g. fixed number of rows/columns or fixed number of pixels width/height)

Flags:

  • Merge Duplicates (Merge duplicate layers)
  • Ignore Empty (Ignores empty layers)

Sprites:

Layers: Visible layers; Selected layers; Group of layers. (Which layers are used to create sprite sheet)

Borders:

Border Padding (Space between each frame and the edge of the sprite sheet) Spacing (Space between each frame in the sprite sheet) Inner Padding (Extra space inside frame edges)

Flags:

  • Trim Sprite (Trims sprite sheet)
  • Trim Cels (Trims each frame separately)
  • By Grid (Trims by grid boundaries instead of pixel by pixel)

Result

When we press the export button blockbench will open another project with the ready sprite sheet image. Based on your settings you will have an result, for example: image

Raiguri avatar Dec 05 '23 17:12 Raiguri