GL_Fog version 1.1.0

GL_Fog : 1.1.0
Author : Chaucer


Introduction :


A simple plugin which utilizes webgl to create randomized fog, no images required! Not only does this plugin create randomized fog, but it also simulates the movement of fog! This plugin is highly customizable, the fog has many parameters to help tailor it to your needs.

Features :
  • Create completely randomized fog.
  • No pictures required.
  • Highly customizable.

Screenshots :

Spoiler: Screenshots
Screenshot from 2020-01-22 14-38-47.png


Screenshot from 2020-01-22 14-38-54.png


Screenshot from 2020-01-22 14-39-02.png

Terms of use :
This Plugin may be used commercially, or non commercially so long as credit
is given, either in the games credit section, or in a text file alongside
the game. This plugin may NOT be sold, or Plagiarized. This plugin may
be extended upon, and shared freely.

Download :
GL Fog
Can it be combined on a map! I mean opacity
.And does it reduce performance?
Combined on map? I'm not sure I follow, but the plugin adds fog to the map correct. You can adjust the opacity as well, yes. The fog will even transition to battles as well. 🙂

As for performance, there is some minor performance overhead. I wouldn't recommend adding this to a mobile game( it didn't work when I tried it, and the fps was really low ), but for the typical computer there shouldn't be any issue.
Looks awesome to create some dream sequences 🙂
Nice plugin!
Screenshots don't do this plugin justice. It looks super nice and runs really well
I'm confuse
is this just this command or there enable disable command I miss
because it's not working in new fresh project
3.JPG
I just tested out the issue you're having, and this was a minor oversight on my end it seems as though fadein is required, you could simple specify "fadein 1" at the end of the plugin arguments, and it should work, however I will fix it so that it is no longer required.


edit : actually, you know what? the issue is not what I initially thought, took me a while before I realized that colors are whole number values, not floats.

Code:
   argument[gl_fog] : color R G B
---------------------------------------
   description : Define the color of the fog R( red ) G( green ) and B( blue )
   are whole numbers, a number between 0 ( no color ) and 255 ( full color ),
   each value should be seperated by a space.alternatively, script snippets,
   can be spliced in instead of a number.
---------------------------------------
   example : color 255 100 50
   example : color $gameVariable.value(1) 100 $gameVariable.value(2)

The examples I posted were from a unreleased version before I realized float values don't work in variables, so I alrtered the way it works, I'll update the examples thanks for pointing this out.


edit2:
● Version : 1.0.1
● Date : 01/31/2020
✩ updated documentation.
Great plugin! I have a question. Is it possible to add a feature where you can specify a region or event for the fog to be placed at? Like say I have a big map and I want to hide certain places for the player until they go inside the fog.
Currently, it's not possible to do so with this plugin while it definitely is a possibility in the future, perhaps when I find time again. 🙂
Hello Chaucer, really nice plugin!

I'm having some strange effects, however, where the fog seems to disconnect in a rectangular way in some places:

fog.png


I thought, maybe it's my resolution (1088x612), or maybe one of my plugins is caunsing interference but...:

1586215062540.png


Tried on a freshlymade project and it was still there.

Any ideas?

Thanks! And again, great work 🙂
hi
can I suggest something
now the gl fog is above everything include show picture
if there a plugin command that make it under show picture would be cool
because the fog is over the bust picture
it is good and bad in difference time
thank you

image_20200428_154856.jpg
@Iqus this is interesting, I haven't seen this issue in any of my testing, if you can could you pm me about this, I'd like to try to resolve this issue asap. if anyone else has this issue please let me know as well, as it may help narrow down the cause of the problem.

@pasunna I will move the fog below the picture by default, and I will add the ability to specify the layer position as well. Thanks for the feedback! 🙂
● Version : 1.1.0
● Date : 01/31/2020
✩ Fixed "Cannot read property '_fogBarrier' of undefined Line:559:38".
★ Add fog layer options( via plugin manager ).

@pasunna I apologize, I didn't add a plugin command, at least, not quite yet, I've got some other features planned for this pluign as well, in the next update I'll add a plugin command for this. For now it's left as a plugin manager variable.
um... don't need to apologize...
unlike I pay you to do it
just do as you comfort
and thank you for your great work
Are you still supporting this? The link here seems to be broken now.

It's an exciting plugin and from what I saw of the fog effect, it looks great; but I encountered a game-breaking bug within minutes. When I have this plugin installed, if I open the menu, save the game, close the menu, and go to an event with a transfer player command, I get a crash:

Code:
rpg_managers.js:1949 TypeError: Cannot set property 'value' of undefined
    at Object.$.applySavedUniforms (Chau_Fog.js:1395)
    at Object.$.uniforms (Chau_Fog.js:1356)
    at new Fog_Filter (Chau_Fog.js:332)
    at Spriteset_Map.Spriteset_Base.createFogFilter (Chau_Fog.js:676)
    at Spriteset_Map.Spriteset_Base.initialize (Chau_Fog.js:1573)
    at Spriteset_Map.initialize (rpg_sprites.js:2261)
    at new Spriteset_Map (rpg_sprites.js:2254)
    at Scene_Map.createSpriteset (rpg_scenes.js:734)
    at Scene_Map.createDisplayObjects (rpg_scenes.js:727)
    at Scene_Map.onMapLoaded (rpg_scenes.js:571)

This happens in a new empty project with nothing in it but two maps and the transfer event, so it doesn't seem to be a plugin incompatibility. And this is without even calling the functions of the plugin--which, for all I know, may be the cause of the error, since it appears to have something to do with applying saved settings (that probably don't exist).

@Featherbrain Hello! Yes I am still supporting all my old plugins, however it may be a while before I get time to look into this i apologize, also that's a very strange error, I've not seen this before.. D:

I'm spending the remainder of my time trying to finish up a different project before x-mas :x After said project is finalized, I'll spend time backtracking, to patch up other existing plugins.
download link was done.
Can you update him ?
Yeah, no problem. Good luck on your Christmas project!

Just FYI, I was testing the error a bit more, and I think I can conclude that the number of events on each map is a factor in whether the crash occurs. Specifically, it crashes when you save on a map that has more events than the map the player subsequently transfers to. If you save on a map that has less than or equal number of events as the map where you will transfer, no crash happens on transfer.

For example: In the test project, I had two maps, with only a transfer event in the first map. When transferring from map 1 (1 transfer event) to map 2 (0 events), I got the crash. When I added a transfer event in the second map to transfer back and forth to the first map, I was surprised that there was no crash. So I added another empty dummy event in the second map, and again, no crash when saving on map 1 and transferring to map 2; no crash if transferring from map 2 to map 1 without saving; but, it crashes if saving on map 2 (2 events) before transferring to map 1 (1 event). Tried it with two events in map 1, one event in map 2, same thing: when saving on map 1 (2 events) and transferring to map 2 (1 event), you get this crash, but not vice versa.

This is consistent with the behavior I noticed when I put this in my actual project, where this crash only seemed to happen when saving on certain maps, and I had no idea why. Looking at the maps in editor now, I can see that the instances where this behavior occurred were when transferring after a save on maps with more events than the maps being transferred to.

Hopefully that helps you figure this out when you get around to it. I'd love to use the plugin, but it looks like I'll have to wait for a fix before implementing it as-is.
@chaucer Hello, is there a way to download this plugin?
Or does anyone have a copy of this plugin to upload on dropbox or pastebin in the meanwhile the author gets around setting up a new main download?
Link is updated! sorry for the inconvenience ^^;

Original thread: https://forums.rpgmakerweb.com/threads/gl_fog-version-1-1-0.117529/