Certain zoom values create pixels above character sprites?

Can someone please help me out?

Problem:
Can't seem to figure out why certain zoom values such as 2.25 create pixels above the character sprites (events/player).
Code:
$gameScreen.startZoom($gamePlayer.screenX(), $gamePlayer.screenY(), 2.25, 1)
Spoiler: Example [2.25]
zoom issue.png

Meanwhile zoom 2.4 & 2.6 work nicely:
Spoiler: Example [2.6]
1576728568349.png

Is there a solution to this besides simply avoiding such zoom values?
Any insight is much appreciated.
It looks like it's taking a row of pixels from the image above. This might be something to do with the height of each individual cell in your character sheet.

Does it do this in a brand new project with NO plugins active? What if you use sprites in the $spritesheet format (only one character per image, 3 columns, 4 rows)?

What if you try 1.26 rather than 1.25?
@Shaz Thanks for reply. Any help is much appreciated 🙂

Does it do this in a brand new project with NO plugins active? What if you use sprites in the $spritesheet format (only one character per image, 3 columns, 4 rows)?
Yup yup just tried a blank project and tried the $spritesheet format still happens.


What if you try 1.26 rather than 1.25?
1.24 & 1.26 both good no extra pixels
Spoiler: 2.75
1576739961467.png
Spoiler: 2.25
1576738860296.png
Spoiler: 1.25
1576739536213.png
Spoiler: 1.26 (no extra pixels)
1576740138274.png

Demo of the issue (clean project, no plugins, freshly created): Click Here to View
So I didn't download your demo, but I tried the same thing on a new map in a project with no plugins, and was able to reproduce the issue.

I also created a $single version of the one character, and it also had the issue, but only in one direction.

I haven't looked very much at the scripts, but I had a feeling it might have had something to do with the number of pixels in height for each individual sprite. So I copied the Actor1 and my $single version, enlarged the canvas by 8 (and 4) pixels, and moved each row down accordingly (row 8 I moved down 8 pixels, row 7 I moved down 7 pixels, etc). After this change, it all worked fine.

I suspect there's something in the scripts that's recalculating the frame size and having a rounding issue - either because of the odd number on the end, or something to do with not being divisible - haven't looked any further at it.

If nobody else gets a solution for you, I'll look a little further over the weekend. I can't concentrate well enough right now to figure it out, and tomorrow I have other things happening.

I've moved this thread to Plugin Support. Thank you.

@mlogan Thanks for moving it. ☺️👍

I suspect there's something in the scripts that's recalculating the frame size and having a rounding issue - either because of the odd number on the end, or something to do with not being divisible - haven't looked any further at it.
Same thoughts just not really sure where to begin with this one...
If nobody else gets a solution for you, I'll look a little further over the weekend. I can't concentrate well enough right now to figure it out, and tomorrow I have other things happening.
No worries I totally know how that one is. I'll take any help with this. I'm quite stumped... perhaps something helpful can be found in rpg_core.js or maybe pixi.js
@ct_bolt Yeah, I moved it because of your report. The blue messages are just automated.
Hmm... I'm really leaning towards something in pixi.js or pixi-tilemap.js being an issue...
Spoiler: Framebuffer ... BaseTexture... ???
1576772253797.png


1576772361339.png

...no clue what I'm looking for really though.
So the following change in pixi.js (starting line 10649) stops the extra lines, but messes with the focus point.

Code:
    TransformStatic.prototype.updateTransform = function updateTransform(parentTransform) {
        var lt = this.localTransform;

        if (this._localID !== this._currentLocalID) {
            // get the matrix values of the displayobject based on its transform properties..
            lt.a = Math.floor(this._cx * this.scale._x);
            lt.b = Math.floor(this._sx * this.scale._x);
            lt.c = Math.floor(this._cy * this.scale._y);
            lt.d = Math.floor(this._sy * this.scale._y);

However, before I made that change, I noticed when zoomed in, the mouse destination became faulty, and the camera didn't follow the player correctly. So I'm not sure if you want to continue along those lines, as there are multiple other issues that would also need to be addressed.

Did you take a look at some of the other camera zoom plugins to see how they handle it, and if they have the same issue?
So the following change in pixi.js (starting line 10649) stops the extra lines, but messes with the focus point.
Hmm.. interesting... thanks for the info.
Did you take a look at some of the other camera zoom plugins to see how they handle it, and if they have the same issue?

Yup I looked over a few others and it seems all the other ones I came across had the issue still.
I did however come up with a fix for this now also. Mind testing? Maybe there are other issues this causes?

Fix:
Changing this.x & this.y in function Spriteset_Base.prototype.updatePosition
Spoiler
Code:
Spriteset_Base.prototype.updatePosition = function() {
    var screen = $gameScreen;
    var scale = screen.zoomScale();
    this.scale.x = scale;
    this.scale.y = scale;
    this.x = -screen.zoomX() * (scale - 1); // Default:   this.x = Math.round(-screen.zoomX() * (scale - 1));
    this.y = -screen.zoomY() * (scale - 1); // Default:   this.y = Math.round(-screen.zoomY() * (scale - 1));
    this.x += Math.round(screen.shake());
};
More specifically removing the rounding of the values.
ExtraPixelFix: Plugin - Click Here to Download/View
However, before I made that change, I noticed when zoomed in, the mouse destination became faulty, and the camera didn't follow the player correctly.
That feature and many more incorporated into an upcoming plugin. 😉👍
PS. Sorry for the delayed reply, somehow missed the notification.

*** EDIT ***@Shaz
The fix I posted seems to fix some values but not all... and may have other issues...
...still need help with this. :dizzy:

Original thread: https://forums.rpgmakerweb.com/threads/certain-zoom-values-create-pixels-above-character-sprites.116403/