RetouchPRO

Go Back   RetouchPRO > Technique > Photo Retouching
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read Chat Room


Photo Retouching "Improving" photos, post-production, correction, etc.

Reply
 
Thread Tools
  #1  
Old 11-21-2011, 10:41 PM
Senior Member
 
Join Date: Mar 2011
Location: San Francisco, CA
Posts: 187
Dodge and Burn tool question

So I am fond of using all different kinds of dodge and burn techniques. Sometimes I like to dodge and burn with color on different blend modes... sometimes using softlight or overlay blend modes with neutral shades, sometimes I use curves. I just do it by feel with a sort of intuition about the color shift I may affect at the same time.

Sometimes I use the Dodge and Burn tool itself for its capacity to target highligh, midtone, or shadow... but I tend not to use it as much since I prefer not to use destructive methods.

Of course, I always give myself a headache whenever I try to understand the math behind the blend modes, but I still try to understand it anyway, even if most of the time I just end up winging it in my actual retouching work.

My question is this: Which blend modes are the dodge and burn tool equivalent to? Is it basically a shift in the curve? Or is it equivalent to 'color dodge' and 'color burn' blend modes? Or is it more of a 'screen' and 'multiply', or 'linear burn' and 'linear dodge'?

I tried googling for answers and found this blog post: http://losingfight.com/blog/2007/09/...nd-burn-tools/

Unfortunately, I already had two glasses of wine with dinner and this is over my head right now. I wish I could think in math and code, but I'm more of a touchy-feely artist. Can any of your brainy folks help me to understand the math behind the dodge and burn tool?

Last edited by Siciliana; 11-21-2011 at 10:54 PM.
Reply With Quote
  #2  
Old 11-22-2011, 02:48 AM
Der_W's Avatar
Senior Member
 
Join Date: Jul 2009
Location: Germany
Posts: 528
Re: Dodge and Burn tool question

Okay, I'll just try to translate the maths into (more or less) simple terms here, I haven't confirmed that it's exactly how the d&b tools in Photoshop work.

First of all, because there are two tools and three ranges, we have an overall number of 6 different algorithms to affect each area in a specific way (e.g. lighten midtones, darken highlights).

The first algorithm is used to lighten the highlights. For this it should affect the highlights the most and give almost the identical results to darker pixels.
Dark pixels are those with a value of 0, midtones are 0.5 and highlights are 1.

This is done by using
C = A + exposure ^ (e ^ A - 1.0)

where C is the result, A is the actual layer (and value), exposure is the exposure of the tool and e the mathematical constant that's being added.
Since A is in the interval of 0 and 1, you'll get a fraction of e that's between 1 and 2.7.
After that 1 is subtracted from it to get more or less into usable range.
There's no direct equivalent in Photoshop to this (at least not unless you go into 32bpc mode, where you could try Linear Dodge (Add) and add small values with a gradient map adj. layer).

Now to dodge the midtones, you'll have to use the formula:
C = A + (exposure ^ 0.25) * sin(A * pi)
The 0.25 * sin() is again used to limit the amplitude, just like the - 1 before.
This is similar to an inverted gamma curve, which you can achieve by placing an invert adj. layer on top of you layer stack, putting a levels adj. layer in between where you move the gamma slider and finally put another invert adj. layer on top.

To dodge the shadows, we'll just add 0.5 to half of the original value (in maths: C = (1.0 - exposure * 0.5) * A + 1- (1.0 - exposure * 0.5)).
You can do this in Photoshop by first using Brightness/Contrast with legacy settings to halve the contrast and afterwards use Linear Dodge (Add) with a medium gray and 50% Fill opacity.

Now for the burning part :-).

To burn highlights, we just quarter their values. In math terms: C = (1.0 - exposure * 0.75) * A.
To do this in Photoshop, just use the Multiply mode and enter values of 64.

To burn the midtones, the formula is almost the same of dodging them, but instead of adding a factor, we subtract it.
C = A - (exposure * 0.25) * sin(A * pi)
This is now similar to a standard gamma curve (without the invert adj. layers).

The last algorithm is used to burn the shadows. It's similar to burning the highlights:
C = A + exposure * (1.0 - e ^ (1.0 - A)).
Unfortunately there's a typo in the article, he wrote A - 1.0, but it should be 1.0 - A.


