(MV Version only) Do you think canvas fall-back for this plugin is neccesary?


  • Total voters
    38
  • Poll closed .

Zer0Morph

Regular
Regular
Joined
Sep 8, 2022
Messages
83
Reaction score
41
First Language
English
Primarily Uses
RMMZ
@Zer0Morph what color do you use?

if you use the same color of light, its weird, but if you use a different color,
than I dont know, but that doesn't have to be the plugins fault, it can be how
WEBGL or how the lights is being made works.

which is something the plugin creator cannot fix if that would be the case.
it's hard to tell how to solve it though and/or if it happens as well if you use
a different color.
I was thinking the same thing so I tried an assortment of different colors but still got the same effect. I also removed every plugin I had except these lighting ones and it still happens. In fact, it's happening consistently using Shora's plugin, the Community Lighting plugin, and OCRam's plugin.

It's strange, but the glowing circle appears to have 2 parts to it, a large circle where the color is displayed properly, and an inner smaller circle close to the player, where it conflicts with other forms of lighting from the same plugin.

I've tried for the past 3 days to make the lights just display one solid color, but so far I've been out of luck.

Edit: On a side note, when I tint the screen using the plugin, to anything WITH color (as opposed to black or white to make the screen darker or brighter), the player generated light and other event lights emit the green glow immediately around the source, as in the inner circle I was talking about before.

This doesn't happen when using a monochrome based tint, however.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,782
Reaction score
3,176
First Language
Dutch
Primarily Uses
RMMV
Cannot say for sure, it could maybe also happen in Real Live purpose?
if lights collides in the center?

but I think its more of a webgl or canvas issue than a plugin issue.
if you really want to test it out on a different basic without a plugin,
see what happens if you use an image based (above player) that floow the player
and 1 on the lightsource itself.

see what happens than, but I dont think this can be fixed inside the plugin,
it is also highly possible how the engine renders this, which makes it impossible
to extremely hard to fix.
 

Zer0Morph

Regular
Regular
Joined
Sep 8, 2022
Messages
83
Reaction score
41
First Language
English
Primarily Uses
RMMZ
Do you use any of the 3 lighting plugins I mentioned? If so, do you have the same problem I'm having?

I don't think it's a plugin issue because all 3 lighting plugins do it so it has to be on my end. When CT_Bolt and I were developing our project a few months ago, I was using MZ 1.1 while he was using MZ 1.5, so the core files were slightly different causing js issues. He had me update my core and lib files to match his... I wonder if that has anything to do with it.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,782
Reaction score
3,176
First Language
Dutch
Primarily Uses
RMMV
hard to tell, I use Shora's lightning for my side game, I use Ocram
and community on the demo usage only, but hard to tell if it happens there.

if you VS lightning plugin 1.1 and doesn't happen there but in 1.5 does, than
it might be the core update or pixi part, but I cannot confirm that.

I dont use it extensively in my project atm, just what I use from demo for
testing stuff.

if it also happen in the demo, but not with VS earlier version, than something
might have changed somewhere.

as if you use a new NWJS, it might be happen on that cause, but not sure.
I can test later on a NWJS 4.8.4 I use a pixi close to that where MZ uses
that as base.

but I have no idea how to fix that, as I'm unfamilair with VS one and dont own
MZ to see how it works on 1.1 or 1.5 basis. (you can try to use 1.5 with the fix
from 1.1 but other than that, I'm clueless though.
 

Zer0Morph

Regular
Regular
Joined
Sep 8, 2022
Messages
83
Reaction score
41
First Language
English
Primarily Uses
RMMZ
Well, I just reverted my entire game back to an early January version when I was using all MZ 1.1 files including the libs. I then setup the Community Lighting mod like I had it before to test. This is a screenshot of my using a tint of #66543A and the player light was set to #F1C570.

You can clearly see the two colors fight with each other causing a green glow around the player. The radius for the player light was set to 300. So it's obviously not an issue with the Pixi version or the MZ 1.5 core js files. :(

1683963151221.png
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,782
Reaction score
3,176
First Language
Dutch
Primarily Uses
RMMV
I dont know, I cannot help you really with this issue, either Shora need to check
it out why it collide or the one that you use the light plugin on, but if each light
plugin produces the same issue, it wouldn't be the plugin fault to begin with.

it shouldn't really bother during game play if nothing breaks it, so you can let
it rest for the time being :) and check later on.

