Skip to content

voldemarz/OppositeRenderer

 
 

Repository files navigation

Opposite Renderer

Forked from apartridge/OppositeRenderer

In short Opposite Renderer is a GPU Photon Mapping Rendering Tool implemented in CUDA using OptiX library. It allows importing Collada scenes files and then render them to an image using Progressive Photon Mapping.

This fork

The project was forked to use it as basis for implementation of the Vertex Connection and Merging algorithm as part of Valdis Vilcans's master's thesis project at DTU. Due to delays in development, the current implementation contains only vertex connection part (bidirectional path tracer) with recursive MIS weight computation (no merging).

  • The files with notable modifications compared to the original project have authors listed in the header. Most important are added files in "RenderEngine/renderer/vcm" directory, BSDF and BxDF classes, modifications in OptixRenderer class and files in "RenderEngine/material".
  • [tech. rep. (xx)] comments in the code refer to formulas of the tech report "Implementing Vertex Connection and Merging"
  • The Server project hasn't been yet updated to work correctly due to changes in RenderEngine. So currently it compiles, but is non functional.

A pre-compiled Windows 64-bit version can be found here.

The Sponza and Conference test scenes can be obtained here.

Where To Start?

If this is your first time hearing about Opposite Renderer, we recommend you start with the original website: http://apartridge.github.io/OppositeRenderer/.

This project is a part of Stian Pedersen's master's thesis project at NTNU. This demo renderer contains a GPU implementation of the Progressive Photon Mapping algorithm. It is written in C++ using CUDA and OptiX. The renderer has a GUI and can load scenes from the well known Collada (.dae) scene format. It has a client-server architecture allowing multi-GPU (distributed) rendering with any number of GPUs. It has been tested with up to six GPUs via Gigabit ethernet with very good speedup.

Conference Room Screenshot

Building and Running

Dependencies

Building

The project is set up to use VS2010 toolset for Win32 build and VS2012 for x64. The variation is purely because of Qt with OpenGL packages that were available precompiled.

The solution is modular and consists of 5 projects.

The project needs some environment variables pointing to dependencies to be set so it can build. Alternatively you can set those values in SDKs.props file in the solution root directory .

  • Define the following environment variables or properties in SKDs.props:

    • QTDIR should point to your QT instalation dir.
    • GLEW_PATH point to where you extracted GLEW.
    • ASSIMP_PATH should point to Asset Import Library SDK installation dir, version 3.0.0 tested
    • FREEGLUT_PATH should point to where you extracted FreeGlut.
    • OPTIX_PATH points to OptiX installation directory
    • CUDA_USE_VER (optional) needs to be set (e.g. "6.0", "5.5", controls wich Cuda toolkit will be used)
    • OPTIX_USE_VER (optional) similarly allows to switch Optix SDK used (see SDKs.props file), if not set will use the one at OPTIX_PATH
    • OPTIX_PATH_Vx_x_x (optional) path to different Optix SDK version, needs to be set if want to use OPTIX_USE_VER

    For example

      QTDIR=C:\Qt\Qt5.2.1\5.2.1\msvc2012_64_opengl
      GLEW_PATH=C:\Program Files\Common Files\glew
      ASSIMP_PATH=C:\Program Files\Assimp
      FREEGLUT_PATH=C:\Program Files\Common Files\freeglut
      OPTIX_PATH=C:\ProgramData\NVIDIA Corporation\OptiX SDK 3.5.1
      CUDA_USE_VER=5.5
      OPTIX_USE_VER=3.5.1
      OPTIX_PATH_V3_5_1=C:\ProgramData\NVIDIA Corporation\OptiX SDK 3.5.1
      OPTIX_PATH_V3_6_0=C:\ProgramData\NVIDIA Corporation\OptiX SDK 3.6.0
    
  • Open the Visual Studio Solution OppositeRenderer.sln and build.

Running

Start Standalone.exe.

Note that first launch can take even 60+ seconds before image appears on the screen due to Optix just in time compilation (JIT), algorithm and scene initializations, acceleration structure build, buffer transfers to GPUs.

For slower GPUs you might want to increase Timeout Detection and Recovery delay (TdrDelay key in registry) otherwise operating system might interrupt the video driver before it has finished its work (screen flash and a baloon message that video driver stopped responding).

About

Extending OptiX based GPU photon mapper OppositeRenderer to include Vertex Connection and Merging.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 69.4%
  • Cuda 18.1%
  • C 12.3%
  • Objective-C 0.2%