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?
$\begingroup$
$\endgroup$
3
-
$\begingroup$ Seems like either numerical error or you have a mistake in your impl. $\endgroup$– lightxbulbCommented Apr 11, 2019 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$– YuChangCommented Apr 11, 2019 at 9:00
-
3$\begingroup$ @YuChang you should explain what the problem was and how you fixed it in an answer $\endgroup$– Sebastián MestreCommented Apr 12, 2019 at 13:25
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
3
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.
-
$\begingroup$ To be honest it looks more like moire and insuficent shadow bias $\endgroup$– joojaaCommented Apr 11, 2019 at 6:12
-
$\begingroup$ Interesting! I've not seen that happen before. Very cool. $\endgroup$ Commented Apr 11, 2019 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$– vgsCommented Apr 15, 2019 at 15:02