Openpgl
Intel(R) Open Path Guiding Library
Install / Use
/learn @OpenPathGuidingLibrary/OpenpglREADME
Intel® Open Path Guiding Library
This is release v0.7.1 of Intel® Open PGL. For changes and new features, see the changelog. Visit http://www.openpgl.org for more information.
Overview
The Intel® Open Path Guiding Library (Intel® Open PGL) implements a set of representations and training algorithms needed to integrate path guiding into a renderer. Open PGL offers implementations of current state-of-the-art path guiding methods, which increase the sampling quality and, therefore, the efficiency of a renderer. The goal of Open PGL is to provide implementations that are well tested and robust enough to be used in a production environment.
The representation of the guiding field is learned during rendering and updated on a per-frame basis using radiance/importance samples generated during rendering. At each vertex of a random path/walk, the guiding field is queried for a local distribution (e.g., incident radiance), guiding local sampling decisions (e.g., directions).
Currently supported path guiding methods include: guiding directional sampling decisions on surfaces and inside volumes based on a learned incident radiance distribution or its product with BSDF components (i.e., cosine lobe) or phase functions (i.e., single lobe HG).
Open PGL offers a C API and a C++ wrapper API for higher-level abstraction. The current implementation is optimized for the latest Intel® processors with support for SSE, AVX, AVX2, and AVX-512 instructions.
<!--, and for ARM processors with support for NEON instructions.-->Open PGL is part of the Intel® oneAPI Rendering Toolkit and has been released under the permissive Apache 2.0 license.
|
|
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Path traced image of a variation of the Nishita Sky Demo scene from Blender Studio (CC0) without and with using Open PGL to guide directional samples (i.e., on surfaces and inside the water volume). |
Disclaimer
The current version of Open PGL is still in a pre v1.0 stage and should be used with caution in any production related environment. The API specification is still in flux and might change with upcoming releases.
Latest Updates
The full version history can be found here
Open PGL 0.7.1
- Bugfixes:
- Fixing invalidation of the guiding field on initial creation if a cell contains no samples #23.
- Fixing noisy stdout printouts #19.
- Improving robustness of the integer arithmetric used during the deterministic multi-threaded building of the spatial subdivision structure.
- Improving numerical stability of fitting process of the VMM-based guiding models.
Support and Contact
Open PGL is under active development. Though we do our best to guarantee stable release versions, a certain number of bugs, as-yet-missing features, inconsistencies, or any other issues are still possible. Should you find any such issues, please report them immediately via Open PGL’s GitHub Issue Tracker (or, if you should happen to have a fix for it, you can also send us a pull request).
Reference
@misc{openpgl,
Author = {Herholz, Sebastian and Dittebrandt, Addis},
Year = {2022},
Note = {http://www.openpgl.org},
Title = {Intel{\textsuperscript{\tiny\textregistered}}
Open Path Guiding Library}
}
Building Open PGL from source
The latest Open PGL sources are always available at the Open PGL GitHub
repository. The default main
branch should always point to the latest tested bugfix release.
Prerequisites
Open PGL currently supports Linux, Windows and MacOS. In addition, before building Open PGL you need the following prerequisites:
-
You can clone the latest Open PGL sources via:
git clone https://github.com/RenderKit/openpgl.git -
To build Open PGL you need CMake, any form of C++11 compiler (we recommend using GCC, but also support Clang and MSVC), and standard Linux development tools.
-
Open PGL depends on TBB, which is available at the TBB GitHub repository.
-
Open PGL depends on OIDN, if the Image-space Guiding Buffer feature is enabled, which is available at the OIDN GitHub repository.
Depending on your Linux distribution, you can install these dependencies
using yum or apt-get. Some of these packages might already be
installed or might have slightly different names.
CMake Superbuild
For convenience, Open PGL provides a CMake Superbuild script which will pull down Open PGL’s dependencies and build Open PGL itself. The result is an install directory including all dependencies.
Run with:
mkdir build
cd build
cmake ../superbuild
cmake --build .
The resulting install directory (or the one set with
CMAKE_INSTALL_PREFIX) will have everything in it, with one
subdirectory per dependency.
CMake options to note (all have sensible defaults):
CMAKE_INSTALL_PREFIX: The root directory where everything gets installed to.BUILD_JOBS: Sets the number given tomake -jfor parallel builds.BUILD_STATIC: Builds Open PGL as static library (defaultOFF).BUILD_TOOLS: Builds Open PGL’s tools (defaultOFF).BUILD_DEPENDENCIES_ONLY: Only builds Open PGL’s dependencies (defaultOFF).BUILD_TBB: Builds or downloads TBB (defaultON).BUILD_TBB_FROM_SOURCE: Specifies whether TBB should be built from source or the releases on GitHub should be used. This must be ON when compiling for ARM (defaultOFF).BUILD_OIDN: Builds or downloads Intel’s Open Image Denoise (OIDN) (defaultON).BUILD_OIDN_FROM_SOURCE: Builds OIDN from source. This must be ON when compiling for ARM. (defaultON).DOWNLOAD_ISPC: Downloads Intel’s ISPC compiler which is needed to build OIDN (defaultONwhen building OIDN from source).
For the full set of options, run ccmake [<PGL_ROOT>/superbuild].
Standard CMake build
Assuming the above prerequisites are all fulfilled, building Open PGL through CMake is easy:
Create a build directory, and go into it:
mkdir build
cd build
Configure the Open PGL build using:
cmake -DCMAKE_INSTALL_PREFIX=[openpgl_install] ..
-
CMake options to note (all have sensible defaults):
-
CMAKE_INSTALL_PREFIX: The root directory where everything gets installed to. -
OPENPGL_BUILD_STATIC: Builds Open PGL as a static or shared library (defaultOFF). -
OPENPGL_ISA_AVX512: Compiles Open PGL with AVX-512 support (defaultOFF). -
OPENPGL_ISA_NEONandOPENPGL_ISA_NEON2X: Compiles Open PGL with NEON or double pumped NEON support (defaultOFF). -
OPENPGL_LIBRARY_NAME: Specifies the name of the Open PGL library file created. By default the nameopenpglis used. -
OPENPGL_BUILD_STATIC: Builds Open PGL as static library (defaultOFF). -
OPENPGL_BUILD_TOOLS: Builds additional tools such as:openpgl_benchandopenpgl_debugfor benchmarking and debuging guiding caches (defaultOFF). -
OPENPGL_EF_RADIANCE_CACHES: Enables the experimental radiance caching feature (defaultOFF). -
OPENPGL_EF_IMAGE_SPACE_GUIDING_BUFFER: Enables the experimental image-space guiding buffer feature (defaultOFF). -
OPENPGL_DIRECTION_COMPRESSION: Enables the 32Bit compression for directional data stored inpgl_direction(defaultOFF). -
OPENPGL_RADIANCE_COMPRESSION: Enables the 32Bit compression for RGB data stored inpgl_spectrum(defaultOFF). -
OPENPGL_TBB_ROOT: Location of the TBB installation. -
OPENPGL_TBB_COMPONENT: The name of the TBB component/library (defaulttbb).
-
Build and install Open PGL using:
cmake build
cmake install
Including Open PGL into a project
Including into CMake build scripts.
To include Open PGL into a project which is using CMake as a build system, one can simply use the CMake configuration files provided by Open PGL.
To make CMake aware of Open PGL’s CMake configuration scripts the
openpgl_DIR has to be set to their location during configuration:
cmake -Dopenpgl_DIR=[openpgl_install]/lib/cmake/openpgl-0.7.1 ..
After that, adding OpenPGL to a CMake project/target is done by first
finding Open PGL using find_package() and then adding the
openpgl:openpgl targets to the project/target:
# locating Open PGL library and headers
find_package(openpgl REQUIRED)
# setting up project/target
...
add_executable(myProject ...)
...
# adding Open PGL to the project/target
target_include_directories(myProject openpgl::openpgl)
target_link_libraries(myProject openpgl::openpgl)
Including Open PGL API headers
Open PGL offers two types of APIs.
The C API is C99 conform and is the basis for interacting with Open PGL. To use the C API of Open PGL, one only needs to include the following header:
#include <openpgl/openpgl.h>
The C++ API is a header-based wrapper of the C API, which offers a more comfortable, object-oriented way of using Open PGL. To use the C++ API of Open PGL, one only needs to include the following header:
#include <openpgl/cpp/OpenPGL.h>
Open PGL API
The API specification of Open PGL is currently sti
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
