Exporting an Asset to Dungeon Alchemist

## Creating a 3D Dungeon Alchemist Asset

The Dungeon Alchemist Asset Importer offers compatibility with a range of 3D formats, that can be created through any 3D modelling software. This page contains guides on how to export properly with popular 3D modelling software.

## Asset Recommendations

While there is no fixed file size limit on Dungeon Alchemist, it's recommended to keep file sizes below 15Mb for a standard model. Geometry usually takes up the minority of the asset size, but texture may add up quickly. For an asset that fills up to three tiles inside Dungeon Alchemist, a good rule of thumb is to keep textures within a 1024x1024 pixel size.

## Supported File Formats

We strongly advise opting for a GLTF format, as it consistently delivers superior and more reliable outcomes. Dungeon Alchemist is compatible with the following file formats:

* GLTF/GLB
* FBX (with embedded textures)
* STL

## Blender Export Guide

### Scaling in Blender

   When exporting from Blender to Dungeon Alchemist, one unit (equivalent to one meter) in Blender corresponds precisely to one tile/square in Dungeon Alchemist.
However, once you've completed the model you can assign it textures and properties through a material.

### Shader Selection in Blender

The standard Blender shader (Principled BRDF) is the only supported shader, so no need to select a different one. Here, you can assign Base Color- (aka Albedo), Metallic-, Roughness-, Emission-, Alpha- and Normal maps.

### Materials in Blender

* **Roughness/Metalness:** When creating materials through the material properties sidebar in Blender, Blender uses the alpha channel of the texture as source when assigning a roughness or metallic map. If you're using a regular greyscale texture, this might give unexpected results. You can double check and/or reassign this correctly in the Shader Editor.
* **Emission:** When using an emission color or -map, you can use the emission strength to boost the effect. Anything greater than 1 will start to have a bloom/glow effect in Dungeon Alchemist.
* **Transparency:** If you are using a transparent color texture, check the Shader Editor. Make sure to connect Alpha to Alpha otherwise you might get unexpected results in DA. Two options are available for transparency in Blender:
	+ Transmission (Preferable if your surface must be either fully opaque of fully transparant (also known as cutout))
	+ Alpha (For semi-transparant surfaces).

### Exporting from Blender

#### Exporting as a GLTF

    Using the standard export settings does result in a reliable export. The image provided highlights the specific mentioned options.

* (Limit to) **Selected Objects**: Only exports the objects you've selected. Handy if there's other objects or some clutter/backups in your file.
* (Transform) **+Y Up**: This defines which axis system to use. Make sure this is checked to ensure proper rotation of your model.
* **Apply Modifiers**: This makes sure your Blender modifiers, like for example symmetry (Mirror modifier), get exported as well.
* **UVs**: Makes sure your UVs get exported.
* **Normals**: Makes sure your normals get exported.
* **Materials**: Export - **Images**: Automatic. Makes sure your materials and textures get exported properly.
* **Use Rest Position Armature**: Uncheck this option to make sure your skinned mesh gets exported in the pose you've configured for it. (Only important when you're working with skinned meshes)

#### Exporting as an FBX

Here's an overview of the most important export settings when using FBX.

* **Path Mode**: Copy
	+ **Embed Textures** (button next to Path Mode): Enabled -- These settings make sure your textures are embedded within the FBX file.
* (Limit to) **Selected Objects**: Only exports the objects you've selected. Handy if there's other objects or some clutter/backups in your file.
* **Object Types**:
	+ Mesh
	+ Armature (when using skinned meshes)
	+ Lamp (if you wish to export lights as well. Only point lights are supported!)
* **Transform**: These define which axis system to use and the scaling of your object.
	+ **Scale**: 1.00
	+ **Forward**: -Z Forward
	+ **Up**: Y Up
	+ **Apply Unit, Use Space Transform and Apply Transform**: All checked
* **Apply Modifiers**: This makes sure your Blender modifiers, like for example symmetry (Mirror modifier), get exported as well.