New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice tool #721

Open
dacap opened this Issue Jul 10, 2015 · 8 comments

Comments

Projects
None yet
4 participants
@dacap
Member

dacap commented Jul 10, 2015

Add a tool to mark rectangular (any shape?) regions and label them. Then we should be able to export the specific slice/region using #645.

  • add --list-slices (print slices on output or/and export to json file)
  • support to export only the area of a specific slice (e.g. --slice name)
  • support to export all slices like --save-as sheet-{slice}.png (like a --split-slices)
  • animation support for slices
  • review #1651

@dacap dacap added the enhancement label Jul 10, 2015

This was referenced Jul 10, 2015

@dacap dacap added this to the v1.4 milestone Jul 10, 2015

@dacap dacap added the slices label Oct 6, 2016

@dacap dacap modified the milestones: v1.2, v1.5 Feb 18, 2017

@dacap dacap self-assigned this Feb 18, 2017

dacap added a commit that referenced this issue Mar 6, 2017

Add basic implementation of slice tool (#721) to modify theme parts
It still need support to export to .aseprite-data as <slice> XML elements, and animation support.
@SolarLune

This comment has been minimized.

Show comment
Hide comment
@SolarLune

SolarLune Apr 24, 2017

Hey, it's cool to see slices in Aseprite, but are they being exported? I don't see anything in the outputted JSON file, and I don't see any "aseprite-data" file options...?

EDIT: And I do have the Slices checkbox selected in the Export dialog.

SolarLune commented Apr 24, 2017

Hey, it's cool to see slices in Aseprite, but are they being exported? I don't see anything in the outputted JSON file, and I don't see any "aseprite-data" file options...?

EDIT: And I do have the Slices checkbox selected in the Export dialog.

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Apr 24, 2017

Member

Hi @SolarLune, you have two options: one using --list-slices and --data in the CLI or using a special .aseprite-data file e.g. your sprite is player.ase you can create a player.aseprite-data with this content:

<?xml version="1.0" encoding="utf-8"?>
<sprite>
  <slices />
</sprite>

This is an undocumented feature, I need to write more details about this.

EDIT: Tomorrow I'll test the Slices checkbox in the export dialog just in case, something might not be working (did you try using other checkbox like layers too?)

Member

dacap commented Apr 24, 2017

Hi @SolarLune, you have two options: one using --list-slices and --data in the CLI or using a special .aseprite-data file e.g. your sprite is player.ase you can create a player.aseprite-data with this content:

<?xml version="1.0" encoding="utf-8"?>
<sprite>
  <slices />
</sprite>

This is an undocumented feature, I need to write more details about this.

EDIT: Tomorrow I'll test the Slices checkbox in the export dialog just in case, something might not be working (did you try using other checkbox like layers too?)

@SolarLune

This comment has been minimized.

Show comment
Hide comment
@SolarLune

SolarLune Apr 24, 2017

This is an undocumented feature, I need to write more details about this.

Ah, OK. I guess I'll wait - seems like that file would basically just be empty tagged like that...? Not sure if I get what it's supposed to do. A write-up would be helpful (though I usually get by with the GUI, so no rush, for me).

something might not be working (did you try using other checkbox like layers too?)

Yeah, the other options work, but just not the Slices option.

SolarLune commented Apr 24, 2017

This is an undocumented feature, I need to write more details about this.

Ah, OK. I guess I'll wait - seems like that file would basically just be empty tagged like that...? Not sure if I get what it's supposed to do. A write-up would be helpful (though I usually get by with the GUI, so no rush, for me).

something might not be working (did you try using other checkbox like layers too?)

Yeah, the other options work, but just not the Slices option.

@SolarLune

This comment has been minimized.

Show comment
Hide comment
@SolarLune

SolarLune Sep 26, 2017

Hey, just wanted to pop up in here and ask if slices could serve the purpose of defining hitboxes / specific important zones when implemented? Or is that a different concept?

SolarLune commented Sep 26, 2017

Hey, just wanted to pop up in here and ask if slices could serve the purpose of defining hitboxes / specific important zones when implemented? Or is that a different concept?

@tkotha

This comment has been minimized.

Show comment
Hide comment
@tkotha

tkotha Jan 29, 2018

I'm responding to solarlune, but judging from the JSON data, it looks like each slice keeps track of its own history throughout the animation of the aseprite file. In theory this could mean that for a given animation you would be able to do basic hitbox tracking, but all slices are on the screen at once, which could get tricky to manage.
if you have multiple animations in one file, this is also tricky because any slice introduced has to be available for the ENTIRE file, not just an animation clip, which can lead to really cluttered views. So yes it can, but i think there's a bit of a management game to be played here

tkotha commented Jan 29, 2018

I'm responding to solarlune, but judging from the JSON data, it looks like each slice keeps track of its own history throughout the animation of the aseprite file. In theory this could mean that for a given animation you would be able to do basic hitbox tracking, but all slices are on the screen at once, which could get tricky to manage.
if you have multiple animations in one file, this is also tricky because any slice introduced has to be available for the ENTIRE file, not just an animation clip, which can lead to really cluttered views. So yes it can, but i think there's a bit of a management game to be played here

@SolarLune

This comment has been minimized.

Show comment
Hide comment
@SolarLune

SolarLune Feb 10, 2018

Yo, thanks for the expansion on the data. From @dacap's explanation in #1651, he's got a good grasp of the idea of properly implementing slice animations, in a sense, which is great!

SolarLune commented Feb 10, 2018

Yo, thanks for the expansion on the data. From @dacap's explanation in #1651, he's got a good grasp of the idea of properly implementing slice animations, in a sense, which is great!

@oceanhahn

This comment has been minimized.

Show comment
Hide comment
@oceanhahn

oceanhahn Feb 10, 2018

Hey there, just a quick request from the cheap seats, but is there any quick explanation out there for exactly what slices can do and what they are for? I would love to know more about them! :D

#1651 gives a lot of information on what they perhaps ought to do eventually, but I find myself wondering how I can make use of them now.

Is there a link I could follow to learn more?
Many thanks! :D

oceanhahn commented Feb 10, 2018

Hey there, just a quick request from the cheap seats, but is there any quick explanation out there for exactly what slices can do and what they are for? I would love to know more about them! :D

#1651 gives a lot of information on what they perhaps ought to do eventually, but I find myself wondering how I can make use of them now.

Is there a link I could follow to learn more?
Many thanks! :D

@SolarLune

This comment has been minimized.

Show comment
Hide comment
@SolarLune

SolarLune Sep 26, 2018

OK, I just tried exporting Slices again and it seems like they're being exported in JSON from the sprite now, which is great. Thanks, @dacap!

@oceanhahn I don't know if you never got the answer, but basically, it's a way to define rectangles that can be exported from your animation along with your actual image. So this could be used for hitboxes, collision areas for tiles, etc. EDIT: Looks like it could also be used for things like separating an image out (so, for example, for GUI, which is inventive). Check out a bit of a discussion about it here: https://community.aseprite.org/t/slice-tool-how-does-it-work/143/4

SolarLune commented Sep 26, 2018

OK, I just tried exporting Slices again and it seems like they're being exported in JSON from the sprite now, which is great. Thanks, @dacap!

@oceanhahn I don't know if you never got the answer, but basically, it's a way to define rectangles that can be exported from your animation along with your actual image. So this could be used for hitboxes, collision areas for tiles, etc. EDIT: Looks like it could also be used for things like separating an image out (so, for example, for GUI, which is inventive). Check out a bit of a discussion about it here: https://community.aseprite.org/t/slice-tool-how-does-it-work/143/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment