15 CreateFromImage
Jesse Boyd edited this page 2018-05-08 16:45:12 +10:00

Overview

The CreateFromImage command is used to build terrain from large heightmaps. Heightmaps can be generated using software like WorldMachine and GeoGlyph or found online.

Examples (vanilla blocks):

CFI TEST Glass color Videos Tests:

Dependencies:

  • PlotSquared (dev build) with enabled-components.worlds set to true
  • Put any jars with textures you want (e.g. your .minecraft/versions/<version>/<version>.jar) in FastAsyncWorldEdit/textures

Command Syntax

  • <arg> - A required parameter
  • [arg] - An optional parameter
  • <arg1|arg2> - Multiple parameters options
  • <arg=value> - Default or suggested value

Terminology

  • Height Map - The HSL luminance (whiteness) of each pixel represents the terrain height.
  • Color Map - An image of terrain color
  • Image Mask - Restrict some operation to the white parts of the image mask

Starting

To begin you need to either specify a heightmap to use, or the dimensions you want.

  • Using a heightmap: //cfi <url>
  • Or using a fixed size: //cfi <width> <length>

Do not run these yet, but when you are happy with your settings:

  • //cfi done - Build the world
  • //cfi cancel - Cancel creation

Modifying the world

The palette

  • You may want to color the world using an image e.g. https://i.imgur.com/TlH2uhU.jpg
  • Before you color parts of the world, you should change your palette (coloring) settings.
//cfi paletteComplexity <min=0> <max=100>
  • Filter out blocks to use based on their complexity, which is a measurement of how much color variation there is in the texture for that block.
  • Glazed terracotta is complex, and not very pleasant for terrain, whereas stone and wool are simpler textures.
  • Using 0 73 for the min/max would use the simplest 73% of blocks for coloring, and is a reasonable value.
//cfi paletteRandomization <enabled=true>
  • This is enabled by default, randomization will add some random variation in the blocks used to closer match the provided image.
  • If disabled, the closest block to the color will always be used.
  • Randomization will allow mixing biomes when coloring with biomes
//cfi paletteBlocks <mask|#clipboard>
  • Allow only specific blocks to be used for coloring
  • block-list is a list of blocks e.g. stone,bedrock,wool
  • #clipboard will only use the blocks present in your clipboard.
//cfi paletteBiomePriority <percent=50>
  • Increase or decrease biome priority when using blockBiomeColor.
  • A value of 50 is the default
  • Above 50 will prefer to color with biomes
  • Below 50 will prefer to color with blocks

Coloring commands

//cfi color <image-url> [image-mask|mask] [whiteOnly=true]
  • Color the terrain using only blocks
  • Provide an image, or worldedit mask for the 2nd argument to restrict what areas are colored
  • whiteOnly will restrict coloring to the white parts of the image mask (if provided)
//cfi glass <image-url>
  • Color the terrain using glass (unique, but looks weird from an angle)
//cfi biomeColor <image-url>
  • Color the terrain using biomes.

Note: Biome coloring does not change blocks:

  • If you changed the block to something other than grass you will not see anything.
//cfi blockBiomeColor <image-url> [image-mask|mask] [whiteOnly=true]
  • Color the terrain using blocks and biomes.
  • Provide an image, or worldedit mask for the 2nd argument to restrict what areas are colored
  • whiteOnly will restrict coloring to the white parts of the image mask (if provided)
//cfi biome [url|mask] <biome> [whiteOnly=false]

Set the biome in specific parts of the map.

  • If an image is used, the biome will have a chance to be set based on how white the pixel is (white #FFF = 100% chance)
  • The whiteOnly parameter determines if only white values on the image are set
  • If a mask is used, the biome will be set anywhere the mask applies

Height settings

//cfi height <url|height>

  • Set the terrain height either based on an image heightmap, or a numeric value.

//cfi waterHeight <height=0>

  • Change the level water is generated at.
  • By default water is disabled (with a value of 0)

//cfi waterId <number-id>

  • Use another block id instead of water. e.g Maybe you want to use lava.

//cfi smooth <image-mask|mask> <radius> <iterations> [whiteonly=true]

  • Smooth terrain within an image-mask, or worldedit mask
  • You can use !0 as the mask to smooth everything
  • This supports smoothing snow layers (set the floor to 78:7)
  • A good value for radius and iterations would be 1 8.

Material settings

//cfi overlay [url|mask] <pattern> [white=false]

  • Change the block directly above the floor (default: air)
  • e.g. Tallgrass

//cfi main [url|mask] <pattern> [white=false]

  • Change the block to use as filling (default: stone)

//cfi floor [url|mask] <pattern> [white=false]

  • Change the block to use as the floor (default: grass)

//cfi column [url|mask] <pattern> [white=false]

  • Change both the floor and main block.

Populators

//cfi caves

  • Generate vanilla caves

//cfi ore[s]

//cfi addores
  • Add the default minecraft ores.
//cfi ore <mask> <pattern> <size> <frequency> <rarity> <min-Y> <max-Y>
  • Use a specific pattern and settings to generate ore.

//cfi schem [url] <mask> <file|folder|url> <rarity> <distance> <rotate>

  • Populate a schematic on the terrain.
  • Change the mask (e.g. angle mask) to only place the schematic in specific locations.
  • The rarity is a value between 0 and 100.