Upgrading MV to PIXI 5

Before I jump down this likely very deep rabbit hole, has someone already figured out what needs to be changed in the core files to make this happen?
Why do you ask?

Well I just opened the rpg_core and searched for "PIXI" and got 95 results. Well, some of them in commented-lines, but still, many lines to update.

I never dealt with the PIXI and graphics stuff in the Core Code, so maybe somebody else can give more details. I would wait until MZ is released, and then we can check how they integrated PIXI 5 and make diffs between their old and new Core Code. Or, when your project is in an early stage (when I remember correctly, it's not :/ ) we can try to convert it to MZ. I give 80% that a conversion is going to be possible with some work.
I did it recently.
The pixi-picture plugin is not yet compatible with pixi5, so you will need to upgrade that manually first. Or remove it from your project (since I don't use picture blend modes, I had no trouble removing it).

Other than that there's only a few changes here and there with some stuff that changed names. If you use the pixi-layers plugin you may need to do some additional changes too, but I think MV doesn't use it by default.
I took a look at it.

No thanks. Way too many compatibility issues with pixi-tilemap and pixi-picture due to deprecation of canvas support.
So far I've been able to reach no crashes, but have black screen. 😀
Yeah after posting this I got to messing with it too and arrived at a black screen. But I'm confident I can fix that. I do so love to tinker with stuff. :LZSwink:

@V_Aero
Mostly I'm looking for the optimizations PIXI 5 brings (just dropping in 4.8.9 causes vast improves with no extra work), and a lot of particle container stuff (which I embarrassingly didn't realize wouldn't work until I looked at the PIXI version that ships with MV). My latest version of the project is almost entirely particles at this point (not shown in my signature video, though I added screenshots to my game thread). So anything that improves that just lets me squeeze in more absurd stuff. :LZSexcite:

But it's not a bad plan to check out MZ when it comes out and see what they did. Still with TouchFuzzy mentioning a stream to showcase it around early August... I don't think it's coming out before that. Plenty of time for me break RM core files until they work. :LZSwink:

@Hudell
That's interesting to hear PIXI-picture is basically unnecessary. And here I was being all concerned with error messages for why it didn't work, and never even looked into what it did. Thanks!
I took a look at it.

No thanks. Way too many compatibility issues with pixi-tilemap and pixi-picture due to deprecation of canvas support.
So far I've been able to reach no crashes, but have black screen. 😀
You can still use canvas, just download pixi-legacy instead of the default pixi.js
Even with pixi-legacy I couldn't get the windows to render even though they still function via keyboard and the tilemap does not render either. All sprites, pictures etc render properly. Mind you I never dedicated a lot of time to figuring this out, maybe I'll dig into it further this week and try and write a tutorial on how to do it.

Edit: I should say I can't get the tilemap to render "correctly" as it does do stuff lol
1593120571287.png
Well let us know if you do, that would be fantastic!
Just got windows rendered, it appears the WindowLayer() class is broken but adding the windows to the scene as a direct child works wonders. The tilemap renders now as well but only after it refreshes upon exiting the main menu. I assume the tilemap needs to refresh and or the Scene_Map needs to wait until the tilemap is ready to render. I'll continue digging into this and make a guide as soon as possible.
I didn't have any of those problems when I upgraded, do you have any custom plugin on your project that may be causing those issues?
Nope, its default MV 1.6.2 project and attempting to upgrade to PIXI v 5.3.0, maybe 5.3.0 is causing these problems, which version did you use?.

I got everything working now, unfortunately unsure how to get the WindowLayer working correctly as it requires more time to investigate. Luckily it does not appear to break anything(that I know of) if you add the window directly to the scene instead. The tilemap simply had to have the renderWebGL method changed to render and a few other minor changes in the rpg_core.js file.

I made a quick and dirty guide here (includes js files for download) https://fenixenginemv.gitlab.io/guides/pixi5-upgrade.html

I'll update the guide when I have more time to investigate further and as I find out more information.
I upgraded from pixi 4 to 5.2, then switched to 5.3 without needing any new changes.

Checking your guide, a few things I've thought odd:

That line with the FORCE_NATIVE = true; was already commented out in my code for some reason, may have been me in the past.

You removed support to the canvas renderer, which I didn't, but I assume it was by choice. I hadn't seen those two new options on the constructor (resolution and autoDensity). What are they used for?

I always preload my tilesets so that may be the reason why I didn't have any problems with the tilemap.

On the windowlayer, you need to also rename renderWebgl to render. Replacing it with a regular Container will likely cause memory leaks.
FORCE_NATIVE is by default in MV codebase but yea like you said you most likely commented it out ages ago lol.
I did remove the Canvas renderer I should probably add to the guide to ensure people know I did this. The resolution and autoDensity although probably not required I added for my own project and those properties are explained here.

The WindowLayer, unfortunately its not as easy as changing renderWebGL to render, at least not for me, because PIXI now moves things like renderer.maskManager to renderer.mask and _activeRenderTarget.projectionMatrix to renderer.projection.projectionMatrix and all these are in the render method. Even after I made the changes, I still receive issues with pop and push to sprite mask, and to filters, etc and I don't have the time right now to figure out why those issues arise. Not sure why it was so easy for you though
oh yeah, I removed that part of the window layer ages ago as I didn't like that behavior (it prevents you from rendering two windows at the same position)
Nope, its default MV 1.6.2 project and attempting to upgrade to PIXI v 5.3.0, maybe 5.3.0 is causing these problems, which version did you use?.

I got everything working now, unfortunately unsure how to get the WindowLayer working correctly as it requires more time to investigate. Luckily it does not appear to break anything(that I know of) if you add the window directly to the scene instead. The tilemap simply had to have the renderWebGL method changed to render and a few other minor changes in the rpg_core.js file.

I made a quick and dirty guide here (includes js files for download) https://fenixenginemv.gitlab.io/guides/pixi5-upgrade.html

I'll update the guide when I have more time to investigate further and as I find out more information.
I salute and thank you. You are a gentleman and a scholar!

Original thread: https://forums.rpgmakerweb.com/threads/upgrading-mv-to-pixi-5.123280/