The rest of the article is basically how to implement these functions and shouldn't be too interesting for the standard Photoshop user :-).

I hope this helps a little?

Last edited by Der_W; 11-22-2011 at 03:00 AM. Reason: Added the exposure function as well.
Reply With Quote
  #3  
Old 11-22-2011, 10:15 AM
Senior Member
 
Join Date: Mar 2011
Location: San Francisco, CA
Posts: 187
Re: Dodge and Burn tool question

Damn, you are such a brain, Jonas

Well, I guess that gives me an answer to my initial question, which came about by wondering if any of the layer d&b methods I use are actually identical to the effect I would get with the dodge and burn tool, and it seems the answer is "no".

Thanks for giving it some thought.
Reply With Quote
  #4  
Old 11-22-2011, 02:34 PM
Der_W's Avatar
Senior Member
 
Join Date: Jul 2009
Location: Germany
Posts: 528
Re: Dodge and Burn tool question

Well, there might be a way to get the same effect with different curves, but I wonder if that'd really be any helpful?
Anyways I'll try and see what I can come up with :-).

Okay, I got some curves that'll emulate the different effects and allow further analysis of similarities :-).
E.g. dodging the highlights is pretty much the same as adding the layer to itself (copy of the layer in "Linear Dodge (Add)" mode) with 24% fill opacity.
Similar for burning shadows which is similar to subtracting the layer from itself ("Linear Burn") with 24% fill opacity.
Dodging the midtones is similar to moving the gamma slider in levels to 1.28, burning them is similar to moving the gamma slider to moving the midpoint in curves from 132 to 106. His graphs have mislead me to thinking it was like an inverted gamma curve which is not the case (this would darken the quarter tones more).
Burning the highlights is really just like multiplying 205/205/205 to the image and dodging the shadows is like screening 50/50/50.

I'll post a link to the curves presets generated from the tools at 100% exposure for you here in case you're interested in it and want to see it yourself: http://dl.dropbox.com/u/7124285/Fore...s%20curves.zip

Last edited by Der_W; 11-22-2011 at 02:53 PM. Reason: Some more info added.
Reply With Quote
  #5  
Old 11-22-2011, 02:37 PM
Senior Member
 
Join Date: Mar 2011
Location: San Francisco, CA
Posts: 187
Re: Dodge and Burn tool question

I wasn't really looking for a way to duplicate the effect of d&b tool, but I happened to be using a color burn layer to burn in an area of an image and I started wondering to myself if the effect was the same as burn tool... that was what started the whole inquiry on my part. I'm just a curious cat, that's all.
Reply With Quote
  #6  
Old 11-22-2011, 02:50 PM
John Wheeler's Avatar
Senior Member
Patron
 
Join Date: May 2011
Location: Colorado
Posts: 414
Re: Dodge and Burn tool question

Hi Siciliana

By doing some black box testing of Photoshop here is what I came up with. I checked the results (yet did not double check) so anyone can let me know if they find an error. This may give a starting point of how the dodge and burn tools can be duplicated with Blends.

This post will show how you can duplicate dodge and burn tools for the case where you turn off "protect tones" (I may cover that in another post).

You can duplicate the dodge and burn tools (tone protection turned off) for highlights, midtones, and shadows with 3 separate blending layers:

- Create 3 new layers all set to 50% gray
- First Layer set to Hard Light
- Second Layer set to Vivid Light
- Top Layer set to Soft Light

In the next steps you will be either painting the gray layer with either white or black and an opacity set sufficiently low ~15% (similar to Exposure on dodge burn tool)

For First Layer that was set to Hard Light
- White painting is same as Dodging Shadows
- Black painting is same as Burning Highlights

For Second layer that was set to Vivid Light
- White painting is same as Dodging Highlights
- Black painting is same as Burning Shadows

For Third Layer that is set to Soft Light
- White painting is same as Dodging Midtones
- Black painting is same as Burning Midtones

Note that in the case of the third Layer, this does not have the same full reach as Burning/Dodging tools for the midtones.

Note that when you have the "protect tones" turned on with the dodge and burn tools some tones are protected (frozen) with a smooth transition to all other tones as per:

Burn Shadows - levels 213-255 Highlights protected
Burn Midtones - level 0-14 and 254-255 Bit of both ends protected
Burn Highlights - level 0-55 Shadows protected

Dodge Shadows - levels 204-255 Highlights protected
Dodge Midtones - levels 0-1 and 204-255 Bit of both ends protected
Dodge Highlights - levels 0-47 Shadows protected

I have no clue why those particular ranges are being protected yet that's what comes out of Photohop. If I figure out how to duplicate the protection feature with blends I will post that too (Blend If did not work well)
Reply With Quote
  #7  
Old 11-22-2011, 03:21 PM
John Wheeler's Avatar
Senior Member
Patron
 
Join Date: May 2011
Location: Colorado
Posts: 414
Re: Dodge and Burn tool question

And Jonas
I am still digesting your previous long post yet had to pause and wait for my mega- shipment of Tums from Amazon.com to arrive before proceeding You really know your stuff.
Reply With Quote
  #8  
Old 11-22-2011, 08:17 PM
Senior Member
 
Join Date: Mar 2011
Location: San Francisco, CA
Posts: 187
Re: Dodge and Burn tool question

Interesting. John, I tried your methods really quickly on some skin, and without really measuring numbers, it seems about right--these looked to be very close side by side with the burn tool samples. Good to know. Based on this experiment, I may make more use of d&b on vivid light mode, for some effects, rather than curves.
Reply With Quote
  #9  
Old 11-23-2011, 12:05 AM
Junior Member
 
Join Date: Aug 2010
Location: The Netherlands
Posts: 21
Re: Dodge and Burn tool question

Why do you have to fill the D&B layer with a 50% grey first? It seems like painting on a transparent layer works just as well. Just wondering.
Reply With Quote
  #10  
Old 11-23-2011, 06:37 AM
Senior Member
 
Join Date: Jul 2004
Location: Brooklyn
Posts: 431
Re: Dodge and Burn tool question

Quote:
Originally Posted by mcdronkz View Post
Why do you have to fill the D&B layer with a 50% grey first? It seems like painting on a transparent layer works just as well. Just wondering.
It does. Grey has no effect any of the "light" modes, as well as Hard Mix. But it makes it easy to see what you've actually put into the layer, if that ever interests you.
Reply With Quote
  #11  
Old 11-23-2011, 07:21 AM
Der_W's Avatar
Senior Member
 
Join Date: Jul 2009
Location: Germany
Posts: 528
Re: Dodge and Burn tool question

John, great idea to use the contrast modes to combine the different effects :-)!
Looking at the actual formulas of the blend modes, it looks like you picked the right ones to do the job :-)!
Reply With Quote
  #12  
Old 11-23-2011, 06:03 PM
John Wheeler's Avatar
Senior Member
Patron
 
Join Date: May 2011
Location: Colorado
Posts: 414
Re: Dodge and Burn tool question

Quote:
Originally Posted by mcdronkz View Post
Why do you have to fill the D&B layer with a 50% grey first? It seems like painting on a transparent layer works just as well. Just wondering.
Very good question and using a fully transparent layer does work quite well yet it does have some differences than using a gray layer approach.

Quote:
Originally Posted by edgework View Post
It does. Grey has no effect any of the "light" modes, as well as Hard Mix. But it makes it easy to see what you've actually put into the layer, if that ever interests you.
In addition to the difference mentioned by edgework, there are two functional differences as well.
  • The impact on Layer Stack transparency is different. If you use a gray layer, the resulting transparency is 0% (100% opacity). If you use a fully transparent Layer, the resulting transparency is just the transparency presented from the layers below (to see this you have to have some transparency in the lower layer and no background layer)
  • If you paint with a brush/pencil in a mode other than normal, the result you achieve will be different using a gray layer than when using a fully transparent layer.
This is neither good nor bad. It just depends on the result you desire in your Layer Stack. You just need to be aware of the differences and the impact to your image. If this does not make sense I could post some examples.

Quote:
Originally Posted by Der_W View Post
John, great idea to use the contrast modes to combine the different effects :-)!
Looking at the actual formulas of the blend modes, it looks like you picked the right ones to do the job :-)!
Thanks Der_W. My brain works more visually than with equations/formulas so I just matched up the transfer curves of the dodge and burn tools in Photoshop (not the article) with matching transfer curves of blend modes. It was a real good match for the case when the Protect Tones was not checked.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 06:59 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 2008 Doug Nelson. All Rights Reserved