Sign in to follow this  

Best Ray Tracing algorithms

This topic is 1712 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Generic ray to triangle mesh intersection for physics as well as baking light maps. This is not for a ray tracing renderer.

 

You might have better luck googling around for "ray casting" rather than ray tracing, as ray tracing is exclusively connotated to rendering.

Share this post


Link to post
Share on other sites
I've implemented the quad-BVH SIMD tree with pretty good success, 1.5 million rays/thread/second on a 3.4 GHz Core i7. It has a number of advantages over traditional BVHs and even KD trees, like doing 4 ray-bounding-box or 4 ray-triangle tests in parallel, plus it generates very shallow trees (no more than 6 or 7 levels). It's a little tricky to implement and you'll have to learn SSE to do it, but it's what I used in my sound propagation library to trace sound rays. It's going to be faster than ray packet tracers in most cases because you don't have to deal with incoherent rays. Edited by Aressera

Share this post


Link to post
Share on other sites

Generic ray to triangle mesh intersection for physics as well as baking light maps. This is not for a ray tracing renderer.

What does your triangle mesh data look like? Some scenes are highly amenable to reduction by bounding-volume hierarchy trees; others by octrees or kd-trees; and still others are chaotic enough (like most indoor 3D shooter environments) that you'd need to customize the approach based on other factors. Edited by ApochPiQ
Typo

Share this post


Link to post
Share on other sites
I second that the easiest solution would be to use Embree (or other ray tracing library). For high performance ray tracing you probably want either spend a LOT of time on optimizations (or use GPU and spend also a LOT of time on it). Currently state of the are are probably speculative gpu traversal kernels, SplitBVH for scene management (for high traversal speed, for fast build I'd say HLBVH build on GPU) along with Woop triangles (instead of standard). KD-trees aren't commonly used as they were (basically they're giving worse performance on GPU, and also are slower to build). Of course on CPU they're still wide-spread (they give probably best performance for random rays -> being very good for (pre)computing GI), quit fast KD tree ray tracer can be put together in like a month (for newcomer - if he wishes to learn and work hard). I can give you few numbers - SahBVH + Woop Triangles + standard while-while ray traversal kernel on Radeon HD 6a770 - approx 50 to 60 MRay/s (for primary, like 30% less for diffuse rays). Building this-like ray tracer will take you few weeks of hard work (if you know what you're doing - e.g. you wrote few raytracers & you know all languages you use as better as your native-language). You can do a lot better (even going over 100 MRay/s), but that takes quite a while of reading & understanding papers, doing experiments, etc. If you don't have time for this - just grab Embree (or other ray tracing library, there are also gpu ray tracers our there!), and you'll have it instantly.

Share this post


Link to post
Share on other sites

This topic is 1712 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this