The Ray Tracer Challenge: Cannot get rid of acne When implement Shadows in Chapter 8.

Hi, I’m working on the Chapter 8 of the book.
After I add add the point_offset, I’m still able to see acne:

In the image above, I remove all balls to make things easier. I notice that for some of the hit point falls into the walls. Therefore it will have very small t (but greater than the epsilon) for the intersection.

I make all tests pass except “The Color with an intersection behind the ray”. Could some one explain that why this case can pass with the shadow? I think the light should be blocked by the outer ball.

May I get some suggestion to debug my code?

Here is my github repo: GitHub - Henrai/TheRayTracingChallenge

Move the discussion to here: Ch 8, Cannot get rid of acne | The Ray Tracer Challenge

That link returns a 421 error with this message: ‘Requested host does not match any Subject Alternative Names (SANs) on TLS certificate [38c6a12a870ccb1e3455cf49cb196b99145b1e4b10b4d098d851b9ba65219cf7] in use with this connection…’

Hey, I’m really sorry about that misconfiguration. It should be all sorted now. If you’re having trouble with surface acne when implementing shadows, do check out the thread mentioned above (this one: Ch 8, Cannot get rid of acne | The Ray Tracer Challenge) and see if any of the tips there get you on the right track. If not, let me know and we can see if we can get it figured out.

It’s cool. I completely understand. I can see the thread now. Thank you very much. My image looks almost exactly like the one in the thread. So it should be very helpful.

1 Like