Skip to content

tlambertz/dd2vtt_wall_converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

DD2VTT Wall Object converter

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.

Install

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.

Linux

# 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

Windows

Usage

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.

Parameters

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.

Usage in TTS

  • 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

License

This application is available as open source under the terms of the Apache-2.0 License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages