optixSoltraceDemos is a demo project that utilizes NVIDIA OptiX for ray tracing encountered in Concentrated Solar Power applications.
Before building optixSoltraceDemos
, ensure you have the following:
-
NVIDIA GPU and Drivers
- An NVIDIA GPU.
- Minimum CUDA Toolkit version: 11.0.
- NVIDIA drivers compatible with your GPU and CUDA version.
-
NVIDIA OptiX SDK
- Download the NVIDIA OptiX SDK from NVIDIA's website.
- Install the SDK to a directory. For example:
C:/ProgramData/NVIDIA Corporation/OptiX SDK 8.1.0/
- The source code for the OptiX SDK is located in the
SDK
directory, for example,C:/ProgramData/NVIDIA Corporation/OptiX SDK 8.1.0/SDK
. Create abuild
folder under theOptix SDK 8.1.0
directory:C:/ProgramData/NVIDIA Corporation/OptiX SDK 8.1.0/build
- Configure and build the SDK in the created
build
directory, in bothRelease
andDebug
modes - To confirm that the
Optix SDK
is built successfully, run theoptixHello
demo inbuild/bin
.
-
CMake
- Version 3.18 or higher.
-
C++ Compiler
- A compiler that supports C++17 or later.
-
Clone the Repository:
git clone git@github.com:uwsbel/optixSoltraceDemos.git cd optixSoltraceDemos
-
Set the
OptiX_INSTALL_DIR
:- Provide the path to the OptiX SDK during CMake configuration.
- For example, if the SDK is installed in
C:/ProgramData/NVIDIA Corporation/OptiX SDK 8.1.0/
:cmake -DOptiX_INSTALL_DIR="C:/ProgramData/NVIDIA Corporation/OptiX SDK 8.1.0/" .
-
(Optional) Set the
OptiX_INSTALL_DIR
as an Environment Variable:- Alternatively, you can set
OptiX_INSTALL_DIR
as an environment variable:- On Windows:
$env:OptiX_INSTALL_DIR="C:/ProgramData/NVIDIA Corporation/OptiX SDK 8.1.0/"
- On Linux/macOS:
export OptiX_INSTALL_DIR="/path/to/OptiX SDK/"
- On Windows:
- Alternatively, you can set
-
Generate Build Files: Run CMake to generate build files for your project
-
Build the Project: Build the optixSoltraceDemos project
Once built, the executable demos can be found in the bin
directory. Run them from the command line or within your IDE.