A downloadable tool

Download NowName your own price

What does this tool do exactly?

It creates a new layer with a yellow line from point A to B. Between those points, you can split the line into equal segments, each of which are separated by red pixels.

Why would I use this tool?

I created this tool because there wasn't a measurement feature in Aseprite already, at least not to my knowledge. If your design requires pixel perfection, and you must know where 3/7 of a line is in order to begin drawing something, then this tool should help you out.

For me, I created it for animation purposes, to determine an equal point per frame. This was for creating a pop-up box that would grow from zero, to 10%, 20% and so on until 100% size. Getting the exact precise pixel was difficult, so I made this tool to do the hard work for me and act as a guide on where I should draw next.

How does it work?

Simple, you need to add your start and end points, which you need to manually enter after checking where they are in your image. It doesn't matter which point you start from.

Then, you add the number of splits you want in your line, from 2 (which is halfway between two points) to 30. 

Remember, the number you choose is equal to the number of times you want the line itself to be split, not how many red dots appear. 

So, for the default example, (0,63) to (127,63) will result in 9 red dots on a flat line, like so.

This splits the 128 pixel line into 8 equal sections of 16 pixels each* (see note later), separated by red dots, with additional red dots on points A and B for ease of determining the line's beginning and end.

Although this split is easy to see given the default Aseprite grid, this tool helps with any length or angle of line, and any number of splits. Below is an example in a 256x256 grid.

Note that putting too many splits on a short line, or with a thicker brush, will just result in a mess of red dots, and won't be useful to you.

Anything else about the tool features?

You can change the brush size from 1 pixel (default) to 30 for those larger images.

You can also change the opacity of the layer from 0 to 255 (default).

How do I install this script?

  • Download the EqualLineSplitter.lua file
  • Open Aseprite
  • Click File > Scripts > Open Scripts Folder
  • Copy or move the EqualLineSplitter.lua file there
  • Return to Aseprite and press F5
  • Run the script from File > Scripts > EqualLineSplitter

* Is the measurement 100% accurate?

Sadly, no. Given that we're dealing with a pixel-by-pixel image editor, there are going to be some tiny errors. 

There are rounding features built into the script which will capture 99% of the errors, however, even then, depending on the length of the line, the angle of the line, and the number of splits, you may end up one pixel away from being exactly on point.

Even in the example image above for the 128x128 grid, it's physically impossible to get the exact centre of the image, since it would be pixel 63.5, and the red dots after are one pixel away from perfection. Increasing the brush size might help mitigate some of these rounding errors, since there's more area to cover.

Why did you release this trash tool? Why can't I just pick the points myself instead of manually finding them first? Can't you make it an extension to use easier in Aseprite?

This is my first time ever coding in lua, so I had to do all the research myself, and I made a working model of this in one day. I thought it might be useful for other people, so I added some extras, like brush size and opacity.

Perhaps, if I learn more about how Aseprite works, I can try to make this an extension for ease of use.

Download

Download NowName your own price

Click download now to get access to the following files:

EqualLineSplitter.lua 1.7 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.