This tools parses dd2vtt files as generated by DungeonDraft, extracts all walls, and generates an .obj mesh.
The mesh can be used in Tabletop Simulator as a transparent collision mesh to block the Fog-Of-War Line-of-Sight.
You have to have a working version of python installed (python 2 should work as well as python 3)
Further, you need openscad for creating the wall-mesh, and meshlab to convert from stl to obj. Some paths are hardcoded in the python script, adapt them if they do not work for you.
In addition you need the dotSCAD library.
# install openscad from your favourite package repo, so it is in the path. On ArchLinux:
pacman -S openscad
# download meshlab, and place it alongside the generate.py script
wget https://github.com/cnr-isti-vclab/meshlab/releases/download/Meshlab-2020.09/MeshLabServer2020.09-linux.AppImage
# clone (or just download) the dotSCAD library alongside the generate.py script
git clone https://github.com/JustinSDK/dotSCAD.git
- install MeshLab from https://github.com/cnr-isti-vclab/meshlab/releases/download/Meshlab-2020.07/MeshLab2020.07-windows.exe
- use the default folder
C:\Program Files\VCG\MeshLab\
- use the default folder
- download dotSCAD and place it alongside the
generate.pyscript: https://github.com/JustinSDK/dotSCAD/archive/v2.4.zip - download openSCAD and place it alongside the
generate.pyscript: https://files.openscad.org/OpenSCAD-2019.05-x86-64.zip
Just run python generate.py mapfile.dd2vtt. It will generate a mapfile.obj file in the same folder. If you use windows, and have python globally installed, you can just drag-n-drop a dd2vtt file onto the generate.py file.
Inside the python script, there are various parameters you can edit:
scalex = 1.1 # multiplicative scale of the final object in x direction
scaley = 1.1 # multiplicative scale of the final object in x direction
height = 2 # height of the final object
width = 0.1 # width of the walls
simplify_epsilon = 0.1 # minimum distance between two wall points. Uses Ramer-Douglas-Peucker to decimate.- Create custom object
- Import mesh as both object and collision mesh
- Select
Non-Convex - Place it in the correct location above your battle map
- LOCK the object. Otherwise the collision will be broken!
- Edit the color of the object, set alpha level to 0.
- create a fog-of-war area
- set minis to reveal fog-of-war
This application is available as open source under the terms of the Apache-2.0 License.