This is the backend tracer used in EAG-PT.
For running EAG-PT, please follow the installation process in EAG-PT.
- This is a tracer written in CUDA and OptiX, and wrapped with PyTorch Extension to support calls from PyTorch side.
eag_pt_tracer_optix/ext.cppdefines the interface of calls.eag_pt_tracer_optix/header/SampleRenderer.handeag_pt_tracer_optix/source/SampleRenderer.cppimplements the calls through classSampleRenderer.- OptiX programs are implemented in
eag_pt_tracer_optix/program/devicePrograms.cu. This file is compiled usingeag_pt_tracer_optix/program/generate-ptx.sh, which is already consolidated intosetup.py, to generate ptx ineag_pt_tracer_optix/ptx.eag_pt_tracer_optix/source/SampleRenderer.cppuses these programs through#include "../ptx/devicePrograms.h". eag_pt_tracer_optix/external/optix: Header files of OptiX v7.7.0 are directly downloaded from https://github.com/NVIDIA/optix-dev/tree/v7.7.0 and included in this repo.
# check PyTorch versions at https://pytorch.org/get-started/locally/ and https://pytorch.org/get-started/previous-versions/
pip install torch torchvision
# for fast compilation
pip install ninja
# nvcc should be installed in advance
# arch 8.9 is only for RTX 4090, check https://developer.nvidia.com/cuda-gpus. arch should also be changed in `setup.py` `command_nvcc` and `eag_pt_tracer_optix/program/generate-ptx.sh`. It should also be okay to leave the arch blank, in this case all archs will be compiled, which is inefficient.
rm -rf *_optix/ptx/ build/ *.egg-info/; TORCH_CUDA_ARCH_LIST=8.9 pip install . -v --no-build-isolation- Accordingly change paths in
.vscode/c_cpp_properties.jsonto get IntelliSense in VS Code.
- optix7course: the framework that this tracer is based on
- torchoptix: insight on passing raw pointers into C++
- 3DGRT, gtracer: ray tracer on 3D Gaussians
- EnvGS tracer, IRGS tracer: single-bounce ray tracer on 2D Gaussians
- PyTorch C++ Extension: link between Python and C++ OptiX