Skip to main content

Embree-backed isometric renderer that turns meshes into OpenRCT2 palette-indexed sprites.

Project description

OpenRCT2 X7 Renderer

openrct2-x7-renderer is the Embree-backed isometric renderer that turns triangle meshes into OpenRCT2 palette-indexed sprites.

Heavily inspired by X7's RCTGen.

Install

Embree-vendored wheels are published to PyPI:

pip install openrct2-x7-renderer

The wheels bundle Embree + TBB, so there is no system Embree dependency at runtime.

Build from source

Building the extension needs Embree 4 and a C++23 compiler. On macOS: brew install embree.

uv sync
uv run pytest

Quick start

import numpy as np

from openrct2_x7_renderer.mesh import load_mesh
from openrct2_x7_renderer.lights import default_lights
from openrct2_x7_renderer.ray_trace import Context, render_view, VIEWS

mesh = load_mesh("model.obj")
ctx = Context.make(lights=default_lights(), dither=True)
ctx.begin_render()
ctx.add_model(mesh, matrix=np.eye(3), translation=np.zeros(3))
ctx.finalize_render()
sprite = render_view(ctx, VIEWS[0])   # -> IndexedImage
ctx.end_render()

Sprite output format

images_dat.write_images_dat writes a single binary blob images.dat containing all sprites, referenced from an OpenRCT2 object.json via the $LGX: syntax ("images": ["$LGX:images.dat[0..N]"]). This is the same format the vanilla OpenRCT2 parkobjs use.

images.dat layout

+--------------------+--------------------+
| num_entries (u32)  | total_pixels (u32) |   8-byte header
+--------------------+--------------------+
| element 0          (16 bytes)           |
| ...                                     |   num_entries * 16 bytes
+-----------------------------------------+
| sprite 0 pixels    (w * h bytes)        |
| ...                                     |   total_pixels bytes
+-----------------------------------------+

Each element is u32 offset, i16 width, i16 height, i16 x_offset, i16 y_offset, u16 flags, u16 zoom. flags = 0x0001 (G1_FLAG_BMP) indicates raw indexed pixel data — palette index 0 is transparent. RLE compression (flags = 0x0008) would be more compact but is not implemented.

License

GPL-3.0-or-later. The distributed wheels bundle Embree and TBB (Apache-2.0); their license texts ship alongside.

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

openrct2_x7_renderer-0.1.0.tar.gz (63.5 kB view details)

Uploaded Source

Built Distributions

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

openrct2_x7_renderer-0.1.0-cp314-cp314-win_amd64.whl (13.5 MB view details)

Uploaded CPython 3.14Windows x86-64

openrct2_x7_renderer-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openrct2_x7_renderer-0.1.0-cp314-cp314-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

openrct2_x7_renderer-0.1.0-cp313-cp313-win_amd64.whl (13.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openrct2_x7_renderer-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openrct2_x7_renderer-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

openrct2_x7_renderer-0.1.0-cp312-cp312-win_amd64.whl (13.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openrct2_x7_renderer-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openrct2_x7_renderer-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

openrct2_x7_renderer-0.1.0-cp311-cp311-win_amd64.whl (13.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openrct2_x7_renderer-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openrct2_x7_renderer-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file openrct2_x7_renderer-0.1.0.tar.gz.

File metadata

  • Download URL: openrct2_x7_renderer-0.1.0.tar.gz
  • Upload date:
  • Size: 63.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openrct2_x7_renderer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a82d0c0b46680a3e4d5e469b9555e9847dc77f35e47ea63a4c1432ae53596786
MD5 1f98f9fe26906edfc38b570568f8e1ac
BLAKE2b-256 fbca2c7137b23f4ea722b4e1b8425a3ce35c2628d250444ae3fbe0fe70b15781

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0.tar.gz:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5e6e6b2bc13c5cd35be6d4d7976bfc8e27a1af84e7e2c6aee4cb04b1b58da7c2
MD5 4a03fdf8f08691312b05e5c2369f345a
BLAKE2b-256 881125461fabaa334e29d9d45d1f858cfb3e02b320d38869d1d5b946cbdced63

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c028227e05ea5eb7dfc51b84f6c75886a5e8ed4349357dd0dca221da6f70b5e7
MD5 d6a4202547c742c699b96ff56119f6f2
BLAKE2b-256 f80517de77d5be34fa265256a34e0a3b33b0a33db6051bff5581ca22564e1f54

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a59ccead8325496ec4b1bbc55ce9c80ced80aab273a21cd124a193c9d630ec86
MD5 0f071df5c83cd60b70bb275885c95c5c
BLAKE2b-256 b5bae808a3c4408ac3285e3006d1fedb26cc3de518fb46dcfe3aa4a96b90a9e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 719d25da02d9ad4a6f719cffe4e075a432294209c3481f0f1ffcbc10115ed380
MD5 fb6f5c431438bddcc2029a06bd0f1cbe
BLAKE2b-256 0168597b132929bbe2e1736b272f21240d0eefda78d6ff27b6ea84c303fe4a17

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bb95516590ef5a4cd8f9b216fccf1f87217547f3c4deeb55bc61422ea017c9b9
MD5 2fad7e4637227b7ca5addd8b6e4e5fe5
BLAKE2b-256 51c513b71756c49e6a91fd2efe45d91e36f6a68489594c4bb6037d915f46b81c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aaab454db99756413096bb4e590f9147e3fa19e9fd01ad88c89a2d597afc8ac6
MD5 060e93b25ad0d6f5e9227206aaaa4994
BLAKE2b-256 31ed527e0bf3b32acd44d7d2319bfdefd421efd790fab7cf6d9f2e6f080a15c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8100c6176c06d607bf54dd1b24f57a30a22f88d2eee5f88baf18ff8cfdf446b9
MD5 39f2c1ca1225f3c28525e354b9bbf2c4
BLAKE2b-256 45f733bea1e7d571756147ee5fa07220d540e3e870547397300f0f74637a4159

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c9466f5e20fc639fc32dbfe7e746d3052521d26bbd17a949817b04cc4c640ec1
MD5 85d2c6033d7e1ed688f3f8b100f02ccc
BLAKE2b-256 58e02d4b978e74554b780d87e8379438ac81a78f0c92948a1af60b943011a062

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac32eb7f2e5c8a43644222cb81ecc6c444a78808e6e44d2ede0a79cafef0458f
MD5 ddc85b57e06b0bd9a9a38fcfb51978eb
BLAKE2b-256 3a10ea7666e3ece3fc5c59c1e3011ecb099770fb0e6673462c7c3b81c6b955c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 369de7f1d4851aed0feca13d1522dbd0d4c88cdd5ace0bf3bfdd6c4a0ac4f3d4
MD5 452534d03a32cd65dd3df4a00a2dd57b
BLAKE2b-256 33f5c6253887ed8dc2c324af948365616f55b8df3be6a6ac9edfcd9c896a4180

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 421111828aef113a727857824c4e49826acfbe296bd2cafc41672201b9e93468
MD5 a208488c994504eba318e064804ef7da
BLAKE2b-256 0ed50c8664295b18da18dd427e4aa69650767e765b7f762783c4058841390d3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openrct2_x7_renderer-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openrct2_x7_renderer-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f29c08ec2c5d11d00e02bc23e689e9d9e42b15ae6cb5207a43b3d3cadc78dedd
MD5 229303be6e9ed9c18b535b79228f5667
BLAKE2b-256 5aae331f867e0557ba167917a1c5c9679d1d054b52105a4dc12e5272870c9db5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openrct2_x7_renderer-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on alex-parisi/OpenRCT2-X7-Renderer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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