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.
