Skip to content

GPU Photon Mapper and RP Solver written in C++ using CUDA and OptiX

License

Notifications You must be signed in to change notification settings

igui/RPSolver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opposite Renderer + RPSolver

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 is intended to extend the original project to help solving Rendering Problem. See this paper for more info on the topic.

RPSolver

This program was done in the context of my final thesis (in spanish). RPSolver solves Rendering Problems, defined in an XML file, finding the best configuration that meets certain Lighting Intentions.

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

  • Visual Studio 2015
  • CUDA v8.0
  • OptiX v4.1
    • Note: You must register first by completing a form. Then download information is emailed to you.
  • Qt Open Source 5.9 for Windows
    • Specifically the version msvc2015 for 5.9
  • FreeGlut MSVC Package
  • GLEW - OpenGL Extension Wrangler Library
  • Open Asset Import Library
  • A CUDA compatible GPU 2.0 or greater.
    • Almost all recent GeForce GPUs support CUDA.
    • This is a run only dependency, as the project can be built if the system doesn't have a CUDA compatible card.
  • Windows 10 or newer, running on 64 bits.

Notes:

  • This project may work with with Qt 5.2, CUDA 5.5, Visual Studio 2012 and OptiX 3.5. But require slight dependency changes.

Building

The project needs some environment variables to be set so it can build. If you don't define them you will get missing files errors while compiling.

  • Define the following environment variables:

    • QTDIR should point to your QT instalation dir.
    • GLEW_PATH point to where you extracted GLEW.
    • ASSIMP_PATH should point to Asset Import installation dir
    • FREEGLUT_PATH should point to where you extracted FreeGlut.
    • OPTIX_PATH points to OptiX installation directory

    For example

      QTDIR=C:\Qt\5.9\msvc2015
      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 4.1.1
    
  • Open the Visual Studio Solution OppositeRenderer.sln and build.

Running

Running OppositeRenderer on a example scene

This can be done inside Visual Studio. There are tested *.dae scenes on the OppositeRenderer\RPSolver\examples folder

  1. Select Standalone as the primary project. This is the renderer.
  2. Hit on Debug. Compilation can take several minutes.
  3. Wait for the GUI program to open, and go to File, Open
  4. Select any of the example files
  5. Enjoy!

Running the ILPSolver on a example scene

If you really want, you can try to solve a sample RP, using the RPSolver library.

  1. Select RPSolver as the primary project.
  2. Hit on Debug. Compilation can take several minutes.
  3. Wait for the command line program to finish. It may take a minute or two depending on the CUDA core count of the running GPU
  4. Go to the folder OppositeRenderer\RPSolver\examples\output and there you will see the output of the run
    • solutions.csv with the optimal configurations
    • A collection of images for the optimal results

Known issues

  • Changing the Rendering Method (Photon Mapping, Progressive Photon Mapping, etc.) makes the program to crash due to OptiX Context reallocation errors.
  • Sometimes the program crash while exiting due to OptiX Context destruction errors.

About

GPU Photon Mapper and RP Solver written in C++ using CUDA and OptiX

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 72.9%
  • C++ 23.0%
  • Cuda 3.7%
  • Other 0.4%