-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rendering artifact #32
Comments
@dafhi The issue that you refer to stems from each new ray's origin point and the lack of machine precision. When the initial ray hits the refractive surface, I have to nudge the transmitted ray forward or through the surface a little so it doesn't self intersect, and likewise I must nudge the reflected ray backwards or out of the surface also to avoid self intersection. If you take away the nudge by commenting out the line: ' firstRay.origin += nl * EPS_Intersect ', the artifacts disappear - however if you now fly the camera above the glass coffee table, the reflected image of the large light spheres in the glass of the table now has many artifacts! Again due to lack of machine precision. Frustrating to say the least. I am currently investigating this problem - I'll let you know if I can resolve it somehow. I think it was always there, but it used to be conveniently masked by the noise of the random ray choice for refraction or reflection. The artifact can no longer hide behind that noise, because it is a solid (and physically correct) double image now. :) Thanks! |
@dafhi The old artifact of the bright white line around the red cylinder where it meets the ground is all but gone now. It is ever so slightly still there, but you would have to be looking for it. Depending on your machine, you can try more precision, say 0.001 but on my humble machines, when I asked for too much precision, black spots started to appear on diffuse and coated surfaces like the checkered ground and white capsule, due to incorrect self intersection of newly spawned rays with the surfaces they had just intersected before. You can give it a try: Geometry showcase demo I am in the process of applying the most precision I can to some of the other demos (like the CSG museum demos) in order to guard against similar artifacts. Thanks for bringing this issue to my attention, I had just kind of forgotten about it, but now I think I ended up finding a good balance between artifacts and machine precision. |
huge improvement! i'll consider the issue closed but let you decide. there may be a possibility of reformulation to make float precision a non-issue. beyond me atm :) |
geometry showcase, where the red cylinder and ground intersect
The text was updated successfully, but these errors were encountered: