-
Notifications
You must be signed in to change notification settings - Fork 161
Creating a world from an image
If you can't find the info you need you may consult the forums or use this tutorial by mysource
Shaping your world can be difficult. Rivers always generate in the wrong place, islands are not where you want, your mountains don't look good enough. Sure, you can achieve a lot with all the biome options. But Terrain Control also has a feature to generate your biomes from an image. With this feature you can take complete control over your world or use the normal biome mode and then have Terrain Control create an image to do some small map improvements.
The pros:
- Complete control over your biomes
- Much easier to work with
- Can be used to produce custom (adventure?) maps
And the cons:
- Images are not infinite, you must fall back on another biome generator when you are outside the image.
- No random biome combinations: biome placement looks as good (or as bad) as you have painted it.
- Has some quirks which are described below.
In each of the BiomeConfigs there is a BiomeColor
variable. This variable is the hexadecimal color of the biome. It's not only used as the output color in the /tc map
command, but also as the color in the input image. The exact BiomeColor
must be used in the image to let the biome spawn where painted. Two biomes may not have the same color, if they do that color will result in ocean generating instead. For each custom biome you should change the BiomeColor
from 0x000000 (black) to another color.
The default biome colors in both RGB and hex (Terrain Control uses the same colors as AMIDST):
Each pixel on the image represents 4x4 blocks. As said above, the color in the image must be exactly the BiomeColor
. Most brush tools of the photo editors won't work, as they change the color to another one:
The blurring (called anti-aliasing) allows objects to blend properly with the rest of an image, however Terrain Control doesn't recognize those colors. When Terrain Control finds a color it doesn't have a config for it places ocean. It is better to use editors (commonly called) pencil tool since that tool doesn't use anti-aliasing. Be sure to save the image as a png file as this is the only format supported and most other formats will change the colors during compression. Before generating a world check the image to ensure it hasn't been anti-aliased or compressed.
Another common error is to resize the image without disabling anti-aliasing:
When painting your image from scratch either assume the right edge (right as 'not left', not as 'not wrong') is north, or use the top as north (as most commonly do) and rotate your image 90 degrees clockwise before generating. If you are editing a map made from the /tc map
command see that section below.
After you are satified with your image and everything is rotated and resized correctly, it's time to let Terrain Control do the work! Place the image next to the WorldConfig.ini file and take a look at the following settings in that file:
ImageMode
- Can be set to ContinueNormal
or FillEmpty
. ContinueNormal
will tell Terrain Control to generate terrain randomly (like BiomeMode:Normal
, based on it's settings) once it has hit areas outside the image. FillEmpty
will fill any areas outside the image with the biome set in the ImageFillBiome
setting, default ocean.
ImageFile
- The name of the image file to use, default of map.png. Must be a .png image.
ImageFillBiome
- The biome to use for generation once outside of the image area when ImageMode
is set to FillEmpty. (Note: need to test if this changes the biome used when TC finds a biome color it doesn't recognize or conflicts with another biome color.)
ImageXOffset
and ImageYOffset
- Shift the the co-ordinate position of the image, useful for getting the center of your image at x:0 y:0. When using ContinueNormal
set these to half the image size. In FillEmpty mode set this to half the image size in the negative value. Example - A 500x500 pixel map.png would have X and Y offset set to 250 in ContinueNormal
and -250 in FillEmpty.
Terrain Control has the command /tc map
to output a biome map. The images generated by it can, with some extra work, be reused as an input image for FromImage
.
When using /tc map
Terrain Control it creates a map at which 1 pixel = 1 block, but the input must always 1 pixel = 4x4 blocks. To get the image the right size it must be downsized to a quarter its normal size.