Forgot your password?
typodupeerror
Graphics Software

Fast Alpha-Blending In Your GUI 592

Posted by timothy
from the alphablend-soup dept.
visnu writes: "I've been waiting for this for 2 years now -- a REAL glass-like windowing system. And yes, it's Microsoft to do it. Ever since W2k came out, and they included alpha-blending in the GDI, I was tempted to write a little tool to turn on any window's transparency, but of course I'm way too lazy to do that. These guys weren't though: glass2k runs in the systray and handles turning on any window's transparency. yes, here's a screenshot. I'm not too sure about the speed in W2k, but in XP w/ the newest Nvidia drivers and a somewhat recent video card, it's hardware accelerated, and yes, you should be drooling." Update: 11/26 19:00 GMT by T : Links updated, so hopefully you'll be able to actually get to the content again :)
This discussion has been archived. No new comments can be posted.

Fast Alpha-Blending In Your GUI

Comments Filter:
  • by snake_dad (311844) on Monday November 26, 2001 @06:28AM (#2612535) Homepage Journal
    There are some apps that I would like to run "always on top", but most of the time they get in the way. This would sure be a nice way to still sorta see them .

    Great stuff, now implement it for NT4 and win98 :P
    • by DaEvOsH (24990) on Monday November 26, 2001 @08:02AM (#2612719)
      The required API's needed to do this in any windows than ME or NT4 is not there. It can be done 'manually', but it is very slow, difficult to do well (I have done it in one of my progs but at the end disabled it when the prog detected the alpha api was not there) and brings problems when running with other programs that alter the way a window is shown.

      It is a pretty esy thing to do. For win32 programmers:

      1. Find the window handle you want to alpha blend. (say, hwnd).
      2. Add the WS_EX_LAYERED extended style to the window with this call:
      SetWindowLong (hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
      3. Call SetLayeredWindowAttributes. Look up MSDN for the info.

      Also, this API in Win2k does not seem to work well in some video cards - windows which update themselves a lot will cause problems i.e. an opengl window, etc (my program has a few of them).
    • It would be even better if one could press one's mouse button really really hard to click on a window underneath the topmost window.

      And the mouse should kind of make a bloop sound as it passes through the layers of windows while leaving a wake in its trail.

      That should be the next change to the desktop idiom, IMHO.

  • by AltGrendel (175092) <ag-slashdotNO@SPAMexit0.us> on Monday November 26, 2001 @06:28AM (#2612537) Homepage
    ...but it strikes me as "Not that useful". Most of my users get confused with standard GUI look and feel. I'd hate to think what this would do to their poor little minds.

    • And its almost as annoying as the menu on the linked page.
    • 'What's wrong?' (Score:3, Insightful)

      by DABANSHEE (154661)
      You load that up on the average bloke's computer & they'd be complain about their buggy Windows desktop till the cows come home.
    • by Anonymous Coward
      hmm, looks like my old laptop with its passive dstn screen.... complete with burn in
    • by be-fan (61476) on Monday November 26, 2001 @05:29PM (#2615717)
      When its on Windows, it's not useful. When its on Linux, its the great, awesome, ground-breaking new technology that Packard dreamed up.
      • No, it's not useful when it's not useful. WindowFX has done alpha in Win2K for a long time.

        The problem is, you need to make certain windows transparent, and only on a selective basis. A clock app, for example, would be a good candidate for alpha. WinAMP is another. Something you want to remain "on top" but still want your whole desktop real estate for.

        Hell, I think having the Windows Taskbar alpha out instead of roll away is better.

        Alpha is cool, but not intrinsically useful. It depends on the app, it depends on the user. But the way it's been implemented so far is just flawed. Not everything should be alpha'd.

        Now what would be really cool is to SCALE windows with the mouse wheel. Roll a window away, and roll it forward. 150% down to 50% (so you can't use them.

        Hell, make the mouse wheel a BALL. Now you can rotate your windows in 3D. Need more room? Just tilt that window away from you a bit. Add a titlebar to the side so you can tell what's there.

        With 3D chips in nearly every computer these days, this shouldn't be hard.
  • Drool? Hardly. (Score:2, Flamebait)

    by dirtyhippie (259852)
    Why would I drool over such a thing? Isn't the whole point of a window so that you can put one on top of the other, and not be confused by what's beneath it? It's great for games, but why on earth would you want to use it in your windowing system? So you can open more porn simultaneously? I don't get it.

    -DH
    • Re:Drool? Hardly. (Score:2, Interesting)

      by gazbo (517111)
      Clearly to some extent this is mainly a neat toy rather than a useful tool.
      However, I can think of many times when it would be useful, such as when I have many windows open from different apps, and I need to cross reference the data and enter it into a final window (which always seems to be an ssh client - strange) Currently if there are too many windows, it becomes impractical to shrink them all down so I can see them at once. Hopefully this should allow a lot more text to be seen through overlapping windows; whilst overlapping text would get confusing, it could recover a lot of space lost due to excessive window chrome.

      But to reiterate my first point, it is just really neat.
  • Looks neat... (Score:2, Insightful)

    by Nachtfalke (160)
    ..but it would drive me nuts after a while.
    Heck, I even reverted to non-transparent xterms, because the background made the text in the xterm partly unreadable, which is kinda bad if you're programming :-)
    But still a cool heck to impress friends with.
  • Mac (Score:3, Informative)

    by zephc (225327) on Monday November 26, 2001 @06:30AM (#2612541)
    There is an Extension called PowerWindows [kaleidoscope.net] that will do that with live dragging of windows in MacOS 8/9. You can adjust the level of transparency too
    • OS X Does this too (Score:3, Informative)

      by Aqua OS X (458522)
      Apps like WindowShade X will allow one to drop the opacity of windows in the OS X. It's quite cool to have an MP3 player rendering visuals at 30 percent opacity behind BBEdit or something ;).

      I'm fairly sure WindowShade X beat Glass 2k to the consumer opacity punch...but who really cares.

      Unfortunatly, the whole GUI in OS X is not hardware acellerated due to the fact that it is vector based. No current video cards support this... but they are going to have to eventually. PostScript is the obvisouse evolution of the 2d GUI.

      However, transparent windows still seem to work at a very respectable speed as long as they are not huuuuge with lots of animation. It's quite impressive actually... considering the graphics card does nothing really ;).

      And yes zephc, PowerWindows has been doing this kind of neet'o stuff for a million and 5 years. However it tends to be quite slow on older machines. But then again, the old OS 9 GUI was not designed for stuff like this. No one at apple cared to dump window buffering into the damn OS ;).
      • the whole GUI in OS X is not hardware acellerated due to the fact that it is vector based. No current video cards support this...

        I won't argue about whether or not OS X renders stuff as vectors but... Do you really think that 3D graphics are rendered as bitmaps instead of vectors? Have you heard about DRI? How about T&L acceleration? Why should displaying 2D graphics with 3D API be any harder than displaying full 3D view like games do? In fact, it's much simpler because you never need to move camera and all the stuff is rendered in plane... though cool effects could be easily achieved with some z-buffer fun.

        3D APIs has not been used for full UIs simply because current 2D displays are good enough for the work you want. It's not like you would *really* want to see your desktop through the image you're trying to manipulate ("Damn, scratch... oh, it's my desktop. Never mind"). Yeah, there are some things I would want tranparency for but none of them would be interactive - just some informational stuff overlayed on top of my screen.

        I still want good anti-aliasing with good fonts.

  • Nothing new (Score:5, Informative)

    by Mwongozi (176765) <(gro.revolgdivad) (ta) (eerhthsals)> on Monday November 26, 2001 @06:30AM (#2612544) Homepage
    Stardock [stardock.com] have an application called WindowsFX [stardock.com] which allows you to turn on transparent windows selectively, for example, just for Notepad windows, which is much less of a CPU hit than turning it on for everything. It also lets you add shadows and various other graphical trickery to windows.

    It's rather cool, but not free, in either sense of the word.

    • Re:Nothing new (Score:2, Insightful)

      by kawaichan (527006)
      It's kidda slow though, this program IMO is better than windowfx If you want just transparent windows, then glassxp thing is good. WindowsFX is good for overall effects. Glass thingy allows individual window customization too. I thought no one is using windows here...
    • Re:Nothing new (Score:3, Informative)

      by Griim (8798)
      I set up WindowsFX here, and I used it for all of 1/2 hour before scrapping it. I thought that having a couple of 'always on top' windows as transparent would be cool, but it's really quite annoying once you use it. And this was just my shell window.

      I find it more useful to be creative in the layout of your windows, so you can see the important parts of all of them (eg. my irc-shell window resides in the lower left of the screen, and I can only see the bottom three lines, but that's all I need to see).
    • by swb (14022) on Monday November 26, 2001 @10:08AM (#2613007)
      When will we see more functionality additions instead of just eye-candy? Admittedly translucency can be considered a navigation functionality, but its seldom talked about as one.

      One thing that they (GUI developers -- KDE, MS, Apple, etc) should implement RIGHT NOW is a feature I've seen on SGIs: A wheel widget that scales the contents of a file browser window. Even at 1600x1200 with a dinky font, I work with plenty of directories that just aren't easily navigable with a full-screen window. Too much scrolling. The ability to scale the contents of the window would be awesome, especially if it was coupled with a magnifying lens area arround the pointer.

      Even normal windows with no content scaling would be more usable if we could hold a key and get a panning-type movement feature for windows with more content than screen space. I know plenty of applications do this, but this should be a base feature of the file management tools as well.

      The point is, too many recent "developments" in GUIs seem to have more to do with making it fit stylistic or visual appearance goals and less with making the windowing system MORE USEFUL. Nice to look at makes it more enjoyable, but more useful means I can get the job done faster and get more time to look at something else.
      • IMHO what would be really nice to see is pop-up menus (like the right-click ones in Windows) all looked like the ones in Office XP and if they were transparent.

        I always find that it can be very annoying when you hi-light text then open a pop-up menu and it covers the text that you've just hi-lighted or when you have programs with many nested menus (like Radlight).
  • Under Win2k... (Score:2, Informative)

    by MrSeb (471333)
    It runs just fine.

    w/ GeForce 2 Ultra, on an overclocked 1.6ghz Athlon CPU.

    No lag or resource drain to mention... :)
  • Thanks, (Score:5, Funny)

    by Anonymous Coward on Monday November 26, 2001 @06:34AM (#2612553)
    Now I need to stack *10* maximized windows in front of my porn when mom comes. If I put just one like I'm doing now she would see through.
  • Am I the only one thinking that this is a big old mess? I can just about make out what windows appear to be on top of each other (I think), but is it really a big whoop to have your desktop background smeared all over your word processor?

    Suggestions as to who would find this useful will be gratefully received. If this appeared on my desktop, the first thing I'd be looking for is the (translucent) button to turn the damn thing off.

    • Yep. IMO, this is the _worst_ user interface idea ever. Non-intuitive, impossible to read, and basically dumb.

      Suggestions for who'd use it - well, any luser who likes "flashy graphics" over actually doing any work. If you currently have an animated background in Windows, you'll probably love this. The rest of us will keep going with 100% higher productivity.

      It's a classic example of ppl doing something without thinking "is this a good idea?".

      Grab.
        • If you currently have an animated background in Windows, you'll probably love this

        You can have animated backgrounds in Windows now? Suddenly I feel relieved that my employer is too cheap to upgrade my WinNT 4.0 box. ;-)

        • You can have animated backgrounds in Windows now? Suddenly I feel relieved that my employer is too cheap to upgrade my WinNT 4.0 box. ;-)

          You too can have animated backgrounds! IE 4 or "better"; even on Win95 or NT4, has a "feature" called Active Desktop that lets you load GIFs, JPGs, and even HTML pages (complete with VBScript, oh the wonder) as backgrounds. Just pick you favorite animated GIF, set it to tile, and let the migrane follow.

          Especially good images for this are phychodelic animations that change colors completely, annoying little hamsters, or quick strobe animations. Great to stick on a friends machine (warning: don't try this on someone who has epilepsy).

          It gets better! Active Desktop also has features that improve your Windows experience by making the shell crash more, both by itself and when IE falls over.

          The first thing we do with those NT boxes here at work is make sure that the Active Desktop "feature" is permanently disabled :)

          Windows Registry Editor Version 5.00

          [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
          "Shell"="cmd.exe"

  • Why is /. posting this tripe? This has been available for ages on the Mac - with PowerWindows on OS 8.x (i.e. 1996-7 if I remember properly), and on Mac OS X since it came out. OS X users - go and get yourselves a copy of WindowShade X - not only can you combine the old minimise-in-place windowshade feature of OS 9 and before with the Dock minimisation, but you can set any window to your chosen degree of translucency at will. Find it on Versiontracker. Then understand why this news story is a waste of time. Mac OS X's graphics system has a far more powerful compositing architecture to WinXP - let's focus on the real news.
    • Old? It doesn't matter that every precollege teen has tinkered with transparency windowing systems; I'm sure someone has been issued a patent for it and is about to IPO. Someone wants to own this now. Expect lawyers to follow.
  • Evas (Score:2, Interesting)

    by vandan (151516)
    Check out http://www.enlightenment.org/pages/evas.html (sorry I can't figure out linking in Slashdot. I think my account is broken) Evas from the new Enlightenment does this sort of thing (hardware alpha-bending, anti-aliased text, etc). There is a neat little demo included in Evas which shows off the features. I'm not sure about transparency (which I suppose this article is about). I think I remember reading some threads on the E developers list where Rasterman said that there are some very dirty ways of achieving this (transparency) with a BIG performance hit, but he wasn't interested in supporting it seriously until X offered some better tools. Or something. Anyway, if you're interested, check out the mailing list archives.
  • by matthayes (459103) <matthew...hayes@@@gmail...com> on Monday November 26, 2001 @06:39AM (#2612566) Homepage
    Athough I can't really think of any practical reason for it - when I'm working / concentrating I usually minimise all but a couple of windows anyway.

    And I think it could be a little dangerous while surfing at work. You know, the boss comes around and you swiftly alt-tab to your work window...to find that it is 90% transparent.

    Does look nice, though.

    Just a thought,
    Matt.
  • by Sludge (1234) <slashdot AT tossed DOT org> on Monday November 26, 2001 @06:42AM (#2612574) Homepage

    If this was bound to a key that was togglable on my keyboard, it would be nice. I could hit the key, and see where each window lies. Perhaps making the windows transparent and alt-tabbing through them while putting a red border on each one instead of having them pop up would be nice.

    Whatever the case, it looks kind of hokey. I would like to see something like this where the widget graphics have alpha channels. Right now everything is one level of transparency. One step at a time, right?

    • Personally, I'd like it so the current window was opaque, and the others were semi-transparent. Now thats a function I could use.
      • The Windows editor "Textpad" uses the "Transparent Dialog Boxes" options just like this - very cool

        BTW I think that TextPad is the BEST windows editor out there, bar none - now we won't talk about editors under *inx, don't want to start a flame war
    • Actually, I'm giving this thing a try right now, and it does have a keyboard shortcut...++number...1 makes it very transparent, 0 makes it solid again.

      Still useless for getting any actual work done, but at least it's got the keyboard shortcut covered.
  • by BESTouff (531293) on Monday November 26, 2001 @06:44AM (#2612580)
    If you have Xfree86 4.x, you have the RENDER extention which does the same thing. See http://www.xfree86.org/~keithp/render/ for a description (screenshot at the bottom). Now you just need the guy who'll patch Gtk to use this.
    • The problem with that is it's not supported by all the video drivers in XFree86 4.x

      For example it just recenty started to support my Rage Mobility LM chipset, before that I had no RENDER support so stuff like anti-aliased fonts in KDE wouldn't work.

      And I *think* that's the reason why people aren't really using it for transparency and stuff. Cause if it's not supported on a persons computer I'm not sure if there is a nice clean way to handle that. I keep hearing about how they can't add it to stuff like KDE or GNOME because so many people wouldn't be able to use it.

      What I really want to know is why someone hasn't put together a special terminal emulator that uses this. Because then just the people who have the render extension could download it and use it, and the people who can't will just have to hope that at some time they'll get RENDER support too.

      Perhaps I should look into that, but I think it's a little too advanced for me to take on.
  • Shiny! (Score:5, Funny)

    by fhwang (90412) on Monday November 26, 2001 @06:44AM (#2612583) Homepage
    I think I'll design a desktop theme called "The Bedazzler". And basically what it will do, is it'll show the same windows and widgets that we've all been stuck with for twenty fucking years, only they'll be covered in rhinestones and glitter! You'll be able to customize your own rhinestone patterns, to say things like "Groovy!" and "Fan-tastic!"

    And this is how we'll enter the brave new era of computing: Not by actually designing and using tools to make our lives more productive, convenient, and satisfying, but by slumping in our chairs and staring at useless eye-candy while we touch ourselves. I can't wait for the future.

    • Here is a good example of how alpha-blending can improve your productivity: just look as this old screenshot [directfb.org] from a few months ago, showing GTK+ running on DirectFB [directfb.org]. Aren't you glad that you can see all these windows at the same time? Think about how much desktop space you have saved by stacking them up. ;-)

    • Re:Shiny! (Score:2, Informative)

      I agree desktop transparency is not entirely useful, although as someone showed DirectFB displaying GIMP, its nice to be able to see the image you are working on through any dialogs you have open. What I think may also be interested in general in the hardware accelerated desktop, is to be able to scale and rotate windows around, this way you have more options about having multiple windows open. Or small stuff like, if you are looking at an upside down image on a website you can flip the browser upside down rather then sitting on your head.

      In the visual candy area (not much better then transparency) is to add some type of physics to windows, so if you yank it in a direction it swings, or if you drop it, it bounces, if you try to push it off the desktop it squishes down instead, or some weird stuff like that.
  • by Osty (16825) on Monday November 26, 2001 @06:45AM (#2612588)

    Applying alpha blending to all windows is not really an interesting problem. There are some hoops to jump through, and you have to be realistic about what you expect, but otherwise it's a simple, straightforward process (don't believe me? This article [microsoft.com] gives you 90% of what you need to write such a tool. The other 10% is bookkeeping.)


    More interesting is applying alpha blending to specific applications. This lets you be much more creative by doing something that complements an application. A translucent Internet Explorer is not interesting or useful (in fact, it's likely a drag on your system, and hard to read). A translucent Winamp [daishar.com], on the other hand, is a match made in heaven. What I'd really like to see is more application developers taking the time to add layered windows to their applications where it's appropriate, rather than taking this one-size-fits-all type of approach. But then, I've been playing with layered windows for a year and a half now, so maybe I'm just not getting the "wow" experience anymore.

  • by ramseys (531979) on Monday November 26, 2001 @06:47AM (#2612592)
    For what it's worth, OS X has the capacity to do this as well (and with WindowShade, you can phase any window on the screen). I haven't found the feature incredibly useful, yet, but it sure does look cool.
  • by Eloquence (144160) on Monday November 26, 2001 @06:47AM (#2612593) Homepage
    Overlapping windows were a pretty brain-dead idea to begin with. This is increasingly being realized by developers who add sidebars and "panels" to their applications which can be moved and resized (knode [sf.net], the KDE newsreader, implements this quite fully, although it's a bit awkward to use). The information below the window you're overlapping is cut in half: A browser window you're overlapping might show you text like

    as not a good idea
    creasingly being interested
    ot to be confused with the

    i.e. noise. The only purpose it serves is to faster identify the window you're dealing with. This has become unnecessary with the invention of the taskbar. Further additions to this concept, like window summarization and application-specific taskbars [kde.org], make it even easier to use. If you want to view a lot of information simultaneously instead of having everything in full-screen mode, a smart window-manager like ion [students.tut.fi] will rearrange windows automatically in useful tiles. Additional usability can be gained with clever hotkeys for application-switching.

    But while overlapping windows are stupid, transparent windows are really part of a vast right-wing conspiracy to stupidify the masses by making computers incapable of displaying information. The next step will be window-spectific screensavers, which turn on after a specific period of inactivity in a single window. Just you wait. Thanks to transparency:

    • Information becomes unreadable, especially with unfortunate color combinations.
    • Information you think is there is actually part of another window -- have fun editing that picture.
    • When two windows overlap with the wrong alpha-blending setting, you can no longer be sure which one is on top without looking at the taskbar or focus (in this screenshot, thanks to additional braindead color gradients in the title bars, this is especially hard).
    • Even your calculator will use more RAM than Mozilla ..

    If you like eye-candy, you may "drool" over this one and get your brain fucked by the Illuminati. A frontal lobotomy may be a quicker solution though.

    • Sorry, no.

      What if I want a large workspace, but I'm working on multiple applications? I create two or more windows with a total surface area greater than the desktop size and overlap them. I can switch more easily than via a taskbar (not so far to move the mouse), I can still drag items between windows, I can see what's going on in different windows. Say I'm comparing two lists of contents. Each window may well contain rather more than the list, but that's all I need at that point. So, I lay it out so I can see both lists and compare away, without losing the larger workspace in the primary application.
      Or maybe one is performing a task - by just displaying a portion of its GUI, I can monitor that task without losing a potentially large portion of my desktop for its full UI.
      The day a desktop GUI bans me from overlapping windows is the day I look for new GUIs.
    • by hattig (47930)
      One good reason for the emergence of overlapping windows: low screen resolutions. You didn't have a choice when you were running at 512x384 or 640x480.

      It is the brain-dead operation of the GUI in Windows (active window has to be on top) that necessitates such nasty hacks as this. A desktop that allows the active window to be behind another window removes this necessity altogether (for when you are e.g., copying text from one window into another).

      Other good systems include multiple desktops, as provided by all good X Windows Managers and various windows hackons. Amiga Screens were another great system. Screens and multiple desktops are like having a large desk (plenty of space to spread your pens, paper, notebook, encyclopaedia, etc), whereas Windows by default is like trying to do all your work on a desk the size of a mousepad.

      There are times of course when overlapping windows are not required. Multiple webbrowser windows when a tabbed interface within a single browser is adequate, for example. Need to display 2 web pages at once - explicitly open two windows, or split the current web page view in two horizontally or vertically, a function provided by Konqueror.

      • It is the brain-dead operation of the GUI in Windows (active window has to be on top) that necessitates such nasty hacks as this. A desktop that allows the active window to be behind another window removes this necessity altogether (for when you are e.g., copying text from one window into another).



        I'm guessing that Microsoft has more time and money to spend on UI research than you do, which is the context for your off-the-cuff judgement that they are "brain-dead". The desktop tricks that you describe are all very nice, but they disrupt the continuity of the desktop metaphor. In other words, they stop it from being the case that what you see on the screen is an accurate representation of your workspace. And it turns out that preserving the metaphor is more important for usability than occasionally requiring a few annoying switches between windows.

        The principle is called "designing for the common case". Sure, it can be useful to have active windows not on top when you're copying text from one window to another, but what about when you're not? Usually, when you want to activate a window, you want to bring it to the front at the same time, and you want to be able to do so with a single click anywhere in the window. Microsoft sets itself up this way because they've done actual work to find out whether it's better or not, rather than ad hoc theorising.

        Go on then, is it quicker to use keyboard shortcuts or the mouse?

  • by The_Messenger (110966) on Monday November 26, 2001 @06:56AM (#2612606) Homepage Journal
    Slashdot likes Enlightment and the whole mess of other useless XFree86 GUI toys. Slasdot also likes MacOS X. Plenty of absolutely useless graphical gimmicks (i.e. fully transparent terminals with anti-aliased text shadows), but we rejoiced when it was released.

    But when some Windows-weenie slaps together a VB control in five minutes to do the same thing in Win2k, the readers get all bitchy and start complaining about how "useless" it all is. Well, duh. But why didn't you complain about MacOS X's uselessness too?

    I object to this story, too, but for a completely different reason: this isn't news. Windows 2000 has always had the ability to display transparent and translucent forms. Windows 2000 can do a whole load of other useless things with forms, too. Ask any Delphi developer -- I can't stand Delphi myself, but a lot of my friends use it -- and he'll show you dynamic desktop magnification and a bunch of other demos that the development suite comes with. It's not news. It may be news to Slashdot's "We only use Windows for games, and Quicktime, and word processing, and financial apps, and graphics work, and email, and web surfing -- but we use Linux for writing Perl scripts, so we're hackers, right?" loser crew, but it's not news to anyone else.

  • by Turmio (29215) on Monday November 26, 2001 @07:00AM (#2612617) Homepage
    In case the server can't handle the /. effect, here's a mirror of the screen shot: http://shakti.tky.hut.fi/slashdot/glass2k-screensh ot/ [tky.hut.fi]
  • Ho Hum, Already Done (Score:5, Informative)

    by under_score (65824) <mishkin-slashdot@berteig . c om> on Monday November 26, 2001 @07:11AM (#2612638) Homepage
    Over a decade ago in the NeXT computers. Transparency (alpha-channel) was part of their graphics system (including their windowing system built using Display Postscript), pretty much from day one. I wrote software which depended on it - some funky drag-n-drop stuff which used transparency in icons. It was fast back then on a 25MHz 68040 - eighty times slower clock speed than todays high end processors!!!
    • by spicyjeff (6305)
      This was carried over into OS X [apple.com] and its Quartz graphics layer since its inception.
    • And now this same system is now in use in Mac OS X. It's pretty neat. The title (and tool, I think) bar of each window in the background is transparent. You can make your CLI transparent. The clock app they ship can reside on your desktop at different levels of user-configurable transparency. The dock background is transparent.

      It's pretty neat.
    • by spitzak (4019)
      Fairly true, however there are two "alpha compositing" systems of interest.

      One is rendering with alpha, into a window. The result is an image that shows the result of the rendering. You can set your "paint" to transparent, and fill a shape, and the resulting image shows a mix of your paint and what was there before. But you cannot then seperate it and recover the image that was there before you painted it. This is what NeXTSTep's PostScript rendering interface provided (though it was more complex than it should be).

      The system being shown here is dynamic compositing of window images to the screen. You can recover the behind image (move the front window away and it reappears without the application having to redraw it). NeXTStep did have the main portion of this, which is a off-screen backing store (or double buffer, or pixmap, or whatever you want to call it). However they always composited it as though the window was opaque. They could have added this alpha fairly easily. One obvious effect was that NeXt could do opaque window drags on hardware that was MUCH too slow to do it under X or Windows.

      As far as I can tell, alpha-based rendering and this alpha windowing are completely different and unrelated systems. You can have either one without the other.

      Also another common mistake: NeXT did not use "Display PostScript". NeXT used a much superior system (though I liked NeWS better) where the creation of windows and management of them was done with PostScript as well.

  • There has been a program out since one of the betas of Win2K called Transperizer--it no longer seems to have an official homepage (as in development has apparently stopped), but there's a review here [voodoofiles.com]. It allows you to set certain windows as transparent based on their window titles.

    In other words, this seems kind of like old news--though I'll probably try it out, since I haven't tested WinXP's transparent window code.

    ~=Keelor
  • PowerMenu (Score:3, Informative)

    by TummyX (84871) on Monday November 26, 2001 @07:25AM (#2612654)
    It's not a big deal. I don't see why this story is on the front page.

    I wrote a small free app called PowerMenu [zdnet.com] which does the same thing and more. It extends every window's system/controlbox menu with new options like always on top and transparency.
  • by frleong (241095) on Monday November 26, 2001 @07:25AM (#2612655)
    It's very easy, suppose that hwnd is your window handle:

    SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED); SetLayeredWindowAttributes (hwnd, 0, 180, LWA_ALPHA);

    GUI programming in Windows is quite snappy.

  • by Dynedain (141758) <slashdot2 AT anthonymclin DOT com> on Monday November 26, 2001 @07:27AM (#2612659) Homepage
    Sure, this stuff has been done before on other operating systems. Sure, Win2k has had it hidden in the API. THE POINT IS that this is being done by your GRAPHICS CARD....nothing on the processor end. Oh, and its a 54K yes 54K download, and is easy to use. Calm down people. Why start flaming someone without ever checking out what it is?
  • Glass and icing (Score:5, Insightful)

    by viktor (11866) on Monday November 26, 2001 @07:30AM (#2612661) Homepage

    There might be a very good reason it's taken two years for the glass-like windowing system. And that would be that it isn't a good idea.

    Sure it looks pretty. It's technically cool. It's very nice eyecandy. But useful? Hardly.

    If our desktops were three-dimensional, there would be a point - in that case you could refocus on a window below your current. When refocusing, the frontmost window would be so blurry to you that it didn't interfere with your view of what was behind it.

    But desktops aren't 3D (and "fake" 3D doesn't work, refocusing requires that your desktop is not displayed on a single plane, as that plane only has one focus), and you can't refocus. What you get is just a blur of all windows that happen to be ontop of one another (and the background if you have a background/wallpaper image).

    I would guess that the only time that transparent windows help is if you have an OS/wm that does not offer workspaces or similar. The transparency might help cram an extra three windows onto the screen. Using workspaces you can just put those extra three on another workspace instead.

    I have yet to see anybody argue how great it would be if all books were printed on plastic rather than paper, so that we could see through them.

    • What you get is just a blur of all windows that happen to be ontop of one another (and the background if you have a background/wallpaper image).

      Yeah, and it's bad to have a display that supports "color", because it's hard to edit text that is constantly flashing in rainbow colors while you're working.

      I wonder if there is any possibility that there are cases where not all the windows have to be transparent all the time? Consider an application-switching mechanism that lets you hold a key to fade all windows, at which point you can select a window to bring to front. It then becomes opaque, and you continue working.

      • Yeah, and it's bad to have a display that supports "color", because it's hard to edit text that is constantly flashing in rainbow colors while you're working.

        The main difference there would perhaps be that examples and screenshots for the color displays generally do not include flashing rainbow text, whereas just about every example use and screenshot of transparent windows I've seen this far has text that cannot be read because the contents of the window below interferes.

        That might of course be an error of the "screenshotters" rather than the functionality in itself. It could also be a strong sign that there really aren't all that many good things you can do with it.

        Consider an application-switching mechanism that lets you hold a key to fade all windows, at which point you can select a window to bring to front.

        This is honestly the first example use of alpha-blending windows I have ever seen anybody mention. I would still prefer workspaces, which IMO unnecessitates (sp?) this functionality, but I can see that somebody definately could find that useful.

        I would still choose to implement workspaces before alpha-blendable windows. But there is of course the additional effect that alpha-blendning is a lot cooler than workspaces, and therefore more fun to implement.

        Unfortunately, everybody is raving on about transparency and how cool it is, apparently without even thinking about how it would make anything better. So perhaps I should just ask for more examples of how alpha-blending in the Windowing System improves usability.

  • PowerMenu [zdnet.com] has given this for months (years?) on the corner menu of each window, as well as the option to set OS priority, and windows Always On Top. Essential stuff to have around.
  • Screensaver (Score:3, Funny)

    by pacc (163090) on Monday November 26, 2001 @07:52AM (#2612699) Homepage
    If you don't use a screensaver, eventually your windows desktop will be burnt into your monitor with disastrous results [chime.tv]
  • Transparency in user interfaces is a pretty old idea. The only thing that is "new" about it is that Windows now has it. Using pure transparency by itself can be a bit confusing. But there, too, people have thought of lots of useful additional visual cues: you can blur contents of the window behind the top window, you can desaturate it, and/or you can reduce its intensity range.

    Some X11 environments have faked various forms of transparency. Now, X11 supports alpha channels, but I'm not sure whether it actually allows partially transparent windows (does anybody know?). In general, the feature seems to be more eye candy than useful. Transparency is primarily useful for 2D and 3D graphics within an application, not for windows and other user interface components.

  • and why exactly should we be drooling? Oh yes, because our venerable X11 can't. A few windowmanagers have hacks to enable something like it (enlightenment with Eterm for example) but its just painting a shaded section of the current wallpaper a window's background, not real, actual transparency.

    And until we all get supercomputers on our desks, rewrite X or ditch it entirely for something that isn't old and bloated we're going to carry on losing on the eye candy front.
  • Its buggy... (Score:3, Informative)

    by glenebob (414078) on Monday November 26, 2001 @08:16AM (#2612746)
    Well, it is nifty, I'll give it that.

    But, I can't find a use for it so far. Maybe if it could make *all* of those 'about' boxes semi-transparent, but there's no way it could know what's an about box and what isn't. Nothing else I tried looks useful in a transparency.

    And, it's buggy, or apparently so. After about 10 seconds' thought, I think it's Windows that's buggy. Big surprise there. The Windows console window won't do transparency at all, and sometimes it even draws incorrectly when it's behind a transparent window. It doesn't work with Media Player; in transparency mode, the movie window goes black, and sometimes bringing it out of transparency mode doesn't fix it. Quake3 won't show transparent. Ultima Online flickers badly and slows waaaay down in transparency. Hmmm, DirectX/OpenGL interfering perhaps? Buggy video drivers? So typical.

    Wouldn't it be cool if it could make all the menus fade in and out? *rolls eyes*
    • The "bugginess" is mostly Windows' fault. All the program does (simply put) is grab a window handle and make a handful of API calls.

      Yeah, console windows don't work right. They don't really play nice with the rest of the desktop. I'm not totally sure why (other than "console windows are some sort of bad OS hack"). Ever notice that a console window doesn't get the new style border and icons like every other window in WinXP? (If you don't have XP, then trust me on that one.)

      With Media Player, it's probably something to do with the fact that they're probably using an overlay surface. Besides, could you imagine trying to real-time alpha blend a movie? Ouch.

      DirectX and OpenGL probably expect to have full control of the video subsystem, at least in their little playground. Hijack that and I can't imagine that they'd want to be real nice about it.

      By the by, why would you want to play a game on a translucent window anyway? It seems kinda silly to me. Not as much for UO than Q3, but still... While it's useful at some level (HUDs and the like), I wouldn't want my action screen to be translucent. ("Why won't this creature die?!" 'Dude, that's an icon.')

      While the usefulness of the program is still limited, it not as bad as you think.
  • by Otis_INF (130595) on Monday November 26, 2001 @08:22AM (#2612752) Homepage
    I just installed it on my Win2k box with ATi Radeon 32MB DDR and v3276 drivers and it runs very smooth, the windows are draggable with content at full speed on 1600x1200x32bpp. A year ago, some registry hacking tool did this too, but then all drivers were software rendering the alphablended windows and it was dogslow. However making Internet Explorer semi transparent isn't that fast. I guess (but do not know for sure) IE is redrawing the complete page every time something changes in the window (like typing in an edit box).
  • Okay, this story makes it offical... I'm the only person who wants a desktop that is quick, and extremely easy to use, and doesn't give a damn about how sleek it looks.

    From anti-aliased fonts, to theme-able browsers, to transparent windows, I still don't give a damn!

    If there is anyone else out there that wants a fast and extremely intuitive and easy desktop, use XFce. [xfce.org]
  • I'm using fake transparency with tint on my Eterms, and it's a lot better looking than that screenshot. Mainly because the top terminal is actually readable (only the background shows through, not other windows) -- the screenshot for the win32 Glass thing is a muddled mess.

    Bander

  • ...is to can make a window larger than your desktop, 100% transparent, and always on top.
  • by ortholattice (175065) on Monday November 26, 2001 @08:55AM (#2612818)
    Translucent windowing has also been in Linux; here is an example [hypermart.net] (not mine; look it up on Usenet). (Warning: Partial nudity.) I don't know how it compares since the site referenced in the article has been slashdotted.
  • Cute toy (Score:3, Interesting)

    by Quila (201335) on Monday November 26, 2001 @09:11AM (#2612859)

    It looks like one of those things you install for a couple of minutes for the gee-whiz factor, and then delete. Worthy of a front-page story? Maybe on a slow day -- it is cute -- but:

    I've been waiting for this for 2 years now -- a REAL glass-like windowing system. And yes, it's Microsoft to do it.

    Seriously, where has 'visnu' been, and why isn't Timothy editing? This maybe a first for MS, but from its inception, Mac OS X has had not just alpha blending, but a completely new compositing system has been a central feature of Mac OS X from inception. And they didn't just slap alpha blending on current windowing, making it harder to use or just to make it do cute my-mouse-has-a-shadow tricks, they integrated it into the usability of the desktop.

    Strange to see a /. story claiming MS innovation where there isn't. You'd think it would be the other way around.

    • This maybe a first for MS, but from its inception, Mac OS X has had not just alpha blending, but a completely new compositing system has been a central feature of Mac OS X from inception.

      And MacOS X does the alpha blending in the CPU. This item is news because it is being done on the graphics card -- no CPU hit.

      I know this reply is redundant, but so are all these goddamn MacOS X whining posts.
  • Pop-ups (Score:3, Funny)

    by Ratbert42 (452340) on Monday November 26, 2001 @09:30AM (#2612914)
    Maybe they could fix it so it makes all those porn/X10 popups transparent.
  • I know that part of the Object Desktop package has been doing this for a long time now. http://www.stardock.com/ The package in question, IIRC, is DesktopFX. Neat toy, but nothing really that useful or newsworthy, more useful than the 'fake' alpha blending most commonly seen in nix (only blend with the root window, ignore all others). For nearly real alpha blending, you could use KDE and use mosfet's (www.mosfet.org) liquid theme and at least have alpha blending on the menus. The reason I say almost real, is that while it does blend against windows as well as the background, it only blends against the screen as it was when it was first drawn, if background changes, the liquid alpha-blended menu does not. Xrender hints at the ability to do true alpha blending w/ hardware help, but I haven't seen it actually used for anything except AA-text.

    While Alpha-blended windows give nifty screenshots and initial "ooh" factor, people switch it back off in moments because it really makes programs harder to use in the long run. It's hard enough to make sure colors within an application always have text that is readable against the background without other applications lending their colors to further mess things up.
  • by Forager (144256) on Monday November 26, 2001 @09:32AM (#2612923) Homepage
    I'm running the program in Win2k right now on my 950 Duron/256MB SDRAM/32MB GeForce2 box, and the slowdown is pretty mild. To be certain, Internet Explorer scrolls down in spurts instead of smoothly like it did before, but beyond that I really can't complain.

    Uses for it? None as of yet. But that probably has to do with the fact that I just became aware of its existence about twenty minutes ago. This is one of those things that I'll keep running in the background and FIND uses for. Some time, maybe a week from now, I'll be working with a program and say "hey, transparency might help me out here," so I'll fire up my little 54K download here and get it running, and BOOM! there it is. Who care's if its not practical yet. Just wait until you need it; then you'll see just how practical it can be. Besides, for 54K what's not to like?

    ~Forager

    Quick after thought: I've already got it running, making my taskbar semi-transparent; I have it set on the left side of my screen, so when it pops up to announce a window update it gets annoying if it's directly over my text or whatever; on 30% opacity, it's much less annoying. Little things like this will make me glad I spent all 20 seconds (56k connection here, people) of my life it took to download this utility.
  • by SimHacker (180785) on Monday November 26, 2001 @09:52AM (#2612970) Homepage Journal
    The classic papers on transparent user interfaces include Toolglass and Magic Lenses: The See-Through Interface (1993) [nec.com], and A Taxonomy of See-Through Tools (1994) [nec.com].

    The pie menus in The Sims [piemenu.com] use a combination of desaturation, darkening, and alpha blending to feather the edges of the menu.

    Why transparency and the other effects? I didn't want the pie menus to obscure too much of the scene behind them. You can see through the pie menu as the animation continues on in real time behind it. The head of the currently selected person is drawn in the center of the pie menu, and follows the cursor by looking at the currently selected item.

    I found it necessary to somehow separate the head from the rest of the scene, otherwise it looked like a giant head was floating in a room of the house! Drawing a solid opaque menu background would obscure too much of the scene. But even a partially transparent menu background still did not visually separate the head from the background scene enough. It looked muddy and cluttered, instead of crisp and bright.

    So instead of simply alpha blending, I actually made it desaturate the background (removes the color so it's gray scale), and darken it (like casting a colorless shadow).

    I wanted the colorful head to look sharp and bright up against the dark gray background. So the effect looks at the Z buffer to clip out the head in the menu center, so it remains bright and colorful against the dark gray background. That gives it visual "pop" that separates the head from the background. The edges of the effect are feathered, so there's no sharp line dividing the inside and the outside of the menu (useless visual clutter).

    The gray shadow just gradually tapers off with distance, suggesting that the pie menu active area extends to the edge of the screen, not confined to the borders of a circle. The labels are drawn with high contrast drop shadows around the pie menu, so they stand out and easy to read, partially overlapping the shadow so they're look like they're part of the menu.

    There's special code to perform that particular combination of pixel filters in real time, to every frame just after the 3D rendering phase.

    The pixelated censorship effect works the same way as the pie menu shadow, like a Photoshop filter run after the 3D rendering phase. There's a special suit type that's tagged as a "censorship" suit. It consists of bounding boxes attached to the varius bones of the skeleton that you can select to censor. So if you just want to censor the head, you attach the head censor suit to the head bone. The 3D character renderer transforms the 8 vertices but doesn't draw anything, and stashes the screen bounding box away for the pixelation filter to draw later. That's how it can censor just the crotch of naked men, but also the chests of naked girls gone wild.

    -Don

  • What we really need is an option to lock a windows draw order to the front, but send it's click focus to the back (or normal layering).

    This is extremely useful for apps that I want to use as "window decals", like resource meters, winamp, AIM, etc.. I want them overlayed onto my screen. BUT. I dont want them to have click focus, cause then they get in the way of the foreground app. I want them draw over everything, so I can see them, but I rarely need to interact with them. If I do, I just bring them to the foreground (click focus) like I would do normally.

    Doesn't that make more sense?
  • Stardock's Object Desktop does this, IIRC. I wouldn't have any first-hand experience, since I don't use Microsoft products, and haven't for a very long time.
  • Now I can have a slideshow running in the foreground, but still see through it to the stuff I'm working on. That's about the only cool use I can think of for this, but it's a good one, no?
  • Algorithm:
    (1) Pre-compute all combinations of background & foreground.
    About 655536 entries per channel.
    (2) Just use lookups to compute result (foreground 8 ) | background.
  • by John_Booty (149925) <johnbooty@bootyp ... g ['ct.' in gap]> on Monday November 26, 2001 @11:19AM (#2613309) Homepage
    To me, translucency in apps would be much more useful if you could have varying levels of translucency within the same app. For example, when you make a text-editor window transparent, it gets really hard to read because the text gets transparent too.

    So it would be nice to vary the translucency of window text/icons separately from the rest of the window, if desired.
  • by Mustang Matt (133426) on Monday November 26, 2001 @02:02PM (#2614266)
    We can finally make pop up adds truly disappear!

Those who can, do; those who can't, simulate.

Working...