Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RT-Template (Ray Tracing Spatial Analysis)

This project is a C++/CUDA/NVIDIA OptiX template that performs rapid spatial line-of-sight analysis natively on the GPU. It loads 3D meshes in the .off format, constructs an OptiX Bounding Volume Hierarchy (BVH) from the geometry, and casts hardware-accelerated rays from each vertex of the model towards the origin (0, 0, 0).

The software checks for line-of-sight occlusions and outputs profiling metrics to measure spatial analysis performance. It differentiates between points that have a clear line-of-sight (marked as 0) and those that are occluded by other parts of the geometry geometry before reaching the center (marked as 1).

Requirements

To build and run this project, you will need the following dependencies:

  • C++ Compiler: A C++17 capable compiler (e.g., MSVC on Windows, GCC/Clang on Linux).
  • CMake: Version 3.18 or newer.
  • NVIDIA CUDA Toolkit: Required for nvcc and bin2c. Note that the bin2c executable needs to be in your system's PATH.
  • NVIDIA OptiX SDK: Version 8.0.0.
    • By default, the CMakeLists.txt assumes it is located at:
      • Windows: C:/ProgramData/NVIDIA Corporation/OptiX SDK 8.0.0
      • Linux: /opt/optix
  • NVIDIA GPU: Hardware with RT Cores is recommended. The project is currently configured to build for Compute Capability 86 (sm_86, e.g., Ampere architecture). Update the CMAKE_CUDA_ARCHITECTURES in CMakeLists.txt if using older/newer hardware.

Compiling on Linux

  1. Ensure the CUDA Toolkit binaries (nvcc, bin2c) are accessible in your environment's PATH.
  2. Open a terminal in the root directory of the project.
  3. Run the following commands:
mkdir build
cd build
cmake .. -DOptix_INSTALL_DIR="/opt/optix"
make -j
  1. Run the executable:
./rt_template custom_model.off

Compiling on Windows

  1. Ensure the CUDA Toolkit and OptiX SDK 8.0.0 are installed. Visual Studio with "Desktop Development with C++" must be installed to use compiler tools.
  2. Open a Developer PowerShell for VS or Developer Command Prompt for VS.
  3. Navigate to the project directory and run the following commands:
mkdir build
cd build
cmake -G "NMake Makefiles" .. -DOptix_INSTALL_DIR="C:/ProgramData/NVIDIA Corporation/OptiX SDK 8.0.0"
nmake
  1. Run the executable:
.\rt_template.exe custom_model.off

Authorship

Author: R. Carrasco
Template created for high-performance GPU Ray Tracing computations.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages