InOneWeekend: issue with dielectrics? #769
Replies: 3 comments
-
Would be useful to render a glass sphere behind a glass sphere (the point of view of the golden sphere on the right. I'd do three renders: one slightly to the left, one directly in line, and one slightly to the right. |
Beta Was this translation helpful? Give feedback.
-
The most probable thing that I'm seeing is that the rays bouncing of the metal sphere are only seeing 1 of the two spheres. The bounces closer to camera see the middle glass sphere, and the bounces further from camera see the left glass sphere. Maybe check to make sure that you are traversing the scene correctly? You might be having a variable that has a too-small scope. Otherwise:
|
Beta Was this translation helpful? Give feedback.
-
Hi! Thank you for your answers, I'm not doing much with the project this week, but I'll try to come back to it on the weekend. Trying to answer your comments already:
Did that, (don't have the render at hand but I'll try again) but I rendered it dead on the position of the metal sphere on the right (and tbh, nothing was glaringly wrong, but I didn't have a couple glass spheres to compare to, will also try the same with the reference implementation). Will try to either render it statically from the positions you mention and/or, if possible with a slight movement, since when using GLSL is entirely possible to do it at a not-so-terrible speed. 👍
It does look like that yes, but the strangest thing is:
Not entirely sure it's that, the bounces further from the camera are more similar to the rendering-only-the-middle-sphere, and the ones closer to the camera look plain wrong.
Good points, in GLSL I'm just having a list of objects, no BVH of any kind, yet small scope variables could be a problem yes.
It's looping with tail call-like replacement, took inspiration from here: https://www.cs.uaf.edu/2012/spring/cs481/section/0/lecture/02_07_recursion_reflection.html
Can try increasing bounces, great idea!
Interesting and yeah... Possible too! 👍 Now, I just want to point out that recursion issues were one of my first suspects, so I tried to reproduce the scene using the reference renderer: I cloned this repo and tried to reproduce the similar scene as best as I could (see my patches + images corresponding to this implementation). What I meant with Thanks again for the suggestions! |
Beta Was this translation helpful? Give feedback.
-
Hello!
I tried porting RTIOW to GLSL, fun ride! But I found what it seems to be an issue with dielectrics that I don't understand. I also downloaded the reference implementation from the repo (5c312de) and it appears to suffer from the same problem?
Here's the patches I used to repro a set of 'similar' scenes:
dielectrics-issue-diff.txt
dielectrics-issue-diff-2.txt
dielectrics-issue-diff-3.txt
Here are my results (issue highlighted):
And here are the reference results (issue highlighted):
I'll try to understand what's really going on, but I wanted to rise the issue now. Since I don't have glass/metal balls to play with I'll have to do it on the actual code :)
Cheers,
Beta Was this translation helpful? Give feedback.
All reactions