Tutorial: Preparing images for ground textures (Levels and Curves)

Moderators: Uros, OXO, JBr

Post Reply
GregHart1965
Posts: 649
Joined: Sun Apr 12, 2015 7:21 am

Tutorial: Preparing images for ground textures (Levels and Curves)

Post by GregHart1965 » Mon Mar 19, 2018 2:44 pm

Ive been putting off writing this for a long time and this is not meant to be a tutorial as I dont have the time to go into too much detail. That said I feel many here could benefit from insight into the various image file types and how they store and represent an image.

BITMAPS:

1. These are archive files - they are intended to store information. They are NOT working files and indeed if you alter them (levels, colour) and save too many times they will start to experience 'gain' and become either too dark or burnt out. Use the working format of your image software to keep your working images - only re-save to bitmap once as a final step when finished with adjustment (note you can save over existing processed files - use 'save-as' or 'ctrl+shift+s" in photoshop).

2. Bitmaps compress information into a smaller band than a lot of other file types. If you open the histogram of most satellite image bitmaps you will see the curve is all lumped up in one place. (Image 01)
01.jpg
- WAIT! What is a histogram? It is a graph showing the relative amounts of pixels in an image that fit the spectrum of values from 0 = black to 255 = white.
- WHY is this important? As stated above a bitmap stores information in a very narrow band. An 'ideal' image histogram would show a perfect Ogive curve of values from 0-255, this how a camera and your image software 'wants' to see an image. Our bitmaps feature a lot of dark colour so we can expect the values to be heavier in the darker range BUT the bitmap still compresses this range.
- OK so HOW does the human eye see things? To make things more complicated we see a slightly different 'histogram'. Our eyesight is poor in the very light and dark ranges but (as we can adjust the 'exposure' of our eye by retina contraction) we have excellent vision through the medium dark and medium light ranges. So our 'histogram' is a fuller curve in the mid ranges than the camera or image software wants to 'see' an image. (Note the 'perfect histogram' the software likes to work to was invented for printing - not what we are doing here)
You do not have the required permissions to view the files attached to this post.
Last edited by GregHart1965 on Tue Mar 20, 2018 2:29 pm, edited 3 times in total.

GregHart1965
Posts: 649
Joined: Sun Apr 12, 2015 7:21 am

Re: Preparing images for ground textures (Levels and Curves)

Post by GregHart1965 » Mon Mar 19, 2018 3:04 pm

If we use this bitmap 'as is' the result will be some very dark and somber scenery. So we need to adjust this.

There are a few ways of doing this, Im just going to describe my method. Please note that every set of images will be different so the values I use in the adjustment may need to be changed to be effective. That said it is important to use exactly the same adjustment values for the whole of a particular image set. Record your steps so that you have a formula for the treatment of each individual set of images.

Photoshop users can use the 'Record' function so you can repeat the process quickly for each image set. If you just do each one by eye you will NEVER get the edges to match the adjacent image which will in turn create very visible joins in your scenery. Note again that the images you download may be made up from many sets of images so flip through them all first and try to pre-identify the sets.

Some tile images may also contain more than one set, pull these files aside and process them individually (another reason a record of your settings is important) slicing the image up and creating many layers in order to address the all the image sets present. The rest of your tiles can be batch processed once you have figured out the settings,



OK! ON to the adjustments:

What I do first is to expand the histogram pulling more values toward the light end of the spectrum and a little toward the dark end.
02.jpg
In this example I add a tiny bit of black, setting at 1, so as to not lose too much basic line detail. Then I draw quite a lot of values upward by setting the top end at 220. This is a VERY low number you may wish to be more conservative and set to 240-245. Whatever value you chose look carefully at the image, by adding white we are burning out the detail in the very light part of the images - do too much and the result will be very bland and washed out. Adjust by eye, record your settings.
You do not have the required permissions to view the files attached to this post.
Last edited by GregHart1965 on Mon Mar 19, 2018 4:54 pm, edited 2 times in total.

GregHart1965
Posts: 649
Joined: Sun Apr 12, 2015 7:21 am

Re: Preparing images for ground textures (Levels and Curves)

Post by GregHart1965 » Mon Mar 19, 2018 3:08 pm

Here we see the result. The image is lighter and has more vibrance in the colour - this is because by expanding the histogram we create a more contrasty image (more black - more white).

Looking at the histogram we see that the curve has shifted slightly covering a greater range and also that the curve has started to break up a little. Some thin stripes without value are OK but keep an eye on that, if you start to see wide gaps of no value, your image will look 'off'.
03.jpg
You do not have the required permissions to view the files attached to this post.

GregHart1965
Posts: 649
Joined: Sun Apr 12, 2015 7:21 am

Re: Preparing images for ground textures (Levels and Curves)

Post by GregHart1965 » Mon Mar 19, 2018 3:13 pm

Things still look a bit dark so I have lightened the image by shifting the midpoint to a setting of 1,1. Again this quite heavy handed - err on the side of caution, it is impossible to fix an image if you push things too far. NEVER save over your original image downloads - start a new folder for completed images.
04.jpg
You do not have the required permissions to view the files attached to this post.

GregHart1965
Posts: 649
Joined: Sun Apr 12, 2015 7:21 am

Re: Preparing images for ground textures (Levels and Curves)

Post by GregHart1965 » Mon Mar 19, 2018 3:14 pm

The result is a histogram that has wider range of values giving us a brighter and more colourful image.
05.jpg
You do not have the required permissions to view the files attached to this post.

GregHart1965
Posts: 649
Joined: Sun Apr 12, 2015 7:21 am

Re: Preparing images for ground textures (Levels and Curves)

Post by GregHart1965 » Mon Mar 19, 2018 3:25 pm

OK so that addresses the tendency for bitmaps to compress the histogram but its not quite how our eye sees things. Things are still a tiny bit dull and flat.

The easy way to fix this is to add a TINY bit of contrast - be careful do a bit less than you think is necessary, the conversion to DDS later will lower the colour depth considerably increasing the apparent contrast of the image.

A better way to address this last issue is to adjust the curves. NOTE Curves are VERY tricky to work with - if you are not a photoshop wiz then use contrast or skip this step altogether.

So with curves our aim is to bring values into the medium dark and medium light range (remember how the eye sees?). This adjustment is both an expansion of the mid-range as well a compression of the outer reaches of values. This is why its tricky to get right, if you are slightly out in the lower range you can end up with a VERY dark and contrasty DDS at then end of the day. A curve vaguely similar to the pic below will give you a place to start. Note I moved the midpoint as well in this example.
06.jpg
You do not have the required permissions to view the files attached to this post.

GregHart1965
Posts: 649
Joined: Sun Apr 12, 2015 7:21 am

Re: Preparing images for ground textures (Levels and Curves)

Post by GregHart1965 » Mon Mar 19, 2018 3:34 pm

Finally we see the result. with a histogram window opened so you can see the effect of the adjustment - the change is quite subtle which is how it needs to be. Too much adjustment will almost certainly result in a poor looking DDS - more on that just now. Overall we have brighter, more vibrant, higher contrast image that looks a lot closer to how we see things in real life.

DDS:

Finally a quick thought about DDS files. These are very compressed format files that have a much lower colour depth than bitmaps. As such they will 'bomb out' and look terrible if you push the process described above to hard.

WARNING! - as you can see the area marked by a red circle has gone very dark as result of the increased contrast. These areas of deep shadow are problematic in C2. You may well wish to select them with a soft feathered edge and invert the selection prior to doing these adjustments. They usually need a different approach.

Overall taking the time to prepare the bitmaps properly will give you a vibrant bright scenery to fly in - much more like real life!! :D
07.jpg
You do not have the required permissions to view the files attached to this post.

Post Reply