Asset Importer

## Introduction

The asset importer is a tool introduced in The Treasury update that allows Dungeon Alchemist users to import, share and find user-created assets. Assets are created by users and uploaded to the Steam workshop, where everyone can find and import them to their own maps. The Asset Importer allows for the import of 3D objects in various 3D formats (FBX, GLTF, STL,...), which can then be configured to work properly in the Dungeon Alchemist editor.

## Exporting a 3D model for use in Dungeon Alchemist

Creating an asset for use in Dungeon Alchemist can be done through any 3D modelling software. Properly creating and configuring a new asset is explained on this page.

The following 3D modelling software guides are currently available:

* Blender Export Guide: available
* Maya Export Guide: TODO (volunteers wanted)
* 3D studio Max Export Guide: TODO (volunteers wanted)

## Quick Step-by-step Guide

If you need a quick step-by-step overview of all things you need to do to get a 3D model in Dungeon Alchemist, follow this Quick Step-by-step Guide.

The page below contains detailed explanations on every aspect of the Asset Importer.

## Importing a new Asset

Through the main menu in the editor, select *Steam Workshop > Open Asset Importer.* This will open up the asset importer.

To start the configuration of a new asset, you need to click the Import Asset button. This will open a menu to select the 3D file you wish to use. The Asset Importer supports 3D files of the following formats: FBX, GLTF and STL. Once an asset is imported, it will appear in the work area. You should now be able to select the asset, to open the object GUI.

**Asset Importer Overview**

* **Exit Button**: This button will take you back to the main Dungeon Alchemist editor.
* **Asset List**: This list contains asset you've configured in the past, and the Import Asset Button.
* **Configuration Tab**: The Configuration Tab allows you to select a template for your asset, give it a proper name, add keywords to enable you to retrieve the asset in the object list and configure advanced options.
* **Category Tab**: This tab will allow you to select the categories in which your object will appear.
* **Collider Tab**: This tab lets you configure the colliders for your assets. Colliders are used by Dungeon Alchemist to determine the bounds of your objects, the way it interacts with other objects and those areas something can be stacked upon.
* **Template Menu**: This menu determines which type of object you're importing, and is vital to a proper configuration.
* **The View Menu**: The view menu works as it does in the editor.
* **The Orthogonal View Menu**: This menu allows you to quickly cycle viewing angles.

## Configuring your asset in the Asset Configuration Tab

Once an asset is imported, it's important to go through the necessary steps to configure the asset. It's good practice to follow these steps in the correct order.

### **Naming your asset**

Give your asset a decent name. A good name is clear, short and defines the unique characteristics of the object. "Table" is a valid name, but "Rustic Table" may make it easier to retrieve later. Refrain from naming your asset with a date or version number. The name of the asset will be used later to retrieve the asset in the search bar and will appear underneath the asset in the object list.

### **Tagging your asset**

The tags you give your asset will make your asset appear whenever a particular tag is searched for. Good tags for a wine bottle, for example, may be "drinking", "expensive", "glass", "grapes". Don't re-mention the asset name in the keywords; the name is included in the search automatically.

### **Selecting an asset template**

This is perhaps the most vital step in the asset configuration. Asset Templates define how your asset will behave once used in Dungeon Alchemist.

*(Some templates may not be visible in your version of Dungeon Alchemist.)* Select the correct asset template for your asset from the following categories:

* **Basic Object**: The most basic version of a Dungeon Alchemist object, and the default option for most assets you will configure. It can be selected, moved, scaled and rotated as any simple object would. When in doubt, this template can be safely chosen.
* **Flying Object**: These object will appear in the editor, but not in the final export. They will always remain in the sky on the same height and can not be placed on other objects. Use this template for objects that will hover overhead, but need to be hidden so they won't obstruct the map below, such as hanging lamps.
* **Pit**: Pits are assets that are either partially or completely located below the level of the floor. They cut a hole in the ground, and should provide geometry to cover up that hole. *Make sure to configure the floor tiles removed when placing this object by dragging the purple handles.*
* **Snaps to Grid**: This template is used for assets that can be used in patterns, such as columns, or need to line up exactly, such as counters. *Make sure to configure the tiles the object covers by dragging the purple handles.*
* **Snaps to Sides**: These assets will snap to the edges of a tile. This template is most often used for walls and bannisters.
* **Token**: An asset configured in the Token template will behave like a token once placed in the editor: you will be able to move the asset around, and start a first person view from within the token.
* **Wall-clipped Object (all sides)**: This template will make an object snap to the wall with all its sides when you move it close to a wall. Alternatively, it can also be placed freely in the room. A bed which can be placed with the long or short end against the wall may fall into this category. *Make sure to configure the distance from the wall by dragging the orange lines!*
* **Wall-clipped Object (back side only)**: This template will make an object snap to the wall with its backside when you move it close to it. Alternatively, it can also be placed freely in the room. Cupboards, desks and benches fall into this category. *Make sure to configure the distance from the wall by dragging the orange line!*
* **Wall-mounted Object**: A wall-mounted object is an object that can ONLY be placed against a wall. A good example would be a hanging torch or a painting. *Make sure to configure the distance from the wall by dragging the orange line!*

Depending on the template you choose, different additional configuration options may be shown.

Once all this is configured, you can test your object in the working area. Drag it around to test how it snaps to the grid or against walls.

If you rotate your object,

## Configuring your Asset in the Work Area

The Work Area GUI can seem a bit daunting at first, but it helps to be aware of the color coding. Depending on the template you selected before, only the applicable options will appear.

* The main *Object GUI* is the white GUI that appears around your asset once you select it, and can be used to **scale** or **rotate** your asset. Moving the asset around has no effect on how it is configured; moving is only used for testing purposes. The object is always centered.
* The *Wall Snap Line* (orange) is used to determine the distance from a wall once the asset is moved close to it. It can be edited by dragging little square handle on top. This is only available when the object uses a **Wall-clipped** or **Wall-mounted** template.
* The *Rotate Point* is the central point around which your asset will be rotated. **Important: only edit the rotation point when the object feels off after testing.** Edit the rotate point by dragging the center orange square. It is set the center of the mesh by default.
* The *Tile Coverage* is used to determine how your asset is snapped to the grid when you hold **Ctrl** in the editor, or when the **Snaps to Grid** or **Pit** template is selected. ***Important: only edit the tile coverage when the object feels off after testing.*** Tile coverage can be edited by dragging the little squares on the side, or dragging the central square to an alternative location. If the *Snap* option in the configuration tab is disabled, the tile coverage can be moved freely. *(Note that the tile coverage can be a bit counter-intuitive: the tile coverage will snap to an exact tile, and then take your asset along with it. If you want your asset to be configured exactly within the tile bounds, move the tile coverage, and not the asset.)*

## Configuring the Asset Category

The categories defined in the Asset Category tab will determine where your assets will appear in the Dungeon Alchemist editor once configured. Multiple categories can be selected. In Addition, the object will always be added to the **Downloaded Objects** category. Define your asset categorie(s) by clicking on one of the left sidebar icons first, then selecting a category in the subcategory. Once you've selected a subcategory, that category will appear in the right column.

## Configuring the Asset Colliders

Colliders are an essential part of Dungeon Alchemist assets. They determine how an object can be selected, what objects stack, when they collide with other assets,... Properly configuring the colliders is vital for the asset to work correctly.

**Collider Surfaces**

One important concept to understand is the concept of "Object Surfaces". A surface is a flat area that other objects can be placed on. An example would be the top of a table, or the sitting area of a chair or bench. Whenever a collider is large enough and is rotated in such a way that one of its sides faces upwards, it is automatically flagged as a Surface. Other objects can now be placed on it. This surface is visualized in the object view by a transparent colored area.

If you don't want a particular collider to have a surface, you can disable this functionality by expanding the collider in the menu and clicking on the appropriate checkbox.

**The Collider Configuration Tab**

This tab is dedicated to configuring the asset colliders. Creating and deleting colliders is done in this tab, editing the colliders themselves happens in the Work Area.

### **Creating a New Collider**

A newly imported asset comes with a preconfigured default box collider (light green box around the asset). Clicking the "+" icon next to New Collider will allow you to select different types of colliders for your asset.

**Types of Colliders**

        **Box Colliders** (Light Green): The default option. If the top surface is wide enough in all directions and has no rotation, it becomes a surface (see above for explanation). A stackable surface will be lightly tinted.

**Ring Colliders** (Light Purple): Ring colliders are used to define the borders of hollow cylindrical assets, such as tubes.

**Cylinder Colliders** (Light Purple): Cylinder Colliders are intended for those assets that need a clearly defined, round side. These are usually suited only to larger objects, that need a finer definition.

**Basket Colliders** (Light Purple): Basket Colliders are hollow cylindrical colliders with a surface at the bottom. Objects can be placed within, and will move as if stacked upon the bottom. Use this collider for baskets, larger pots,...

**Collider Sets**: Colliders that make up a set are moved together, which makes editing easier.

### **Editing Colliders**

All colliders have small squares in the center of their sides, that are used for scaling in their respective axes. Dragging the squares will scale the colliders. Colliders can be moved as any regular asset, by clicking them so the Object GUI appears around them. The standard Object GUI scaling corners will not be present, however, as scaling is done with the handles. Duplicating and deleting a collider or collider set is done by the icons at the base of the GUI frame.

### Tips for Configuring Colliders

* Use the orthographic camera views in the top right corner to easily configure the colliders from different angles.
* You can select a collider by clicking on it in the 3D view or by selecting it in the menu.
* Selected colliders will have a different color, making them easier to spot. They will also get preference when multiple handles overlap, so use this feature to make sure you're adjusting the right collider.
* You can rotate colliders along different axes depending on the orthographic camera view you pick in the top right.
* If you need to fine-tune specific colliders, you can enter numbers directly by expanding with the arrow key the collider in the menu.
* From the same expanded menu you can also enable or disable surfaces for box colliders, if you change your mind at some point and don't want objects to be placeable on that collider.

## Saving the Asset

Click the *Save Asset* button to confirm all edits you made to your asset configuration. If properly configured, the asset will now be visible in the Asset List on the left hand side, in the *Local Assets* category. The asset is now available to you inside the Dungeon Alchemist editor, and can be found in the previously defined categories.

At this point, the asset is only stored locally on your hard drive. It will not be available on any other computers.

## Publishing Your Asset

With your asset saved and properly configured, a new tab will appear on the menu: the Publish Asset tab.

* **Status:** The status of your asset can be either unpublished, with the asset available only to you, or published to the Steam Workshop.
* **Visibility:** This setting defines who will be able to view your asset once uploaded to the Steam Workshop
* **Description:** The description you enter for the asset you created is intended to clearly define your asset for users on the Steam workshop.
* **Publish**: You *publish* an asset (upload it to the Steam Workshop) by clicking the *Publish!* button. In doing so, you agree to the Steam Subscriber Agreement. Violating these terms may result in legal action, so be mindful to only publish assets to which you hold the rights and intellectual property. The Dungeon Alchemist Terms of Use apply to these assets, too.

Once published and with the correct visibility settings, your assets will be available on the Steam Workshop for other users to use in their maps.