INTERACT FORUM

More => Old Versions => Media Center 11 (Development Ended) => Topic started by: JimH on August 29, 2003, 05:31:09 am

Title: New graphics
Post by: JimH on August 29, 2003, 05:31:09 am
I'm moving this post by Doof to  a new thread.  -- JimH


Quote


Just want to make a note of these for any skinners out there.  You can edit the 32-bit PNG files in [MC]\Data\Default Art and add any sort of alpha effects.  You can also use per-pixel alpha blending in any megaskin item.  Hopefully it'll open the door for some cool skinning effects.


I'll be the first to admit that I'm not the most knowledgeable person in the world when it comes to graphics editting. But... I was looking at a WMP skin last night and noticed that it used PNG files. The PNG files themselves are "oddly shaped" in that it has transparent areas in the image itself. With WMP, there is no need to define a transparent color for window bitmaps, since the necessary parts of the PNG just ARE transparent. (I hope this is making sense). Anyway, MC doesn't seem to handle this the same way. It just assumes all images are rectangular. So areas of the PNG that are transparent just show up as white.

Which brings me back to needing to fill in that transparent area with a color that I can then define as a transparent color. The problem there is, that since these PNG files support alpha blending (and since Photoshop handles alphablending and layers etc), some of the color that I pick is alpha blended with the shadow area of the png file, leaving you with a kind of half-and-half color. Since that color is no longer true to the transcolor I defined, MC displays it.

So am I just doing this wrong? How do you define in a mini-me skin what areas of the png are transparent, and which aeras are alphablended, etc? Should this just be working the way that WMP handles it and I shouldn't have to define a transcolor?
Title: Re: Doof on new graphics
Post by: Matt on August 29, 2003, 05:47:50 am
Media Center does support 32-bit PNG's with their transparent / semi-transparent regions now.  That means you don't need a "transparent color" anymore.

If there are places where the transparency is just showing up as a plain color, let us know and we'll chase it.  We just need to get everything using the new image engine properly.

Thanks!
Title: Re: Doof on new graphics
Post by: Doof on August 29, 2003, 05:54:37 am
Thanks, Matt. I'll double check the PNG's and make sure they're 32bit. That's the only thing I can think of that may be the problem. I'll let you know what I find.
Title: Re: Doof on new graphics
Post by: NoCodeUK on August 29, 2003, 06:20:09 am
This is fantastic news!!  The one thing that has really been hampering me with skinning was that I couldn't get the transparency sorted out correctly...if I can now use alpha blended pings the world is my oyster!!

Adam
Title: :Re: Doof on new graphics
Post by: knickelfarz on August 29, 2003, 06:41:26 am
Doof:
Make sure the background of your images is really transparent... If you make them with Photoshop, don't reduce them to *background*, just reduce to grouped layers, without the background you may need to see the effects inside Photoshop...
Other programs like ACDsee may show the transparency as white... don't be scared  ;)


Matt:
I made a quick test skin... the transparency seems to work only for icons/buttons right now. The TestSkin should have a hole next to the Previous Track button and the Toolbar Menues should have a shadow... but the transparency shows as black.

I edited the "ActionWindowNavigation.png", and the transparency is OK.

Download TestSkin.zip (http://www.futurehome.de/mc/TestSkin.zip)
Download ActionWindowNavigation.png (http://www.futurehome.de/mc/ActionWindowNavigation.png)

Title: Re: Doof on new graphics
Post by: Matt on August 29, 2003, 07:23:55 am
Whenever you alpha blend, you need a background to blend with.

Items that are the background can't have alpha.  They'd need to blend with a window behind MC, which is nearly impossible on non-XP machines.

So, you can use alpha in your button items or other controls that get drawn on a background.  Using alpha in backgrounds (menu back, player bar back, etc.) won't work.

I hope that makes sense.
Title: Re: Doof on new graphics
Post by: knickelfarz on August 29, 2003, 07:27:12 am
Quote
Thanks, Matt. I'll double check the PNG's and make sure they're 32bit. That's the only thing I can think of that may be the problem. I'll let you know what I find.

If your images were made in RGB mode, Photoshop will save the PNG's with 32bit always. Photoshop will make PNG's with lower color resolution only if you use a special color pallet or reduce the images to indexed colors...
Title: Re: Doof on new graphics
Post by: knickelfarz on August 29, 2003, 07:42:02 am
Quote
...Items that are the background can't have alpha.  They'd need to blend with a window behind MC, which is nearly impossible on non-XP machines...


OK, thanks for pointing out  ;)

Will it be or is it already possible with XP machines? I'm using 2K, so can't see if it's working...
Title: Re: Doof on new graphics
Post by: Matt on August 29, 2003, 07:49:18 am
Quote
Will it be or is it already possible with XP machines?


Not now, but maybe in version 10.
Title: Re: Doof on new graphics
Post by: jleerigby on August 29, 2003, 07:51:18 am
This thread makes me feel very much out of my comfort zone.  I think you are all talking a funny language  :D cos I know zilch about graphics.  However,
Quote
5. NEW: Update core graphics component (JRImage) to support per-pixel alpha blending.
6. NEW: MC supports 32-bit PNG files in skinning engine(s). (allows alpha drop shadows, etc.)
7. Changed: No image placeholders in lists now alpha-blended so they stand out less.

Does any of this mean that we can now have skins that show the icons in glorious full color even when inactive?  I think the greyed out icons in MC is a real let down considering how many fantastic skins have been created.
Title: Re: Doof on new graphics
Post by: knickelfarz on August 29, 2003, 07:56:02 am
Quote

Not now, but maybe in version 10.


Cool ;)

