There would be a few pretty easy ways to do it - you could generate a z-buffer matte and use that to adjust two versions of the images separately. That's the easiest but I don't remember if TG does z-buffers or not.
The old-school 3D approach would be to render a second version of the scene: turn off all lights and atmospheric effects (no fog, no clouds, etc). Make the sky a flat white and 100% luminescent. Render that, and you'll have an image you can use as a matte.
Alternately you could put a big flat plane off in the distance (perpindicular to the camera), also 100% white and 100% luminescent, then render with sky turned off completely. Again, this will give you a nice matte where your background is white and everything in the foreground (that rock formation for example) is black.
Then just comp it up in Photoshop or AfterEffects using this new render as the matte to separate the two adjustments. You'll probably want to have some blur where the horizon is, if your adjustments are drastically different. A little blur everywhere in the matte can help too, since in real photos you tend to get bloom any time a super-bright area meets a dark one.
Personally I prefer AE to do color corrections, since its filtering is non-destructive.