pouët.net

UI blur enigma

category: code [glöplog]
This is one of those things that has been nagging me for a bit but never enough to investigate, maybe someone here knows the answer or is interested in discussing it for fun and profit :D

The window blur effect that's been introduced in windows vista. From what I could see it properly blurs what's behind the window, even multiple times if you have multiple windows stacked on each other. Even when the background animates. I'm curious how you guys would do this effect, as the bruteforce solution (stop rendering before each window that requires a new blurry area, blur the image then render or something similar) doesn't really seem like something that'd be good enough to use in an OS interface :)
added on the 2014-06-28 01:54:53 by BoyC BoyC
This one?
BB Image
added on the 2014-06-28 02:46:41 by Salinga Salinga
Quote:
by BoyC:
doesn't really seem like something that'd be good enough to use in an OS interface :)
I don't know what they do, but it may be that is more performant than you'd like to think, but not enough for all cases. Windows 7 (as I never experienced Vista) is quite willing to turn off the Aero effect due to launching software that doesn't support it. This can include video players (PowerDVD 11 does it, though only in some cases) Lync does, iirc, when you enable screen sharing, and of course Remote Desktop doesn't do it either. There are likely others. It may be good enough for most things, but not in combination with other items requiring high performance in updates.

I should also point out that the area needing the blur effect in most applications used to be quite small: the drabble strip around the edges and the titlebar. Of course now apps like Chrome and Firefox (especially 29+) reveal more of it, but I still think the overall area is small. The taskbar also usually rarely has things underneath it to worry about.

Also, if you do the "peek" feature, which sits to the right of the clock in the taskbar, all windows become glass, but they are not blurred. This might be for better visibility of all windows, or because doing so on large surfaces isn't very fast. However I will note that all Aero windows in Windows 7 at least seem to start off as a single blurred glass area. If you don't have a test app to try this on, you can use Stylish for Firefox to turn off the background of newly created tabs, before the site background is loaded.* What's there is not a solid color, but the "glass" background.

* I've done this on my home desktop. I rather like the effect of it, considering that at one point a Firefox update caused it to load their base background before the site's background color, so things would flash that didn't before. Showing the glass base background doesn't prevent this but I think it does make it nicer to look at when it happens. :)
Quote:
by AMcBain:
This can include video players (PowerDVD 11 does it, though only in some cases) Lync does, iirc, when you enable screen sharing, and of course Remote Desktop doesn't do it either.
This can include video players (such as PowerDVD 11), Lync but only when you enable screen sharing, iirc, and of course Remote Desktop.

--
As a second aside, PowerDVD 11 only does it in some cases. If Windows turns off Aero on launch / start of play, just stop the DVD, then restart it. Aero returns.

Quote:
by AMcBain:
I should also point out that the area needing the blur effect in most applications used to be quite small: the drabble strip around the edges and the titlebar.
draggable
when looking at stuff like this BB Image
i would say it is making a texture of every window and then doing the "bruteforce"
added on the 2014-06-28 10:50:19 by the_Ye-Ti the_Ye-Ti
Quote:
I'm curious how you guys would do this effect [...]

I wouldn't, i find it useless in an OS, except maybe to show that you're wasting so much space on the top of the windows!
added on the 2014-06-28 11:09:08 by baah baah
Microsoft is the new Fairlight!
added on the 2014-06-28 11:43:35 by Kylearan Kylearan
So when will Windows get ribbons?
added on the 2014-06-28 11:48:05 by trc_wm trc_wm
As far as i know Win7 renders all windows into offscreen memory so that composition can be done like with textures or memory bitmaps.
Advantage: No need for proper dirty region handling due to overlap and the like, less redrawing needed by the application windows and no tearing due to broken redraw handling
Disadvantage: Needs more memory
added on the 2014-06-28 14:00:19 by T$ T$
Quote:
As far as i know Win7 renders all windows into offscreen memory so that composition can be done like with textures or memory bitmaps.

That's correct, this is called "desktop compositing" and can be disabled in the system performance settings - as a result, Aero glass effects will be disabled.
It also changes window update behaviour, which used to cause a problem with OpenMPT's sample editor, where sample playback position markers were drawn on-screen, and while this worked without desktop compositing, it would sometimes show the state of the bitmap between the after the previous marker was deleted and before the new marker was drawn.
i can remember buggy white blinking of windows under vista when the system was hogging as fuck on my old laptop, so yeah, they're just layered textures. :)
Yeah, that the windows are rendered into textures is quite obvious from the flying window feature that the_Ye-Ti posted a screenshot of.

What I was wondering about is that if you have say 3 overlapping windows, for each you need to have the background image accessible to do the blur effect as it's not just a matter of simply layering images on top of each other. In order to calculate the blur you need to have the image at hand that's to be blurred first, which is (part of) the desktop behind the window you're about to draw.

With a hardware implementation this is a problem either way as it means that after drawing each window you need to do some sort of a rendertarget swap so that the next window can utilize the rendered desktop for the blur effect. That's pretty suboptimal.

Or it can be done in software but I highly doubt they did that :)
added on the 2014-06-29 01:37:03 by BoyC BoyC
BoyC: are you really sure about this multiple blurs btw?

when binging for some aero screenshots i got the impressions that blur is only applied before the topmost texture.
BB Image
added on the 2014-06-29 07:39:33 by the_Ye-Ti the_Ye-Ti
So this is all handled by the DWM (introduced in vista)
these articles should give you more info:
http://en.wikipedia.org/wiki/Desktop_Window_Manager
http://msdn.microsoft.com/en-us/library/windows/desktop/aa969540(v=vs.85).aspx
added on the 2014-06-29 08:40:09 by CobaltHex CobaltHex
what purpose does blurring the background serve? nothing! - so don't blur the background.
added on the 2014-06-29 09:23:29 by farfar farfar
what purpose does making the demos serve? nothing! - so don't make the demos.
added on the 2014-06-29 09:28:21 by Tomoya Tomoya
A properly implemented blur kernel does cost close to nothing on nowadays hardware, you just can do that + it's locally bound, so you only have to update from changing regions inside the blur kernel radius - this possibly makes the stuff even faster if done right (proper update/invalidation).
added on the 2014-06-29 12:34:32 by las las
(What T$ said)
added on the 2014-06-29 12:35:59 by las las
tomoya: not true, creating a demo is an exercise where you can learn new things, have fun, become smarter and better at what you do, as well as a creative endeavour in itself. your comparison is fail.
added on the 2014-06-29 16:16:55 by farfar farfar
plaf: and BoyC would've liked to learn something for fun.
added on the 2014-06-29 18:48:44 by Gargaj Gargaj
Quote:
what purpose does blurring the background serve?

Providing a more aesthetical experience for the user, making usage of the system more enjoyable. A simple compromise between usability and ux (though it hardly hampers the usability at all).
added on the 2014-06-29 19:00:57 by noby noby
Quote:
Quote:
what purpose does blurring the background serve?

Providing a more aesthetical experience for the user, making usage of the system more enjoyable.


O RLLY? ;P
added on the 2014-06-29 19:48:41 by T$ T$
Yeah this question was for fun as it has been nagging at me from time to time since I first saw the effect.
Anyway, based on this they did do it properly by partially compositing the desktop for each needed area into an offscreen buffer.

Quote:
Therefore, a key element in the Aero design is the blurring of content behind the "glass" borders, to avoid that content being too clear and discernible. This blur is surprisingly difficult to achieve, and the DWM team has spent a lot of brainpower and effort getting it to where it is:

Quote:
The source of the blurring must be a partially composited desktop - everything behind the window border that's being rendered, but not the window border or what's in front of it. And that needs to be pulled out into a different buffer.
added on the 2014-06-29 20:48:47 by BoyC BoyC
noby: nice try
added on the 2014-06-29 21:40:31 by farfar farfar
somewhat related: the next version of OSX is going to feature these blur/transparency effects heavily (and iOS has used it heavily since last year):

BB Image

I'm pretty familiar with this on iOS at least, since my work involves a lot of iOS UI design. The reason for it being used is basically "prettier design without much work for the designer". It's just an automated version of the classic "use a blurred background to make stuff less boring without being distracting" trick.

Example: You have that window chrome on vista, and you have a desktop wallpaper. If your wallpaper is red, and the window chrome is green, it's going to look ugly. You don't want to make a ton of bitmaps for the UI in every colour and have the user switch them all the time just to match the colours. So you make it transparent, and it takes the background colour automatically. Then you blur it so it's not distracting (you want colour, not shape).

Where I think vista failed a bit is that the blur kernel was too small - it was almost possible to read text through the transparent bits, I found that a bit weird. Maybe the hardware limited what they could do back then.
added on the 2014-06-30 10:22:02 by psonice psonice

login