Pages: [1]   Go Down

Author Topic: Are luminosity masks 8 bit?  (Read 4876 times)

khenke

  • Newbie
  • *
  • Offline Offline
  • Posts: 17
Are luminosity masks 8 bit?
« on: January 22, 2015, 04:01:48 pm »

There has been a few photographers who profess that editing through luminosity masks render that selection area 8 bit rather than 16 bit.  Thus, there could be some degradation of that particular area, particularly if there was multiple edits done to that selected area. Considering the wide use and acceptance of using luminosity masks for focused image editing, I am surprised that if this was an issue it wan't addressed somewhere.  I would like to get this answered once and fore all.
Anyone have any insight?
Ken
Logged

howardm

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1984
Re: Are luminosity masks 8 bit?
« Reply #1 on: January 22, 2015, 04:12:02 pm »

it follows whatever the image is.  if you've set the image to be 8bpc, then 8; otherwise if it's a 16bpc image, the mask will be 16.

bill t.

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3011
    • http://www.unit16.net
Re: Are luminosity masks 8 bit?
« Reply #2 on: January 22, 2015, 05:27:28 pm »

I use luminosity masks a lot with 16 bit images and can't say I ever saw any posterization or such that I could attribute to them.

Working with layers there's no need to "degrade" and area with multiple edits.

If luminosity masks have a downside, it's that you can quickly paint yourself into a post processing corner by using them.  For instance, if you decide to rubber stamp something on an image with lots of luminance masks, you will see the luminance ghosts of past versions emerging as from nowhere.  It's usually better to start over in that case.  Even better to do all your rubber stamping at the get-go.

Topaz Clarity and Detail3 are now very nice options for many of the things that luminance masks can do, and they don't shut the door on editing.  Both those programs are destructive, so make copy layers of you bottom layer image just above, and work on those only.  Blending can be useful in that case.

Logged

kirkt

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 604
Re: Are luminosity masks 8 bit?
« Reply #3 on: January 22, 2015, 09:16:16 pm »

If you create a luminosity mask in a color document, select the mask and copy it into a new document, the bit depth of the new document reflects the bit depth of the originating source document, implying that the mask is of matching bit depth.  I do not know if the internal math is consistent.

One thing to be aware of is that luminance masks, being grayscale, are affected by the gray gamma of your working space color settings.  From what I can gather, it is best to get middle grays to fall in the middle by matching your gray gamma to the gamma of your color working space to get the closest match during luminance selection/conversion for the mask - for example, for sRGB and Adobe RGB use gray 2.2, for ProPhotoRGB use gray 1.8.

kirk
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Are luminosity masks 8 bit?
« Reply #4 on: January 23, 2015, 04:44:52 am »

Topaz Clarity and Detail3 are now very nice options for many of the things that luminance masks can do, and they don't shut the door on editing.

I agree, they are very useful additions, producing results that could only be achieved with very complex Luminosity masking, and then some.

Quote
Both those programs are destructive, so make copy layers of you bottom layer image just above, and work on those only.

Not necessarily destructive (irreversible is the formal term), because one can convert a duplicate layer to a Smart Object layer. The Topaz filter settings can then be retroactively adjusted/tweaked/reset. Very useful if one adds further masked or blended adjustment layers on top of that layer, and one wants to revise the earlier Topaz filter settings without having to start all over.

As for the OP's question, (as mentioned) the Mask follows the image mode. That means that it helps to convert the mode to 16-bit/channel before adding a mask.

Cheers,
Bart
« Last Edit: January 23, 2015, 04:55:14 am by BartvanderWolf »
Logged
== If you do what you did, you'll get what you got. ==

Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507
Re: Are luminosity masks 8 bit?
« Reply #5 on: January 23, 2015, 01:52:07 pm »

There was a great debate about this some years ago, after 16bit ops was added to Photoshop. I can't remember what forum it was on. The debate centered on the accusation that some Photoshop tools operated in 8bit mode even when the image was in 16bit mode.

In some examples, people claimed the brush tool and gradient tool created banding associated with 8bit processing. Some claimed that "soft" brushing on the main pixel layer looked quite different than making the same brush stroke on a mask.

One person developed a test which appeared to prove that masks were in 8bit mode even on 16bit documents. I just repeated that test to the best of my memory, and now (under CC 2014) it appears to prove that masks are indeed 16bit, although in grayscale mode (one value per pixel instead of 3 RGB values).

Here's the test:

1. Load any image, dupe the background twice, for a total 3 layers.
2. Save that in 2 versions, one in 8bit, one in 16 bit, as uncompressed TIF.
3. Add a layer mask to the top layer of each of these and save new versions.

Now, with 4 versions of the file, look at file sizes on disk and compare the differences. Look at the difference between the 8bit masked and 8bit unmasked versions. That difference is the size of the mask in 8bit. Then look at the difference between the 16bit masked and unmasked versions. Finally, look at the difference between the differences.

As I recall from years ago (version CS? CS2?) There was no difference between the differences. The size added by the mask in 8bit mode was the same as the size added in 16bit mode, which seemed to prove that all masks were 8bit. When I do this test now, there is a difference. The size added by the mask on the 16bit image is twice the size added to the 8bit image. And those sizes equate approximately to a grayscale size of my test image.

A disclaimer - I don't completely trust my memory of the debate from years ago, so neither should you.
Logged

khenke

  • Newbie
  • *
  • Offline Offline
  • Posts: 17
Re: Are luminosity masks 8 bit?
« Reply #6 on: January 23, 2015, 02:34:32 pm »

Yea, as Redcrown mentioned it was a hot topic several years ago. However, even Jeff Schewe had mentioned selections were 8 bit several years ago. And, as mentioned, it appears newer versions of Photoshop have improved the bit depth of selections; thus is isn't a prominent issue being raised.   
Every now and then, someone does come out the woodwork mentioning this issue again.  Usually, it is in the context of pushing for using the "blend if" sliders or using HDR software.  And certainly they can work quite well and are easy to use, depending on the quality one seeks.  But for blending real high dynamic range images, I personally find luminosity masks to be essential. Additionally, I use luminosity masks extensively for targeted editing. Every image, all the time.
Logged

samueljohnchia

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 498
Re: Are luminosity masks 8 bit?
« Reply #7 on: January 24, 2015, 03:52:44 am »

If your working document is 16 bits, the masks or alpha channels are 16 bits too.

All of the luminosity masking tutorials I have seen show how to create them by loading various channels as a selection and then generating the mask from that. Selections in Photoshop quantize data to 8 bits. When the selection is loaded as a mask or alpha channel, the quantized data is then spread over 16 bits if the working document is in 16 bits, but any posterization remains.

The posterization effect is most obvious when 'intersecting' various masks multiple times, on any smooth gradients. Blue skies are one example.

So there really is no use that the mask is of 16 bit precision, when the image/channel data was quantized to 8 bits in its creation. However, subsequent brushing on the mask, or the use of the gradient tool, are all of 16 bit precision.
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Are luminosity masks 8 bit?
« Reply #8 on: January 24, 2015, 06:11:00 am »

If your working document is 16 bits, the masks or alpha channels are 16 bits too.

All of the luminosity masking tutorials I have seen show how to create them by loading various channels as a selection and then generating the mask from that. Selections in Photoshop quantize data to 8 bits. When the selection is loaded as a mask or alpha channel, the quantized data is then spread over 16 bits if the working document is in 16 bits, but any posterization remains.

The posterization effect is most obvious when 'intersecting' various masks multiple times, on any smooth gradients. Blue skies are one example.

So there really is no use that the mask is of 16 bit precision, when the image/channel data was quantized to 8 bits in its creation. However, subsequent brushing on the mask, or the use of the gradient tool, are all of 16 bit precision.

I agree, and that's a very good point about the mask creation through selections. Selections are 8-bit precision, regardless of the 8 or 16-b/ch mode the document is in at that moment of selection creation.

Even Feathering of a selection won't change that (at least on CS6, don't know about CC). Blurring a mask, or painting it with some opacity other than 0 or 100 will produce 16, well actually 15-bit/channel, precision when the document is in 16-b/ch mode.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

samueljohnchia

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 498
Re: Are luminosity masks 8 bit?
« Reply #9 on: January 24, 2015, 07:59:39 am »

Hi Bart, it is always great to have confirmation on the facts, thank you. I too do not have CC, so I speak for up to CS6 too.

Btw is there any reason that Photoshop is still working in 15 bits plus one signed integer instead of 16 bits? Is it the massive re-coding work that is keeping them from it? One of the many reasons not to give them any more money for CC.
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Are luminosity masks 8 bit?
« Reply #10 on: January 24, 2015, 10:22:58 am »

Btw is there any reason that Photoshop is still working in 15 bits plus one signed integer instead of 16 bits? Is it the massive re-coding work that is keeping them from it? One of the many reasons not to give them any more money for CC.

Samuel, yes I think it's the difficulty of re-coding lots of old stuff that can be done slightly more efficiently with signed integer numbers. I'm not too sure about the speed benefits though, since some operations can be done differently with both types of numbers, so it's more involved than merely exchanging the number type casting.

Of course, the future is in floating-point numbers processing (also made easier with GPU support), although at some stages 15-bits are enough. FP numbers make tonemapping, and things like 3D conversions and other geometrical operations, easier and allow to maintain virtually lossless cascades of operations without rounding errors becoming big enough to even remotely come close to ending up in the final results. File Formats like EXR would also become much easier to integrate in the workflow.

Given that memory is relatively cheap these days, one can also use Rational number arithmetic in order to postpone some of the rounding while keeping the benefit of relatively simple (and proven/tested) arithmetic.

But the 8-b/ch limitations of selections is a bit of a puzzle, unless it's been improved in more recent versions of Photoshop. One of the lessons is that it may be safer to blur a mask e.g. a Gaussian Blur of 0.3, than to use Feathering.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==
Pages: [1]   Go Up