povray
povray copied to clipboard
Port of FS288 - Tolerance problem with refraction in blobs in CSG intersections.
http://bugs.povray.org/task/288
Status as of January 2017:
Blob accuracy has been looked at in some detail over 2016. A collection of many other problem blob scenes from years past gathered and reviewed. A potential tuning fix - which addressed this particular issue and many others - exists at:
https://github.com/wfpokorny/povray/tree/feature/blob_accuracy
What's not done is a more complete review of the collected test cases as the tuning factor evolved over time. Plus more testing against blob scenes which previously worked so we know the change is not corrupting working scenes. Not many test scenes have been collected for the latter verification.
Details:
If a blob is intersected by something else, the composite object has incorrect refractions if it is too small (in absolute units). Having the same object constructed without a blob, the errors happen at much smaller scales. The errors don't affect solid objects, just refractions.
An example shows a half-sphere, constructed as CSG sphere + plane, and identical half-pshere, constructed as CSG blob + plane. When the scale of the entire construction is changed, the refractions disappear first for the blob, and at 100x times smaller scale, also for the sphere. The right side shows the solid version, showing that the surface intersection test is ok, it's just the refraction that fails.
The problem is not present when looking from the curved side (the blob side). So the ray that hits the blob, gets refracted correctly, but the ray that hits the intersecting plane first, and should then refract in the blob from the inside, doesn't work. If in attached sphere, you exchange -y with y in clipping planes, everything is ok.
The scale when this happens is not very small - blobs of radius 0.02 already fail (noticed because in 1=1metre scale, blob raindrops on a glass plate didn't have intersections when looking from the back).
Examples are named by factor=9,0.9,0.09,0.009 and you can see first the blob (top) refraction gets smaller and disappears, then later the bottom (sphere) also gets the same problem.
blob_refraction.pov (1.7 KiB) blob_refraction_9.png (29.5 KiB) blob_refraction_0.9.png (29.1 KiB) blob_refraction_0.09.png (17.6 KiB) blob_refraction_0.009.png (17.2 KiB)
See zip file: FS288.zip
For the records: I consider this a precision issue that we don't want to tackle in a hurry while we prepare for v3.8.0 release.