Skip to content

daydrive7/track-layout-creator-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Track Layout Creator +

A desktop track layout editor for designing, generating, and exporting race track layouts as .TED files. Built with Python and Tkinter.

Python Platform License


Features

Track Editing

  • Node-based polygon editor — place, drag, and modify control points on a zoomable canvas
  • Euler & circular curve interpolation — smooth corners with adjustable radii and camber
  • Elevation editor — integrated elevation graph with manual height nodes and smooth easing
  • Real-time preview — instant visual feedback as you modify the layout
  • Undo/Redo — full history support

Track Generation

  • Procedural generators — Grand Prix, Technical, Oval, Rally Stage, and Chaos presets
  • Image vectorizer — trace a track layout from PNG/JPG/WebP images using centerline extraction, outline tracing, or smart fill (TSP) algorithms
  • GPX import — load real-world GPS paths as reference or editable layouts
  • CSV / TED import — load existing track data for editing

Export

  • TED file export — ready for use in compatible racing simulators
  • PostScript export — high-quality vector output for printing
  • Isometric 3D view — rendered top-down 3D preview with terrain heightmaps

Terrain & Environment

  • Heightmap system — real terrain elevation data for Death Valley, Eifel, Andalusia, and Eifel Flat themes
  • Marching squares contour rendering — topographic lines drawn from heightmap data
  • Configurable road types — normal, narrow, wall/no-wall variants per theme

User Interface

  • Dark theme — modern dark UI with accent colors
  • Tabbed sidebar — Geometry, View, and Generators panels
  • Toolbar — quick access to selection, pen, pan, rotate, scale, mirror, and zoom tools
  • Splash screen — branded startup screen

Localization

Supports 9 languages:

  • English, Polish, Spanish, Portuguese (BR), Portuguese (PT), French, German, Japanese, Russian

Requirements

  • Python 3.8+
  • Pillow (for image vectorization)
  • Tkinter (included with standard Python on Windows)

Installation

Quick Start (Windows)

Double-click run.bat — it will automatically:

  1. Detect or install Python
  2. Install required libraries (Pillow)
  3. Launch the application

Manual Setup

pip install -r requirements.txt
python TrackLayoutCreatorPlus.py

Usage

Creating a Track

  1. Select the Pen tool from the toolbar (or press the hotkey)
  2. Click on the canvas to place control points — each point becomes a corner node
  3. Adjust corner radii using the sidebar sliders or by right-clicking a node
  4. Toggle Circuit mode to close the loop or leave it open for point-to-point layouts
  5. Export to TED via File → Export to TED

Using the Generators

Open the Generators tab in the sidebar:

Generator Description
Grand Prix Large layout with flowing corners and long straights
Technical Compact layout with many tight corners
Oval Simple 4-turn speedway shape
Rally Stage Long point-to-point stage with winding sections
Chaos Fully random layout

Image Vectorization

  1. Go to the Generators tab
  2. Select a trace mode:
    • Centerline — extracts the drivable center path (recommended)
    • Outline — traces the outer shape boundary
    • Smart Fill (TSP) — uses a traveling salesman approach to fill complex shapes
  3. Click Trace Image and select a PNG, JPG, WebP, BMP, or GIF file

Importing Reference Data

  • GPX files — import real GPS tracks as reference overlays
  • CSV / TED files — import raw coordinate data or existing track files
  • Use the Reference Path Scale slider to resize imported paths

Elevation Editing

  1. Open the Geometry tab
  2. Enable Manual Height to add elevation nodes
  3. Use the elevation graph at the bottom to set heights at specific distances
  4. Enable Smooth Easing for higher-quality interpolation between height nodes

Project Structure

Track Layout Creator+ (modded 3.4)/
├── TrackLayoutCreatorPlus.py       # Main application (UI, logic, export)
├── run.bat                         # Windows launcher with auto-setup
├── config.json                     # User preferences (theme, language, etc.)
├── requirements.txt                # Python dependencies
│
├── resources/
│   ├── layoutClasses.py            # Data classes (Coordinate, CP, Curve, etc.)
│   ├── layoutConfig.py             # Color palette, constants, UI config
│   ├── layoutOperations.py         # Math utilities (distance, subdivision, etc.)
│   ├── layoutEuler.py              # Euler spiral and curve interpolation
│   ├── heightmap.py                # Terrain heightmap loading and sampling
│   ├── imageTraceService.py        # Image-to-track vectorization engine
│   ├── isometricProjection.py      # 3D isometric view renderer
│   ├── readfile_3.py               # TED file reader/writer and GPX parser
│   ├── icons/                      # Toolbar icons and app icon
│   └── maps/                       # Binary heightmap data per theme
│
├── locales/                        # Translation files (JSON per language)
│   ├── en.json
│   ├── pl.json
│   ├── es.json
│   ├── fr.json
│   ├── de.json
│   ├── ja.json
│   ├── ru.json
│   ├── pt-br.json
│   └── pt-pt.json
│
├── savefiles/                      # User save files
├── output/                         # Exported TED files
├── polygons/                       # Exported polygon data
└── reference paths/                # Imported GPX/CSV reference paths

Configuration

Settings are stored in config.json:

Key Type Description
theme string "Dark"
language string Language code (e.g. "en", "pl", "de")
elev_height int Elevation panel height in pixels
hide_terminal bool Hide the console window on startup

Keyboard Shortcuts

The application supports keyboard shortcuts for common operations. Access them through the menu bar where each action displays its associated hotkey.


Contributing

Contributions are welcome. Please see the project structure above and keep the following in mind:

  • The main application logic lives in TrackLayoutCreatorPlus.py
  • Shared math and data utilities are in the resources/ package
  • All user-facing strings should go through the tr() translation function
  • New language support can be added by creating a JSON file in locales/

Credits & Attribution

This project is a heavily modified, expanded version of the original Track Layout Creator tool.

  • Original Architecture & Core Engine: Developed by eran0004 on GTPlanet. This project is independently distributed as an educational, non-commercial community modification designed to preserve and expand offline track-editing features.
  • Playtesting before release: willyham. on Discord

About

A heavily expanded, multi-language desktop track layout editor for designing, vectorizing, and exporting race track layouts (.TED) with advanced curve and elevation tools.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors