3
$\begingroup$

I followed the book Ray Tracing in One Weekend and implemented a simple ray tracing procedure. There are 100 random samples every pixel for antialiasing, but the render result looks weird: There is a unnatural circle at the center of the screen, and a strange line lies on the center of the ground, Why?

render result

$\endgroup$
  • $\begingroup$ Seems like either numerical error or you have a mistake in your impl. $\endgroup$ – lightxbulb Apr 11 at 6:38
  • $\begingroup$ @lightxbulb You are right! The numerical error caused self intersection. I have fixed it now. i.imgur.com/mGwTjGA.png $\endgroup$ – YuChang Apr 11 at 9:00
  • 2
    $\begingroup$ @YuChang you should explain what the problem was and how you fixed it in an answer $\endgroup$ – Sebastián Mestre Apr 12 at 13:25
1
$\begingroup$

Those are moire patterns. They are an aliasing artifact that usually occurs when sampling on a regular grid. Did you jitter the positions of your samples? If you just sampled an evenly spaced 10x10 grid within each pixel, that could explain it. Also, numerical errors or inaccuracy could it.

$\endgroup$
  • $\begingroup$ To be honest it looks more like moire and insuficent shadow bias $\endgroup$ – joojaa Apr 11 at 6:12
  • $\begingroup$ Interesting! I've not seen that happen before. Very cool. $\endgroup$ – user1118321 Apr 11 at 16:02
  • $\begingroup$ I also think it may be a shadow bias issue, as I've seen this happening on some of my renders. Just bias the ray starting position an epsilon away from the surface when tracing the reflected rays. $\endgroup$ – vgs Apr 15 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.