Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: motorollin on July 06, 2007, 09:29:58 AM

Title: Transparency
Post by: motorollin on July 06, 2007, 09:29:58 AM
This is a follow on from my AmiNetRadio Skins thread. I am wondering why it seems to be impossible for applications to support transparency on Workbench 3.x? We have had transparent icons for years, and PowerIcons/AfA-OS enhances this with multiple alpha channels. So why can't VisualPrefs, AmiDock and others support transparency?

--
moto
Title: Re: Transparency
Post by: Crumb on July 06, 2007, 09:37:06 AM
@motorollin:

it probably would require updated intuition/graphics libraries. AROS already does that so maybe AfA (AROS for AmigaOS) could do it. You could try to recompile "kitty" demo from AROS. It shows the AROS mascot in a transparent window that allows you to see through the empty parts. I mean, it shows the image without borders as a non-rectangular window.

Ask Bernd Roesch (the AfA author) about it, I guess that it shouldn't be too difficult to add.

Running AmiNetRadio with a non square skin would be cool :-)
Title: Re: Transparency
Post by: Oli_hd on July 06, 2007, 10:00:26 AM
Didnt magic workbenches do it with the right mouse button menu?
Not exactly the same but it shows it can be done.
Title: Re: Transparency
Post by: motorollin on July 06, 2007, 10:16:05 AM
I had a feeling AfA-OS would be able to do it. It would be really great if AROS's skinning engine could be backported to AmigaOS as a replacement to VisualPrefs.

Where would I get the source for the Kitty demo? Is there any instruction on how to compile it? I have not experience of compiling software on an Amiga.

--
moto
Title: Re: Transparency
Post by: motorollin on July 06, 2007, 10:18:45 AM
@Oli
I think MagicMenu did transparency. Also the borders round icons have been transparent since before AfA-OS, and PowerIcons doesn't use AfA-OS and that supports transparency. So although AfA-OS can probably do it, I don't think it is the only way.

--
moto
Title: Re: Transparency
Post by: motorollin on July 06, 2007, 11:39:53 AM
I have contacted Bernd Roesch to see if there is any way that AfA can be used to enable transparency in other applications. I'll summarise any reply I get here.

--
moto
Title: Re: Transparency
Post by: cv643d on July 06, 2007, 12:05:27 PM
I dont think the transparency in Magic menu is real transparency. IIRC it copies what is behind of the menu and puts it in as the background of Magic meny. So if anything behind Magic menu updates in realtime the "transparent" image will be static.
Title: Re: Transparency
Post by: motorollin on July 06, 2007, 12:07:18 PM
I see. So it's fake transparency :-) I assume AfA uses real transparency. I hope we will start to see 68k Amiga apps which require AfA, and which will take advantage of AfA's advanced features.

--
moto
Title: Re: Transparency
Post by: Karlos on July 06, 2007, 07:43:06 PM
Are any of the transparency effects genuine?

As far as I can see, for transparency to work properly, layers.library would have to make sure occluded parts of windows were still drawn and graphics.library would have to support alpha blending for rendering calls. For all this to be quick, ideally you'd need hardware rendering too, since reading back from video ram (ready for software rendering) is like walking in quickset cement on most amiga graphic cards.
Title: Re: Transparency
Post by: motorollin on July 06, 2007, 07:50:20 PM
Who cares if it's real or simulated, as long as it works and is fast?

--
moto
Title: Re: Transparency
Post by: weirdami on July 06, 2007, 09:02:26 PM
I think there was "transparency" since the first A1000, only nobody used it. It was more like genlock or chromakay type deal. I remember reading about it being demonstrated at some place like Comdex or something when A1000 was still in wire wraps. You were supposed to be able to see through the current screen down to the one under it I think.
Title: Re: Transparency
Post by: cv643d on July 06, 2007, 09:03:10 PM
The best use of transparancy of windows I have ever found is when I run MSN Live at work. I can set the transparancy on any window so I set it to 5% visible for MSN. So when my boss comes in he can not see the MSN window because it is so blended into the background.

Other than that use transparant windows are just a pain to use IMHO. Messes up your head when you can see through windows.
Title: Re: Transparency
Post by: itix on July 06, 2007, 09:33:02 PM
What kind of transparency you mean and where? There is no support for transparency in layers.library and thus it is not possible have windows with transparency unless you hack it into programs. Icons are rendered by programs and there it is easier.



Title: Re: Transparency
Post by: itix on July 06, 2007, 09:41:35 PM
I doubt AfA supports "real" transparency (translucency) since updating contents behind translucent layer is great pain without HW acceleration and support from the system. AfA extends CGX with WritePixelArrayAlpha() function which makes it easier to draw images with alpha channel, though.

