Double precision support for Optix Prime

Hi guys,

Optix 3.7 is working great for me at the moment, but I can’t help but wonder if double precision support is in the pipeline? Right now the only thing in my application that uses single precision is Optix.

Thanks!

Yes, it’s on our to-do list, but is not very near the top. Could I ask about your use case? All of the user code in OptiX can use double precision. The things that can’t are the ray representation and the ray-BVH intersections, though the latter should be conservative.

Hi Dave,

My use case is for scientific optical simulations, not visual rendering purposes. I need the large number of bits due to the difference in order of magnitude between the size of objects in the scene (1E3 to 1E-3) and various properties of light like phase angle, etc (<10E-9) all of which severely depend on the accuracy of the intersection distance and geometry. I have implemented everything and found single precision to be lacking in resolution. You can see the same sort of problems here: https://software.intel.com/en-us/forums/topic/280885 , basically double precision is a must for technical ray tracing.

Right now I am implementing a double-based moller-trumbore kernel which uses optix prime as the ray/triangle index intersection finder only. I can report back my results if you like?

Although I imagine it was not necessarily your original goal, it would be nice if there was a flag in optix prime which could enable slower simulations with the benefit of more numerical robustness. Intel Embree already has this feature: RTC_SCENE_ROBUST (from https://embree.github.io/api.html ). Alas they also do not yet support double precision either.

Well, here is me reporting back anyway. My kernel with doubles appears to give me the precision I need. But of course, with “small” triangles this will also not be suitable

And it just turns out that I found out why my simulations were giving weird results! I think vertices closer than the BVH can handle are being merged by the float conversion. And ray direction vectors are being rounded. I’m a bit stuck here, any ideas on how I can shoehorn doubles onto the geometry?

It’s looking at this point like I’ll simply have to write my own BVH if I need higher precision, which would actually replace the last part of optix prime I am using. :(

In OptiX (not Prime) you can write a bounding box program that takes double precision geometry and returns a single precision bounding box that’s conservative (rounds outward), so that every ray that would hit the geometry hits the bounding box. You can then intersect your double precision geometry against the single precision ray.

I don’t have any help to give you on quantization in the single precision ray. We’ll get there eventually.

Yes, the robust mode is a good idea. I’ll add that to our feature request list.