I am working on a ray tracer. But i want to put more than 10 objects in the scene. How can i make the intersection fast so that it can give me reasonable FPS. Its a cpu-based ray tracer.


1 Answer 1


You have several techniques.

  1. Use acceleration structures. The idea is that you store your geometry (triangles) into generally some kind of volumes. The general idea behind acceleration structure is to discard quickly large parts of the scene, which we know (using these structure) don't have any object that your ray will intersect. An introduction to the topic can be found here.
  2. You can also take advantage of multi-threading and parallelism (threads and SSE instructions or similar - this is harder than 1. and the benefits are not always as high but you optimise for your hardware).
  3. You can ray-trace in the GPU but ray-tracing is a memory-bound problem so you will have memory problems quicker with the GPU than with CPU.

These are just some ideas.

  • $\begingroup$ Thanks for taking out some time for answering the question! $\endgroup$ Commented Feb 4, 2017 at 17:54

Your Answer

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

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