I know that when creating a custom primitive one needs to define an intersection shader and an AABB. Are there any examples with OptiX 7.0 with a mesh of custom primitives with the corresponding AABB’s ?
Hey, yes there are a few examples of custom primitives. I don’t know about a ‘mesh’ of them, but the examples with a sphere in them are a good place to start, such as the optixWhitted example.
A follow-up, if that is okay. Can you tell me where a good beginner example is that employs an input mesh to render (custom or built-in triangles) ? such as the teapot example you find on many OpenGL tutorials.
The optixPathTracer SDK sample is the simplest mesh input example that has multiple triangles. It uses built-in triangles. The entire (very simple) scene is hard-coded in the sample’s optixPathTracer.cpp file: look for g_vertices and g_mat_indices.