/bop_renderer

A simple C++ off-screen renderer with Python bindings utilized in the BOP Toolkit.

Primary LanguageC++MIT LicenseMIT

This is an enhanced version of https://github.com/thodan/bop_renderer that supports per-vertex texture coordinates and enables rendering of textured meshes.

BOP Renderer

A simple C++ renderer with Python bindings utilized in the BOP Toolkit.

The renderer is based on OSMesa, an off-screen rendering library, which makes it suitable for rendering on servers.

Dependences

The BOP Renderer depends on OSMesa which requires LLVM. You can use the provided script osmesa-install/osmesa-install.sh to install these libraries (it is a modified version of osmesa-install -- the changes are documented in osmesa-install/README.md).

The installation locations can be set by osmesaprefix and llvmprefix in osmesa-install.sh. If you do not want to install LLVM, set buildllvm to 0 in osmesa-install.sh.

To install the libraries, run (from folder bop_renderer):

mkdir osmesa-install/build
cd osmesa-install/build
../osmesa-install.sh

You will also need to install yaml-cpp.

Moreover, the BOP Renderer depends on the following header-only libraries, which are provided in the folder 3rd (no installation is required for these libraries): glm, png++, pybind11, RPly.

Compilation

  1. If necessary, modify library paths in CMakeLists.txt.
  2. Compile by: mkdir build; cd build; cmake .. -DCMAKE_BUILD_TYPE=Release; make

Note: The BOP Renderer was tested on Linux only.

Samples

  • samples/renderer_minimal.py - A minimal example on how to use the Python bindings of the BOP Renderer.
  • samples/renderer_test.py - Comparison of the BOP Renderer and the Python renderer from the BOP Toolkit.