MZ 1.2.1 Bloom/Flare effect on all windows, despite window.png not being changed.

The Row

Veteran
Veteran
Joined
Mar 2, 2016
Messages
117
Reaction score
83
First Language
Swedish
Primarily Uses
Found something strange when I updated from 1.1 to 1.2.1.
Got strange lens/flower pattern on my window background.
Flare.png
(Left 1.1.1, Right 1.2.1 Doesn't show unless 100% in size.)

Thinking something must have been changed in Window.png, I went and copied it from another old project.
Now, 3 hours later, I still can't find how to remove the strange pattern, neither can I find where in the patch notes it says this was suposed to happen.
Am I missing something? Is it a bug? Is there a Window_Layer2.png somewhere?

Here is another example using a custom window.png to highlight the issue, note that the area containing the background:
Flare2.png
(Once again seen better in 100% size)
Window file used:
Window.png

The question I have is quite simple: How do I make the strange pattern go away?
(Do note that I even made a brand new project trying to find the source of the problem. I also googled the problem, but seeing that I really didn't know what to call the Flares/lens effects/blooms/flower patterns... I googled and found nothing really of use.)

(Edit: I posted here in tech-support since it there isn't a bug or a maker-specific for Mz. If it is wrongly placed I ask the mods to move it to the right place.)


Edit 2: After another 5 or so hours trying to find the reason for this (copy pasting file by file trying to see which one brought about the change) I found that the change was brought about by rmmz_core.js.

After another hour, going through line by line I found this:

Window.prototype._refreshBack = function() {
const m = this._margin;
const w = Math.max(0, this._width - m * 2);
const h = Math.max(0, this._height - m * 2);
const sprite = this._backSprite;
const tilingSprite = sprite.children[0];
// [Note] We use 95 instead of 96 here to avoid blurring edges.
sprite.bitmap = this._windowskin;
sprite.setFrame(0, 0, 96, 96);
sprite.move(m, m);
sprite.scale.x = w / 96;
sprite.scale.y = h / 96;
tilingSprite.bitmap = this._windowskin;
tilingSprite.setFrame(0, 96, 96, 96);
tilingSprite.move(0, 0, w, h);
tilingSprite.scale.x = 96 / w;
tilingSprite.scale.y = 96 / h;
sprite.setColorTone(this._colorTone);
};

And wouldn't you know. The [Note]:ed line, looks like the bad guy. By changing it from:
sprite.setFrame(0, 0, 96, 96); to sprite.setFrame(0, 0, 95, 95); The strange image effect goes away.

The question now is... Can you just do this and go around like nothing happend? Or will this break the whole thing?

[Note]. I have no clue what I am doing, or what blured edges the original writer is refering too, all I know is that changing it back to 95 instead of the new 96, removes the strange looping effect found on the background of all windows.
Therefor I would not recommend this fix, untill someone, that knows what they are talking about, can say what the change in number was meant to fix in the first place.
 
Last edited:

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
569
Reaction score
244
First Language
PT-BR
Primarily Uses
RM2k3
Would it be like the spheres of light in an exact pattern?

In my view, the image is using a pixel pattern to create a tone between red and the background color (checkered?).
This was seen a lot in old games.

Attached is a test with CSS.
(Online: JSFiddle)
 

Attachments

  • testScale.zip
    917 bytes · Views: 2
Last edited:

The Row

Veteran
Veteran
Joined
Mar 2, 2016
Messages
117
Reaction score
83
First Language
Swedish
Primarily Uses
What's your screen resolution?
My screen resultion is 1920*1080
As for the one used by MZ it is 960*540 (50%) exactly of the one mentioned above.
But I did test this with a blank project aswell. 816*624, and the same thing happens. I would however want to point that that the pattern used by the standard window.png doesn't show the effect as much, but it is still there, reason as to why explained bellow.

Would it be like the spheres of light in an exact pattern?

In my view, the image is using a pixel pattern to create a tone between red and the background color (checkered?).
This was seen a lot in old games.

Attached is a test with CSS.
(Online: JSFiddle)
This seems to be exactly the issue. I though, since the pattern was almost spot on with the "grid" of 96*96 pixels that it was caused by something looping. If this is correct, it is caused by a scaling of the window.png-skin.

And some testing later:
example.png

It does appear that it is caused by scaling, of some sort... But as I said, I didn't see this in 1.1.1.

(The reason I even found out about this, for those wanting to know was that I tried to create a windows skin that emulated old scanlines, found on old television sets and old monitors... basically filling every 2-nd row with a slight stransparent green tinted line... which showed the "stars" that I couldn't figure out where they were comming from... Having a line draw every 2nd line instead of every 3rd, highlighted the problem I guess....)

But I must say it being caused by scalling is wierd. The image is 96*96 pixels... so for there to be scaling issues, the orignal input (0,0,95,95) shouldn't fix the issue, it should cause it. Unless of course the program only reads a 95*95 square, in which case the 96*96 would increase the size by 1px... but the window skin IS 96*96 so why would they change it in the first place?

This got me so confused.

Edit:(I change the colour to full on red, since it helps highlight the problem.)
 

Latest Threads

Latest Profile Posts

New version of my wife's art for Tundra's opening map. No new version of Katrina yet, but I think this looks awesome.1624062754755.png
Devil May Cry-Style Action Shooter in RPG Maker 2000! | RPG Maker News #75

So many good stat names, how do people chose!? :p
I am often just about to give in and ask for help in the forums, when I eventually figure things out myself. Spent almost the whole day with a minor issue, but in the and it's so satisfying that I didn't need to open a thread :D

Forum statistics

Threads
112,347
Messages
1,067,629
Members
145,992
Latest member
Baghead
Top