This file is used to "grow" a grey scale road by x number of layers for blurring and eventual pasting into a height map.
Created by Darren Hunt. Mirrored here for archival purposes.
Road Expander
Version: V1.00
Date: April 21, 2005
Author: Darren Hunt
Location: Canada
Email: darkdogxpand@gmail.com
Purpose: This file is used to "grow" a grey scale road by x number of layers for blurring and eventual pasting into a height map. Due to how a Gaussian Blur operates, the road surface which is being blurred to smooth out ends up being distorted by the data beside the road edges. In order to correct this, the road data must be expanded to cover more area to create a buffer for the actual road surface in the middle. By blurring a larger road, the inner section is not distorted, allowing a smooth road to eventually be copied from the center of the blurred image and into its height map.
An additional feature of this program is to help identify missed pixels in the road. After expanding the road, single pixels of the wrong color will be very visible as they would have been stretched out with the expansion process. Use this to find the incorrect pixels and correct them. Then run the image through the program again for a clean version.
This program is used within the command line interface.
1. Put the roadexpander.exe in the same directory as the height.tga file.
2. Run the command using the file name of the tga file. The program will convert the tga image into a <filename>_exp.tga file.
3. Once the conversion process is over, load the new file into a Paint Program and blur it.
The roadexpander.exe requires one argument, the tga file name. It also allows a second argument for the number of layers that will be added to the road To see a listing of its arguments, type "roadexpander /?".
Expansion Layer Argument:
- Expansion Number (/NA) (default expansion): When the default expansion is used, all of the non-road data within the TGA map is filled.
- Expansion Number (/N#) (1 to 1000): When the expansion number is used, it represents how many layers will be added to the roads. If a high enough number is used, and all of the image is filled, it will stop early and exit the program.
Requirements:
- The image file must be a uncompressed, 24 bit TGA file.
- Solid Red (RGB 255,0,0) is used as the data to be replaced. If it is not red, then it can possibly be replaced during the expansion process.
- The rest of the colors within the image must be grey scale colors (i.e RGB 100,100,100 or 57,57,57). Essentially what this means is that the red, green and blue values must be equal.
- The resulting file from the conversion will have the same file name with '_exp' appended onto it.