Skip to main content

forge3d: Rust/WebGPU core with PyO3 bindings

Project description

forge3d

GPU-accelerated 3D terrain rendering for Python.
Built in Rust with WebGPU. Pre-built wheels — no Rust toolchain required.

PyPI Python 3.10+ License Docs


forge3d hero render

This image was generated with 5 lines of Python. Load a DEM, launch the GPU viewer, position the camera, and capture a publication-quality snapshot. No shaders to write. No OpenGL boilerplate. Just pip install forge3d.

import forge3d

with forge3d.open_viewer_async(terrain_path="rainier.tif") as viewer:
    viewer.set_orbit_camera(phi_deg=225, theta_deg=35, radius=1.2)
    viewer.set_sun(azimuth_deg=315, elevation_deg=32)
    viewer.snapshot("render.png", width=3840, height=2160)

Install

pip install forge3d

Need Jupyter widgets or tutorial datasets?

pip install "forge3d[jupyter]"     # ViewerWidget for notebooks
pip install "forge3d[datasets]"    # on-demand sample DEMs, CityJSON, COPC
pip install "forge3d[all]"         # everything

Gallery


PBR terrain

Landcover overlay

LiDAR point cloud

Sun & shadow control

GeoPackage labels

CityJSON buildings

Vector overlays

Camera animation

Map plate compositor

See the full gallery →

What You Get

Open Source (Apache-2.0 / MIT)

Everything you need to go from raw elevation data to a rendered 3D scene:

  • Interactive viewer — real-time orbit, pan, zoom via a Rust/WebGPU subprocess controlled from Python over IPC
  • Terrain rendering — load GeoTIFFs or numpy arrays, PBR materials, 100+ colormaps
  • Vector overlays — GeoJSON/GeoPackage polygons, lines, and labels projected onto terrain
  • Point clouds — COPC and LAZ files with millions of points, colored by elevation or classification
  • 3D Tiles — stream OGC 3D Tiles tilesets directly into the viewer
  • CRS reprojection — automatic coordinate transforms via PROJ + pyproj
  • Camera animation — keyframed flyover paths with frame-by-frame export
  • Jupyter integrationViewerWidget embeds the viewer inline in notebooks
  • High-res snapshots — up to 8K PNG export from any camera angle

Pro

Professional cartography and production workflows:

  • Map plate compositor — legends, scale bars, north arrows, multi-panel layouts
  • SVG / PDF export — publication-ready vector output
  • 3D buildings — GeoJSON, CityJSON, and 3D Tiles import with roof inference and PBR materials
  • Mapbox Style Spec — load and apply Mapbox-compatible styles
  • Scene bundles — save and share complete .forge3d scene packages
  • Commercial licensing details → https://github.com/milos-agathon/forge3d#license

Tutorials

Two tracks depending on your background:

Jupyter

from forge3d.widgets import ViewerWidget

widget = ViewerWidget(terrain_path="dem.npy")
widget.set_camera(phi_deg=225, theta_deg=35, radius=1.2)
widget.set_sun(azimuth_deg=315, elevation_deg=32)
widget.snapshot()  # renders inline

Links

Documentation  ·  API Reference  ·  GitHub  ·  PyPI

License

Open-source core released under Apache-2.0 OR MIT. Pro features require a commercial license key set with forge3d.set_license_key(...). Licensing details live at https://github.com/milos-agathon/forge3d#license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forge3d-1.23.1.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

forge3d-1.23.1-cp310-abi3-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.10+Windows x86-64

forge3d-1.23.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

forge3d-1.23.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.7 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

forge3d-1.23.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (11.3 MB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file forge3d-1.23.1.tar.gz.

File metadata

  • Download URL: forge3d-1.23.1.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for forge3d-1.23.1.tar.gz
Algorithm Hash digest
SHA256 a0b7527d37a6c5be8135a2423cddb96edb2f6a916e96f65ebc10410f44e5b0a6
MD5 f076f7462efb7e9eab594c11b1a3f85a
BLAKE2b-256 273adb077777b461e06a3b5abec2f04a1cafbbfafe0bfdebacfc366ce41793b8

See more details on using hashes here.

File details

Details for the file forge3d-1.23.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: forge3d-1.23.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for forge3d-1.23.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 79f74745ed02d73ee3462708950c195bb61073de69f99fbfd037c6f122bec86d
MD5 7ee2986ee1ca0164cfb96830f5aef74f
BLAKE2b-256 944220df4151cc20e8a0cedfd9125b7a301ebd8ac0ae9ca56ca22980279813b2

See more details on using hashes here.

File details

Details for the file forge3d-1.23.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for forge3d-1.23.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96001f11a074d978a1a2e691c3bebdc46163e6c1ad6c748aad9f5a8d6dca858f
MD5 a73d2b9e325f4cd5d48f97b531e2092b
BLAKE2b-256 f2d0cc299e28a955720fb5b752db5cc2ae87c9d1d38d17fcbac249c97cbdf607

See more details on using hashes here.

File details

Details for the file forge3d-1.23.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for forge3d-1.23.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 444f9f6ba24534e6cafc279c4e6a72ea58c009e194cd0a1f2dae94ff580f8ac6
MD5 e89595aa5f32b4f811266e38042a73ee
BLAKE2b-256 6afb19338476274704e7a9bbbca067065d2025afe1cb3dd3226fae5b2e7b1e72

See more details on using hashes here.

File details

Details for the file forge3d-1.23.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for forge3d-1.23.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 bdb75813fc50a182fd9594c9d7fb8f8b92cdc918c9ca8e2964ac77a023408f3c
MD5 eb309a64829aff2e25d52dd785018f77
BLAKE2b-256 a34efdc4b11cf60900bd64b4cc954bb58824263d9d99bf2342cd1c8cf0e13c7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page