In menus not having real translucency is not great deal anyway (to most users).
Title: Re: Transparency
Post by: quenthal on July 06, 2007, 09:48:02 PM
How versatile are Feelin's window decorations? Can't remember now, but I think they had BeOS like window decorations (I could be wrong on this), which would indicate that it could make non-rectangle windows?

However, I'm not sure what kind of transparency is meant here - partial transparency which for example Magic Menu is imitating, or just non-rectangle windows?
Title: Re: Transparency
Post by: Karlos on July 06, 2007, 11:45:48 PM
Quote

motorollin wrote:
Who cares if it's real or simulated, as long as it works and is fast?

--
moto


That depends on what you mean by "works". If you want visible changes to things behind your (partially) transparent window to "shine through" in the same way it does on Compiz/Beryl/OS-X/Vista etc., you need support for it in layers.library and graphics.library, as I said.

If you then want it to be fast as well, then you are ****ed, unless all the RTG drivers get reimplemented to support hardware rendering for the newly added features to said libraries. Doing it in software on existing systems is cringingly slow in comparison, since every pixel in the affected has to be read from the video memory, blended and written back.

In the absence of HW accelerated rendering, the best solution would actually be to have layers.library reimplemented to have a compositor system in fast ram where all the occluded areas can be processed and then the final result written to the display. That still has a big overhead, though its not as bad as reading areas from video, blending them and putting them back.

Either way, you need a lot of work on layers and graphics.
Title: Re: Transparency
Post by: motorollin on July 07, 2007, 09:03:44 AM
I'm not talking about totally transparent windows. I just mean, basically, non-rectangular windows. So VisualPrefs themes with rounded corners, transparent dock, AmiNetRadio themes with transparent backgorunds etc.

--
moto
Title: Re: Transparency
Post by: itix on July 07, 2007, 11:27:56 AM
Quote

I'm not talking about totally transparent windows. I just mean, basically, non-rectangular windows. So VisualPrefs themes with rounded corners, transparent dock, AmiNetRadio themes with transparent backgorunds etc.


It requires that layers system supports transparency. Windows are defined as a rectangle (x1,y1 to x2,y2) and that is how they are. You need an API extension to define window shape.

Transparent (translucent) dock is possible in 3.9 but without support from the operating system it is tricky and does not always work well.
Title: Re: Transparency
Post by: A4000_Mad on July 07, 2007, 11:45:19 AM
Well this is way over my head but I did previously ask Stefan Robl the creater of Amidock (http://www.qdev.de/?location=amiga/amidock) a couple of other questions:-

What would be  involved for someone other than yourself to make the OS3.9 version  transparent?

Quote
Stefran wrote:
AmiDock for OS4 uses some OS features to allow the transparency. It  
would be doable whith some bigger drawbacks on OS3.9 as well but it  
certainly is not on my radar... sorry!
I have no plans to release the source code of AmiDock for OS3.9.


Any chance the version from OS4 that supports transparency could be put into OS3.9?


Quote
Stefran wrote:
No, the code base of AmiDock for OS4 was never meant to being  
compatible with any OS version below 4.0... please note that AmiDock  
now heavily relies on the application.library and new inituition  
functions... porting AmiDock would mean a rewrite or to port the  
whole OS4 to 68k.

I am sorry that I wasn't able to help you...

Title: Re: Transparency
Post by: motorollin on July 07, 2007, 01:07:26 PM
Quote
Stefran wrote:
porting AmiDock would mean a rewrite or to port the whole OS4 to 68k.

Yeah! Someone do that! :-P

So what we're saying is that without (hacked) support from layers.library for non-rectangular windows, any layers.library window transparency is going to be a hack which maps whatever is behind the window in to the transparent areas to give the effect of transparency (slow and no refresh if something behind the window changes)

*However* I have had a response from Bernd Roesch confirming that AfA's graphics features (including transparency) can be used in any 68k AmigaOS application. While this doesn't help for Workbench windows (unless layers library can be patched/replaced to use AfA instead) it does mean other apps like PolyNetNG as a dock replacement could be made transparent.

Bernd did send me some example code but it made little sense to me. I can post it if anyone is interested in seeing it.

--
moto
Title: Re: Transparency
Post by: DariusB on July 07, 2007, 04:23:17 PM
Quote

A4000_Mad wrote:
What would be  involved for someone other than yourself to make the OS3.9 version  transparent?


For me, i didn´t know the OS4 Version of AmiDock, but AmiStart is also able to act like a (Horizontal) DockBar and supports (Faked) Transparency, Textures and on OS4/AROS also the possibilities of the new Layers (nonrectangulart windows)

http://aros-exec.org/modules/xcgal/displayimage.php?pid=189&album=lastup&cat=10469&pos=1
http://aros-exec.org/modules/xcgal/displayimage.php?pid=214&album=random&cat=10469&pos=-214
http://aros-exec.org/modules/xcgal/displayimage.php?pid=162&album=random&cat=10469&pos=-162


if something is missed, i can try to implement it.l
Title: Re: Transparency
Post by: motorollin on July 07, 2007, 05:00:49 PM
Those screenshots look really nice! Does AmiStart fake transperency under AmigaOS 3.x as well as AROS? Is there any chance of implementing support for AfA in the AmigaOS 3.x version to allow non-rectangular windows?

--
moto
Title: Re: Transparency
Post by: DariusB on July 07, 2007, 05:29:07 PM
Quote

motorollin wrote:
Those screenshots look really nice! Does AmiStart fake transperency under AmigaOS 3.x as well as AROS? Is there any chance of implementing support for AfA in the AmigaOS 3.x version to allow non-rectangular windows?

--
moto


Yes it fakes it, it´s not possible other than that at the moment, for real transparency layers must be updated. Faked meant that the background was readen and wroten back (with manipulating it). If the background changes or a window is moved behind the faked transparent window it´ll not be updated. It´s possible to do real transparency but it´ll eat much much resources and need all Apps to use SmartRefresh.
windows and´ll be refreshed delayed .

Nonrectagular are not really needed for alpha-channel transparency, that meant when you need nice outlines with alphachannels, support for non rectagular windows must not be existing, when you want to use hard transparency a non-rectagular window is a good solution for that.

If AfA adds AROS intuition to 68k, than a update for nonrect windows is a short term.
Title: Re: Transparency
Post by: motorollin on July 08, 2007, 08:58:23 AM
@DariusB
I have just downloaded and installed AmiStart. When I run it, I just get a grey box in the bottom left hand corner which seems to function as the "start" menu. I can't figure out any way to configure the application, and I can't find any instructions in the guide about how to do this. Can you tell me how I would go about configuring the application to function as a transparent dock?

--
moto
Title: Re: Transparency
Post by: DariusB on July 08, 2007, 10:12:32 AM
Quote

motorollin wrote:
@DariusB
I have just downloaded and installed AmiStart. When I run it, I just get a grey box in the bottom left hand corner which seems to function as the "start" menu. I can't figure out any way to configure the application, and I can't find any instructions in the guide about how to do this. Can you tell me how I would go about configuring the application to function as a transparent dock?

--
moto


First i must told that AmiStart only works with Hi/Truecolors views, 2nd the Version on my Homepage is very outdated and is not able to simulate a Dockbar, either you post me an message (d.brewka(a-t)freenet.de) to get a new or you use the version from AmiKit which is nearly the same.

AmiStart didn´t use a configuration editor like AmiDock, items could be added by dropping them from your workbench (in the Popupmenu you must switch on Edit in the Drag&drop) entry.

On my Homepage there is also a HTML documentation for AmiStart but you can post me an email and i´ll send you a newer Version of this Doc.

However i´ll release a new AmiStart in the next weeks.

A warning, if you want to use a fast and short Applauncher AmiStart is a worse choice, it´s nothing for Real 68k Hardware but for WinUAE it´s nicely useable.
Title: Re: Transparency
Post by: motorollin on July 08, 2007, 10:20:45 AM
Email sent :-)

--
moto
Title: Re: Transparency
Post by: unusedunused on November 20, 2007, 08:33:11 AM
>Is there any chance of implementing support for AfA in >the AmigaOS 3.x version to allow non-rectangular windows?

If you have a CGX 68k system, non-rectangular layers are support, see history of CGX.Is in since CGX3

now is new AFA skin system release and skin system support alphablend and so too round egdes.the buttons can move to every place you want, so from skin systems there is no Problem to make skins that work on CGX for 68k with round edges.

But i dont know if non rectangular layers work correct on CGX 68k.

but P96 on 68k does not support non rectangular layers.
I use only P96 so i must develop blind with testers of CGX system.

When there is somewhere a CGX example, how nonrectangular layers work i think it is easy to add to the openwindow function a layershape.

AROS layers library do nonrectangular layers too , can compile for AFA OS but they did not run correct when boot.
Only when start later after boot work AROS layerlib in AFA.

Because layer management is the complicatetst Part of AOS for me and maybe cost lot time, i do more usefull stuff before.

i think i bring afa skin and zune final on the road and then i look closer to layer library.

