Table of Contents
Fetching ...

PyBatchRender: A Python Library for Batched 3D Rendering at Up to One Million FPS

Evgenii Rudakov, Jonathan Shock, Benjamin Ultan Cowley

TL;DR

The paper targets the pixel-based RL bottleneck by introducing PyBatchRender, a Python-accessible, batched rendering library built atop Panda3D. It adds four data-oriented extensions—Multi-View Tiling, Hardware-Instanced Geometry Control, CUDA-OpenGL Interoperability, and TorchRL integration—to render many scenes and instances in a single GPU pass. Empirical results show throughput exceeding 1 million FPS on simple scenes and substantial speedups over state-of-the-art Python renderers, including up to 1.6M FPS at 64×64 vs Madrona's 403k FPS. The work demonstrates that high-performance pixel-based RL can be achieved with pure Python tooling and a mature engine, enabling rapid prototyping and broad accessibility while preserving integration with Python ML ecosystems.

Abstract

Reinforcement learning from pixels is often bottlenecked by the performance and complexity of 3D rendered environments. Researchers face a trade-off between high-speed, low-level engines and slower, more accessible Python frameworks. To address this, we introduce PyBatchRender, a Python library for high-throughput, batched 3D rendering that achieves over 1 million FPS on simple scenes. Built on the Panda3D game engine, it utilizes its mature ecosystem while enhancing performance through optimized batched rendering for up to 1000X speedups. Designed as a physics-agnostic renderer for reinforcement learning from pixels, PyBatchRender offers greater flexibility than dedicated libraries, simpler setup than typical game-engine wrappers, and speeds rivaling state-of-the-art C++ engines like Madrona. Users can create custom scenes entirely in Python with tens of lines of code, enabling rapid prototyping for scalable AI training. Open-source and easy to integrate, it serves to democratize high-performance 3D simulation for researchers and developers. The library is available at https://github.com/dolphin-in-a-coma/PyBatchRender.

PyBatchRender: A Python Library for Batched 3D Rendering at Up to One Million FPS

TL;DR

The paper targets the pixel-based RL bottleneck by introducing PyBatchRender, a Python-accessible, batched rendering library built atop Panda3D. It adds four data-oriented extensions—Multi-View Tiling, Hardware-Instanced Geometry Control, CUDA-OpenGL Interoperability, and TorchRL integration—to render many scenes and instances in a single GPU pass. Empirical results show throughput exceeding 1 million FPS on simple scenes and substantial speedups over state-of-the-art Python renderers, including up to 1.6M FPS at 64×64 vs Madrona's 403k FPS. The work demonstrates that high-performance pixel-based RL can be achieved with pure Python tooling and a mature engine, enabling rapid prototyping and broad accessibility while preserving integration with Python ML ecosystems.

Abstract

Reinforcement learning from pixels is often bottlenecked by the performance and complexity of 3D rendered environments. Researchers face a trade-off between high-speed, low-level engines and slower, more accessible Python frameworks. To address this, we introduce PyBatchRender, a Python library for high-throughput, batched 3D rendering that achieves over 1 million FPS on simple scenes. Built on the Panda3D game engine, it utilizes its mature ecosystem while enhancing performance through optimized batched rendering for up to 1000X speedups. Designed as a physics-agnostic renderer for reinforcement learning from pixels, PyBatchRender offers greater flexibility than dedicated libraries, simpler setup than typical game-engine wrappers, and speeds rivaling state-of-the-art C++ engines like Madrona. Users can create custom scenes entirely in Python with tens of lines of code, enabling rapid prototyping for scalable AI training. Open-source and easy to integrate, it serves to democratize high-performance 3D simulation for researchers and developers. The library is available at https://github.com/dolphin-in-a-coma/PyBatchRender.
Paper Structure (8 sections, 3 figures)

This paper contains 8 sections, 3 figures.

Figures (3)

  • Figure 1: Batched rendering pipeline for a single geometry across multiple scenes. Users specify per-instance translations for $I$ instances of a shared mesh across $S$ scenes (dashed box separates user control from internal operations). The system constructs per-instance model matrices $M_i^s$, composes them with per-scene view matrices $V^s$, and processes all instances across all scenes in a single pass using a custom batched vertex shader. Rasterization and fragment processing produce a tiled output texture, which is then partitioned into $S$ individual frames of resolution $H \times W$ that remain on the GPU for subsequent access. This approach consolidates $S \times I$ independent render passes into a single parallelized GPU operation, eliminating render target switching overhead and maximizing hardware utilization. Not shown: per-instance scales, rotations, and colors, as well as camera control via e.g. positions/orientations, all of which are supported by the system but omitted here for clarity.
  • Figure 2: Cumulative performance gains for rendering throughput for 64x64 resolution in the CartPoleBalance environment. Each component is added cumulatively to the baseline, demonstrating its contribution to the final performance on Apple M2, Nvidia RTX 4090, and Nvidia A100 GPUs.
  • Figure 3: Comparison of environment rendering throughput for CartpoleBalance with pixel observations on an Nvidia RTX 4090. PyBatchRender (without multiprocessing) is compared against Isaac Lab, Maniskill, and Madrona MJX across various resolutions. Competitor data is sourced from zakka_mujoco_2025.