Connected Textures#

Connected Textures (CTM) connects matching blocks together, making them appear unified.

Based on the configuration for MCPatcher’s Connected Textures mod.

_images/icon5.png

The textures “connect”#

Warning

renderPass is not implemented

For each block or terrain tile to override with connected or random textures, use this template and create a .properties file in the optifine/ctm folder of the resource pack. Properties files can be organized into subfolders of any depth, as long as everything is within the top-level optifine/ctm folder.

_images/settings4.png

Button and tooltip for the option, found in Video Settings ➔ Quality#

Different types of connected texture methods are available with different requirements and restrictions. See below for details for each method.

General properties used by all methods#

Note

All property names are case-sensitive.

Note

All paths are relative to assets/minecraft unless otherwise stated.

Note

matchTiles and matchBlocks can be omitted if they can be inferred from the filename instead:
optifine/ctm/xxx/<name>.properties assumes matchTiles=<name>
optifine/ctm/xxx/block_<name>.properties assumes matchBlocks=<name> (unless either property is specified explicitly; defined keys override inferred filenames)

Key

Values

Meaning

method

Values: ctm, ctm_compact, horizontal, vertical, horizontal+vertical, vertical+horizontal, top`, ``random, repeat, fixed, overlay_ctm, overlay_random, overlay_repeat, or overlay_fixed
Required: ❌ No
Method to use when choosing a block’s replacement texture
Methods:
ctm: Standard 8-way method (glass in the original CTM, uses 47 tiles)
ctm_compact: Compact 8-way method, uses 5 tiles
horizontal: Connect to blocks on left and right only (commonly used for bookshelves)
vertical: Connect to blocks above and below only
horizontal+vertical: Connect horizontally, then connect vertically
vertical+horizontal: Connect vertically, then connect horizontally
top: Connect to block above only (commonly used for sandstone)
random: Pick a tile at random
repeat: Repeat a fixed pattern over large areas
fixed: Use a single fixed tile, equivalent to random with only one tile

overlay: Overlay for block transitions, uses 17 tiles
overlay_ctm: Overlay variant of ctm method
overlay_random: Overlay variant of random method
overlay_repeat: Overlay variant of the repeat method
overlay_fixed: Overlay variant of fixed method

The overlay method can be combined with other methods if they come before them in the order, alphabetically
The ctm_compact method cannot be combined with any overlay method

tiles

Values: List of tiles
Required: ✅ Yes
List of replacment tiles to use
Each tile must be a separate image, just like terrain and item textures
Tiles can be specified in several ways: 0 0.png, 8-11 8.png, 9.png, 10.png, 11.png, name name.png, name.png name.png, full/path/name.png  full/path/name.png
<skip>: Skip the tile, continue with next CTM properties
<default>: Use the default texture for that block/tile

In all cases except the last, the PNG file must be in the same directory as the properties file itself
The formats can be mixed and matched: tiles=0-4 5 some/other/name.png
The overlay methods may use the special name <skip> for empty tiles to be skipped; overlay methods cannot use the <default> special name

matchTiles

Values: List of strings
Required: ❌ No
List of block and/or tiles this method should apply to
Multiple .properties file can refer to the same block/tile and they will be processed in alphabetical order by filename
All tile-based entries are checked before block ID-based ones; the first match wins

matchBlocks

Values: List of blocks + optional properties
Required: ❌ No
To refer to a tile from vanilla Minecraft, simply use its’ name in textures/block: matchTiles=dirt
To refer to a tile from a mod, its’ name must be known: matchTiles=botania:blazeblock

Tiles output by CTM rules can also be matched by another rule
The tile name is simply the full path to the tile: matchTiles=optifine/ctm/mygrass/1.png

Block format: (optional parts are in <>)
<namespace:>name<:property1=value1,value2...:property2=value1,value2...>
For example:
• Short name: oak_stairs
• Full name: minecraft:oak_stairs
• Full name + properties: minecraft:oak_stairs:facing=east,west:half=bottom

weight

Values: Integer
Required: ❌ No
Default: 0
If multiple properties files match the same block, the highest weighted one is used
In the event of a tie, the properties filenames are compared next.

connect

Values: block, tile, material, or state
Required: ❌ No
Default: block for blocks, tile for tiles
Connect type
For methods that connect to adjacent blocks, specify how the game should decide if two blocks should be connected:
block: Connect if block ID of this block == block ID of neighbor
tile: Connect if tile texture of this block == tile of neighbor
material: Connect if block material (stone, dirt, etc.) == neighbor’s
state: Connect if block state (block + properties) == neighbour’s

connectTiles

Values: List of tiles
Required: ❌ No
Connects only to blocks which are using the specified tiles
Only for overlay methods

faces

Values: Combination of north, south, east, west, top, bottom, sides, and all
Required: ❌ No
Limit feature to certain faces of the block:
bottom: Bottom face (negative Y)
top: Top face (positive Y)
north: North face (negative Z)
south: South face (positive Z)
east: East face (positive X)
west: West face (negative X)
sides: Shorthand for north south east west
all: All sides

This property is ignored on non-standard blocks (signs, fences)

biomes

Values: List of biomes
Required: ❌ No

Biome restrictions, modded biomes also can be used

heights

Values: Integer range
Required: ❌ No
Height restriction, no limit.
Since 1.18, negative values may be specified for height. When used in a range they have to be put in parenthesis ( ).

minHeight, maxHeight

Values: Integers
Required: ❌ No

Legacy properties for heights, Use heights instead

ctm.<ctm_index>

Values: Tile index
Required: ❌ No
Compact CTM tile replacement
Only for ctm_compact method
Allows definition of replacement tile for a specific CTM case

<ctm_index> is the index of the CTM case from the template (0-46)
Tile index is the index of the tile as defined in tiles; not the tile name

With ctm_compact, more than 5 tiles can be defined and they can use the additional tiles as replacements

tintIndex

Values: Integer
Required: ❌ No
Default: -1, disabled
Tint index, only for overlay method
Tint index is for the tile’s texture
-1 means it is disabled

tintBlock

Values: Block ID
Required: ❌ No
Tint block, only for overlay method
The block used for the tile texture tinting
Different blocks use different colors for the same tint index

layer

Values: cutout_mipped, cutout, translucent
Required: ❌ No
Default: citout_mipped
The layer on which the overlay texture should be rendered
Only for the overlay method

Values:
cutout_mipped: Transparent textures with mipmaps
cutout: Transparent textures without mipmaps
translucent: Translucent textures with mipmaps

name

Values: List of block IDs
Required: ❌ No
Only for blocks with have corresponding nameable tile entities
For example: Beacon, Brewing Stand, Enchanting Table, Furnace, Dispenser, Dropper, Hopper

See Custom GUIs document for the syntax

Method-specific properties#

Everything below here is for specific CTM methods. Each .properties file should contain only one of these sections.

Standard 8-way connected textures#

Note

Implies method=ctm

_images/ctm.png

Template for the CTM method, 48th tile is unused#

Key

Values

Meaning

tiles

Values: List of 47 tiles
Required: ✅ Yes

List of the 47 tiles to use when connecting

innerSeams

Values: Boolean
Required: ❌ No
Default: false

Whether to show seams on inner edges when connecting to adjacent blocks

Compact 8-way connected textures#

Note

Implies method=ctm_compact

_images/compact.png

Template for the CTM method#

Key

Values

Meaning

tiles

Values: List of 5 tiles
Required: ✅ Yes

List of the 5 tiles to use when connecting

innerSeams

Values: Boolean
Required: ❌ No
Default: false

Whether to show seams on inner edges when connecting to adjacent blocks

ctm.<I>

Values: Integer
Required: ❌ No
Indexes of replacement tiles for some CTM cases
<I> is a tile index
Only used for special cases

Horizontal-only connected textures#

Note

Implies method=horizontal

_images/horizontal.png

Template for the CTM method#

Key

Values

Meaning

tiles

Values: List of 4 tiles
Required: ✅ Yes

List of the 4 tiles to use when connecting

Vertical-only connected textures#

Note

Implies method=vertical

_images/vertical.png

Template for the CTM method#

Key

Values

Meaning

tiles

Values: List of 4 tiles
Required: ✅ Yes

List of the 4 tiles to use when connecting

Top connected textures#

Note

Implies method=top

Key

Values

Meaning

tiles

Values: Tile string
Required: ✅ Yes

Single tile to use when connecting

Randomly connected textures#

Note

Implies method=random

Note

For linked to work, multiple properties files with linked=true and the same number of replacement textures and same set of weights must be present
For example, double_plant_top.properties: method=random ; tiles=grass_top1 grass_top2 grass_top3 ; weights=1 2 3

Warning

High randomLoops value may decrease the chunk loading speed

Key

Values

Meaning

tiles

Values: List of tiles
Required: ✅ Yes

List of tiles to use when connecting

weights

Values: List of integers
Required: ❌ No
List of weights to apply to the random choice
For example: tiles=1 2 3 4 weights=10 1 10 5, tile 1 has weight 10, 2 has 1, 3 has 10, and 4 has 5.
Weights do not have to total any value; in the above example, tiles 1 and 3 will each be used ~38% of the time ((10/(10+1+10+5)))
List must be same length as tiles

randomLoops

Values: Integer range from 0 to 9
Required: ❌ No
Default: 0
Repeats the random function several times to increase randomness
Can be used to make different textures use different random patterns

symmetry

Values: none, opposite, or all
Required: ❌ No
Default: none
Desired level of symmetry for the faces of each block
Applies to standard 6-sided blocks only

none: All 6 faces are textured independently
opposite: 2-way symmetry; opposing faces have the same texture, but each pair can potentially have a different texture
all: All 6 faces have the same texture

linked

Values: Boolean
Required: ❌ No
Default: false
Texture linking between related blocks
If true, OptiFine uses the same random number seed for all parts of a multi-block object, for example, the top and bottom halves of tall grass
This allows randomized textures that will remain consistent within each set of blocks
If false, the two halves will be scrambled, i.e. chosen independently
This property currently only applies to plants, double plants, and doors

Repeat connected textures#

Note

Implies method=repeat

Key

Values

Meaning

width

Values: Integer
Required: ✅ Yes

Width of the repeating pattern

height

Values: Integer
Required: ✅ Yes

Height of the repeating pattern

tiles

Values: List of tiles
Required: ✅ Yes

List of exactly width * height

symmetry

Values: none, or opposite
Required: ❌ No
Default: none
Desired level of symmetry for the faces of each block
Applies to standard 6-sided blocks only

none: All 6 faces are textured so that the pattern tiling looks the same from all sides
opposite: 2-way symmetry; opposing faces have the same texture, which means that tiling on the south and east faces will be mirrored left-to-right when comapared to the north and west faces

Fixed connected textures#

Note

Implies method=fixed

Key

Values

Meaning

tiles

Values: String
Required: ✅ Yes

Single tile to use


🆚️ This documentation assumes the latest OptiFine version. Notes are not made for legacy versions (1.8).
🔙️ This documentation is updated to commit 8410499f.
©️ This file is offered without any copyright restrictions. Please copy and modify it to suit your needs. Credit is optional, but appreciated.