Heuristic42
Blog
Opengl
Meta
Rendering
0
edited
Jun 8 at 22:29
Rethinking writing files with memory mapping and C++
This post introduces the motivation behind the [decodless C++ o…
–
admin
created
Jun 8 at 22:16
Rethinking writing files with memory mapping and C++
This post introduces the motivation behind the [decodless C++ o…
–
pknowles
comment
Jun 5 at 13:36
Contributing
just buy the newer model, still on amazon or ebay: https://www.…
–
anonymous
comment
Apr 19 at 11:24
Matrices
[deleted]
–
anonymous
comment
Apr 13 at 0:25
Matrices
[deleted]
–
anonymous
comment
Apr 5 at 9:43
Matrices
[deleted]
–
anonymous
comment
Mar 27 at 17:19
Matrices
[deleted]
–
anonymous
comment
Mar 25 at 4:59
Matrices
[deleted]
–
anonymous
comment
Mar 5 at 15:39
Matrices
[deleted]
–
anonymous
comment
Feb 7 at 5:45
Microsoft Natural Ergonomic 4000 Replacement
Thank you so much for sharing your thoughts here, it tells me e…
–
anonymous
comment
Jan 28 at 23:31
Microsoft Natural Ergonomic 4000 Replacement
Oh man, I feel this post. Not sure if you've seen the "new" new…
–
anonymous
comment
Jan 25 at 12:06
Matrices
[deleted]
–
anonymous
comment
Jan 20 at 3:11
Matrices
[deleted]
–
anonymous
reverted
Dec 21 '23
Route contention when running docker and a VPN
updating to latest
–
admin
edited
Dec 21 '23
Route contention when running docker and a VPN
Things have improved since the original post. It may have been …
–
pknowles
edited
Dec 21 '23
Route contention when running docker and a VPN
Things have improved since the original post. It may have been …
–
anonymous
edited
Dec 21 '23
Route contention when running docker and a VPN
This have improved since the original post. It may have been up…
–
anonymous
comment
Nov 24 '23
Matrices
[deleted]
–
anonymous
edited
Sep 17 '23
Writing custom C++ containers, iterators and value references
Generic containers are awesome. 1. The effort required to wr…
–
pknowles
created
Sep 17 '23
Writing custom C++ containers, iterators and value references
Generic containers are awesome. 1. The effort required to wr…
–
pknowles
comment
Sep 15 '23
DerBard: Custom Split Mechanical Keyboard Prototype
Hey. Thanks for your interest! I've uploaded the files here, bu…
–
pknowles
comment
Sep 13 '23
DerBard: Custom Split Mechanical Keyboard Prototype
Hi! Is it possible to get some models so I can also make it?
–
anonymous
edited
Aug 14 '23
On docker stealing routes and breaking the internet
Boy this is frustrating. The internet just doesn't work with do…
–
pknowles
edited
Aug 14 '23
On docker stealing routes and breaking the internet
Boy this is frustrating. The internet just doesn't work with do…
–
pknowles
…
View All
Log in
CPU Raytracer
leave this field blank to prove your humanity
Article title
*
Article revisions must have a non-empty title
Article body
*
I hear all graphics programmers have made one. Well, after some years of OpenGL so did I. At the time I decided I didn't like the randomness and duplication of typical Monte Carlo raytracers and tried my hand at the older and slower recursive branching kind. The code is still available on [github](https://github.com/pknowles/pyarlib/blob/master/trace.h). Sorry. I started work on a this in Oct 2012, mainly just for fun but also for a comparison to shader based approximations. I'm sure it could be much faster with a GPU. I chose not to use one. I'll post rendering times when I'm good and ready. # Gallery ![enter image description here][1] ![enter image description here][2] ![enter image description here][3] ![enter image description here][4] ![enter image description here][5] ![enter image description here][6] ![enter image description here][7] ![enter image description here][8] ![enter image description here][9] # Debugging Finding good ways to visualize what's happening in 3D graphics is one of the most useful skills. ![enter image description here][10] ![enter image description here][11] ![enter image description here][12] ![enter image description here][13] # Tech At the core of the raytracer is the spatial data structure. I didn't mess around with any BVH nonsense :P. This thing was made to render one mesh only with no animation. I decided I wanted a kd-tree + surface area heuristic (SAH). I then followed and implemented the algorithm described by: *On building fast kd-Trees for Ray Tracing, and on doing that in O(N log N)*. It also includes the technique described in *Tracing Ray Differentials* to anti-aliase texture sampling. You'll note crisp checkerboard filtering in the image of the gold rings despite aliasing at geometry edges. That's just one ray per pixel! [1]: https://img.heuristic42.com/img/d95f7ef7524f.jpg [2]: https://img.heuristic42.com/img/04e5e5fbd6ca.jpg [3]: https://img.heuristic42.com/img/27129cfee4ec.jpg [4]: https://img.heuristic42.com/img/6a02c8586563.jpg [5]: https://img.heuristic42.com/img/dd33bbf1c5b1.jpg [6]: https://img.heuristic42.com/img/334138ea9ca1.jpg [7]: https://img.heuristic42.com/img/a760f01abaea.png [8]: https://img.heuristic42.com/img/64891f82e614.png [9]: https://img.heuristic42.com/img/a97f0b6cfa25.jpg [10]: https://img.heuristic42.com/img/06ddd64cb93c.jpg [11]: https://img.heuristic42.com/img/256fefd9aced.jpg [12]: https://img.heuristic42.com/img/f712616c2a59.jpg [13]: https://img.heuristic42.com/img/3df8c8fb667a.jpg
Toggle Preview
Edit message
*
A description of the changes made
Discard Draft
Save Draft
leave this field blank to prove your humanity
Flag
the thing you clicked
for moderator attention.
Reason choice:
Spam, promoting, advertising without disclosure
Rude, inappropriate, generally offensive
Too arrogant or demeaning to others
Other
Reason:
The reason for raising the flag
Error