Adding 3D models as objects#

This tutorial will teach you how to export 3D models from Blender and add them to the game. If you wish to specifically add stackable objects like cards or tokens to the game, see Adding images as cards and tokens.

Note about Blender#

This tutorial will be using Blender as an example to export a model ready for the game to use. It is worth noting however that if you already use another application for 3D-modelling, then it’s okay as long as the application can export the model into one of the supported formats outlined in 3D Model.

If you do not have a 3D-modelling application installed, then I very highly recommend Blender in general, not only for this tutorial, but because it is free, and it is (in my humble opinion) one of the best open-source applications ever made! You can download it on their website.

Setting up the model#

For the start of this tutorial, we’re going to assume you have a 3D model in Blender already. If this is not the case, you can either create one, or you can import a model from the game’s assets folder by going to File > Import!

Note

This is the assets folder next to the game executable, not the one under your Documents.

Once you can see your model in Blender, the first thing we will do is scale it to match the in-game dimensions we want. The golden rule is as follows:

One unit in Blender = 1cm in Tabletop Club.

Select your object in Object Mode. From here, there are two ways you can set the scale of an object in Blender:

  • Pressing S, then moving the mouse of typing a number to adjust the size. You can then also press X, Y or Z to set the scale of the object on a specific axis.

  • In the main viewport, drag out the arrow on the right-hand side by the axis gizmo to bring out the Transform menu. At the bottom there should be three numbers representing the Dimensions of the object, which you can change.

    Note

    The units in the transform menu don’t affect the size of the exported model.

Further setup for tables#

Lastly, if the model is a Table, we will need to adjust it’s position in the scene.

Note

Positioning only matters for tables. Objects can be in any position in the scene, since the game will automatically center them when importing the model.

To position the table, select it in object mode, then you can use G, then either X, Y or Z before moving the mouse to move it in that respective axis. You’ll want to position it with these points in mind:

  • The table should be in the centre of the scene.

  • The surface of the table should as close to z = 0 as possible.

Exporting the model#

When exporting models, there are multiple different formats to choose from. The recommended format for Tabletop Club is glTF 2.0, with both binary (.glb) and seperate (.gltf) formats supported. However, it is not the only supported option - see 3D Model for all supported formats.

To export the model, click on File > Export > glTF 2.0 (.glb/.gltf), and in the dialog, go to your asset pack folder (if you do not have one, see Creating your own asset pack). From here, you have a choice as to what folder you can create and put the exported model in, depending on what functionality the object should have:

  • Board: MyAssetPack/boards

  • Container: MyAssetPack/containers

  • Dice: MyAssetPack/dice - then depending on how many sides the die has, a further subfolder named: d4, d6, d8, d10, d12, or d20.

  • Piece: MyAssetPack/pieces

  • Speaker: MyAssetPack/speakers

  • Table: MyAssetPack/tables

  • Timer: MyAssetPack/timers

If you are not sure what type of object the model should be, then a safe default is Piece, since it has no special functionality.

See more#

And with that, the next time you launch the game, you should be able to spawn in your 3D model in-game through the Objects menu!

If you want to configure your new objects, feel free to have a look at 3D Model and config.cfg.