Blur room when GUI opens

Started by RoliX, Fri 16/03/2012 08:48:16

Previous topic - Next topic

RoliX

Hi,

I searched a lot on forums and did not find a topic about bluring backgrounds with script. I read the "Room functions and properties", and the "Drawing Surface" things in the Help, but can't find a solution.

Please tell me how to do it. I hope it's not too complicated.

Gilbert

Unfortunately there is no internal function for this and unless someone has already written a screen blurring module or plugin, this isn't some simple task.

cat

An easy way would be to make a semitransparent white gui that you put between your background and the other gui. This does not blur the background, but the effect might be similar enough.

Khris

I made a quick test. I took a screenshot, then drew it to an empty DynamicSprite multiple times with a slight offset and a transparency of about 15.
If one does this multiple times, i.e. if the next screenshot is taken of the already blurry image, it gets quite blurry very quickly. I found that white ends up red though if this is repeated a dozen times.
I guess it'll do for your purposes?

To create a perfect blur like in Photoshop, one has to go through the screenshot pixel by pixel, get the surrounding colors and calculate how they mix. This will probably result in a noticeable lag.

Snarky

Another option would be to create a blurred version of the background in Photoshop/image editor of your choice, and simply display that. If you want to have the characters and animated objects appear as well, you could make blurred versions of those sprites and overlay them (the result won't be pixel-identical to blurring the composed picture, but  depending on the amount of blur it should look pretty close; walkbehinds aren't going to work well with this method, though).

SMF spam blocked by CleanTalk