maybe if there is a new update for the core plugin, it might be fixed? but there
is little we can really do though, at least for now.
 

Shora

Regular
Regular
Joined
Apr 12, 2020
Messages
99
Reaction score
228
First Language
Vietnamese
Primarily Uses
RMMZ
Because I'm apparently blind, how do i alter the radius of an individual light? lol
You can set the light when created using the "-r [value]" part in the comment. After that, you can set the radius in MV using the plugin command "radius [event_id] [value] [time_to_change] [animation_type]", though it OK to emit the last two. If you using MZ there a convinient plugin command layout already setted up for you that is the Set Light Parameters command, just change only the radius if that your goal.

Hi, could anyone help me with this issue I'm having, I'm not sure if it's plugin limitations or if I'm doing something wrong? But basically, some lights go through walls when they shouldn't, some lights don't display due to the "Shadow Ambient" and the "Top Block Ambient" parameters being set to "Black".
You can see these issues in the video linked below and some simple walls glitching out and letting light through. I made the switch from Khas's Lighting, and this one feels a lot more complicated to figure out as Khas's plugin did exactly what I wanted it to very easily. I also added a picture of how the regions are set up. I really hope I'm just doing something wrong. Any help is appreciated, thanks!
https://youtu.be/ibh0nW5NZ6E
1683987616687.png
in this part, you can try to have the "-behindwall" flag in the command (or just change in the light default setting) to see if it fix it. I haven't test it when the light position collided with the top block though, so it might be test further.
1683987762517.png
This part is probaly a bug, as I haven't try this pattern. Could you send me the map file, or simplify this part pattern for me to test? I'd glad to fix this use case :D

If anyone has any idea on how to prevent the color change when 2 lights collide, I would be eternally grateful. For some reason, whenever a light gets to close to another light, a weird green light appears near the inner glow of the two lights.

View attachment 261720
This is just the normal behavior for the ADD blend mode in PIXIJS (or everything really). I don't know if the MULTIPLY blend mode would have the image you have in mind. You can try play around with blend mode more on your favorite editing tool, I still don't really understand your color goal :\. Because light blending like that is pretty normal in my view. Would happy to see your suggestion though.
 

hallo4an

Warper
Member
Joined
Feb 8, 2023
Messages
4
Reaction score
3
First Language
English
Primarily Uses
RMMV
The demo is working well, but when I try to add a plugin to my project, it gives an error. 1683988971862.png
 

Zer0Morph

Regular
Regular
Joined
Sep 8, 2022
Messages
83
Reaction score
41
First Language
English
Primarily Uses
RMMZ
This is just the normal behavior for the ADD blend mode in PIXIJS (or everything really). I don't know if the MULTIPLY blend mode would have the image you have in mind. You can try play around with blend mode more on your favorite editing tool, I still don't really understand your color goal :\. Because light blending like that is pretty normal in my view. Would happy to see your suggestion though.
What I'm trying to do is have the lights retain their color when they overlap, instead of turn green.

How would I change the blend mode in Pixijs? Could I use normal blend mode instead of ADD or Multiply. Overlay might work as well. Do I change that in your plugin or in the Pixijs file?

Thanks for your help!

Edit: Here is a list of different Blend modes taken straight from Pixi.js. How can I change the blend mode of these lighting mods? Is the blend mode chosen in the plugin or in the Pixi.js file?

1684003607316.png
 
Last edited:

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,782
Reaction score
3,176
First Language
Dutch
Primarily Uses
RMMV
you can try to open the plugin line 1404 to find this class:
class LightingLayer

than to this function:

this.sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY;

and change MULTIPLY to OVERLAY or HUE or whatever, I cannot tell it will
work, as this is for the LightningLayer (not shadow).

it might throw a crash or not, but you can test it out.

