MZ Show pictures only above player and specifc events (Masking or clipping sprites)

Hello again!
First of all I wanted to say thank you for the people who helped me on my last post, I really appreciate it!

I've been using Galv's layer graphics (MZ version) to make full parallax maps (learned how to do it with Starlit Castle tutorials on youtube) where I also make shadows and lights with layers using the multiply and add layer modes.
For aesthetic reasons tho, I would like to have more control of how those lights and shadows interact with the player, character and event sprites, such as by having some way of clipping layers to sprites or using the character and event sprites as masks for these lights and shadows layers (also if possible, I would be able to specify which events would be affected by this, or toogle so that all events on that map are affected by the masking).

I found this plugin that uses a picture to be set up as a mask that other pictures can use:

But it seems like this only works with normal pictures.

And this Thread that has the exact same idea as mine:


Could anyone help me with this? Is there a way to either modify Galv's or SrOscuro's plugins? Or maybe a way for me to make a plugin that does this?

Sorry if it's confusing or I wrote something wrong, if needed I can give more specifics on what I would want to do.
Thank you for the time to read this.
what exactly are you trying to do?
so I can try to guide you how masking pictures work or compatible with
galvs (only I don't use MZ) but if there is a way, I may be able to help you.
what exactly are you trying to do?
so I can try to guide you how masking pictures work or compatible with
galvs (only I don't use MZ) but if there is a way, I may be able to help you.
Thank you for commenting!

My idea was to have more artistic control of shadows and lights, since I would like to paint scenes more like how I do it normally in my illustrations, and for that a clipping effect of images that show only on top of specified events (including the player if I want to on that scene) would help me alot.

I'm using here the game Eastward as reference, of course the way they do lights and shadows is much more complicated and nicely implemented onto the game but I think I can replicate some of the effects I'm most interested (to an extent) if I'm able to have this control.

In this gif (from eastward) you can see an example of what I want to try to achieve:
1000093202.gif



Let's say if I build a simplified version of this scene in rpgmaker, I would put the background layer (blue water), events of the grass scattered around, the car with the characters and a painted light layer set as "add layer" type.
Here, the lights only hit the car and the grass, not the water layer. Right now, without a clipping/masking feature that works with event/character sprites, if I put the parallax light layer on rpgmaker, it will show on top of all other layers, not just on the car and grass, that would make the water be much more brighter and while I can still work with this type of layering, I wanted to have more control over how the scene looks.

Hopefully this explanation together with the gif was more helpful to illustrate what I want to achieve, if you want I can draw a picture of what I mean, I'm away from home rn but when I get back I can draw it.

Thank you so much again for commenting!
I don't know the game, but now I see what you try to do, I need to think around
this how masking can work, but I think you need to look into the direction
of PIXI or lightning plugin and regions.

if an event hit the region, or inside, you can bright it up more, but can go over the
entire event as long its inside the event.

another work around (more work) is to make region and change graphics, but this
require also some perfect timing (disable fast forward if its an autorun).

but I currently have no idea how it can be implemented smartly with masking alone.
as it may work out when done right.

the latest version I made with someone to improve extensive from base for simple masking,
may work, but I don't have time to mess around either this week.

maybe someone else have some idea's as I do like the mechanic as it make it also
dynamic or intense when doing it right.
I don't know the game, but now I see what you try to do, I need to think around
this how masking can work, but I think you need to look into the direction
of PIXI or lightning plugin and regions.

if an event hit the region, or inside, you can bright it up more, but can go over the
entire event as long its inside the event.

another work around (more work) is to make region and change graphics, but this
require also some perfect timing (disable fast forward if its an autorun).

but I currently have no idea how it can be implemented smartly with masking alone.
as it may work out when done right.

the latest version I made with someone to improve extensive from base for simple masking,
may work, but I don't have time to mess around either this week.

maybe someone else have some idea's as I do like the mechanic as it make it also
dynamic or intense when doing it right.
Thank you again for responding!
I thought about those solutions of using regions and changing the graphics fast while walking through specifc parts of the map, but they unfortunately don't make me satisfied enough both visually and for the latter, the amount of pictures having to be saved on the game.

I'll try to keep searching a way of making the characters sprites work as a mask, but I don't understand Pixi and javascript in general as much as I should to do this alone I think.

Perhaps there is a way to make a filter that targets specified events (like 0 for player, 1, 2, 3, etc), makes a white layer that covers fully over them, and then with that filter layer you can mask pictures to it? I'm not sure if you can do that with pixi.

Thank you so much for your time again!

Original thread: https://forums.rpgmakerweb.com/threads/show-pictures-only-above-player-and-specifc-events-masking-or-clipping-sprites.181579/