Asset Editor

From Cities: Skylines Wiki
Jump to: navigation, search

This article may contain outdated information that is inaccurate for the current version of the game. It was last updated for 1.7.

The Asset Editor is a powerful tool for decorating existing assets, creating new assets from props, or creating new road pieces such as intersections that can then be imported into the game.

The Asset Editor is launched in the Tools sub-menu of the Main Menu.

Asset Editor (click to enlarge)

Usage[edit]

When you click on New Asset, a theme selection panel is shown. You can select one of the built in base themes or any custom theme that you have created or subscribed to from Steam Workshop. The theme does not affect your asset itself in any way, but the available templates vary slightly depending on the base theme. The selection is also useful for previewing how the asset will look in different themes. Especially with Snowfall, the winter theme can be used to preview how the texture-based snow will look like.

After the theme is loaded, you will be presented with a choice of various asset types that are supported.

Once the type has been selected, choose an asset template to start from. These are built-in assets and previously created assets. The ”Use existing decoration” toggle will load the existing decoration (if any) alongside the asset itself. Selecting the correct template is very important, since many properties will be inherited from it and cannot be changed later. These include things like the AI (which describes the in-game functionality of the asset), and UI category among others.

Asset Importer (click to enlarge)

For some asset types, the next screen allows you to select either a custom model (.fbx file format) or the default model from the template. In this screen, the model can also be scaled, rotated, or its pivot moved to bottom-center. It is however a good idea to set the transform and scale correctly already in the modeling software for easier updating. Due to differences in how various modeling programs export .fbx files, it is quite common to have to scale the model by 100. This can also be taken into account already in the modeling software. The selected model can be previewed from different directions using the mouse. A larger preview window can also be opened using the ”maximize” button. This mode has an additional ”state” slider for previewing what the model will look like if burned in a fire.

Asset Properties (click to enlarge)

The next step is the decoration tool, where various objects such as props and trees can be used to decorate the asset. Some props are marked as random. They have several versions, of which a random one is selected for each instance of the asset when it is spawned in the game to make copies of the asset look more varied. Because of this, the asset will not look exactly like in the editor.

There is a toolbar for preview tools in the bottom of the screen. Currently it can be used to select the time of day, and a checkbox for disabling and enabling the automatic snow (only available if the base theme is winter). Note that the snow toggle is only for previewing: even if disabled, your asset will still have generated snow in the game.

If the asset type allows for gameplay values to be adjusted, you can do so on the Asset Properties panel, in the bottom right corner.

Sub building button (click to enlarge)

Buildings can additionally be supplemented with sub buildings, which will be placed alongside with the main asset. New sub buildings can be placed by clicking the Add Sub Building -button on the bottom right corner of the screen. Sub buildings are copied and saved with the main building, so changes to the original template will require reimporting and saving. Some building types might not fully function as sub buildings.

Additional information on some of the properties:

  • Buildings/Circular: instead of the usual rectangular area the asset will occupy a circular area. Since the circular area is not currently shown in the asset editor, this may cause overlapping in the game if the building model is too large, and may thus require some experimentation.
  • Buildings/Expand front yard: automatically spawned buildings have a variable length (e.g. 1x1 can also be spawned as 1x2, 1x3, or 1x4). This variable specifies whether the extra space is added on the front or back yard of the building.
  • Props/Create ruining and Trees/Create ruining: if selected, a small worn out patch is created under the asset
  • Props/Variations and Trees/Variations: some asset templates support variations. When placing a prop or tree with variations in game, the final model will be randomly selected from the variations.
Asset Save (click to enlarge)

The asset can be saved from the menu reached from the icon on the top right corner or pressing ESC. It will become available for use in the game, and can be found in the same category as the template that was used in its creation.

Custom animation is not supported.

Custom asset in game (click to enlarge)

In all editor tools, when a small folder icon is seen, you can click it to open the folder containing the currently displayed assets.

For example, when saving an asset, this functionality can be used to change the thumbnail and tooltip image of the asset seen in the in-game UI. This is done by replacing the files in this folder with new ones (of the same name, type and size). The changes will be instantly reflected in the save asset panel. Replacing the main thumbnail image also automatically regenerates the other states of the button, which can then be replaced with custom ones if so wished. Please notice that this temporary folder will be deleted when the save panel is closed, so the original files should be stored elsewhere.

How to change the preview image (click to enlarge)

Specifications for imported assets[edit]

Modeling[edit]

This section is highly dependent to what modeling software you are using but below should apply to most of them.

The System Units of the modeling software should be set to metric with 1 unit = 1 meters.

Keep in mind that buildings in the editor are on a grid system called cells. Each cell is 8m x 8m. (See the section 'Buildings > General' for the max building cell sizes)

It is important for the model to be one single object with no hierarchy. So make sure to collapse the hierarchy in 3DS Max for example. It is also important for the model to use a single material, otherwise it will be split in sub-meshes and will fail to display parts of it.

