This program will create a half-life2 displacement map from a height map image. It can read common image formats along with 16bit grayscale tif and pgm images.

 

Here are some of the features of dispgen

 

All processing is done using 16 bit grayscale images. 8-bit images (including 24/32 bit fullcolor images, are converted to 16 bit grayscale images before creating the terrain. All scaling and smoothing is done using 16 bit grayscale. This can be used to eliminate the stair steps in generated terrain caused by having only 256 levels of gray.

 

I use a bicubic interpolation scaling algorithm. This generates a better image if the size of terrain is significantly different from the size of the texture image.

 

Alpha maps can be generated using images, base on the height of the texture or  based on the slope (0-90 degrees)

 

Dispgen includes an algorithm (pat. pending) for fixing texture stretching on the vertical parts of the terrain. This can stretch the textures in weird ways, so you may or may not like it.

 

 

Dispgen contains an internal gaussian smoothing algorithm.  If you read an 8 bit image and generate a terrain, the terrain will have stair steps. Dispgen converts all images to 16 bit grayscale and can run smoothing on the image after the conversion. This will remove the steps in the terrain even when an 8-bit image is used. The following image shows the results of running smooth on an standard 8-bit image. Dispgen can also read 16-bit grayscale pgm and tif images. In this case no smoothing is required.

 

 

Dispgen also includes an algorithm to fix texture stretching. As terrain rises vertically it stretches the texture so that the texture looks lower resolution on hills than it does on the ground. Dispgen contains an algorithm which will adjust the terrain to minimize stretching. The following image shows the results of terrain adjustment. This can do weird things to more complicated terrains, so use with care.

 

 

Dispgen 0.1a Downloaded 8583 times