Title: Re: Transparency
Post by: motorollin on November 20, 2007, 03:20:11 PM
Quote
bernd_afa wrote:
now is new AFA skin system release and skin system support alphablend and so too round egdes.the buttons can move to every place you want, so from skin systems there is no Problem to make skins that work on CGX for 68k with round edges.

Just to clarify, is this working and available now? What skins does it support?

--
moto
Title: Re: Transparency
Post by: unusedunused on November 20, 2007, 04:33:13 PM
no it dont work yet, only if i get code how to set a mask with CGX 3 for 68k.

Or how can do on MOS.i think MOS CGX use same way to use nonrectangle layer

Ken have paint round edges for looking glass skin , as far i remember for test some times age, but currently the edge is round but there is on this round place no background show
Title: Re: Transparency
Post by: leirbag28 on November 20, 2007, 06:40:16 PM
@motorollin

I could be wrong, but no Amiga does Transparency..............what your probably seeing is the menu gets dithered or pixels are eliminted so that you can see through it.  Like for example.....grab an icon on the desktop is OS3.9 and drag it around the screen...........you can see through it, but you will also notice it is not as solid as it was before........pixels have been elimintaed......it has been dithered with color zero.

Real TRansparency requires 16 million colors or a gfx card and higher resolution. But I suspect the effect is done the same way........but because the resolution is higher........you cant see the holes and the image would still look pretty good.  
 Perhaps there is another technique?  I don't know...........imnot even sure I am correct on this matter.

Title: Re: Transparency
Post by: itix on November 20, 2007, 07:11:41 PM
Quote

I could be wrong, but no Amiga does Transparency..............what your probably seeing is the menu gets dithered or pixels are eliminted so that you can see through it.


Not at all. For example MagicMenu implements transparency (translucency) without dithering. Menu is simply blended to the background. It is not real transparency however, the background does not update while menu is open.

With CGX (CGX4?) it is possible have shaped windows but it is not same as transparency...
Title: Re: Transparency
Post by: Piru on November 20, 2007, 08:54:55 PM
@leirbag28
Quote
Real TRansparency requires 16 million colors or a gfx card and higher resolution.

No it doesn't. You can do transparency with 15bit and 16bit aswell. You can even do transparency with planar graphics, and in fact that's quite trivial (you just need to play with the colour palette and you lose 50% of the colours, or alternatively if you can, just add 1 bitplane).

Quote
But I suspect the effect is done the same way........but because the resolution is higher........you cant see the holes and the image would still look pretty good.   Perhaps there is another technique? I don't know...........imnot even sure I am correct on this matter.

The real transparency is done be keeping each individual component in separate bitmap and blitting them together to produce the final resulting screen. This gets quite slow without HW accelerated alpha blits.
Title: Re: Transparency
Post by: unusedunused on November 20, 2007, 09:01:59 PM
>With CGX (CGX4?) it is possible have shaped windows but >it is not same as transparency...

this feature is in cgx3.But i never see a running example for it.

If you can explain how that work or post code or link to code how it work on MOS, is nice.I think CGX 3 and 4 use same technique

Title: Re: Transparency
Post by: Piru on November 20, 2007, 09:07:01 PM
Prayer2 (http://aminet.net/package/mus/play/Prayer2) has shaped windows with groovie_transparent.robe
Title: Re: Transparency
Post by: A4000_Mad on November 20, 2007, 11:41:23 PM
Thanks for giving us the link to Prayer2 Piru :pint:

I've downloaded it and tried to use groovie_transparent.robe, but I get a report "This robe file requires cgxsystem.library v42 or better".

However, if I go into a Shell and type:-

Version cgxsystem.library  

I get "cgxsystem.library  42.0"

Any thoughts on that please? The other problem is when the audio is set to 44.1 it plays in slooooow motion. Do you think that should be the case when using an 060?
Title: Re: Transparency
Post by: unusedunused on November 21, 2007, 08:58:58 AM
@A4000_mad

when you use AFA then cybergraphics get version 45.
but i use that number by random

@Piru

thanks, thats a good tip, i ask the author maybe he give source if he left amiga or help

I dont know on which cgx library version MOS support the writepixelalpha features.

If you can tell me the version number, i can set the library version to that source compatibility is better to MOS

I do that in iconlib for AFA too.
OS4 introduce in V52 iconlib the 32 bit icons, so AFA has too iconlib num > V52.

this allow the picture thumbnail plugin for workbench and dopus magellan eastern for OS4 to work with 32 bit without change of source with only a compile for 68k and same eastern binary work too on non AFA non OS4 final systemes.  

AFA now support in iconlib new tags for scaling, cropping and tiling in iconlib, i name it now V53.