-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bvh_node
is broken with negative-radius spheres
#733
Comments
Ref. #532 I believe that this is due to using negative radius spheres, and that you should be using appropriate indices of refraction for your air-inside-glass bubbles. Can you try the following instead?
|
Also, I'm assuming this is for Ray Tracing: The Next Week, right? |
bvh_node
is broke in a specific casebvh_node
is broken with negative-radius spheres
The "smaller negative" sphere is a trick that @petershirley mentioned as a way of producing a hollow glass sphere. I tried out you recommendation of doing the It doesn't look right. The BVH node is from "Ray Tracing: The Next Week". |
I figured out the fix. When making the |
Fix is to make sure that the AABB's is always a positive real number it should never be negative. Closes RayTracing#733
RayTracing/raytracing.github.io#733 Simply make sure that the AABB's are always using a positive radius.
The entirely blue sphere is very surprising. I can't imagine how that could happen. |
The original constructor expected that the first parameter was the minimum point, and the second was the maximum. The new constructor now selects the minimums of all coordinates in the two parameters, and the maximums of all the coordinates. In this way, the two parameters are just two extreme points of the bounds, so is significantly more robust. This change was done because the original code had bugs when handling spheres of negative radius (used to model glass spheres with voids). Resolves #733
I think the above fix should get things working for you. Please let me know if this is untrue. |
Hi, sorry for the delays. I've been quite preoccupied these past few weeks. I'll be taking a look at it most likely during the upcoming Holiday/weekend. |
I wanted to create some "Matryoshka hollow glass spheres", so I setup this scene:
When rendering on
world
, I get this, which is correct:But when I render with
world_bvh
, this is the result:I don't think that's right.
The text was updated successfully, but these errors were encountered: