0
\$\begingroup\$

I want to know if mesh polygon count affects raytracing performance, by Raytracing I mean Nvidia's RTX or similar hardware accelerated raytracing.

So If I have a scene with high poly objects and total poly count of 20 million triangles and another scene but with 1 million triangles, will it work faster with 1 million.

If yes, then does the performance decrease in linear ?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

Raytracing solutions tend to use a bounding volume hierarchy to accelerate searches for the closest hit along a ray. That means your scene geometry is organized into something like a tree. If a ray misses the bounding volume of one branch of that tree, then the entire branch and all its twigs and leaves can be skipped over.

So, given no other information about the scene contents or the details of the raycasting queries being performed, we'd expect this to scale similarly to other tree search algorithms: ie. logarithmically.

That means raycasting a scene with 1 million triangles will usually be faster than doing the same in a scene with 20 million triangles, but not 20 times faster.

The particular scaling factors will depend on details of your scene geometry (do you have a lot of clusters of geometry well separated from each other, so the BVH can prune lots of it out of the path of your search? Or is all your geometry densely packed in the path of the rays you tend do shoot, so we have to visit most of it during a particular search?), the kinds of raycasting queries you use, and the particular graphics card and driver you're running on.

So as always with performance questions, the best way to get accurate answers for your use case is to build a test and profile the results.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .