Khas Advanced Graphics (deferred lighting and procedurally generated fog)

@Khas I get this bug if i use MBS Zoom. The light shifts 😀
Zoom Compatibility is set to true in the parameters.

Spoiler: Screenshot
@styx92 thanks for reporting this. Will be fixed in the next update 🙂
Is it possible to make a less dense fog?
We have only medium and dense fog. But medium fog is already very dense.
How do I get this to work with mog hunter time system, as when lighting is on it adds a tint to the screen, how do I remove the tint?
Downloaded the plugin demo to see for myself how to work it, but the demo does not seem to wish to work the lights, I'm not sure why it's not displaying darkness and such to produce lightsources, i've checked and installed the plugins also: but I think there might be a glitch with the demo?
Downloaded the plugin demo to see for myself how to work it, but the demo does not seem to wish to work the lights, I'm not sure why it's not displaying darkness and such to produce lightsources, i've checked and installed the plugins also: but I think there might be a glitch with the demo?

The demo works perfectly for me. I do not have any troubles
@Poupouille there's the "rare" fog as well. But you can create your custom fogs too!

@blade911 perhaps I'll add a compatibility add-on later 🙂

@Skurge could you give more details about the problem you have? Did you just unrar it and ran? I always test my demos carefully before releasing to the public and it seems that other persons don't have any problems with it (thanks @styx92 ).
Rare fog is perfect, thank you! Pity that this is not specified in the plugin's instructions. :/
@Poupouille it's specified in the plugin's help! 🙂

* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* * Default Lights and Fogs
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* The following lights and fogs are available to use with this plugin. If you
* want to create your own, please read the next section.
*
* Lights - Artificial:
* halogen, tungsten, fluorescent, broken, flashlight
*
* Lights - Candle:
* candle
*
* Lights - Torch:
* torch, white_torch, red_torch, green_torch, blue_torch, pink_torch,
* cyan_torch, yellow_torch, purple_torch
*
* Lights - Colored:
* white, red, green, blue, pink, cyan, yellow, purple
*
* Lights - Test (use this to test and adjust offset):
* test
*
* Fogs:
* rare, medium, dense
*
@Poupouille there's the "rare" fog as well. But you can create your custom fogs too!

@blade911 perhaps I'll add a compatibility add-on later 🙂

@Skurge could you give more details about the problem you have? Did you just unrar it and ran? I always test my demos carefully before releasing to the public and it seems that other persons don't have any problems with it (thanks @styx92 ).

