-
Notifications
You must be signed in to change notification settings - Fork 46
TilingUpdate
The geometry/tiling update has a lot of internal changes. This document aims to provide an overview of what needs to be changed for package authors.
The geometry of wall/floor/ceiling tiles is now generated entirely by the compiler. This allows portalability to be defined individually for each 32×32
(¼ voxel) tile. As a consequence, any condition which detects black/white portalability for voxels now checks per-tile. Positions will need to be updated to reference the center of ¼ tiles, not the center of voxels. Tiles may also be set to nodraw or a forced 4x4 variant, causing tile sizes to appropriately reshape around that.
- To manipulate tiles, a new AlterTiles result has been implemented. In addition, templates have been greatly expanded with new
bee2_template_tilesetter
andbee2_template_colorpicker
entities. - A common pattern in items is to use
EmbedFace
in editoritems to generate surfaces for all the areas where the item overlaps, then use templates to remove the tiles and place a custom set of brushes with matching colours. For efficiency, use PosIsSolid with a type ofsame
to check if all the tiles are the same:
"Condition"
{
"PosIsSolid"
{
// Two diagonally opposite tiles for a standard voxel
"Pos1" "-48 -48 0"
"Pos2" "48 48 0"
"Type" "Same"
}
"Result"
{
// Visgroup with a single color-picker, and as few brushes as possible.
"TemplateBrush" "SOME_TEMPLATE:single"
}
"Else"
{
// Visgroup with all 16 colour pickers, and brushes split on the 32-grid.
"TemplateBrush" "SOME_TEMPLATE:multi"
}
}
If so a simpler set of brushes can be used. Otherwise, place a different template with all the brushes clipped on the 32-grid so each can be accurate. VBSP will usually be able to merge adjacent faces if they're identical.
- If possible use the tiling system instead of your own brushes, since it can efficiently merge brushes as required.
The paneling sub-system lets you mark a set of tile positions as a grouped panel. They will be generated separately to all other tiles, and added to a brush entity. The tiles will be given appropriate squarebeams
textures on the side, with a thickness of 2
/4
/8
units. These are useful both for creating movable panel items, and extruded panel segments behind items. The "bevel" state on all sides can be individually controlled. To create these, use the CreatePanel result, and use SetPanelOpt to adjust options after.
The compiler now uses comp_kv_setter
s to add outputs to items. This means that a func_instance_io_proxy
is now no longer required at all for all items. Instead define the outputs as if they were using a proxy, and the compiler will do the correct thing. It is suggested that you make use of comp_relay
to make input and output more convenient.
The format of the Textures
block in styles has changed to be more flexible. Before, there would be a White
/Black
block which specifies a single category for each orientation. Now, each orientation and tile type has its own block, with individual definitions for each size of tile. This allows only textures which fit to be present. There's also a Double
category for a 256x256, though the logic for this is WIP.