Transparencies (Alpha Channels?)

Yes, this has probably been answered before, but will somebody please just straight out tell me how to do transparencies in Photoshop (I have 7.0) and to have them work in coldstone? Is there a way to have an image with both an opaque and a transparent part to it? If you could help me out, that would be great. Getting shadows to work is such a pain :/.

Thanks.

------------------
"Stiney! Get me a danish!"

(This message has been edited by OgreBob (edited 09-08-2003).)

Take a look at the "PNGetc" pdf on (url="http://"http://www.ellrx.com/articles/vault/index.html")ellrx's website(/url). I find his writing style to be very difficult to read (I'm very anal about the proper use of written English) but you may find it useful, and it's the only full writeup I can think of offhand.

Here's my basic understanding of the process - I've made alpha-masked (transparent) pngs that work in Coldstone, but it's been a while, so I'm operating mostly from memory. Note also that I use Photoshop 5.5, so menus and such may be different for you.

Bring up the Channels palette (grouped with Layers and Paths on my system) and use its dropdown menu to select "New Channel..." This will add an alpha (transparency) channel to your image. If you turn this channel on and the other channels off, it will be shown as a grayscale image, in which white represents "fully opaque", black "fully transparent", and the shades of gray are all the levels between.

For soft shadows for windows and such, what generally works is to have the entire "background" around the window be solid black in color, and have the alpha channel fade from near-opaque at the edge of the window to fully transparent further away.

Once you have an alpha channel that appears to be correct, "Save a Copy", select PNG as the save format, and make sure the "Exclude Alpha Channels" checkbox is turned off. This should create a working image.

If you want some example files to see how a valid file should look, take a look at the png files in Coldstone Art Lib -> Medieval Outdoors -> FX_AnimFrames.

------------------
'You can either be on the stage, just a performer, just going through the lines...or you can be outside it, and know how the script works, where the scenery hangs, and where the trapdoors are. Isn't that better?'
-- T. Pratchett

Yes this will create a png graphic. However, CGE has a different interpretation of the PNG format.

All values from 95%-100% despite their hue or saturation will be rendered as white, and thereby completely transparent.

To avoid this and still use values 95% and above, you must must gradiate the alpha mask.
I suggest using any "blur" function.
This means that all images containing white/portions of white will have soft edges, to reduce this use, the Gaussian blur(or its equivalent) set to .4-.9 pixels.

Or Simply use values 94%-0%.

------------------

... bwahhaaaaahaaaaaugh fooooolish sammurai.
{ edit }

(This message has been edited by ellrx (edited 09-09-2003).)

I'd put all the stuff I wanted to be transparent on a different layer and reduce the opacity of that layer

------------------
Pilky
(url="http://"http://www.mcubed.cjb.net")M cubed homepage(/url)
(url="http://"http://scorpius.spaceports.com/~pilky/coldstonecentre/home.html")Coldstone Resource Centre(/url)
Cheesiest film line of all time "Flash I love you but we only have 14 hours to save the earth" from Flash Gorden

Quote

Originally posted by ellrx:
All values from 95%-100% despite their hue or saturation will be rendered as white, and thereby completely transparent.

If you're talking about RGB values, I haven't seen this. I have had no trouble making pure white opaque with the use of an alpha mask. Try using (url="http://"http://homepage.mac.com/glennfield/DialogWhite.png")this image(/url) for an example. It works as a stamp, and it works associated with a dialog. (The shadow is screwy, but that's another matter.)

Or are you talking about 95-100% alpha? In that case, this might well happen, simply due to the 16-bit limitation of the graphics engine... but how visible do you expect something 95% transparent to be, anyway?

------------------
'You can either be on the stage, just a performer, just going through the lines...or you can be outside it, and know how the script works, where the scenery hangs, and where the trapdoors are. Isn't that better?'
-- T. Pratchett

Look at your image, the white is not standing in a significant mass by itself,
the parchment serves as its degrees of gradation.

preserving the white is a 2 step process, it must primarily be done in the RGB channel,
failing this it must be done in the alpha channel.

an example of this was in the 1st beta of kit's abc adventure, the dialog box which was primarily white, was knocked out. it had pure white in the foreground/rgb, and purewhite in the alpha.

I performed numerous tests during the beta period, and arrived at this, i might have submitted something to the list.

If i still have a copy of the premier i will post a screen shot in my next post.

------------------

... bwahhaaaaahaaaaaugh fooooolish sammurai.

Alright no such luck, i do recall giving JAS his preliminary review on the webboard, no matter the problem does exist, be alert.

I expect %% transparent areas to be 5% transparent, not null.

I can tell the difference and I make no haphazard or randomly thrown strokes and i am very aware of the values.
You expect standards in the written interpretation of the english language i expect the same for color.

5% visible is a very relevant value, without it do you expect to see a smooth transition?

visibility is not always even distributed in normal gradation. A popular method of creating effects is to use a solid pattern and paint in the alpha.

imagine if you created something in this layer and it is not rendered.

I will visit this topic no more, forward all responses/ questions to ellrx@yahoo.com

------------------

... bwahhaaaaahaaaaaugh fooooolish sammurai.

OK, on further investigation, there's something really weird going on here.

To reproduce this bug with alpha masking, here's what I've found so far:

-It seems to only occur when the alpha consists entirely of 100% transparent and/or 0% transparent pixels, with nothing in between. If there's even a single pixel that's 99% or 1% alpha, everything renders correctly in every case I've tried. (Thus, presumably, if you have an image with this problem, tweak a pixel somewhere unobtrusive and it should be fixed.)

-After the above requirement is met, if the image color is solid white, the bug will occur. If there are even slightly off-white pixels, one of two things happens: either the image renders correctly, using the alpha channel even for pure white color, or it renders as if there were no alpha channel at all, with RGB > 95% as transparent (which appears to be a separate bug) and all else as opaque. Problem is, I can't seem to see a pattern yet as to which will occur for a given image.

I'll try and do some more research in the near future - any clear and helpful information or sample files would be much appreciated.

------------------
'You can either be on the stage, just a performer, just going through the lines...or you can be outside it, and know how the script works, where the scenery hangs, and where the trapdoors are. Isn't that better?'
-- T. Pratchett