How to Get Started with OptiX 7

Originally published at: https://developer.nvidia.com/blog/how-to-get-started-with-optix-7/

The evolution of a production-tested high performance ray tracing API Image courtesy of © Dabarti Studio, rendered with V-Ray Next GPU There has been a recent shift in high-performance API design towards providing lower-level control of resource management and execution scheduling. This design evolution allows experienced developers to be in full control of their application…

Looks like the template parameters (<t> etc.) are missing in the "Shader Binding Table" code snippet above, probably mangled by your CMS and interpreted as HTML tags.

Can the curve primitives be utilized to create closed shapes? For instance, using a series of linear segments to define a hexagon-type curve shape?

I want to test your denoiser in NVIDIA-OptiX-SDK-7.3.0-linux64-x86_64/SDK/optixDenoiser. However, I don’t know how to generate some basic inputs like soane-BSDF, soane-Normal and soane-Flow. I have tried to produce them in NVIDIA-OptiX-SDK-7.3.0-linux64-x86_64/SDK/optixSphere, but I don’t even know how to draw one more ball.

I modified few lines in optixSphere.cpp as below, but I still can’t see another sphere I add.

CUdeviceptr hitgroup_record;
            size_t      hitgroup_record_size = sizeof( HitGroupSbtRecord );
            CUDA_CHECK( cudaMalloc(
                    reinterpret_cast<void**>( &hitgroup_record ),
                    hitgroup_record_size * 2
                    ) );
            HitGroupSbtRecord hg_sbt[2];
            hg_sbt[0].data.sphere.center = { 0.8f, 0.0f, 0.0f };
            hg_sbt[0].data.sphere.radius = 0.5f;
            hg_sbt[1].data.sphere.center = { -0.8f, 0.0f, 0.0f };
            hg_sbt[1].data.sphere.radius = 0.5f;
            OPTIX_CHECK( optixSbtRecordPackHeader( hitgroup_prog_group, &hg_sbt[0] ) );
            OPTIX_CHECK( optixSbtRecordPackHeader( hitgroup_prog_group, &hg_sbt[1] ) );
            CUDA_CHECK( cudaMemcpy(
                        reinterpret_cast<void*>( hitgroup_record ),
                        hg_sbt,
                        hitgroup_record_size*2,
                        cudaMemcpyHostToDevice
                        ) );

            sbt.raygenRecord                = raygen_record;
            sbt.missRecordBase              = miss_record;
            sbt.missRecordStrideInBytes     = sizeof( MissSbtRecord );
            sbt.missRecordCount             = 1;
            sbt.hitgroupRecordBase          = hitgroup_record;
            sbt.hitgroupRecordStrideInBytes = sizeof( HitGroupSbtRecord );
            sbt.hitgroupRecordCount         = 2;
        }

To sum up, I have two questions. First, how to draw multiple objects (including spheres and triangles) in one scene. Second, how to use optix7 to generate soane-BSDF, soane-Normal and soane-Flow in exr format.

My account is fangtiancheng@sjtu.edu.cn or 1773701277@qq.com. I would be appreciated if you could answer my question.

Would you please write to more beginner centric technical staff on OptiX? There are few on NVIDIA ON DEMAND, but those are of high level. Also, I think a few video tutorials are really missing in OptiX. After SIGGRAPH 2019 Ingo Wald’s talk, nobody actually made any other video tutorial series.