Khas Advanced Graphics (deferred lighting and procedurally generated fog)

Hey Khas,
i'm having a problem with pictures being displayed below the ambient light.
For example, in my game I'm currently trying to implement a torch that can be switched on and of while a switch is active.
Additionally, when turning that switch on a pictures is being shown. But as the ambient light is above the picture, it is hardly visible.

I tried looking into your plugin but I'm no scripter, so I need a little advice on where to look for the part that determines on which z-layer your plugin draws the ambient light.

Hey, Gonor!

If you read above, it'll show that I reported the same issue a couple days ago, and Khas is currently working on it. They're super busy since (as in their status) they recently moved (from Brazil to America). As far as I am aware, there is a new version of the plugin coming soon that might solve the issue.
Hey, Gonor!

If you read above, it'll show that I reported the same issue a couple days ago, and Khas is currently working on it. They're super busy since (as in their status) they recently moved (from Brazil to America). As far as I am aware, there is a new version of the plugin coming soon that might solve the issue.

I'm actually not sure if it is the same problem.
You're using Galv's bust plugin and I am using MV's Show Picture event command.
Although I admit that it could be the same thing that's causing our issues. I don't know enough about JavaScript to rule it out. :ewink:
Is it possible to disable certain pictures from getting the light effects? I use pictures for overlays but also for bust graphics and seeing the lightning affect the bust images does look a bit weird.
I'm actually not sure if it is the same problem.
You're using Galv's bust plugin and I am using MV's Show Picture event command.
Although I admit that it could be the same thing that's causing our issues. I don't know enough about JavaScript to rule it out. :ewink:

What I'm saying is that I believe all these issues are related to putting pictures onto the map layer. Since this plugin doesn't use layers. (As explained by Khas on my earlier question) I suspect that GALV, and Show Picture both use the same layer. (Map Layer) Which I believe all of our issues, including the one posted after ours, (Which was the same question as yours) are all effected by the same thing. I'm only familiar with Java enough to change a couple things. I could be wrong.

Edit: I'm only updating that I (Believe) the issue is being looked at. I hope it solves all of our issues at once.
Hey Boss. know your busy!🤘 loving the plugin so far, making my maps looks the bee's knee's 😛 I also have some parallax maps ( quite a lot ) I use TDDP Bind Picture's To Map plugin, Ambient_light does not work on the parallax maps. The fog works fine, but for cutscene's I like to add a picture of a black bar at top and bottom of screen and set it to top layer, but the fog goes above these bar's. And I still have not been able to make it work with my picture's background menu..just pitch black xD thanks 👍
@Gonor are you using the default picture system, or is it a plugin? I'll take a look into this issue.

FYI, my system doesn't use layers:

Q: Does this plugin use layers to add this effect?
A: Nope. I implemented a technique similar to deferred shading, which renders all the lights to an off-screen framebuffer, and then I use GLSL Shaders to compose the final scene with correct lighting and fog. So there's no additional layers.

Edit: oh crap, I didn't see the other answers, my bad. I've read them all and I'm working on an update right now. This update includes new features and bug fixes. Thanks for your patience!
@Khas you are the tits..:troll: GIGGITY, GIGGITY. :troll:
What I'm saying is that I believe all these issues are related to putting pictures onto the map layer. Since this plugin doesn't use layers. (As explained by Khas on my earlier question) I suspect that GALV, and Show Picture both use the same layer. (Map Layer) Which I believe all of our issues, including the one posted after ours, (Which was the same question as yours) are all effected by the same thing. I'm only familiar with Java enough to change a couple things. I could be wrong.

Edit: I'm only updating that I (Believe) the issue is being looked at. I hope it solves all of our issues at once.

Ah, I think, I see what you mean. Yeah, now I agree. Our issues might be related.

@Gonor are you using the default picture system, or is it a plugin? I'll take a look into this issue.

I'm using the default picture system. Although I have a few plugins using images from various folders (Orange Overlay for example). These are also below your ambient light and fog. This is not part of my problem, though.
Any chance to extend lightning/fog it into sideview Battle scene as well in future??
Ambient light and fog blending with animations effects within battle scene would be even more awesome 🙂
@Gonor thanks! I found the root of all these problems and it's been fixed. Expect an update on Wednesday 😀

@Kilitar I'll see what I can do about this 🙂

Edit: I wanted to release the 1.1 update today, but I found some extra stuff to improve in this version, so I need an extra day to work on this!
Hey guys, the 1.1 update is ready to use! Thank you for your help and your patience 😀

By the way, I launched my Patreon page today! If you like my work, please consider supporting me for more awesome plugins!



@Parallax Panda now you can use custom tile sizes!
@KaBlooZio the plugin is compatible with zoom controls now 😀
@Skurge I have added terrain tags/regions lights!
@Izzybelle I fixed the bugs you reported, thanks for your help!
@Tuomo L @Gonor now pictures work fine!
@SoSick. the new version should fix the problems you have
@Kilitar I will add your suggestions (effects on battle scenes) on the next version!

Full update log
03.03.2017 R3 Khas Advanced Graphics updated to 1.1
* MV updated to 1.3.5
* Requires Khas Core 1.2
* Added compatibility with zoom controls (zoom in only!)
* Added compatibility with different tile sizes
* Added Pixi.js version checking (requires v3 or later)
* Fixed event not turning off light on page switch
* Added commands to create lights with region tags and terrain tags
* Fixed lighting/fog being applied to pictures
* Performance tweaks
* Fixed shader problems with opacity and exposure
You should change the "Khas is creating Games & RPG Maker MV Plugins" for "Khas is creating awesome Games & RPG Maker MV Plugins" ;D!
Good luck!
Thanks for the awesome update!

I am having an issue now again. (Sorry. I feel bad.) It seems as though you fixed the pictures too well. I parallax my entire game, so when I use "Bind Picture to Map" while it doesn't do anything with darkness. It does when there is fog involved. (The fix definitely solved the issues with the busts, which is awesome.)

Shown below are images of the "Bind Picture to Map" with fog, and without. It doesn't seem to effect it at all with only darkness.
@Izzybelle don't feel bad! So "Bind Picture to Map" is the plugin you're using, right? I'll take a look later and see what I can do.
Now my overlay images aren't affected by the lightning either after the update. :rswt2:
@Tuomo L I'm rewriting the effects system (fog + lighting) for the next update, so it will work with special cases like yours (selected pictures will be affected byt the effects).
Awesome plugin! Thanks! Is there anyway I can make the light only go out in a certain direction? Like if I lamp on the wall, I don't want the light to go over the wall and show the hidden corridor? Is there a way to radiant the light North, South, West, and East? Or something like this.
@Solis sure! You can make lights in any shape you want, you just need to add custom lights (instructions are on the plugin). I'm also working on a way to add dynamic shadows to the system 🙂
Dang! I don't have any programming experience. 🙁
@Solis you don't need to have programming experience 🙂
It works like this:
1) Create the light image on photoshop or any image-editing software (you may cut the light, for example)
2) Place that image file on the img/lights folder
3) Open my plugin with notepad, and scroll until you find the custom lights section (it's easy to find)
4) Follow the instructions there - it's just a bit of copy and paste!

Original thread: https://forums.rpgmakerweb.com/threads/khas-advanced-graphics-deferred-lighting-and-procedurally-generated-fog.73911/