RPG Maker Forums


Khas Advanced Graphics
Lighting and Fog


2.0 Update
This plugin has been discontinued! Lighting and fog are now separate plugins, and both of them require my new KhasGraphics plugin. You may read more below!




Introduction
This is my graphics enhancement plugin for RPG Maker MV, which includes deferred lighting and procedurally generated fog. Both systems are processed by your graphics card with GLSL shaders, so you will get great performance and awesome eye candy.

Attention!
This plugin requires WebGL. There’s no way around this.
Old save files will not work correctly with this plugin.

Features
Easy to use!
Deferred lighting
Lights are created from images – you can create them in any shape you want!
Two light blend modes: stock and custom
All effects are rendered using GLSL shaders
Adaptive exposure – simulates de human eye reacting to drastic lighting changes
Comes with 23 lights and 3 fogs. You can easily add more!
Procedurally generated fog – it’s dynamic and it looks awesome
Variable fog density around the player

Screenshots
Click to enlarge.











Download
The latest version is always available here (click me!).
If you like my work, please consider supporting me for more awesome plugins!




FAQ
Q: Is this a port of your Ultra Lighting script for RPG Maker VX Ace?

A: A few weeks after I released Ultra Lighting, the RPG Maker MV was released. Since then, people have been asking me to port my lighting engine to MV. I was very excited after I heard the new RPG Maker supports WebGL, so I started trying to make a new version a year ago. Unfortunately, a lot of personal issues and lack of time came in the way. But now it’s finally done! I spent more than 70 hours making this plugin, according to my steam account. I had a long list of ideas I wanted to implement, so I did my best for each of them.

Q: Your previous lighting engine had dynamic shadows. Why this plugin doesn’t have them?
A: Technical reasons. With Ultra Lighting I had complete control over the light rendering, with nothing in between the lights and KGL (my library for rendering inspired by OpenGL). However, things in RPG Maker MV are more complex than in its predecessor. There’s the MV engine, then Pixi.js and then WebGL. Thus, I had both the limitations of the MV engine and of the Pixi.js to work with. The biggest barrier was that Pixi is great to render bunnies and other sprites, but it’s terrible to generate geometry, especially dynamic geometry. If I wanted to render shadows in the same way I did in my previous engine, I would need to edit the Pixi engine, which is not a good thing and could be very unstable (I tried). The other option would be to implement a technique similar to shadow mapping, which was my dream once I heard about MV’s OpenGL capabilities. Unfortunately, again, Pixi.js doesn’t use depth buffering (this buffer holds an extra dimension data, z in RPG Maker’s case), so this discards the possibility entirely. It would require a massive edit on Pixi and MV’s engine. As my top priority is to create something reliable, I had to discard shadows. I’m sorry.

Q: You are back! What happened?
A: I apologize for my long absence. If you want to know more, please read this blog post.

Q: I got this error "TypeError - Cannot set property 'CUSTOM_KHAS' of undefined". How do I fix it?
A: Update your RPG Maker MV. The version of your Pixi.js is outdated.

Q: Is this plugin fast? Is it faster than other MV Lighting plugins?
A: Yes! Lighting is super fast and won't have any performance impact in your game. Fog, however, requires a more modern GPU (because it's procedural). I'll add low, medium and high Graphics options in the future, so that won't be a problem anymore. You can read more about it and check a benchmark against other lighting system here (click me!).

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.

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

01.24.2017 R2 Khas Advanced Graphics updated to 1.0.1
* Fixed bug: inverted lighting/fog on menu screen

01.22.2017 R1 Khas Core.js updated to 1.1
* Fixed bug: erase event / empty event

01.20.2017 R0 Version 1.0 released!

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,037
Messages
1,018,464
Members
137,821
Latest member
Capterson
Top