Skip to content

Helper Scripts

Michael Horvath edited this page Dec 26, 2020 · 1 revision

Note that most of these scripts ignore comments and most META tags and will typically strip them from the resulting generated files.

create_road_spline

Input four control points and output a model of a road that rises and falls with the shape of the Hermite spline defined by these control points. The road does not move from side to side however.

dir

Lists all DAT, LDR, MPD and XMPD files in the current directory.

git

Some useful git bash commands.

inliner

Creates an inlined version of a model. Created by Michael Heidemann.

interactive_town_map

An Excel worksheet I used to create some of the HTML files in the "docs" directory of this repository.

l3p

Converts an LDraw model to POV-Ray format. Somewhat obsolete.

ldboxer

Replaces parts that are partially hidden with various "boxed" or simplified versions of these parts. Originally created by Tore Eriksson.

map_render_aids

A series of GIMP files I use to create the model maps and street maps.

meshlab

A script for MeshLab to help process heightfield meshes.

model_splitter

Splits a model into sub-models based on their X and Z coordinates in space. (The Y coordinate is not taken into account.)

model_table_generator

Parses a directory full of models and retrieves metadata concerning them that is suitable for copying and pasting into a spreadsheet. Also generates thumbnails of each model using LDView.

mpd2json

Tries to convert an MPD model file to JSON format. Ignores most known meta commands. Strips comments.

mpdcalcpos

Calculates the "final" or "flattened" coordinates and rotation matrices for sub-models and parts in an MPD file. MPD file has to be converted to JSON first using mpd2json before running this program.

myboxer

Replaces as many parts with "boxed" versions as possible without taking the visibility of the part into account.

sign_text

Converts a string of text into an LDraw part. You can specify the font.

sunflow

Experiments with the Sunflow raytracer.

terrain_colorer

Takes a terrain mesh and colors the triangles in a checkerboard fashion.

terrain_leveller

Takes a terrain mesh and makes triangles with a small slope even flatter so you can populate them with studs afterward using terrain_studder.

terrain_splitter

Splits a terrain mesh into grid sectors based on the triangles' X and Z coordinates.

terrain_stepper

Takes a terrain mesh and rounds the triangles' Y coordinates to a multiple of some integer.

terrain_studder

Covers a terrain mesh with LEGO studs.

Clone this wiki locally