8
$\begingroup$

Recently I'm developing a Monte-Carlo path tracer. To measure my tracer's performance, I decided to implement a simple mechanism to count how many rays can it trace in a second. Then here comes the problem, there are two ways to define a single ray:

  1. A complete ray, i.e., starting from camera and bouncing around the scene until it terminates.

  2. The ray originated from each intersection point.

Although many people use "Rays per Second" to measure ray/path tracer's performance, how they recognize "rays" is unclear to me. Perhaps anybody knows?

$\endgroup$
4
  • 1
    $\begingroup$ I've seen both, unfortunately. I'm not fond of ray per second as meaning exclusively primary rays and I'd suggest "paths per second" or "samples per second" instead. "Complete ray" is not a name you'll find elsewhere: a ray is an unbounded line segment. "Rays per second" is ill specified for a path tracer: do shadow rays count, for instance? It's a useful metric for an acceleration framework (i.e. Embree or OptiX) but not a renderer. $\endgroup$ Apr 30, 2016 at 21:20
  • $\begingroup$ Also, be aware that samples per second still isn't a great metric of actual performance since sample quality will vary wildly depending on implementation details. It's probably the best thing you can do starting out though, as the better solutions involve fairly complex variance estimates. $\endgroup$ Apr 30, 2016 at 21:30
  • $\begingroup$ @KarlSchmidt I think you should post those comments as an answer ;) $\endgroup$ Apr 30, 2016 at 22:05
  • $\begingroup$ Probably a good idea, yes. :) $\endgroup$ Apr 30, 2016 at 22:56

1 Answer 1

4
$\begingroup$

I've seen both, unfortunately. I'm not fond of rays per second as meaning exclusively primary rays and I'd suggest "paths per second" or better yet "samples per second" instead. "Complete ray" is not a common term: a ray is a (potentially unbounded) line segment and a sequence of rays is a path.

Rays per second in your second sense of total ray casts is not well-specified for a path tracer: do shadow rays count, for instance? It's a useful metric for evaluating an acceleration structure or intersection testing framework (i.e. Embree or OptiX) but I'd avoid it for a renderer.

Finally, be aware that samples per second still isn't a great metric of actual performance since sample quality will vary wildly depending on implementation details. It's probably the best thing you can do starting out though, as the better solutions involve fairly complex variance estimates.

$\endgroup$
2
  • $\begingroup$ Great answer. To add to it, since it is hard to come up with one metric that is universally meaningful, I'd suggest you pick one that makes most sense / is most honest for your usage case, and make sure you explain what you mean by your terminology. $\endgroup$
    – Alan Wolfe
    May 1, 2016 at 13:59
  • $\begingroup$ Yeah right, thank you for clearing my thoughts! Currently I choose the "samples per second" since it is easy to understand and hard to be misunderstood IMO. I'll eventually implement something that can calculate variance and measure rendering performance based on that. $\endgroup$
    – D01phiN
    May 8, 2016 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.