Double-Process RAW For Better Tonality
Don't try to do it all in one step. Use the power of RAW to process two separate images optimized for different tonalities.
(STEP 4) Add A Layer Mask. I then added a layer mask to the lighter image layer. The easiest way to do this is to click on the Layer Mask icon on the Layers palette (the icon is a rectangle with a circle inside it). This creates a Reveal All (white) layer mask on the active layer (you also can go to Layer > Layer Mask > Reveal All). The secret to all masks in Photoshop is that black hides the layer and white shows the layer. At this point, all the pixels of the lighter layer show because the layer mask is white.
(STEP 5) Bring In The Lower Layer. To show the darker pixels of the layer below, you need to paint with black on the mask to hide the pixels of the lighter layer. In this case, I needed to balance the bright lights along the top of the photo with the darker bottom area of the image and I also needed to bring in the better highlights of the underlying layer to blend into the upper layer that had the good dark tonality. I used the Paintbrush with black as the foreground color in order to paint with black on the upper portion of the mask.
With the layer mask active (click on the mask to make sure it's active), I selected a soft brush with a fairly low opacity; I recommend 20% to start. Then I painted over the image. I built up density by going over some areas multiple times. If you just drag your cursor back and forth across the image, you won't be able to build up any more density than the 20% opacity you set. By releasing the mouse or raising the pen (on a tablet) as you go, you can build up density. If you use a soft brush and build up the density of your strokes, it's easy to make the blends seamless.
(STEP 6) Refine Your Layer Mask. You can see your mask by Alt/Option-clicking on the Layer Mask icon. From the screenshot shown here, you can see that the edges of the mask were refined and blended to make the two photos go together better.
Once the mask was complete, I had an image that showed good detail and contrast throughout the image, balancing the exposure. So what was once difficult to record in a single exposure is now possible.
With one click of the shutter, you can record the information needed in a RAW file, which you can process in different ways to bring out better detail in both the highlights and shadows. Then it's a simple matter of combining the two images by using a layer mask to make your picture more closely resemble what your eye could see instead of what technology can record. It opens up many possibilities for capturing reality in a way that was never before possible.