|
Post by packetslave on Aug 9, 2020 3:28:52 GMT
Two test renders from my C++ raytracer thus far. No smooth triangles and no bounding boxes yet. I'm using Facebook's folly library to support C++20 coroutines and running 20 concurrent tasks, each rendering an individual row of pixels. On my 2017 iMac Pro (Intel Xeon W, 10 cores / 20 threads), both models take about 50 seconds to render about 6300 triangles @ 1600x1200.  
|
|
|
Post by Jamis on Aug 9, 2020 3:40:42 GMT
Looking good!
|
|
|
Post by packetslave on Aug 9, 2020 23:44:49 GMT
Update: after implementing bounding boxes (not BVH yet), the above models are down to ~12 seconds each at 1600x1200. After implementing BVH from the bonus chapter, I may play around with one or two of the third-party BVH libraries out there, such as - github.com/madmann91/bvh- github.com/brandonpelfrey/Fast-BVHAs an aside, I tried switching out the native tuple/matrix code in favor of Eigen (http://eigen.tuxfamily.org) and it actually got dramatically SLOWER (I suspect because Eigen objects are significantly more expensive to create than my tiny classes. I haven't spent much time reducing allocations yet.
|
|
|
Post by packetslave on Aug 11, 2020 18:14:45 GMT
Pretty happy with how this turned out. Shadows are still hard-edged instead of soft, and I need to do some reading about anti-aliasing to get rid of the jagged edges, but not bad overall. It would also be nice if the red of the floor reflected up onto the bottom of the teapot a bit. 3200 triangles for the Utah Teapot, a single plane for the floor, and one point light source. About 2 seconds to render at 1600x1200 on my 10-core iMac Pro. Click for full-size. 
|
|
|
Post by Jamis on Aug 12, 2020 5:13:22 GMT
That's really lovely. The glossy texture really shines! It sounds like you're wanting to explore global illumination ( en.wikipedia.org/wiki/Global_illumination), which tries to simulate the effects of light bouncing off of surfaces (like the red floor casting a red highlight onto the teapot). It's an exciting area that I've wanted to explore more as well. Let me know how it goes!
|
|