Oh i think the problem was plugins were not installed in the demo and the positioing was wrong when i installed them.. I'm not sure whats going on- I've had my PC dead for a while and im trying to get used to using it again.
On a side note the effects look good, I noticed with the blue light on the crystal it does not seem to illuminate the area as such, is there an option to brighten the area with that colour?
@Skurge There's a guide on the help explaining how to customize and create new lights. You can increase the intensity property or edit the image file of any light (change the color, make it bigger, increase/decrease the brightness), it's up to you. I used a dark blue to create the blue light, so if you want something brighter/bigger you would need to do some customization. But it's very easy! 😀
How to use the map commands if in my map (it's a parallax), I have another map commands?

1489661218-capture-d-ecran-2017-03-16-a-16-46-28.png


Both, it doesn't work 🙁
@Poupouille these commands are right. Are you using any plugins for parallax mapping? Does it works with a non-parallax map in the same project?
Yes, I use a plugin for parallax mapping.
This is the plugin "Khaus_Ultimate_Overlay"

I solved the problem by putting this plugin first, and putting the two Khas plugins under.
But as it's noted that the plugin of Khas must be first of the list, I am afraid to create some bugs. But for now, no.
1489756522-capture-d-ecran-2017-03-17-a-19-15-04.png
@Poupouille I'm glad you managed to solve it. Let me know if you need anything else 🙂
I'm almost sure this happened because Kaus' plugin overwrites some method instead of aliasing it.
Hello Khas.
Sorry for my english I am not native speaker but I hope you will understand.
I played alot with your plugin last few days. Made few new "light patterns" (as In my game is spell "Aura" which makes all enemy groups glow based on their "monster type" 🙂 and it looks great. Red auras are for agressive, green for friendly and yellow for neutral. Shape of aura is based on enemy type - undeads has skull shape, wild animald wolf head shape, elementals flame etc. As you had avesome idea to have each event page with own comment tag - I can make my events glow only when Aura spell is active much easier than with Terrax plugin (My game does not have random encounters).


Anyway I have one small suggestion and one big request.

Suggestion is - when I use [offset_x +10] it does not work, but when I use [offset_x -10] it does. It took me almost hour to figure "+" is problem 😉. So [offset_x 10] works as [offset_x +10]. It is cosmetic, but might be confusing. Change script to accept both versions should be simple change 🙂.

My request is about player lantern. On my game it unfortunatelly looks very bad - and funny. As my game is in HD resolution, I reworked my Actors to 72 pixel size and your lantern light center is right on their private parts 😛. I can solve it easilly for NPCs with offset command.
But I did not found any way to offset player lantern for Actors (except maybe edit all lights images and make their "shifted" version by about 36 pixels up. ) It would be much more comfortable to have Light ofset option for Player lantern as part of plugin parameters or even better as plugin command for actor lantern offset. (one of my Actor is dragon teenager and he is 128 pixels height 😛.)
@Khas
Me again 😀
Could there a way to store and restore the "ambient light" factor?
I have an event that changes for a short time the darkness in the map. But you can use this event on every map. So it would be nice to store the ambient light, than change it via the plugin command and than i can restore the ambient light. I think you know what i mean 😀

And is there a way to fix the ambient light or the fog? I clear the fog but if i reenter the map the fog is there again. I always have to set a conditional branch into a parallel event the clear the fog 😀
@Kilitar thank you for your kind comments and your suggestion! I'm happy to hear you find it useful 😀

About the first suggestion, it's a good point indeed, which will be included in the next version. Speaking of which, it will take some time, as I'm rewriting the entire script on a new language. Systems will be more reliable and there will be more features 🙂

Regarding the flashlight, I used an offset to make it look like the chars were holding it with their right hand. You can edit the flashlight definition on the plugin:

flashlight: {
fileName: "flashlight",
intensity: 100, variation: 0,
offset_x: {2: -12, 4: -72, 6: 72, 8: 16 }, offset_y: {2: 72, 4: 0, 6: 16, 8: -72 },
syncWithDirection: true
},

2, 4, 6 and 8 are the directions, so you can set an offset for each direction 🙂


@styx92 Thanks for the suggestion! I'll take this into consideration on the next version of the plugin. Regarding your second question, perhaps you could use the following commands:
* AutoAmbientLight ON/OFF
* Use this command to turn ON/OFF the automatic ambient light change
* when entering a map.
* Example:
* AutoAmbientLight ON
* AutoAmbientLight OFF
* AutoFog ON/OFF
* Use this command to turn ON/OFF the automatic fog change when entering
* a map.
* Example:
* AutoFog ON
* AutoFog OFF

But I'll try to think of an easier way to do this 😀
Hello Khas.

Thank you for kind reply, and fast answers, I have 4 more questions 🙂.

1. As you can see on picture, my aura shining throught objects, when event is "behind object". Any way to block light behind using region tag or so is planned in future?
cut.PNG

---------------------------------------------------
2. By a chance - any way to attach more lights same time to event/actor to blend together? Now, when I use more comment tags with light, last one rewrite previous one.
---------------------------------------------------
3. I probably found a bug, your plugin does not like capital letters on self defined lights 🙂 if you call them via plugin command. On events it does not throw such error.

This one works:
act_candle: {
fileName: "candle",
intensity: 80, variation: 20,
offset_x: 0, offset_y: -32
},

This one throws exception error when using plugin command "PlayerLantern Act_candle". (Cannot read intensity of undefined"
Act_candle: {
fileName: "candle",
intensity: 80, variation: 20,
offset_x: 0, offset_y: -32
},
-------------------------------------------------------------------------------------------
4. When I use custom light with offset_x: 0, offset_y: -32 on event, offset is ignored - but it work for actors.
Anyway I can use comment tag [offset_y -32] and it works for events. Not sure if it is bug or intentional.
Now ain't this dandy looking plugin? Thanks for the plugin!

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