Nice work. Any plans for a double precision version? The GPU's are doing it!
Seriously, I would love to test a double precision version against our renderer.
not sure about the answer, I hope Embree developers check this forum more often and reply to users questions.
With that aside, I'm curious to know what type of applications require double precision? I'd like to know if it's worth it to exchange some speed for extra precision?
New features for Embree are mainly motivated by the feedback we get from users.We will definitely consider double a precision version if asked for by multiple sources.
Unfortunately, each rendering application has different demands. One idea behind having Embree Open Source, is that developers have optimized algorithms and data structures that theycan adjust to the specific demands of their application.
It would be helpful if you precise where your application needs double precision, e.g. often using double precisionsolely during ray/triangle intersection is sufficient.
We have found that with very large scenes the ray and the triangle data need to be maintained as doubles, although it is often, but not always, possible to move the action to the origin.
The BVH could remain floats as you suggest if the floats of the leaf bounding boxes are properly rounded. Some special handling might be needed to ensure that a double precision ray / float bounding box intersection is done properly. Also one would need to consider the size increase of a float bounding box at large distances from the origin compared to a double precision bounding box.
We are doing technical ray-tracing, with for instance some thin glass sheets which are not perfectly flat but modeled with realistic glass processing deformations. The average distance between interfaces is as small as 1-2mm, and this is in building-scale models.
Floating-point is causing artifacts in some conditions. The worst being interfaces intersected in the wrong order, but as the glass medium is absorbing slight tint banding appears even in good conditions, as the calculated crossed distance is incorrect.
Double precision would definitely be a plus here