Custom sprite sheets getting cut off...strangely

I've been working on my game since mid December and made a handful of custom sprite sheets both for walking and fixed objects, and up until now I haven't had a single problem. But suddenly, despite doing everything the same way, the sprites are getting trimmed at a one-pixel border on all four sides, with the opposite side appearing in the wrong frame.

For example, if I make a custom sprite with collective parts that extend to fill a 70x23 frame, then multiply that by the appropriate dimensions resulting in a 210x92 canvas and place each single frame accordingly, it shows up perfectly in the editor, but will have a "line" on one side of certain frames (which is the weird part, since theyre all the same image and only the center actually has visual differences between sprites) appear on the opposite side of that frame when the game is launched. Here is an example of the size of one of the sheets if anyone would prefer to test it. This file is titled !$TestCube and if you put it in as a simple stepping animation event using the top center cube as a base image, you should see what I mean.

!$TestCube.png


I've quadruple checked each frame and they're all in place, but this has happened with both sprite sheets I've made just today, and never at all in the past. It happens on any map, but not to any prior custom sprites (namely ones with $ or !$ in front). The only way I was able to get around it was to increase the size of the actual sprite by 1 transparent pixel border, but that seems excessive when it only just started being a problem and if a solution exists I'd like to know about it. Or if I've just been doing something wrong the entire time and it miraculously hasn't shown up until now, please let me know! The sprites I made in this exact way yesterday are unaffected and I haven't added any new plugins in well over a week, so I don't think that could've contributed to it out of nowhere.

Edit: wrote the modified height dimensions of one sheet by mistake. The 8 extra pixels were from a transparent line above and below each frame to remedy the cutoff, as I mentioned I had done. The sides were not affected for that particular sheet, which is another inconsistent issue - with one sheet it's the sides, other on the top and bottom.
Have you tried disabling all your plugins or doing this in a fresh project? It's likely caused by some change to the engine.

And to clarify, are only new spritesheets affected, or all old ones affected too?
I haven't downloaded your image but going by your description of 70x23 pixels per frame should yield a canvas of 70x3=210 & 23x4=92.
So canvas should be 210x92
Have you tried disabling all your plugins or doing this in a fresh project? It's likely caused by some change to the engine.

And to clarify, are only new spritesheets affected, or all old ones affected too?
Yes, it happens in a blank project with 0 custom plugins. All the other sprites on this map from previous work days function normally, only the ones I made today seem to be doing this.

I haven't downloaded your image but going by your description of 70x23 pixels per frame should yield a canvas of 70x3=210 & 23x4=92.
So canvas should be 210x92

Ah, sorry, I think I wrote the dimensions of the sheet after I added the transparent border in my post by mistake. I'll fix that
I think you'd need to share one of the spritesheets that's causing the problem for us to look at/test.
I think you'd need to share one of the spritesheets that's causing the problem for us to look at/test.
The one I shared in my post is identical in dimensions to the one in my game, but with colored blocks instead of the sprite. Respectfully, I'd prefer not to share my actual artwork unless you can provide a reason for the pertinence of doing so in this case. Sorry if this comes across as rude, I'm just a private person when it comes to art projects.
The one I shared in my post is identical in dimensions to the one in my game, but with colored blocks instead of the sprite.
Okay, well, that image doesn't match any of the information you provided in your post.

The dimensions of that image are 153x188, and a 70x23 cel grid doesn't match up with anything.

So I'm not sure what else to say.

1711732753235.png
Okay, well, that image doesn't match any of the information you provided in your post.

The dimensions of that image are 153x188, and a 70x23 cel grid doesn't match up with anything.

So I'm not sure what else to say.

View attachment 300118
I said in my post that it was one of the sheets. Both the image and written example were also cited individually as an example -- they were never stated to be the same. I just found the blocks easier to notice the issue, but wanted to give 2 different cases to put to bed the idea that the image size itself could be the problem.
Well, the cube looks perfectly fine as a stepping event in my test project, which I would expect from a sheet with even cubes in the correct layout.

So either it's a problem with the actual images you're using, or if you're saying you see artifacts with that cube image, it's a problem on your system.
70x23 sounds like a strange number.
Have you tried to make the spritesheet in other size?
Like 72x24 instead of 70x23.

I think making the spritesheet from numbers divisible by 8 is the safest solution.
Both 72 and 24 are divisible by 8.
*So are 16, 24, 32 and 48
Well, the cube looks perfectly fine as a stepping event in my test project, which I would expect from a sheet with even cubes in the correct layout.

So either it's a problem with the actual images you're using, or if you're saying you see artifacts with that cube image, it's a problem on your system.
Again, even the test cubes display the issue for me in a fresh project. If this had happened to me earlier in development it would not have baffled me as much as having it happen twice in immediate succession for the same event, but I have not changed my process at all and yet the issue suddenly occurred.

Here is an example of the sheet I posted (green/purple) displaying the cutoff issue on the left side, next to a different sheet I made last week using the same exact process where you can see no artifacts are present. This is on a fresh project with no plugins. So I don't believe it is a problem with my system at all, but I also do not know how you were able to get it to work on your own project. If anyone else has other ideas, I'm still stumped.

testcubes.gif


Edit: for those who don't enjoy blinding themselves by staring at pastel cubes, what's happening with the green/purple is that frames 1 and 2 of a generic walk cycle display this single line cutoff, while the 3rd frame (leftmost on a standard sheet) is completely unaffected and shows its entire frame properly. using a different color for just that frame proves this, and it is not just a case of the two purple frames overlapping and giving the illusion of no cutoff. This is what makes it stranger to me than if it affected all frames equally.
70x23 sounds like a strange number.
Have you tried to make the spritesheet in other size?
Like 72x24 instead of 70x23.

