-
Notifications
You must be signed in to change notification settings - Fork 139
CTM Guide
This page describes how to use CTM, structure of .properties file and some useful (or not) techniques
-
All textures for CTM textures are in
[modname]/mcpatcher/ctmfolder
the overrides apply globally so it doesn't matter in which directory you put them -
in the
ctmfolder you must have a folder with your block name (or any name actually)
in that folder you will have all texture files (animations allowed via mcmeta file for every texture) and.propertiesfile
multiple.propertiesfiles are allowed for a single folder and set of textures for more complex behaviour (see examples)
- Method
- MatchBlocks
- MatchTiles
- Tiles
- Connect
- Faces
- Biomes
- Heights
- RenderPass
- InnerSeams
-
Weights
- Examples
Override for a specific block, you can get the value from the tooltip if you have this feature enabled.
Can accept several values which allows to apply one CTM for different blocks.
if no value for this property was provided, Angelica will fallback to name of the .property file
examples:
matchBlocks=gregtech:gt.blockcasings4
matchBlocks=minecraft:glass minecraft:glass_pane
Override for a specific texture, main difference from matchBlocks is that this will only match a certain texture, not the block itself
example:
matchTiles:minecraft:blocks/stone
The list of texture names for CTM. Supports ranges and explicit names.
You probably would want to use texture names like 0.png, 1.png as it is easier, however this allows for any names
examples:
tiles=0-46 - classic for full CTM, expects files from 0.png to 46.png
tiles=0-3,5, 8 - expects files 0.png, 1.png, 2.png, 3.png, 5.png, 8.png
tiles=sometext,somemoretext - expects files sometext.png, somemoretext.png
Sets how the blocks are connected, can accept values: block, tile, material
block connects based on block (who would guess)
tile connects based on texture
material connects based on material (didn't really understand this part, ig it is for stone, iron, wood etc)
Fallbacks to block if no value for matchTiles is set, otherwise fallbacks to tile
Most of the time you don't need to set this value because of that fallback rule
example:
connect=block
Limit to specific faces of a block, can accept several values
Fallbacks to all if value not present in the .properties file
examples:
faces=top
faces=all
faces=bottom
faces=sides
faces=north south east west
faces=top bottom sides
Limit to specific biomes, can accept several values
Fallbacks to all if value not present in the .properties file
examples:
biomes=plains
biomes=desert forest
biomes=taiga jungle savanna
Limit to certain Y levels, can only accept several values
can be set through either minHeight and maxHeight or heights
examples:
heights=0-64
heights=64-255
example of maxHeight and minHeight:
minHeight=64
maxHeight=128
Controls which rendering layer a CTM rule is applied in
In most cases you only need it to avoid rendering issues with transparency
renderPass=solid used for fully opaque blocks
renderPass=cutout used for fences, glass CTM, textured blocks with hard transparency
renderPass=translucent used for transparent blocks like glass or water
renderPass=cutout_mipped no idea for what
renderPass=overlay used for blocks with an overlay, for example GT hatches or damaged anvils
renderPass=backface used for blocks with a backface, however it is very rare to use this one
Adds internal seams, fallback to innerSeams=false if not set
example:
innerSeams=true
Priority, used for Random type to determine which textures have certain chances to be used for render
accepts several values, assigns values correspondingly to tiles list values
examples:
weights=10 2
weights=1 3 3 2 1
Selects CTM mode:
-
LINK
ctm/glass/default -
LINK
compact/ctm_compact -
LINK
compact-extended -
LINK
horizontal/bookshelf -
LINK
vertical -
LINK
horizontal+vertical/h+v -
LINK
vertical+horizontal/v+h -
LINK
top/sandstone -
LINK
repeat/pattern -
LINK
random -
LINK
fixed/static
example:
method=ctm
Requires exactly 47 tiles, the most versatile but the most size-heavy method
Here's a visual explanation of how the textures should be numbered:
Requires exactly 5 tiles.
Splits face into 4 quadrants and builds final texture per quadrant.
Here's a visual explanation of how it works on an example of 3x3 blocks pattern with a cutout:
as you can see, compact CTM has a single limitation:
the size of any part of texture, such as an edge or a corner, can't be larger than 8x8 pixel
this is the main case where only full CTM can be used.
Requires exactly 5 tiles, layout is the same as compact ctm. The difference is that instead of rendering 4 quadrants, it generates 47 textures just as full ctm, which removes z-fighing issues which is needed for casings / hatches or any other blocks with overlays.
Requires exactly 4 tiles. connects only horizontally, used for bookshelves for example
Requires exactly 4 tiles.
Requires exactly 7 tiles.
Two-stage: horizontal first, then vertical if none horizontal variations are found.
Requires exactly 7 tiles.
Two-stage: vertical first, then horizontal if none vertical variations are found.
Requires exactly 1 tile.
Applies tile on side faces when block above matches, for example used for smooth sandstone
Requires width * height tiles.
Properties:
-
width- defines the number of tiles in width -
height- defines the number of tiles in height -
symmetry- defines the symmetry of the pattern, can be eithernoneoropposite
Just uses N*M grid, for example
0 1 2 3 4
5 6 7 8 9
Any number of tiles.
Properties:
-
weights- described here -
symmetry- acceptsall,opposite,none, groups opposite faces together, otherwise keeps them independent -
linked- makes the textures consistent between render states, not needed much
Requires exactly 1 tile. Always uses the same tile.
useful only if combined with height or other properties (see examples)
matchBlocks=minecraft:glass minecraft:glass_pane
metadata=0
method=ctm
faces=all
tiles=0-46
connect=blockthis one will use one texture for lower part of the world and another for the rest of the world
matchBlocks=minecraft:dirt
metadata=0
method=fixed
faces=all
tiles=0
connect=block
maxHeight=40matchBlocks=minecraft:dirt
metadata=0
method=fixed
faces=all
tiles=0
connect=block
minHeight=41