Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is a way to model this type of situation for watertight dielectrics with interface tracking: you assign each material a priority value, and a transition between materials occurs when entering that material only if it has a higher priority than your current material. Yining Karl Li has a great article about it:

https://blog.yiningkarlli.com/2019/05/nested-dielectrics.htm...

that inspired me to add the feature to my renderer (rayrender.net).

The downside to priority tracking (and possibly why PBRT does not include it) is it introduces a lots of overhead to ray traversal due to each ray needing to track a priority list. Modern raytracers use packets of rays for GPU/SIMD operations, and thus minimizing the ray size is extremely important to maximize throughput and minimize cache misses.



Minimizing the ray payload for GPU was definitely part of why we didn't add that. (Though it does pain me sometimes that we don't have it in there.)

And, PBR being a textbook, we do save some things for exercises and I believe that is one of them; I think it's a nice project.

A final reason is book length: we generally don't add features that aren't described in the book and we're about at the page limit, length wise. So to add this, we'd have to cut something else...


Wow, the problem is more involved than I (a simple user) realized ...

Maybe I have to broaden my search for a raytracer. What would be my best bet for correctly simulating multi-material lenses (so with physical correctness), in Linux (open source), preferably with GPU support?

(By the way, as a user I'd be happy to give up even a factor of 10 of performance if the resulting rendering was 100% physically accurate)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: