raytracing.github.io icon indicating copy to clipboard operation
raytracing.github.io copied to clipboard

Book 1 - the order of diffuse spheres

Open genmeblog opened this issue 3 years ago • 1 comments

book1-review branch. The order of images is incorect imho.

Image 7 - looks like after gamma correction, which is introduced later in the book Image 8 and 9 - the shadows are much darker than in the next image, my render of image 9 produces below result (ligher shadows): ch08b

I use different method of genereting random vector from the ball (normalized gaussians rather than rejection), so maybe this is the reason. However there is a followin statement below image 10: "The shadows are more pronounced after the change". This statement suggests that images 8 and 9 should have ligher shadows, not darker.

genmeblog avatar Apr 28 '22 19:04 genmeblog

Ref #778

hollasch avatar Apr 28 '22 21:04 hollasch

I bumped into this same issue and banged my head against the wall trying to get the same result as the book.

Image 7 appears to show the result after some kind of enhancement has been applied, but the result the code gives you at this stage is much darker. This can be confirmed by checking out this repo at 516fb5c4b2fbe5b7646dfdcc06f8ddc3bec891f2 (master branch at the time of writing) and applying this patch to remove code added in later sections. This yields the images below.

No gamma correction or shadow acne fix applied (this is what Image 7 should look like)

no-gamma

Gamma correction applied

with_gamma

Removing shadow acne

with_gamma_and_sa

tysonliddell avatar Mar 13 '23 00:03 tysonliddell

Looks like the cause of Image 7 in the book being much lighter than what is obtained when following the code might be due to https://github.com/RayTracing/raytracing.github.io/issues/875#issuecomment-1013842362. However, the images above are what you obtain with the book in its current form.

tysonliddell avatar Mar 13 '23 00:03 tysonliddell