S&box Wiki
Home
/
Edit Tilesets
View
Edit
History
No Category
Developer Overview
The Project System
Publishing To Asset Party
Getting Started With Hammer
Mapping Basics
Mapping Entities
Advanced Mapping Techniques
Getting Started with Modeldoc
Animgraph & Animation
Physics
Modeldoc Nodes
Advanced Modelling
UI Basics
Styles & Stylesheets
Razor Templates
Game Menus
Materials
Built In Shaders
Shaders
Shader Reference
Sounds & Audio
Particles
Getting Started
Making Games
Input
Networking
Physics
Rendering
Editor & Tools
VR
Misc
Playing Guides
Console Commands & Variables
Dedicated Server
Log in to edit
Tilesets
<cat>Hammer.Advanced</cat> <title>Tilesets</title> <upload src="aaf9e/8dbdee87e7cec01.png" size="47768" name="image.png" /> # What is a Tileset Tilesets allow you to create individual pieces of a larger build and define how they fit together. Using tilesets allows you to work with very simple geometry and let hammer replace it with more the complex version of it. ‌ --- ‌ # Creating a basic tileset ## Step 1 : Create an Empty Map. Create your map and add **`_tileset`** to the end. This will allow you to search for it easier as well as all other tilesets. For demonstration purposes we will be creating a 512x512 Road network, so we will name it: **`roadnetwork_512_tileset`** ##Step 2: Creating an empty tileset To create a tileset hover over the **Tiles** tab and select the **Create tile set** . <upload src="aaf9e/8dbdee5af984873.png" size="268770" name="image.png" /> After clicking a object should appear in your outliner named _"UnnamedTileSet - Tileset"_. ## Step 3: Renaming Tilesets are required to be named **`Base`**. Select the tileset in the outliner or Object Properties and rename it. <upload src="aafdb/8d98e8d08006226.png" size="9386" name="rename.png" /> ## Step 4: Setting up a Tile start off by creating a placeholder mesh, this can be anything and will be deleted once we have our tile object Once you have a mesh down, selected it using the Mesh or Objects tool. Click on _* Tiles -> Create Single Tile*_ <upload src="aaf9e/8dbdeeca1c9fb54.png" size="225764" name="image.png" /> You should now have a blue outline surrounding this square <upload src="aaf9e/8dbdeece99bacb4.png" size="48432" name="image.png" /> The *inside* of this blue outline is your Tile, Every tile four sides: Top, Bottom, Left, Right. The green arrow points to the Top and the red points to the Right. These sides will determine how the tiles are placed on the mesh so keep them in mind when designing your geometry. ‌ **`IMPORTANT STEP:`** Hierarchy is important to tilesets, the tile you just created is not apart of the tileset, drag the tile object in the outliner and drop it on the tileset. it should look like: <upload src="aaf9e/8dbdeedd29cc066.png" size="2392" name="image.png" /> <note> All objects that you want to be apart of your tile need to be a child of tile object in the outliner. It is a very common for hammer to break this parenting, in anycase, you can just drag the objects you want onto the tile in the outliner to fix it. </note> ‌ Because we are creating a road network there are 4 types of tiles we need: Straight, Turn, T-Section, Intersection. <upload src="aaf9e/8dbdef024cc8d70.png" size="144916" name="image.png" /> Before we start creating these mesh's though we should increase the size of our tiles so we can have wider roads. click on the tile in *Object Mode* and check the Object Properties. We will explain the rest of these later but for now focus on *Base Height* and *Base Width*. These two make up the size of your tile. We will set both Width and Height to 512 <upload src="aaf9e/8dbdef340fc85d5.png" size="47304" name="image.png" /> Now can create our first road segment, again making sure any meshs we add, we make children of the tile object. <upload src="aaf9e/8dbdef3b7b8dbd3.png" size="501695" name="image.png" /> Then we can Repeat these step 3 more times for every other piece of the road <upload src="aaf9e/8dbdef465c0785b.png" size="394472" name="image.png" /> ## Setting up the Rules Now that you have your tiles created its time to establish the rules on how the connect. Open up the Object Properties for your Tileset. This is done by double clicking on it in the outliner, or selecting it and pressing <key>ALT</key>+<key>E</key> Once open select the _"Tile Set Properties"_ Tab <upload src="aaf9e/8dbdef538b241f7.png" size="48893" name="image.png" /> for the sake of simplicity we wont worry about angles quite yet and instead focus on connectivity Select the _"Add Mesh Property"_ button along the bottom Then choose _"Mesh_edge_connectivity"_ <upload src="aaf9e/8dbdef5bc359463.png" size="54164" name="image.png" /> for now, leave everything as default and close the object properties window. While in Object Mode, Select one of your tiles ( Not the geometry the tile itself ) You should notice the property we just added to our tileset is now available within the tiles. <upload src="aaf9e/8dbdef64338d2c8.png" size="29492" name="image.png" /> Mesh Edge Connectivity gives us 5 values to choose from: - open - closed - not open - note closed - \* \- Match Any These are the rules that define how the tile will connect to other tiles, "Open" means that edge of the mesh is open aka nothing is there, "Closed" means that edge of the mesh is closed aka theres another tile connected at that side. Looking at the green and red indicators on the tile assign which sides of the tile should be connected to other tiles ("Closed") or not connected to other tiles ("Open") For our road network example this is how we setup the rules: <upload src="aaf9e/8dbdef8037784de.png" size="45577" name="image.png" /> and thats it! Make sure to save, and now we start using it! ## Step 5: Using your Tileset once you have a tileset saved. Open up a new map, this can be whatever you want or an existing map, anything works. Create a plane that is the same size as what you set your base height and width to earlier. We created out tileset to a size of 512x512 so that will be my plane size <upload src="aaf9e/8dbdef8f4022105.png" size="421307" name="image.png" /> while in *Mesh Mode* select your plane, then select _Tiles -> Create Tile Mesh_ (or <key>Ctrl</key> + <key>Shift</key> + <key>I</key>) you should notice in your outline your mesh has now become a tilemesh <upload src="aaf9e/8dbdef99bee50e4.png" size="34651" name="image.png" /> in the object properties, set the "Tile Set File 0" to the tileset we just created, you can press the blue magnify glass to open a browser. <upload src="aaf9e/8dbdef9db56c56a.png" size="17711" name="image.png" /> Now with edge mode enable select the edge you want to extend, hold shift, and drag it out. <note>Since we made out tileset 512, we can set out grid size to that amount to make extending the edges easier.</note> <upload src="aaf9e/8dbdefacfbeaa95.mp4" size="20545682" name="Desktop 2023.11.06 - 14.00.30.03.mp4" /> Congrats you now have a simple but working tileset! If you want to test your understanding see if you can create a segment for end pieces of the mesh. <note> Why was the first and second tile not replace with anything? - because we didn't create a tile with rules that fit those squares, the initial square requires all 4 sides to be open, when creating our tileset we never made a tile that had all 4 sides open meaning no tile could work there leaving the base geometry. same with the second square. </note>
S&box Wiki
Development
Developer Overview
6
Editor Overview
General FAQ
System Requirements
The s&box wiki
Troubleshooting
Useful Links
The Project System
4
Adding Assets
Creating a Game Project
Project Settings Window - Games
Project Types
Publishing To Asset Party
2
Uploading assets
Uploading projects
Hammer
Getting Started With Hammer
3
Getting Started With Hammer
Making Your First Map
Mapping Resources
Mapping Basics
7
Cordons
Hotspot Materials
Selection Sets
Standard Mapping Dimensions
Tool Materials
Tools Visualisation Modes
Using Entities That Require a Mesh
Mapping Entities
2
Creating a Door
Light Entities
Advanced Mapping Techniques
8
Collaborating With Prefabs and Git
Instances
Prefabs
Quixel Bridge Plugin
Tilesets
Tilesets-Advanced
Tilesets-Proxies
VIS Optimizations
Models & Animation
Getting Started with Modeldoc
7
Automatic Model Setup
Breakpieces
Creating a Model
Guide to Models
Importing Rust Weapons
LODs
ModelDoc FAQ & best practices
Animgraph & Animation
4
Animations without Animgraph
AnimEvents, AnimGraph Tags, Attachments
Animgraph
Delta Animations
Physics
3
Cloth Physics
Collisions, Physics & Surface Types
Jiggle Bones
Modeldoc Nodes
1
Custom ModelDoc nodes
Advanced Modelling
6
Bodygroups
Citizen
First Person
IKChains and Stride Retargeting
Morphs
Vertex Normals
User Interface
UI Basics
7
Custom Fonts
Embedding Websites
Enabling Pointer Events
Events and Input
Localization
UI Basics
UI with Components
Styles & Stylesheets
1
Video Backgrounds
Razor Templates
4
A Razor Overview
Aliases and SetProperty Attributes
Generic Components
Templates
Game Menus
1
Making a Custom Pause Screen
Materials & Shaders
Materials
5
Guide to Materials
Material Attributes
Material Resources
Texture Settings
Using Dynamic Expressions
Built In Shaders
2
Foliage Shader
Glass Shader
Shaders
4
Compute Shaders
Constant Buffers
Material API
Shading Model
Shader Reference
5
Anatomy of Shader Files
Getting rid of Tex2D macros
Shader Reference
Shader States
Texture Format Cheat-Sheet
Other Assets
Sounds & Audio
3
Guide to Sounds
Sound Events
Soundscapes
Particles
5
Creating animated sprites
Creating your first particle effect
Understanding Particle Editor
Using custom sprites
Using particle systems from C#
Coding
Getting Started
5
Cheat Sheet
Learning Resources
Setting up Rider
Setting up Visual Studio
Setting up Visual Studio Code
Making Games
2
Components
GameObjects
Input
4
Commands
ConVars
Input System
Speech Recognition
Networking
7
Auth Tokens
Http Requests
Lobby System
Networked Types
Networking Basics
RPCs
WebSockets
Physics
5
Collisions
Hitboxes
Joints
Traces
Triggers
Rendering
3
Render Tags
RenderHooks
Scenes
Editor & Tools
7
Creating a Tool
Custom Asset Types
Guide to Widgets
Hammer API
Hammer Gizmos
Hotload Performance
Widget Docking
VR
3
Getting Started
VR Input
VR Overlays
Misc
13
Asset Types
Attributes and Component Properties
Backend API
Cloud Assets in code
Code Accesslist
CPU Performance Profiling
DisplayInfo
FileSystem
Mounting assets at runtime
package/find
Setting Up A Navigation Mesh
Threaded Tasks
TypeLibrary
Playing
Playing Guides
3
Default Keybinds
Proton
s&box on macOS (Experimental)
Console Commands & Variables
1
Launch Arguments
Dedicated Server
1
Dedicated Servers