Skip to content

Patoche692/Nexus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexus Renderer

Interactive physically based GPU path tracer from scratch written in C++ using CUDA and OpenGL.

Screenshots

cannelle_et_fromage3 stormtrooper mustang water2 spider bathroom5 piano3 piano_zoom lamp

coffee monster_under_bed iphone

Features

  • Interactive camera with thin lens approximation: FOV, defocus blur
  • Triangle meshes with an SAH-based BVH (built on the CPU, ray traversal on the GPU)
  • The BVH is split into two parts: a top level structure (TLAS) and a bottom level structure (BLAS). This allows for multiple instances of the same mesh as well as dynamic scenes with object transforms
  • Model loader: obj, ply, fbx, glb, gltf, 3ds, blend with Assimp
  • Texture mapping (diffuse, emissive)
  • HDR environment maps
  • Materials:
  • Importance sampling: cosine weighted for diffuse materials, VNDF for dielectrics

Prerequisites

Nexus requires the following:

Build

  • Clone the repository

    git clone --recurse-submodules https://github.com/Patoche692/Nexus
  • Launch the setup.bat script. It will generate a Visual Studio solution in the build folder

    Alternatively, you can generate the solution via cmake:

    mkdir build
    cd build
    cmake ..
  • Open the Visual Studio solution. Right click on the Nexus solution and set it as startup project. Press F5 to build the project

Usage

  • Go to file -> open to load a new scene. The model loading is not multithreaded and the BVH construction might take some time depending on the model size
  • Controls: hold right click and use WASD keys to move and the mouse to change the camera orientation
  • You can change the meshes and camera properties in the UI

Dependencies

Resources

Models