By the way... Have you plans to move the AW and toolbar icons back to the skin folders of 9.1? Is it worth to customize them?
EDIT: Maybe JLee can then find sleep again after renaming his toolbar images...
Title: Re: Doof on new graphics
Post by: knickelfarz on August 29, 2003, 08:31:28 am
Quote
Does any of this mean that we can now have skins that show the icons in glorious full color even when inactive?

No.
Title: Re: Doof on new graphics
Post by: Matt on August 29, 2003, 08:37:47 am
But this will allow "glorious full color" even when inactive :)

In just released 9.1.242:
Quote
8. Changed: MC skin can disable toolbar inactive greying by setting InactiveBlend to FFFFFF in the skin XML.
Title: Re: Doof on new graphics
Post by: jleerigby on August 29, 2003, 08:48:50 am
Quote
But this will allow "glorious full color" even when inactive :)

In just released 9.1.242:

I'm getting giddy with excitement. I wish I didn't have to wait over an hour for my dial up to download.

Thanks Matt - your are the man!
Title: Re: Doof on new graphics
Post by: Doof on August 29, 2003, 10:17:51 am
No, I still can't get this to work...

I have a PNG that I know has a transparent area. Photoshop is displaying the transparent area as that white and grey checkerboard that it does. And around one edge of the PNG is an alpha blended shadow area. I'm trying to use this PNG as a window (not the Main window) in my skin.

MC always displays the transparent area as just white. What am I missing?
Title: Re: Doof on new graphics
Post by: Doof on August 29, 2003, 10:38:29 am
Just wanted to point out that I'm not trying to alpha blend this png to the desktop or any other window behind MC. This PNG is a mini-me window that's on top of another mini-me window. So I'm not sure if what you said above to knickelfarz applies in this situation.

Should transparent areas on PNG's work for mini-me windows? Or just the buttons?
Title: Re: New graphics
Post by: Matt on August 29, 2003, 11:18:03 am
Alpha can't be used on the background of any window.  You can only use alpha on the items that sit on top of the background.

Examples:

Scrollbar background: don't use alpha
Scrollbar handles, arrows, etc: use alpha

Playerbar background: don't use alpha
Buttons and display area on playerbar: use alpha
Title: Re: New graphics
Post by: Doof on August 29, 2003, 11:41:18 am
Ok, forget alpha then. Why isn't the transparency working?

Is this no-alpha-on-backgroud-items just an arbitrary rule that's being enforced? Because I think you're shutting out some interesting effects if so.

For instance, I've seen some Winamp 3 skins that have a glass-like window over the song info display. It looks really cool. But if MC won't allow alpha blending on anything that's not a button or control, then we won't be able to do something like this.

In my specific case I have a window overlapping another window. Why shouldn't I be able to alphablend the top one over the one beneath it?
Title: Re: New graphics
Post by: Matt on August 29, 2003, 11:56:56 am
Quote
For instance, I've seen some Winamp 3 skins that have a glass-like window over the song info display. It looks really cool. But if MC won't allow alpha blending on anything that's not a button or control, then we won't be able to do something like this.


Just make the piece of glass a button or picture on the same window.  

The only time alpha can't be used is:
Title: Re: New graphics
Post by: Doof on August 29, 2003, 12:06:39 pm
So in the case of two overlapping windows, I should be able to alpha the one on top, at least in the overlapping area?

And regardless of the answer to that question... We should be able to eliminate the need of defining a Transcolor to define the shape of the skin, yes?
Title: Re: New graphics
Post by: Doof on August 29, 2003, 12:26:35 pm
Ok, to better illustrate part of the problem I'm having (the transparency part)...

Both of these "skins" should behave the same, if I'm understanding all this stuff correctly.

Experiment 1 uses a PNG with out a TransColor added or defined in the XML.

Experiment 2 uses a PNG with a TransColor added and defined in the XML.

Is there some reason that Experiment 1 isn't working?

Experiment 1 (http://home.ne.rr.com/doof/Experiment1.mjs)

Experiment 2 (http://home.ne.rr.com/doof/Experiment2.mjs)
Title: Re: New graphics
Post by: Matt on August 29, 2003, 01:06:49 pm
Thanks for the example.  Looks like mini-me hasn't been updated to properly support alpha yet.

Hopefully you don't mind waiting until Tuesday for a fix.
Title: Re: New graphics
Post by: knickelfarz on August 29, 2003, 02:19:42 pm
I'm a bit confused now...

You say that "Experiment 1" should work, but there is a bug in mini-me. That would mean if you do something similar in MEGA-ME, it should already work.

But why my ugly quick test skin then don't show a hole next to the Previous Track button? It's exactly the same scheme, there is a tranparent part in the "MainFrame_TopBorder.png".

Anyhow, as far as I understood Matt's previous posts, "Experiment 1" and my hole in the "MainFrame_TopBorder" both can not work by design in 9.1...

So I'm a bit confused now... What's the different between "alpha blending" and "transparency" in this case? Is it not the same technique?
Title: Re: New graphics
Post by: Matt on August 29, 2003, 03:14:13 pm
Window regions (used to make a window a funny shape -- or add a hole) are either on or off -- no in-between blending (alpha).  Does that clear anything up?
Title: Re: New graphics
Post by: knickelfarz on August 29, 2003, 03:22:25 pm
Quote
Window regions (used to make a window a funny shape -- or add a whole) are either on or off -- no in-between blending (alpha).  Does that clear anything up?


Matt, thanks for trying to explain...

I think I understood that :P... but what then is the difference between a mini-me funny shape and a hole a Mega-Me "MainFrame_TopBorder"? Is there something in Doofs example I can not see? Both (the hole and the "Experiment 1") are trying to blend with a "non MC" background, and that will not work. OK.

But what has to be fixed to make "Experiment 1" work in mini-me? What is not working in "Experiment 1"?
Title: Re: New graphics
Post by: knickelfarz on August 29, 2003, 05:27:32 pm
Mmh, this really makes me mad ;) But maybe I'm asking the wrong questions...

I made another ugly test skin, a "mini-me": Install MiniTest (http://www.futurehome.de/mc/MiniTest.mjp)

(http://www.futurehome.de/mc/MiniTest.gif)

On the left it shows what's NOT POSSIBLE - alpha blend in front of the desktop. There can not be a shape for the background and there can not be a shadow for the background. They will show up as white/black areas.

On the right it shows what IS POSSIBLE - transparency by a defined transparency color, a "shadow" by a checkerboard trick.

The "Play" button should show up as a round button with a shadow - it does not (in build 242) because of the mentioned bug of mini-me.

The "Stop" button should show up as a transparent button - it does not (in build 242) because of the mentioned bug of mini-me.

Please compare the "test.png", "Button_Play.png" and "Button_Stop.png" (in Photoshop...) with the "look" of the skin on your desktop... As a matter of principle, that's all what's possible / not possible...right?

But, to get back to Doofs "Experiment 1", what should be fixed in mini-me to make it work in another way? There's no button in his example... Am I crazy? :P
Title: Re: New graphics
Post by: Pink Waters on August 30, 2003, 07:38:14 am
the new images for media files in list view are cool but the image for the playing track does not define an imported track from non-imported track
Title: Re: New graphics
Post by: knickelfarz on September 02, 2003, 09:43:37 am
aehm, sorry, but... bump :-)
Title: Re: New graphics
Post by: Matt on September 02, 2003, 09:57:30 am
Yeah, a cross-hatch is the closest thing to a drop shadow you can do. (since it's still either on or off -- no in-between alpha)

Next build will fix the mini-me PNG problems.
Title: Re: New graphics
Post by: knickelfarz on September 02, 2003, 10:07:07 am
Ok :P ;D