I think making the spritesheet from numbers divisible by 8 is the safest solution.
Both 72 and 24 are divisible by 8.
*So are 16, 24, 32 and 48
This is more along the lines of what I was expecting to hear, that it had to do with divisibility and I had somehow never worked with an odd number sized sprite/sheet before. But checking through, I have plenty that don't meet that criteria and have worked fine.

I don't have any real objection to increasing the size of the affected sheets to avoid this issue if that really is the cause, but of course wanted to ask for help here in case I was missing something else that would come back to bite me later on in development. It's still odd for it to happen twice in the span of an hour after not happening once in the past 4 months... I meticulously check every single sprite way more than is probably necessary, so it would not have slipped by me if it had.
Why are you telling us it's one dimension and then in your example give us a different dimension?

My theory:
Make the horizontal frame an even number and see if that works. Character sprites are horizontally centered along a 48 pixel square so it being an odd number is going to produce an offset as it can't be centered. There's no such thing as .5 of pixel as a pixel is the smallest it can be so it's either got to take from the right or the left.

Your other character images may be even pixels horizontal or with empty space so it never became an issue for you before.

I always make my character frames even numbers so I've never had this issue before.

Anyways, good luck, hope this sorts your issue.
Why are you telling us it's one dimension and then in your example give us a different dimension?
It's always better to have multiple examples when asking for help. I thought I had phrased my post to reflect this, but in future I will be sure to make myself even more clear.

The even number theory does work, but I can't consider it the solution, given only 2/3 of the frames seem affected by the trim. I certainly don't claim to be a master in math, but shouldn't they all be evenly affected? And furthermore, how is it possible that after so many years, this hasn't become a known issue with the program enough to include the requirement of evenly sized pixel dimensions in the help file?

Even if the workaround fixes it on a visual level, I still would be interested in learning what the explanation is regarding the leftmost frame not being affected whatsoever. I've learned a lot since starting my project and have become drawn to discovering what exactly causes programs to produce what we may call "errors" through petty lack of understanding.
Even if the workaround fixes it on a visual level, I still would be interested in learning what the explanation is regarding the leftmost frame not being affected whatsoever. I've learned a lot since starting my project and have become drawn to discovering what exactly causes programs to produce what we may call "errors" through petty lack of understanding.
Leftmost frame not affected because there's no frame preceding it.
The other two frames have the problem since the preceding frame bleeds to the current one.
And the preceding one is different color from the current one.

So it looks like this.
index.php

*That strange line came from preceding color, purple.
It is THE solution. It's not a work around but the proper way to format sprite sheets as I said before, you can't have .5 of a pixel. In the old days of video games sprites had to be in multiples of 8. You still see it alot in gaming still, tiles that are 32x32 or 64x64 characters etc. I agree it should be in the documentation if it's not.

Theory of why one frame works:
it's borrowing a line of pixels from the far right which is the same color or it's as EPICfile said
It is THE solution. It's not a work around but the proper way to format sprite sheets as I said before, you can't have .5 of a pixel. In the old days of video games sprites had to be in multiples of 8. You still see it alot in gaming still, tiles that are 32x32 or 64x64 characters etc. I agree it should be in the documentation if it's not.

Theory of why one frame works:
it's borrowing a line of pixels from the far right which is the same color or it's as EPICfile said
That is what I meant by the solution - adding the extra pixel fixed the problem, but until hearing the reason for the unaffected third frame, I could only perceive it as a workaround. Someone on this forum got me into that mindset: to not accept something as "the solution" until it can be explained why, rather than just leaving it at "well this fixes the issue so just leave it at that!" which can often lead to misunderstandings. I apologize if that's unconventional, but I thought it was good advice and should be more mainstream. Assuming things without confirmation would get me into more trouble than simply asking for details, but it's always the latter that gets me the weird looks. I don't know how else to learn if I don't ask.

Thank you everyone for your help.
Make the horizontal frame an even number and see if that works. Character sprites are horizontally centered along a 48 pixel square so it being an odd number is going to produce an offset as it can't be centered.
A few interesting notes about this.

- I've seen this with SV battlers, where having an odd-numbered width caused visual glitches.

- Something is different about MV and MZ in this regard, as the same battlers did not produce the glitch in MZ.

- There is some kind of difference between systems also in play, as I do not see the glitch that the OP describes using the provided cubes in a test MV project.

flashing.gif
Another observation I can add to this: the issue (visually) rectifies itself when using plugins to offset the affected image in certain directions, which is my current understanding as to why I somehow managed to avoid encountering it -- I must have been narrowly avoiding coordinates where the artifacts would appear by pure chance. And it was again chance that caused it to happen twice within an hour with two unrelated events of different sheet sizes that coincidentally met the requirements for the visual "error".

I'm surprised also that I haven't seen another post about this. I read quite a lot of help posts before I even decided to buy the program just in order to get a feel for it, and to learn about issues people tended to run into that I wanted to be prepared for. Dozens of "why is my sprite chopped in half!" posts but no mention of this.

So if I were to put this flashing block in my game, and someone with a differently equipped system came upon the event while playing, they would not necessarily see them same artifacts as I do? Or is it a purely visual matter? I'm kind of worried now that events that look fine on my machine will look misaligned to others... or does it not work in reverse...? So much I don't know.
Without knowing how many character spritesheets you've made, it seems it ought to be simple enough to make sure all of them have cels that are evenly divisible horizontally.

Worst case scenario, you make a GIMP macro to adjust them.

Original thread: https://forums.rpgmakerweb.com/threads/custom-sprite-sheets-getting-cut-off-strangely.167287/