The simple question is: how do you process these 16-bit UDR TIF files in photoshop?UDR stands for Unrestricted Dynamic Range. As discussed in the previous FAQ, the PMax stacking method often causes contrast to increase, pushing darks darker and brights brighter. To compensate for this effect, the last step of the PMax method is a type of HDR (High Dynamic Range) local adjustment of contrast & brightness that preserves detail in overly light regions while pushing those regions back into standard bounds. By selecting the option to “Retain UDR Image”, you can preserve the image as it stood just before the HDR step. This allows you to run your own HDR methods outside Zerene Stacker, say in Photoshop.
Zerene Stacker's UDR in PMax: How to handle in photoshop?
Moderators: rjlittlefield, ChrisR, Chris S., Pau
-
- Posts: 306
- Joined: Tue Jul 31, 2012 11:47 am
- Location: Groningen, Netherlands
Zerene Stacker's UDR in PMax: How to handle in photoshop?
The FAQ of Zerene Stacker says:
Re: Zerene Stacker's UDR in PMax: How to handle in photoshop
If you are referring to the UDR TIFF files created by Zerene, they process like any TIFF or JPEG file in PS or LR. Of course TIFF files are just larger size than JPEG, so the processing may take longer and require more computer memory.nielsgeode wrote:The FAQ of Zerene Stacker says:
The simple question is: how do you process these 16-bit UDR TIF files in photoshop?UDR stands for Unrestricted Dynamic Range. As discussed in the previous FAQ, the PMax stacking method often causes contrast to increase, pushing darks darker and brights brighter. To compensate for this effect, the last step of the PMax method is a type of HDR (High Dynamic Range) local adjustment of contrast & brightness that preserves detail in overly light regions while pushing those regions back into standard bounds. By selecting the option to “Retain UDR Image”, you can preserve the image as it stood just before the HDR step. This allows you to run your own HDR methods outside Zerene Stacker, say in Photoshop.
Hope this helps.
Best,
Mike
- rjlittlefield
- Site Admin
- Posts: 23626
- Joined: Tue Aug 01, 2006 8:34 am
- Location: Richland, Washington State, USA
- Contact:
I suspect that most people simply add a Curves adjustment layer, then shape the curve so as to get the contrast and range that they like.
When I wrote that section of the FAQs page, I was imagining that people would do things like make two copies of the image, apply different Curves adjustments to emphasize highlight detail in one, shadows and midrange in the other, then do an Automate > Merge to HDR to combine those. That approach is analogous to converting a raw file multiple times with different exposures and HDR merging the results, as described HERE.
However, as support@zerenesystems.com, I don't hear from people who are taking the more sophisticated approach. I can't tell whether that means there aren't any such people, or they don't need any help. For the people who do write, I suggest to try curves first. If I hear back at all, the response is always something like "OK, that works great for me. Thanks!".
--Rik
When I wrote that section of the FAQs page, I was imagining that people would do things like make two copies of the image, apply different Curves adjustments to emphasize highlight detail in one, shadows and midrange in the other, then do an Automate > Merge to HDR to combine those. That approach is analogous to converting a raw file multiple times with different exposures and HDR merging the results, as described HERE.
However, as support@zerenesystems.com, I don't hear from people who are taking the more sophisticated approach. I can't tell whether that means there aren't any such people, or they don't need any help. For the people who do write, I suggest to try curves first. If I hear back at all, the response is always something like "OK, that works great for me. Thanks!".
--Rik
-
- Posts: 306
- Joined: Tue Jul 31, 2012 11:47 am
- Location: Groningen, Netherlands
Thanks for the clear explanation. I noticed that if you save a 16-bit UDR output image in Zerene Stacker, the 'Retain extended dynamic range' checkbox gives the 'merky' and 'flat' look, whereas unchecking this box gives a TIF that looks like a normal TIF from PMax with the HDR step applied. Is the latter TIF indeed identical to a normal PMax TIF (and identical to the normal output image when both a normal and UDR image are created with a single Stack PMax command)?rjlittlefield wrote:I suspect that most people simply add a Curves adjustment layer, then shape the curve so as to get the contrast and range that they like.
When I wrote that section of the FAQs page, I was imagining that people would do things like make two copies of the image, apply different Curves adjustments to emphasize highlight detail in one, shadows and midrange in the other, then do an Automate > Merge to HDR to combine those. That approach is analogous to converting a raw file multiple times with different exposures and HDR merging the results, as described HERE.
However, as support@zerenesystems.com, I don't hear from people who are taking the more sophisticated approach. I can't tell whether that means there aren't any such people, or they don't need any help. For the people who do write, I suggest to try curves first. If I hear back at all, the response is always something like "OK, that works great for me. Thanks!".
--Rik
- rjlittlefield
- Site Admin
- Posts: 23626
- Joined: Tue Aug 01, 2006 8:34 am
- Location: Richland, Washington State, USA
- Contact:
In general they are not identical, although they can be if the image has sufficiently low contrast.nielsgeode wrote:I noticed that if you save a 16-bit UDR output image in Zerene Stacker, the 'Retain extended dynamic range' checkbox gives the 'merky' and 'flat' look, whereas unchecking this box gives a TIF that looks like a normal TIF from PMax with the HDR step applied. Is the latter TIF indeed identical to a normal PMax TIF (and identical to the normal output image when both a normal and UDR image are created with a single Stack PMax command)?
The normal PMax output includes a final step that is very much like what I described earlier: generating a sort of HDR output from two images, one of which has been altered to emphasize roughly the range of pixel values 0-230 (in 0-255 notation), and the other altered to emphasize 231-max, even if max happens to be more than 255.
The effect of that final step varies from stack to stack.
Many stacks, especially deep ones, tend to blow out the brights due to contrast increase during the pyramid stacking process. With these stacks the final HDR step has the useful effect of rescuing detail in many bright areas that would otherwise be featureless white.
With other stacks, particularly with shallow ones that have been exposed-to-the-right, the final HDR step has the undesirable effect of slightly darkening bright areas that would not have blown out in the first place. This effect is seldom noticed, or at least seldom mentioned in comments and questions, but when it happens you may get a better result by using the UDR image and thinking of it as Unmodified Dynamic Range.
Thanks for the question. It's been a long time since I wrote that piece of PMax, and revisiting how it works has been valuable to me. I also see that the documentation needs some improvement, so I'll get that done soon.
--Rik
-
- Posts: 306
- Joined: Tue Jul 31, 2012 11:47 am
- Location: Groningen, Netherlands
Thanksrjlittlefield wrote:In general they are not identical, although they can be if the image has sufficiently low contrast.nielsgeode wrote:I noticed that if you save a 16-bit UDR output image in Zerene Stacker, the 'Retain extended dynamic range' checkbox gives the 'merky' and 'flat' look, whereas unchecking this box gives a TIF that looks like a normal TIF from PMax with the HDR step applied. Is the latter TIF indeed identical to a normal PMax TIF (and identical to the normal output image when both a normal and UDR image are created with a single Stack PMax command)?
The normal PMax output includes a final step that is very much like what I described earlier: generating a sort of HDR output from two images, one of which has been altered to emphasize roughly the range of pixel values 0-230 (in 0-255 notation), and the other altered to emphasize 231-max, even if max happens to be more than 255.
The effect of that final step varies from stack to stack.
Many stacks, especially deep ones, tend to blow out the brights due to contrast increase during the pyramid stacking process. With these stacks the final HDR step has the useful effect of rescuing detail in many bright areas that would otherwise be featureless white.
With other stacks, particularly with shallow ones that have been exposed-to-the-right, the final HDR step has the undesirable effect of slightly darkening bright areas that would not have blown out in the first place. This effect is seldom noticed, or at least seldom mentioned in comments and questions, but when it happens you may get a better result by using the UDR image and thinking of it as Unmodified Dynamic Range.
Thanks for the question. It's been a long time since I wrote that piece of PMax, and revisiting how it works has been valuable to me. I also see that the documentation needs some improvement, so I'll get that done soon.
--Rik
What happens internally if you run both a PMax UDR a DMap and then retouch the PMax UDR with the DMap as input file for the retouching?
And is it possible to apply the HDR on a PMax UDR file in zerene stacker if that is the only file you have and you don't want to regenerate the input TIF's from the raw files?
- rjlittlefield
- Site Admin
- Posts: 23626
- Joined: Tue Aug 01, 2006 8:34 am
- Location: Richland, Washington State, USA
- Contact:
Retouching makes no distinction between PMax UDR and normal PMAX. In both cases, if you're using the default Details brush, and you retouch from DMap into PMax, then the retouched pixels will assume the overall brightness of their new surroundings so as to make the insertion seamless. See http://www.photomacrography.net/forum/v ... 5715#85715 for more about that.nielsgeode wrote:What happens internally if you run both a PMax UDR a DMap and then retouch the PMax UDR with the DMap as input file for the retouching?
Sorry, but no, the HDR step is not exposed as something that you can do to a pre-existing image. There's no good way to "fake it" either, since if you save the UDR image to file and reload it, the extended range will either get clipped or levels-adjusted so as to fit within the range that can be stored in standard image files.And is it possible to apply the HDR on a PMax UDR file in zerene stacker if that is the only file you have and you don't want to regenerate the input TIF's from the raw files?
--Rik
-
- Posts: 306
- Joined: Tue Jul 31, 2012 11:47 am
- Location: Groningen, Netherlands
No, I mean if you have a PMax UDR output image that is still in the Zerene Stacker's project file, saved as a zsy file in the generatedimages folder and listed in the "Output Images" part of zerene stacker when you open the project. Can you convert that file in Zerene to a normal output file, either saved as a tif or listed in the Output Images and internally saved as a zsy file?rjlittlefield wrote: Sorry, but no, the HDR step is not exposed as something that you can do to a pre-existing image. There's no good way to "fake it" either, since if you save the UDR image to file and reload it, the extended range will either get clipped or levels-adjusted so as to fit within the range that can be stored in standard image files.
--Rik
- rjlittlefield
- Site Admin
- Posts: 23626
- Joined: Tue Aug 01, 2006 8:34 am
- Location: Richland, Washington State, USA
- Contact:
-
- Posts: 306
- Joined: Tue Jul 31, 2012 11:47 am
- Location: Groningen, Netherlands
Theoretically it should be possible to do the HDR step afterwards on an internal zsy image since all information needed to do it is saved in the zsy file, isn't it?rjlittlefield wrote:Sorry, my answer was unclear. You can't do the HDR step to any pre-existing image, including one that is still in the Output Images panel and internally stored as zsy. The only way it gets done is at the end of a Stack...PMax operation, when the normal Output Image is generated.
--Rik
- rjlittlefield
- Site Admin
- Posts: 23626
- Joined: Tue Aug 01, 2006 8:34 am
- Location: Richland, Washington State, USA
- Contact:
-
- Posts: 306
- Joined: Tue Jul 31, 2012 11:47 am
- Location: Groningen, Netherlands
Would it be an option to add a function to Zerene Stacker where you can choose to apply the HDR step on a zsy image listed in the Output Images and add that as an additional (zsy) Output Image? Especially if you do lots of retouching and you want both files, you wouldn't want to do the retouching twice so retouching the UDR and then apply HDR would be welcome in that case.rjlittlefield wrote:Yes. The only part that's missing is code to read in the zsy image, call existing code that implements the HDR step, and save the result as a new zsy with a corresponding Output Image entry.
--Rik
I'm wondering: if you have a UDR output image within ZS and save it as a TIF, the resulting files look quite different depending on whether or not you checked the 'extended dymatic range' checkbox in the save options dialog box. In fact, if you do not check that box, the TIF looks like a normal TIF. What is happening there?
- rjlittlefield
- Site Admin
- Posts: 23626
- Joined: Tue Aug 01, 2006 8:34 am
- Location: Richland, Washington State, USA
- Contact:
I have added this to the list of requested features. Realistically, given the length and priorities of that list, it is not likely to happen any time soon. In the meantime, I suggest to experiment with retouching the UDR, saving the result as 16-bit TIFF with "extended dynamic range" checked, then applying a curves adjustment layer in Photoshop as necessary to give a good appearance. If you can't get good results, then probably the best approach is to ask again and provide a sample stack so that I can see in more detail what you're wrestling with.nielsgeode wrote:Would it be an option to add a function to Zerene Stacker where you can choose to apply the HDR step on a zsy image listed in the Output Images and add that as an additional (zsy) Output Image? Especially if you do lots of retouching and you want both files, you wouldn't want to do the retouching twice so retouching the UDR and then apply HDR would be welcome in that case.
By the way, there's a recently added feature, currently in beta, that causes Zerene Stacker to save just the UDR version, not the ordinary PMax output with the HDR step applied. It is located at Options > Preferences > PMax Settings > "Retain Only UDR Image", in Build T201708112041_beta and above.
When extended dynamic range is not checked, any internal pixel values that are "brighter than white" or "darker than black" are simply clamped at the corresponding limit when they are written to file. Any detail in "brighter than white" areas is blown out to pure white; likewise for "darker than black" to pure black.I'm wondering: if you have a UDR output image within ZS and save it as a TIF, the resulting files look quite different depending on whether or not you checked the 'extended dymatic range' checkbox in the save options dialog box. In fact, if you do not check that box, the TIF looks like a normal TIF. What is happening there?
When extended dynamic range is checked, pixel values are subjected to a linear transform that reduces contrast and shifts the white and/or black limits just enough to ensure that there's no loss of detail through clamping at either end.
As written at https://zerenesystems.com/cms/stacker/d ... range_mean :
In more detail, when you select extended dynamic range and 16-bit output, then the pixel values for output get computed asPlacing a checkmark on “Retain extended dynamic range” essentially does a “levels adjustment” that reduces contrast and possibly brightens the image, exactly enough to occupy the full range of allowed pixel values, 0-255 in an 8-bit image. This preserves all the computed pixel values so that you can apply your own levels or curves adjustment in Photoshop or any similar tool to get whatever appearance you like best. When using “Retain extended dynamic range”, it's also a good idea to use 16-bit TIFF output, so as to preserve good gradation that might be lost if the extra dynamic range were compressed into 8 bits.
file_value = (internal_value-min)*(65535/(max-min))
where max and min are the internal values for white and black, or the actual max and min if the image contains pixel values that are "brighter than white" or "darker than black".
So, min maps to 0, max maps to 65535 (=2^16-1), and all other pixel values change linearly to match. If you pull this file into Photoshop, apply a Levels Adjustment layer, and shift the upper and lower limits to correspond to the original black and white points, then you'll reproduce what Zerene Stacker would have given without extended dynamic range selected.
--Rik