There is also a Lightning Sprite at 1562, find this.blendmode = .....
which you can test it too (make comment what it previously was, in case it wont work.
 

Zer0Morph

Regular
Regular
Joined
Sep 8, 2022
Messages
83
Reaction score
41
First Language
English
Primarily Uses
RMMZ
Well, after hours of testing the different blend modes, I've come to the conclusion that ADD is the best for lighting, and unfortunately it causes colors to change when they get too close to each other which won't work with my project. This must be a limitation of Pixijs.

Thanks anyways for the help guys!
 

Shora

Regular
Regular
Joined
Apr 12, 2020
Messages
99
Reaction score
228
First Language
Vietnamese
Primarily Uses
RMMZ
The demo is working well, but when I try to add a plugin to my project, it gives an error. View attachment 261737
Can you provide more detail on how the plugin didn't work? Did you set the lighting images probably?

Well, after hours of testing the different blend modes, I've come to the conclusion that ADD is the best for lighting, and unfortunately it causes colors to change when they get too close to each other which won't work with my project. This must be a limitation of Pixijs.

Thanks anyways for the help guys!
Yeah, that also my conclusion after a bunch of testing. If user demand the blend mode settings change I would add it, but ADD is surely the most realistic blend mode for lighting for now in PIXIJS.

@Shora On an unrelated note. Happy to see you’re back Shora!
I'm happy to comeback for developing this plugin though, thanks for your words! :D. The past year real life problems put a lot of burden on my back, but now I can probably continue to develop this plugin further. Happy to see your guys suggestions and bugs reporting!
 

hallo4an

Warper
Member
Joined
Feb 8, 2023
Messages
4
Reaction score
3
First Language
English
Primarily Uses
RMMV
Can you provide more detail on how the plugin didn't work? Did you set the lighting images probably?


Yeah, that also my conclusion after a bunch of testing. If user demand the blend mode settings change I would add it, but ADD is surely the most realistic blend mode for lighting for now in PIXIJS.


I'm happy to comeback for developing this plugin though, thanks for your words! :D. The past year real life problems put a lot of burden on my back, but now I can probably continue to develop this plugin further. Happy to see your guys suggestions and bugs reporting!
I found out that the plugin works properly in the new project.
But it doesn't work in my project even when all other plugins are disabled.
It's very strange.
Here's console error if it helps1684080909770.png
I think I'll just try to create a new project and transfer everything from the old one into it.
Aslo, the error only appears when I create an event with the comment [light] or when I write it in character notes
 

Zer0Morph

Regular
Regular
Joined
Sep 8, 2022
Messages
83
Reaction score
41
First Language
English
Primarily Uses
RMMZ
Yeah, that also my conclusion after a bunch of testing. If user demand the blend mode settings change I would add it, but ADD is surely the most realistic blend mode for lighting for now in PIXIJS.
Just an FYI, OCRam's Lighting plugin uses MULTIPLY instead of ADD, not sure why, but the results look about the same for lighting overlap, so who knows, haha. ;)
 

Shora

Regular
Regular
Joined
Apr 12, 2020
Messages
99
Reaction score
228
First Language
Vietnamese
Primarily Uses
RMMZ
I found out that the plugin works properly in the new project.
But it doesn't work in my project even when all other plugins are disabled.
It's very strange.
Here's console error if it helpsView attachment 261815
I think I'll just try to create a new project and transfer everything from the old one into it.
Aslo, the error only appears when I create an event with the comment [light] or when I write it in character notes
Do your map have any region id block? It look like a problem with the shadow system. Try start in a empty, non-region map to see if it work and report back to me. If you can you could send me a little demo on how it don't work, I could try to fix it for you.

Just an FYI, OCRam's Lighting plugin uses MULTIPLY instead of ADD, not sure why, but the results look about the same for lighting overlap, so who knows, haha. ;)
I don't really know how OCRam's Lighting work, but my plugin is just let all the light blending each other with ADD blend mode, then all of those blended lights get MULTIPLY-ed into the scene. If you want to try different blend mode, one possible way is just change this line, from ADD to MULTIPLY.1684109938919.png
I don't know if it yield the result you want, so do try ;).
 

Shora

Regular
Regular
Joined
Apr 12, 2020
Messages
99
Reaction score
228
First Language
Vietnamese
Primarily Uses
RMMZ
Update v.1.9 (6/3/2023):
Download from itch.io page: https://shoraaa.itch.io/shora-lighting-plugin

- Massive performance improvement. With Full HD resolution and 100 MOVING lighting & 560 shadow segmentI was able to have ~100 fps using my laptop, when the previous version only have ~14fps. It currently not really stable but it can guaranteed to have at least 5x fps increase on heavy dynamic lighting map. There can be even more optimization in the future since I have already have found what the bottleneck is.

- You can now rotate and scale lighting dynamically WITHOUT major impact on shadow performance. Which mean you can have almost every dynamic lights in your game to pulsating for more realistic enhancement and don't need to worry about the fps. With that, the pulse animation option is now worked, you can just enable it in your custom light setting and see the effect.

- Various light parameter now working correctly. For example, you can use [light -r 120 -a 45] to have a quick default light with 120% radius and 45 degree angle.

- Added tint animation. Now you can animate your light in almost everyway possible: rotating, moving, scaling, flickering and changing colors.

- Fixed various bugs. One important bug I encountered is that if you change paramters on one light, every other lights with the same type will have there paramaters changed (thanks for Javascript reference). It has been fixed.

- Updated the demo, with more animating examples and performance testing maps.

- Writing a proper guide for the plugin. I see a lot of people are encountering simple error like "Cannot read properties of underfined", which is almost certainly caused by wrong parameters in custom lights settings. I will try to write a decent complete guide and FAQ to avoid those problems in future. Also, if you encountering any errors with the plugin, make sure to post it here and I will try to help!

- Finally back to this project :D. Thank everyone for still using my plugin! Feel free to ask any questions! Really sorry for past several months without update though, a quite lot of things have gone over in my life. But now I will try my best to developing and doing more commission :D
1685752788361.png
 
Last edited:

Puppet Knight

Knight on a Crossbar
Regular
Joined
Aug 3, 2022
Messages
644
Reaction score
759
First Language
English
Primarily Uses
RMMZ
For example, you can use [light -r 120 -a 45] to have a quick default light with 120% radius and 45 degree andgle.


This. this is the info I needed :') Thank you for the update Shora!
 

Puppet Knight

Knight on a Crossbar
Regular
Joined
Aug 3, 2022
Messages
644
Reaction score
759
First Language
English
Primarily Uses
RMMZ
Hye for some reason one of my lights suddenly stopped working post update. Specifically [light fire].

I haven't made any other changes and regular [light] is fine.


ANyone else get that post update?


EDIT: it seems they are all using the same light image (specifically torch form the demo project) At game start the light shows for like half a second and then disappears. Not happening with any other image tho
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,782
Reaction score
3,176
First Language
Dutch
Primarily Uses
RMMV
@Puppet Knight can you try it in a fresh project or the new demo to replicate it?
if it isn't replicateable there, it might have changed, but its hard to say.
 

Latest Threads

Latest Posts

Latest Profile Posts

Crystal Shock Devlog #5 yay!



This week was super fun as I got to work on my favorite thing: Combat! A new boss has been added and some new mechanics on top of that. I also made some improvements to the first town.
Home cooking is good for your health! My wrist had been hurting weirdly for months now, but when making a soup I lifted a storage container with the "bad" hand, it crunched and there was a stinging pain and now everything is back to normal.
You gotta be kidding me...
Apologies for posting again so soon, but I just had to share what I believe to be my best map yet, I'm over the moon with the way this has turned out to be.

Definitely leaning on the "try to" part of the status feed rule and I really try not to sad post, but not only is my kitty Simone more or less confirmed to have IBD... but she has some pulmonary edema and a slightly enlarged heart. They say everything is early and mild and that I'm very diligent and observant about my pets but iunno...doesn't feel like a win right now.

Forum statistics

Threads
134,910
Messages
1,251,848
Members
177,738
Latest member
Misuki
Top