Talk:Alpha: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Misfeature in channel previews?)
Line 19: Line 19:


:: Actually, playing around - the red, green and blue channel previews appear to display multiplied by the alpha channel component. Additionally, the previews ''aren't'' immediately updated when you apply a layer mask - you need to do some more editing, or hide then show one of the channels, for them to update. It does seem to be a bug, in that the RGB channel previews are showing the alpha channel too - but no data appears to be lost. Could be a good bug to report, anyway! &mdash;'''<font color="#10c010">Cargo Cult</font>''' <sub>([[User:Cargo Cult|info]], [[User talk:Cargo Cult|talk]])</sub> 11:17, 22 Feb 2007 (PST)
:: Actually, playing around - the red, green and blue channel previews appear to display multiplied by the alpha channel component. Additionally, the previews ''aren't'' immediately updated when you apply a layer mask - you need to do some more editing, or hide then show one of the channels, for them to update. It does seem to be a bug, in that the RGB channel previews are showing the alpha channel too - but no data appears to be lost. Could be a good bug to report, anyway! &mdash;'''<font color="#10c010">Cargo Cult</font>''' <sub>([[User:Cargo Cult|info]], [[User talk:Cargo Cult|talk]])</sub> 11:17, 22 Feb 2007 (PST)
:::Data was definitely being lost for me: when I imported the file to VTFEdit there were areas of pure black. Did your image have transparent pixels, or only translucent ones? GIMP (2.1.3/Win) only removes RBG data for fully transparent pixels, which is why my fix works.
:::Incidentally, we really need a unified texture editing system. Over the past couple of days I've had to fiddle around with five layers in an image editor every time I need to see something in-game, and once I've overcome that fiddle around even more converting into VTF. It'd be wonderful to be able to hit Ctrl+S and have everything slot into place. --[[user:TomEdwards|TomEdwards]] 11:49, 22 Feb 2007 (PST)

Revision as of 12:49, 22 February 2007

My mistake with the combine forcefields.--TheJ89 21:31, 16 Jul 2005 (PDT)

What you say? --Andreasen 14:08, 15 Nov 2006 (PST)

I can't get Photoshop to save my Targa with several layers, meaning I can't make alpha Targa. Can it REALLY be done, and if so, how? --Andreasen 14:08, 15 Nov 2006 (PST)

Its not layers, its a channel. I forget photoshops ahndeling of it, but theres eithier the RGB channel, you need to then add an Alpha Channel and paint in that. -OR- it will take it form the transparency of the only layer you have. --Angry Beaver 16:04, 15 Nov 2006 (PST)
Ah, thank you. That might explain it. You see, I have Photoshop Elements, and Photoshop Elements only seem to be able to handle layers, and not channels. Do you know any picture editors that one can use for free that can handle alpha targas? --Andreasen 05:27, 16 Nov 2006 (PST)
GIMP should be able to handle it. I'm not sure, I use Painshop Pro. Are you sure you can't just create a transparent image, an image without a background, or delete the background layer? —Kateye 09:37, 16 Nov 2006 (PST)
Oh, you're right: You can apparently create a NEW layer, then choose transparency for it, press <Delete> to delete the contents, and then remove the first (background) layer. You can then paint a texture on this new transparent layer. You can even use brushes with different Opacity settings (with 1% as minimum Opacity). Strange, because the pages I read told me that alpha could only be simulated in Photoshop Elements. I'll test it and see if the transparency saves correctly. (Photoshop has apparently been known not to handle especially targa alpha.) --Andreasen 11:15, 16 Nov 2006 (PST)
You'd be surprised how often the pages found for Google can be wrong. It's infuriating. Those of us who know the "right" way don't realize that an article needs to be said, or we're not on the boards where the question is asked. I have some horror stories about methods people have suggested and I found on Google, most of which were broken, hugely long and broken, hugely long and a backward compatibility nightmare, and all of which tend to be replaced by a single line of code. </Tangent> Anyway, be sure to actually test the texture in-game, as I was frustrated for a while by the fact that the texture viewer I was using didn't show the transparency. It wasn't until I actually just tried it that I realized it had been working all along. Although personally I've found PNGs to be better for saving, then convert the PNG into a TGA or use a texture tool that can import PNGs. —Kateye 11:36, 16 Nov 2006 (PST)
Well it's confirmed: Photoshop Elements will not save transparency (full or partially) for targa format (24 bit or 32 bit). It will convert it into white instead, and this will still be white in Hammer (even if "$translucent" 1 is specified). --Andreasen 11:49, 16 Nov 2006 (PST)

Saving alpha in GIMP

The article says that GIMP can handle alpha, but there's one very important piece of the puzzle missing. You can't embed a mask into a normal map (for phong/specular) if means erasing the RBG data! Has anyone worked this one out? --TomEdwards 07:09, 22 Feb 2007 (PST)

Solved: set the background alpha to 1%. The result doesn't look any different, and the RGB channels are saved normally. --TomEdwards 10:33, 22 Feb 2007 (PST)
I think it might just be a misfeature involving the RGBA channel thumbnails - I created a vaguely similar image, saved to TGA and loaded again, and things appeared similarly 'broken'. I then did a decompose-to-RGBA, and discovered that the contents of the channels were in fact entirely correct. This is with Gimp.app 2.2.11 on MacOS X, incidentally - no idea what Windows version you're running, but it might be worth updating.
Actually, playing around - the red, green and blue channel previews appear to display multiplied by the alpha channel component. Additionally, the previews aren't immediately updated when you apply a layer mask - you need to do some more editing, or hide then show one of the channels, for them to update. It does seem to be a bug, in that the RGB channel previews are showing the alpha channel too - but no data appears to be lost. Could be a good bug to report, anyway! —Cargo Cult (info, talk) 11:17, 22 Feb 2007 (PST)
Data was definitely being lost for me: when I imported the file to VTFEdit there were areas of pure black. Did your image have transparent pixels, or only translucent ones? GIMP (2.1.3/Win) only removes RBG data for fully transparent pixels, which is why my fix works.
Incidentally, we really need a unified texture editing system. Over the past couple of days I've had to fiddle around with five layers in an image editor every time I need to see something in-game, and once I've overcome that fiddle around even more converting into VTF. It'd be wonderful to be able to hit Ctrl+S and have everything slot into place. --TomEdwards 11:49, 22 Feb 2007 (PST)