If your model imports sideways, you need to experiment with the pivot so that your modeling software matches Unity's coordinate system (left handed coordinate system, +X is right, +Y is up and +Z is forward (into the screen)). Pivot in your model needs to be 0 on Z-axis and in the bottom center of the building. For instance, 3DS Max needs a +90degrees rotation on the X-axis to match Unity's coordinate system. The vertices at the bottom of the building need to be at 0.

Assets size need to fit to a grid where 1 cell is 8x8 meters. When importing an asset, there are constraints on its size depending on what template you use. (i.e. zoning buildings can be at most 4x4 cells while city service buildings can be 16x8). Those limitations are not currently documented in one place but the decoration editor will limit the cells size of a building depending on its type so you should first play around with the template you are planning to use before modeling something which may be too large. Pretty good floor height would be 2.5 to 3 meters.

A good size for a standard door would be roughly 2 meters. In shopping centers or such it could be higher. If the building is very tall, let’s say much more than 10 floors, the artist needs to scale down the floor height. This is done because the building would appear too high in the game and this would lead to two problems. 1. the game’s camera would take a jump upwards and then down again whenever the building is crossed in the game world. 2. It would make it hard to see the street level clearly.

The model size is not limited other than by Unity's limit of about 65000 vertices per mesh, but even approaching that is too much for single assets. To give some rough guidelines, the triangle count of the building models in the stock game ranges from less than 1000 triangles for the smallest and simplest buildings to about 5000 for large and complex buildings. A few exceptional buildings use up to 10-15k triangles. Vehicles typically have 500-1000 triangles, while trees vary from a few hundred for simple bushes to about 2000 for the more complex ones. Also note that a large number of props can also make the asset rendering slower, which is why there is a limit in the asset editor.

The game automatically creates both texture-based and 3D snow on all assets in the winter theme, so the same asset can be used for any theme. The generated snow can be disabled locally with vertex colors on the models. Set the color to (255, 255, 0) to disable all snow and to (255, 255, 128) to only disable 3D snow.

Generally the buildings use 1024x1024 texture maps, or 1024x512 if the building is small or simple. If working on a large building, try to see if it can be fitted in 2048x1024 size before making a 2048x2048 sized map. We try to refrain using 2048x2048 maps, and use them only in really important and huge buildings, such as a stadium or an airport.

The material for Buildings supports up to 6 textures, each needs to use the same filename as the FBX file with a texture type suffix. All main model textures have to have the same resolution.

  * "_d" suffix stands for the diffuse texture (RGB)       - 3 color channels texture defining the albedo.
  * "_a" suffix stands for the alpha texture (Mask)        - 1 color channel mask specifying per pixel transparency.
  * "_c" suffix stands for the color texture (Mask)        - 1 color channel mask specifying per pixel where the color variations can be applied.
  * "_i" suffix stands for the illumination texture (Mask) - 1 color channel mask specifying per pixel if the diffuse color should be considered emissive.
  * "_n" suffix stands for the normal map texture (RGB)    - 3 color channels tangent space normal map.
  * "_s" suffix stands for the specular texture (Mask)     - 1 color channel mask to specifying per pixel specularity.

The model import user folder is located at:

  • On Windows %localappdata%\Colossal Order\Cities_Skylines\Addons\Import
  • On Mac /Users/<username>/Library/Application Support/Colossal Order/Cities_Skylines/Addons/Import
  • On Linux /home/<username>/.local/share/Colossal Order/Cities_Skylines/Addons/Import
LOD (Level of Detail)[edit]

You may notice your custom models sometimes gets very distorted when viewed from far away : that's because the game automatically generates a low poly version (LOD) of your model and your texture in order to save resources. To solve this problem, you need to provide your own low poly version of the model (the fewest polys the better) and name it yourModelName_lod.fbx

For growable assets, the suggested limit on this is 100 triangles. For larger buildings and monuments, you can go slightly higher (200). For props and vehicles, less than 50 triangles should be enough. A typical texture size for the LOD models is 128 x 128. For the sake of other players, please abide by these LOD limitations unless its absolutely necessary to break them. This is how the game regains performance when you are zoomed out. The effect of the LOD model on runtime performance is often more significant than the high detail version. If the LOD model is too complex, the game may consider the asset broken and display an error message.

Your low poly model should have a new UV set that is probably different than your original high-poly model, this is anticipated. The UVs should be kept in the 0...1 interval, since the LOD textures use a texture atlas and values outside that range will result in colors being taken from other random models. The game will automatically bake the textures from your high-poly base model to your new low-poly model upon import. Also, make sure no vertices in both high detail and LOD models are below the 0-level since they can confuse the baking process. Often problems with the baking are related to trying to reuse UV space for parts of the buildings that are not similar enough (remember that the baking also bakes normals using the detailed geometry, even if no normal map is defined).

