0

When I put the mouse cursor on a transparent texel and check the Info panel, there is only the Alpha value displayed, but empty for RGB:

Photoshop snapshot

5
  • 1
    "texel" is a specific term in use in 3D modeling and texturing which refers to the base unit of resolution of a texture on the surface of a 3D mesh; in 2D rasterwork the equivalent term is "pixel" - thus when working in Photoshop one is working in pixels - if one takes a 2K (2048 x 2048) Photoshop file of seamlessly-tiled texture into a 3D DCC tool like Blender or Modo and applies it to several meshes, each with differing UV scales, you may then discuss the idea of "texel density" referring to how consistently that texture resolution is applied relative to object scales in your scene. Mar 19, 2020 at 16:01
  • Take a look at this question / answer, graphicdesign.stackexchange.com/questions/97458/… you will get the RGB and the transparency objects.
    – Rafael
    Mar 19, 2020 at 18:36
  • @Rafael this won't work if a pixel is absolutely transparent Mar 19, 2020 at 18:45
  • 1
    If a pixel is absolutely transparent there is a chance it is discarded from the layer, from the file. Some programs drop that info.
    – Rafael
    Mar 19, 2020 at 18:46
  • @Rafael I don't understand what you mean. Do you have an example of a program that keeps info of transparent pixels? Mar 19, 2020 at 18:48

3 Answers 3

2

Using a term texel doesn't make much sense in Photoshop: it's pixels. Photoshop doesn't keep color information for transparent pixels: a pixel needs to be at least 1/256 non-transparent to have any color information.

Sometimes you might see a color in the Info panel even if opacity is 0%: that's only because there's a slightly-non transparent pixel in there and it's transparently less than 0% in 0-100% integer scale (1/256*100 = 0.39%, Photoshop 'rounds' this to 0%)

enter image description here

12
  • Yeap, sometimes the "king of raster programs" is a bit lame on its tools. U_U
    – Rafael
    Mar 19, 2020 at 18:34
  • @Rafael how so? What RGB value should a transparent pixel have? Mar 19, 2020 at 18:46
  • Based on your comments, You are only considering an absolutely transparent pixel as transparent. Transparency can have one of 254 values.
    – Rafael
    Mar 19, 2020 at 18:49
  • my comments are based on OP's screenshot where he points on an absolutely transparent pixel and asks why it doesn't have any color Mar 19, 2020 at 18:51
  • 1
    @LeoM but you wrote "If I open the same image with Gimp, it tells me (Red:100%,Green:100%,Blue:100%,Alpha:0%)" — it's white! where this red comes from if it was never there? What I'm saying is I think it's an issue of a particular asset pipeline, not PS. Mar 20, 2020 at 11:24
1

You are right there is no such thing as a transparent pixel! All pixels have a color even fully transparent ones.

You can get this value, photoshop just uses a lot of energy to keep people thinking transparent is a color of its own. And for some reason 100% transparent is white by default in Photoshop, this makes PS sometimes a bit problematic for game assets. Anybody who interpolates values knows differently*. There are essentially 2 ways, and any combo thereof.

  1. The image calculations is impervious to Photoshop's sleigh of hand. This is useful if you want to decompose the channels as they are and move over to channel based workflow at some point (see below).

  2. Scripting layer has access to the actual data of a pixel

Now there is a lesser known mode in Photoshop, back to 1980's. Does not work well with layers but solves this issue (clunky) with channels. All you see is the opaque values and lapha is taken form channel called alpha. So if you really need to color the transparent pixels do this:

Just copy the red channel over to a new channel, green abd blue also then alpha as separate. Delete layers and make the new channels the R G B channel and copy alpha as a channel named alpha. You will miss all photoshop's functions but you can do this as a last step, or last resort. You can decode this as an action so you only ever have to do this once.

Photoshop essentially is a bad editor for non-image work. A lot of other tools are way better. Anybody who does vfx will has to stand where you are now, at some point.

* One can debate wether this is good or bad. Lets just say this is the way they have chosen to implement this. Its ok if you only ever do images for print, ist semi ok if you only do images for 1:1 size display in digital. It can be problematic, but in 3d and vfx its a severe limitation. It has the benefit of needing a lower amount of brainpower to accept.

9
  • Is the result not the same as this graphicdesign.stackexchange.com/questions/97458/…?
    – Rafael
    Mar 20, 2020 at 21:05
  • Could you upload a practical example of where this matters? What you've described with channels, this will make white where transparency is, how is this beneficial for mipmapping or anything else? To my understanding a compressor dictates if fully transparent pixels will be treated as white or black and it's user's role to add bleeding. Mar 20, 2020 at 21:44
  • @Rafael yes but calculations would work on multilayer files.
    – joojaa
    Mar 21, 2020 at 6:09
  • @SergeyKritskiy two main issues premultiplied vs unmultiplied alpha since 3D engines mainly require unmultplied alpha youd need to unmultiply the color. Second when you work out the mipmap the white will bleed trough to the mipmap generator. Unless you build a more sophisticated builder, which then would need a switch somewhere (source of error) to account for all those textures that dont use alpha channel as alpha but a extra datalayer.
    – joojaa
    Mar 21, 2020 at 6:17
  • @joojaa as you mentioned, if no color was set, the color will be defined as white. So if a color was never set, you'll have the same issues with bleeding of white. So it's up to the assets artist to make sure there's a correct color bleeding in the asset. No? I think I've seen a plugin for Photoshop that was exporting PNGs with a bleeding in transparency similar to what 3d software does for UVs... but! this is only needed on the last stage, during the export, there's no need for this in Photoshop if I'm not mistaken Mar 21, 2020 at 13:59
0
  • Duplicate the layer until you have 100% opacity (to be faster, duplicate in 2 times, then all of them 2 times, then all of them 2 more times, and so on).
  • Eyedropper in the opaque layer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.