jb892 / bop_renderer

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

Home Page:http://bop.felk.cvut.cz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 install OSMesa and LLVM using the provided script osmesa-install/osmesa-install.sh, which is a modified version of script 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 OSMesa and LLVM, go to folder bop_renderer and run:

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

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

Compilation

In CMakeLists.txt, set the following paths:

set(LLVM_DIR ...)
set(OSMESA_DIR ...)
set(PYTHON_LIBRARIES ...)
set(PYTHON_INCLUDE_DIRS ...)

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.

About

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

http://bop.felk.cvut.cz

License:MIT License


Languages

Language:C++ 84.6%Language:Python 6.2%Language:C 4.8%Language:CMake 1.5%Language:Objective-C 0.9%Language:HTML 0.9%Language:Shell 0.8%Language:Makefile 0.2%Language:CSS 0.0%