S&box Wiki

Revision Difference

Tilesets-Advanced#552490

<cat>Hammer.Advanced</cat> <title>Tilesets-Advanced</title> <warning> This page assumes that you have read the <page>Tilesets</page> page. It is highly recommend that you read through that page first and have a preliminary understand about how tilesets work. </warning> ⤶ ## The Advanced Features ⤶ # The Advanced Features This page aims to cover the remaining information about tilesets, it will cover everything left out of the initial <page>Tilesets</page> and more. ⤶ ⤶ &zwnj;⤶ ⤶ ---⤶ ⤶ # Tile Set Properties⤶ ⤶ ## Object Properties⤶ ⤶ ### Convexity Angle⤶ Changes the threshold for a angle to be considered convex/concave. ⤶ ⤶ here I set tiles to appear as green when attached to a convex angle.⤶ <upload src="aaf9e/8dbdf1450e4bedd.gif" size="547091" name="ConvexityAngleExplainer.gif" />⤶ ⤶ &zwnj;⤶ ⤶ ⤶ ### Ramp Rule Set⤶ <validate> unknown </validate>⤶ ⤶ ⤶ &zwnj;⤶ ⤶ ⤶ ## "Tile Set Properties" Tab⤶ | Property | Description |⤶ | ------------------------------ | ------------------------------------------------------------ |⤶ | mesh_face-world-z | TBD |⤶ | mesh_edge_connectivity | which sides are connected regardless of angle |⤶ | mesh_edge_convexity | define sides based on if its a concave/convex angle |⤶ | mesh_edge_convexity_or_tileset | same as above but also includes option for different tileset |⤶ ---⤶ &zwnj;⤶ ⤶ ### Tile Set Mesh Properties Settings⤶ <upload src="aaf9e/8dbdf167b3342d9.png" size="9970" name="image.png" />⤶ | Property | Description |⤶ | ----------- | ----------------------------------------------------- |⤶ | Components | what the rule uses to determine how tile is connected |⤶ | Apply To | where to send the information to |⤶ | Manipulator | TBD |⤶ # More Properties⤶ ⤶ ## Tile Set Properties⤶ - Convexity Angle⤶ - Ramp Rule Set⤶ &zwnj;⤶ ⤶ ⤶ ## Tile Set Materials⤶ This allows you to use placeholder materials in your tiles and gives you an way to swap between multiple styles when creating your mesh⤶ ⤶ 1. Create your Tiles with placeholder materials. Here is an example I made for walls with an protruded outline.⤶ ⤶ <upload src="aaf9e/8dbdf18f4fea4d4.png" size="365760" name="image.png" />⤶ ⤶ 2. Open the Tile Set's Object Properties Window and goto the _"Tile Set Materials"_ Tab⤶ ⤶ 3. Along the bottom, click the third option _"Add Material"_, this will add the _"reflectivity_30"_ by default but double click it and and change it to one of your placeholder materials. Do this for all placeholder materials⤶ ⤶ <note> Double clicking the image will open the material editor but double clicking the name of the material will open the browser </note>⤶ ⤶ 4. Once you have all your materials added, click the first option _"Add Material Set"_. This will create a new column copying your placeholder materials, in this new column change the material from the placeholder to the real material. Remember to name any created sets for future reference.⤶ ⤶ >> It should look something like this⤶ <upload src="aaf9e/8dbdf1af0c9961f.png" size="42101" name="image.png" />⤶ ⤶ 5. Now that you have created the material set, go to your Tile Mesh, Choose Face Mode, and select all the faces that you want to apply the Material Set to. Then right click to open the context menu, and choose⤶ >> Context Menu -> Tiles -> Assign Material Set -> {Material Set Name}⤶ <upload src="aaf9e/8dbdf1b84764b40.png" size="225292" name="image.png" />⤶ ⤶ 6. Behold, All the placeholder materials now take on that Material Set's Equivalent. ⤶ <upload src="aaf9e/8dbdf1bb3f9caf4.png" size="589040" name="image.png" />⤶ &zwnj; ⤶ - Tile Set Properties⤶ * mesh_face-world-z⤶ * mesh_edge_connectivity⤶ * mesh_edge_convexity⤶ * mesh_edge_convexity_or_tileset⤶ ⤶ ---⤶ &zwnj; ⤶ - Tile Set Properties Settings⤶ * Components⤶ * Apply To⤶ * Manipulator⤶ ⤶ &zwnj;⤶ - Tile Set Materials⤶ ## Tile Properties | Property | Description | | ------------------- | ------------------------------------------------------------------------------------- | | Name | User given name for tile | | Base Width | Width of the tile | | Base Height | Height of the tile | | Use Best Size Match | If checked, the tile closest to the mesh size will be used, even if not exact. | | Minimum Size Scale | The minimum scale at which the tile can be selected, 0 is disabled | | Maximum Size Scale | The maximum scale at which the tile can be selected, 0 is disabled | | Probability Weight | Determines the chance of the tile being selected from multiple tiles of the same size | | Display Base Face | If checked, the tilemesh will remain visable even when replaced by a tile | | Align To Axis | Forces the edge rules to align to the provided world axis | | Rotation Snapping | Forces the geometry to snap along this angle | | Variation Id | <?TBD?> <validate> - **Rotation Snapping** - Description is educated guess, cannot determine behavior in practice - **Variation ID** - Unknown, Believed possible to learn through the provided tile set examples </validate> # Using Concave & Convex angles Concave and Convex angles allow your tile sets to use specific tiles based on how connected tiles are angled relative to it. ⤶ ⤶ Examine this diagram to what name refers to what type of angle⤶ <upload src="aafdb/8d9905e4d8c7ce5.png" size="39381" name="test.png" />⤶ >>> in short, concave is an "inside" angle and and convex is an "outside" angle.⤶ ⤶ to give your tiles these rules, goto your TileSet Object Properties -> Tile Set Properties -> Add Mesh Property -> mesh_edge_convexity⤶ <upload src="aaf9e/8dbdf205f3039f3.png" size="52750" name="image.png" />⤶ ⤶ Once this TileSet property is added each tile will now be given those "rules" in its object properties allowing you to specify how the edges should connect⤶ ⤶ &zwnj;⤶ ⤶ ###mesh_edge_convexity⤶ <upload src="aafdb/8d99067057ff564.png" size="5273" name="mesh_edge_convexity.png" />⤶ This property can define what tiles can connect together depending on their edge characteristics.⤶ <upload src="aafdb/8d9905e4d8c7ce5.png" size="39381" name="test.png" />⤶ If 180 degrees is treated as flat then **concave is < 180** and **convex is > 180**⤶ ⤶ Drop-down options are as follows⤶ - **open**⤶ - **flat**⤶ - **convex**⤶ - **concave**⤶ ⤶ Included are also their negated versions and a ***-Match Any** option⤶ ⤶ ##Example⤶ Here the settings for mesh_edge_convexity is shown for 2 tiles and in practice how these 2 tiles can be used.⤶ ---⤶ ⤶ For those interested here is Template I made for creating building walls.⤶ <upload src="aaf9e/8dbdf21c3570f7b.vmap" size="452133" name="buildingWalls_tileset_template.vmap" />⤶ ⤶ * The size of the tiles are 128x128 and they are to be placed vertical (z axis)⤶ ⤶ ---⤶ ⤶ &zwnj;⤶ ⤶ Also here is an example on how Concave/Convex angles can be used in practice⤶ <upload src="aafdb/8d99094281bd708.png" size="200431" name="example.png" /> <upload src="aafdb/8d990914958c046.mp4" size="27956660" name="2021-10-16 11-38-34.mp4" />⤶ ⤶ ⤶ # Group Proxies & Custom Properties⤶ ⤶ ⤶ ⤶ ⤶ ⤶ # Using Multiple Tilesets⤶ <upload src="aafdb/8d990914958c046.mp4" size="27956660" name="2021-10-16 11-38-34.mp4" />