|
Post by thegastropod on Jan 7, 2019 1:23:08 GMT
Hah! While I do think there's still something wrong with my n1 and n2 values, I found the culprit for the nearly black spheres: I neglected to update the under_point value to use the negative normal when inside an object. D'oh! That's now working, and my transparent spheres look better. But there's still something definitely off about them. If I crank up the refractive_index from 1.5 to 2.0, they look more like Jamis's image. At 1.5, the green one doesn't appear to refract at all. And the blue sphere is doing who knows what. I think I need to really dive into what's going on in my n1 and n2 values here... Thanks for the help! Attachments:

|
|
|
Post by ascotti on Jan 7, 2019 18:53:52 GMT
If it can help, I can get your first image using ior=1.1 for the blue ball, and the second image using ior=1.2.
|
|
fs
New Member
Posts: 28
|
Post by fs on Feb 2, 2019 21:13:05 GMT
Finally got around to implementing depth-of-field. Very nice effect for very little additional runtime overhead (if already super-sampling for anti-aliasing). Quite pleased with it. 
|
|
|
Post by ascotti on Feb 2, 2019 23:07:07 GMT
Effect is really nice!!!
|
|
|
Post by Jamis on Feb 2, 2019 23:35:53 GMT
Excellent! It's one of my favorite effects (along with temporal aliasing, or motion blur).
|
|
madox
New Member
Posts: 22
|
Post by madox on Aug 18, 2019 15:54:35 GMT
I tried rendering this image since I just completed chapter 11 and I get something super wrong. All the tests are passing though (so maybe more tests are needed!). I'm going to keep scratchign my head over this one, but any tips would help a lot! (Also my html canvas is locked at 400x400 but that shouldnt affect anything) Update: I found 2 bugs and it works now! So happy  Attachments:
|
|
|
Post by Jamis on Aug 18, 2019 19:38:31 GMT
I'm glad you figured it out! Sorry the test coverage wasn't sufficient---can you think of a test that would have picked up the bugs you found? Maybe it could be worked into a second edition eventually.
|
|
madox
New Member
Posts: 22
|
Post by madox on Aug 19, 2019 1:52:57 GMT
Looks like, inside the color_at function, if you forget to pass xs to prepare_computations, it doesnt fail any tests. Also a test to make sure that over_point, under_point and reflectv properly account for inside being true would help  My schlick function was also bad, but that's on me being dumb.
|
|
r366y
New Member
Posts: 4
|
Post by r366y on Aug 23, 2019 12:24:36 GMT
Hi , my first post madox I have similar problems , you said What should be taken into account ? By the way when I render only one glass sphere it looks ok.
When I render two glass spheres they look like soap bubbles
All the unit tests are green.
|
|
|
Post by Jamis on Aug 27, 2019 15:27:21 GMT
r366y -- that is really interesting! Does the same thing (multiple glass shapes rendering wrong, when one glass shape works fine) happen on a simpler scene, or just that scene? Can you create a scene with a plane and two glass spheres that has this same problem?
|
|
madox
New Member
Posts: 22
|
Post by madox on Aug 30, 2019 23:13:10 GMT
r366y Sorry I didnt check here in a while. I mean, when inside is true, the normal should be getting flipped, so make sure that anything that uses the normal (over_point, under_point and reflectv) is using the flipped normal.
|
|
r366y
New Member
Posts: 4
|
Post by r366y on Sept 6, 2019 10:35:56 GMT
r366y -- that is really interesting! Does the same thing (multiple glass shapes rendering wrong, when one glass shape works fine) happen on a simpler scene, or just that scene? Can you create a scene with a plane and two glass spheres that has this same problem? Sorry , for the delayed reply. I tried only with this scene but thank you for the suggestion , I will try with a simpler scene
|
|
|
Post by cloose on Dec 19, 2020 19:47:53 GMT
Looks like, inside the color_at function, if you forget to pass xs to prepare_computations, it doesnt fail any tests. Also a test to make sure that over_point, under_point and reflectv properly account for inside being true would help  My schlick function was also bad, but that's on me being dumb. I did the same mistake. Seems to be easy to make if your programming language supports default values for parameters. Maybe there is a way to test this?
|
|
|
Post by signal11 on Feb 22, 2021 5:59:03 GMT
Looks like, inside the color_at function, if you forget to pass xs to prepare_computations, it doesnt fail any tests. Also a test to make sure that over_point, under_point and reflectv properly account for inside being true would help  My schlick function was also bad, but that's on me being dumb. I did the same mistake. Seems to be easy to make if your programming language supports default values for parameters. Maybe there is a way to test this?
imho, adding a test with checkered-floor + air-ball + glass-ball (this is the picture from Pg. 159 from the book), and looking at output from color_at(...) should be useful perhaps ? that way, we are not lulled into a false-positive. -- best regards signal11
|
|
|
Post by signal11 on Feb 22, 2021 9:16:48 GMT
yesterday, i got couple of hours to myself again, and was able to finish the implementation outlined in chapter-11. here is the canonical image that i get. moreover the render times have increased significantly  . a 1280x1024 resolution image spews the following statistics for me .../ray-tracer/src/render_with_t3r.cpp : 00087 | benchmark details : {mean (ms): '14671', standard-deviation (ms): '00106'} can someone post their numbers as well for a similar resolution image just to compare ? -- best regards signal11
|
|