rtGeometryTrianglesSetIndexedTriangles... deprecated?

Hi!

I was about the implement my scene and in the programming guide found the chapter on triangles. Since this is only what I am dealing with (a bunch of meshes from Unity) this seemed exactly like what I need. Not having to implement my own bounding box and intersection program seemed like a good and I assume that an existing implementation for those would be more optimized.

However in the documentation it appears to be deprecated (both programming guide and api documentation for v6):

https://raytracing-docs.nvidia.com/optix_6_0/api_6_0/html/nvoptix_8h.html#a89db42423f353eb976e69f75867214ef

Please have a look into the optixGeometryTriangles OptiX SDK example and read through the function createGeometryTriangles() inside optixGeometryTriangles.cpp.
Look for these calls:

...
geom_tri->setTriangleIndices( index_buffer, RT_FORMAT_UNSIGNED_INT3 );
geom_tri->setVertices( num_vertices, vertex_buffer, RT_FORMAT_FLOAT3 );
...

The final OptiX 6.0.0 API replaced that deprecated function with these more flexible calls:
rtGeometryTrianglesSetVertices
https://raytracing-docs.nvidia.com/optix_6_0/api_6_0/html/group___geometry_triangles.html#ga565d463a96fb69617e6d284ab4536792
rtGeometryTrianglesSetTriangleIndices
https://raytracing-docs.nvidia.com/optix_6_0/api_6_0/html/group___geometry_triangles.html#ga95c4c771992e31b6b95f37b5d88688a7

Note that the GeometryTriangles API for setPrimitiveIndexOffset() behaves differently than for Geometry nodes.
The primitive index offset is really only affecting the device side rtGetPrimitiveIndex() function.
When specifying an index buffer, only the beginning of that needs to be adjusted with the primitive index offset.

Thanks a lot!

Other than that the Triangles API should behave like the rest, except for the limitations mentioned in 3.6.13 of the programming guide? Just wondering if I am going to run into problems going this (seemingly easier) route.

Not sure which documentation version you’re looking at. I see no chapter 3.6.13 in the online OptiX 6.0.0 programming guide version.
Please always start at this site when looking for NVIDIA raytracing docs. That should lead to the most current versions.
[url]https://raytracing-docs.nvidia.com/[/url]

How strange. I am on vacation right now, so I printed it out. The version is from Feb 5 2019, 6.0. Document build number 314700

Found it here: https://raytracing-docs.nvidia.com/optix/guide/nvidia_optix_programming_guide.190205.A4.pdf

I think the issue is that this is high up on the google search results for Optix programming guide. I’ll go through the URL you send then.