Closed matangpanchal closed 6 years ago
It's possible to do much, much better than what bepuphysics v1 exposes for ray casts. With a very high quality implementation on sufficient hardware, 500 million coherent rays per second is achievable, and billions is possible with some implementation/hardware combos.
Getting to those numbers does typically require things that aren't exactly CPUs, though. Many high performance raytracers are implemented on GPUs, and some are built with some other more exotic architectures in mind (like xeon phi).
That said, there are still massive implementation improvements compared to bepuphysics v1 available on a regular CPU. This would be composed of three big parts:
Taken together, I think it should be possible for v2 to reach 10 to 100 million coherent rays per second on a consumer level machine depending on the difficulty of the scene and the underlying CPU.
So, the easiest thing to do to get better performance would be 'use v2 once it's ready', but getting this kind of raytracing work in will take a few more months. If you only care about CPU raytracing performance, you might want to look at Intel's Embree, which already does everything I've mentioned very well.
Dear Sir, I am very glad to receive such an extensive explanation and guidance. Thanks a lot for it.
Actually I am aware of Optix Library from Nvidia, which is very powerful GPU based library for raytracing. I am using it in one of my project also, but here (in above mentioned project) I am not able to integrate it with .net applications developed in c# or vb.net. If it is possible to use it from c# or vb.net and you are aware then I request you to share such resource.
Thanks for suggesting Embree, I will definitely explore it.
Apart from Raycast I am using BEPU for Inverse kinematics also, which is very helpful too. Thanks for making such library.
Depending on the target platforms, writing a C# wrapper for the C API should work (using DllImport, extern and so on), but I don't know of any existing wrappers.
Ok, thank you very much
Dear Sir, I am looking for a faster way to ray cast rays with one origin and direction having a Triangle mesh in the way. in my scenario rays are almost 4 -5 millions , Raycast method of Staticmesh is giving much better performance compared to the WPF hittest method, for example rays something around 5 million takes more than 1 minute in wpf hittest method where as above mentioned raycast method does the same in 10 secs. 👍 , I tired raycast method in parallel for each loop and it completes in 3.4 seconds approx. Which is very good enough in comparision of the default one, but I am interested in getting/ knowing any other approach which can boost more performance. So please let me know if any such approach exists.
Regards, Matang