If for some reason you would like to override the auto-texture generation process (also called baking), you can create a diffuse texture for this low-poly model by importing a texture with "_lod_d" suffix (lowercase "lod" is important). If the diffuse texture is overwritten, the baking process is skipped entirely, so normals, speculars, etc also need to be set manually, or you lose the advantage from the automatic normal map creation. Note: due to a bug in version 1.1.0, using this feature requires additionally importing both lod_s and lod_a for the model to work at all; neutral ones can be used.

Asset types[edit]

  • Intersections
  • Parks
  • Buildings (city services ploppable and zone spawnable)
  • Trees
  • Vehicles
  • Citizens

Buildings[edit]

General

  • Buildings are on a grid in the editor. In the grid, each tile is called a cell.
  • One cell is 8m x 8m.
  • Max size for automatically spawning buildings: 4x4 cells.
  • Max sizes for manually placed buildings: 16x8, 15x9, 14x11, 13x12, 12x13, 11x14, 9x15 or 8x16 cells.

Supported textures

  • Diffuse
  • Normal map
  • Specular (Grayscale. 100% white areas are rendered as windows)
  • Alpha (Grayscale)
  • ColorMask (Grayscale. White color means that diffuse map is multiplied by variable color)
  • Illumination (Grayscale. Illumination color is taken from the diffuse map)

Illumination Map Details

      0 = No illumination 
      120 = Full illumination
      128-255 ( Windows Random Illumination Values)
      192 (Neutral illumination value)

The likelihood of a window to be lit at a given time and its intensity are randomized for values within 128 and 255, the closer the value is to a boundary the more likely it is to be lit and stronger.

Trees[edit]

General

  • Assets imported as trees will automatically sway in the wind.
  • Tree LODs are automatically created (using billboarding), this cannot be overridden.

Supported textures

  • Diffuse
  • Normal map
  • ColorMask (Grayscale)
  • Alpha (Grayscale)

ColorMask details

The color mask in the built in trees is intended to be used to mark the foliage with black and the trunk/branches with white. More exactly, the parts of the tree for which the mask is white are not affected by the brightness and color variations, automatic texture-based snow, and normal recalculation from position (tree leaves are typically created with alpha masked, double-sided planes which cannot provide good normals). Notice that the automatic snow can also be disabled completely for a custom tree using the asset properties panel.

A missing colormask defaults to white. Please notice that this means a colormask is needed for the tree to get any snow cover in the winter theme.

Props[edit]

Supported textures

  • Diffuse
  • Normal map
  • Specular (Grayscale)
  • Alpha (Grayscale)
  • ColorMask (Grayscale. White color means that diffuse map is multiplied by variable color)
  • Illumination (Grayscale. Illumination color is taken from the diffuse map)

Vehicles[edit]

General

  • The connected parts of a vehicle mesh that touch ground (y close to 0) are automatically recognized as wheels and will rotate when the vehicle moves. You should therefore not connect the wheels to the body of the car, or the whole car will rotate.
  • As with buildings, vehicle LOD models are created automatically if not overridden with a "[modelname]_lod.fbx".
  • Vehicle trailers can be customized from the properties panel. Note that if a custom trailer is created, it will become available for selection only after restarting the game or visiting the main menu. The selected trailer asset is saved in the same file with the main vehicle asset.
  • Sound, light and emergency effects are automatically inherited from the template and cannot be customized as of yet.

Supported textures

  • Diffuse
  • Normal map
  • Specular (Grayscale. 100% white areas are rendered as windows)
  • Alpha (Grayscale)
  • ColorMask (Grayscale. White means that diffuse map is multiplied by a variable color. If the template has an emergency light effect, the color mask needs to be 0 in the areas that should light up and the color variations can only be used to modulate the color of the emergency (police, fire, ambulance) lights)
  • Illumination (Grayscale. This has a unique usage for vehicles: 0.5 is the neutral color. 0 is used for turning signals and 1 is used for braking signals and headlights.)

Citizens[edit]

General

  • Custom citizens use skeletal meshes with existing animations. Custom animations are not currently supported. LODs are not animated but use normal meshes.
  • Template skeletons that can be skinned with custom meshes are located in game folder under Cities_Skylines/Files/Templates/
  • Using the right skeleton for template citizen yields the best result (for example BluecollarFemale_skeleton for Bluecollar Female, -2, -Snow, and -Snow 2)
  • Some citizens are currently only available in certain themes, and custom citizens using template that is unavailable in a used theme are not loaded.
  • Custom citizens spawn randomly using the same logic as built-in citizens.
  • Custom animals are still in experimental phase, but can be used via scripting.

Supported textures

  • Diffuse
  • Normal map
  • Specular (Grayscale)
  • Alpha (Grayscale)
  • ColorMask (Grayscale)
  • Illumination (Grayscale)

Roads[edit]

See Road Editor