Optix 6.5

Hardware:
2080 Super

Hi!
I have a problem with Optix 6.5 and the advanced samples. After i follow this steps…

Requirements for 64-bit Windows:

Instructions for building:

  • Start up cmake-gui from the Start Menu.

  • Select the “src” directory from optix_advanced_samples as the source file location.

  • Create a build directory that isn’t the same as the source directory.
    Hint: if you type in the directory instead of using the “Browse Build…” button,
    CMake will prompt to create the directory if it doesn’t already exist.

  • Press “Configure” button and select the version of Visual Studio you wish to
    use. Note that the 64-bit compiles are separate from the 32-bit compiles
    (e.g. look for “Visual Studio 12 2013 Win64”). Leave all other options on
    their default. Press “OK”.

  • Set OptiX_INSTALL_DIR to wherever you installed OptiX, e.g.,
    "C:\ProgramData\NVIDIA Corporation\OptiX SDK ".

  • The newly added OptiX Introduction examples add a dependency for the DevIL image library.
    Set IL_INCLUDE_DIR, IL_LIBRARIES, ILU_LIBRARIES, and ILUT_LIBRARIES to the path for
    DevIL/include, DevIL.lib, ILU.lib and ILUT.lib respectively.

  • Press “Configure” again, then “Generate”.

  • Open the OptiX-Advanced-Samples.sln solution file in the build directory you created.

  • Select “Build Solution” from the IDE.

  • Right click on one of the sample program targets in the solution explorer and
    select “Set as start up project”.

  • Run the sample. “q” or “Esc” will close the window.

But i take this error:

and error MSB6006: “cmd.exe” exited with code 1

I dont have that bin folder…

Can u help me plse?!!

Thanks!

That is most likely due to the outdated FindCUDA.cmake inside the repository which is not able to determine the correct CUDA_HOST_COMPILER location after Microsoft changed their internal folder structure from MSVS 2015 to 2017.

Please see this post for how to set the CUDA_HOST_COMPILER manually inside the CMake GUI or how to use the FindCUDA.cmake provided by CMake.
https://forums.developer.nvidia.com/t/hdr-denoising-variable-has-no-effect/71813/8

Sorry but i get this:

In VS 2015:

C:\Users\juan\Desktop\TFG\optix_advanced_samples-master\Build.vs\support\glfw\uninstall.vcxproj : warning : The build tools for v142 cannot be found. Install v142 to build using the v142 build tools.

In VS2019 with
CUDA_HOST_COMPILER
in:
C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe.config

3>Failed to run C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe.config ((null)).

3>CMake Error at optixGlass_generated_path_trace_camera.cu.ptx.cmake:245 (message):

3> Error generating

3> C:/Users/juan/Desktop/TFG/optix_advanced_samples-master/Build/.vs/lib/ptx/optixGlass_generated_path_trace_camera.cu.ptx

3>

3>

3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): error MSB6006: “cmd.exe” exited with code 1.

Edit:
My software:
CUDA 8.0 and CUDA 10.2
VS 2019
VS 2015
Optix 6.5
Multiple Dev tools c++

This looks like you mixed up compilers and solutions in the MSVS 2015 case and picked the wrong file for the CUDA_HOST_COMPILER in the MSVS 2019 case.

The CUDA_HOST_COMPILER is not
C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe.config
it needs to be the cl.exe itself as I explained in the linked thread above, not some .config file.

I’ve tried building all OptiX Advanced Samples in two ways just now and both worked:
1.) MSVS 2019, CUDA 10.2, OptiX 6.5.0 with CUDA_HOST_COMPILER set manually.
2.) MSVS 2019, CUDA 10.2, OptiX 6.5.0 with the FindCUDA folder and FindCUDA.cmake renamed to _FindCUDA to let CMake use its own version which finds the CUDA_HOST_COMPILER correctly.

In both cases I selected the OPTIX_INSTALL_DIR because mine is not at the default location and picked the DevIL include folder and three .lib files manually as described inside install-win.txt file.

Please delete your build folder and start from scratch. I recommend the second approach.
Newer CMake versions (I used 3.17.3) will print some developer warning about deprecated features. These can be ignored.

Note that the latest OptiX Advanced Samples have been developed with the OptiX 5.1.0 version and do not make use of the built-in triangle primitives of the OptiX 6.5.0 versions. Means these examples are not making full use of your RTX board without changes.

If you start new projects with OptiX, I would really recommend using OptiX 7 instead which has the more modern API and is generally faster.
I ported some of my OptiX Introduction examples from the OptiX Advanced Examples over to OptiX 7 and you already got those working before.
For that, please have a look at all resources listed here:
https://forums.developer.nvidia.com/t/optix-7-1-release/139962
https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410/4