Toggle navigation
Heuristic42
Blog
Rendering
Opengl
Meta
0
comment
Jan 4 at 13:45
Microsoft Natural Ergonomic 4000 Replacement
I currently have 3 or 4 Ergo 4Ks and use one almost every day...
–
anonymous
comment
Oct 28 '22
Microsoft Natural Ergonomic 4000 Replacement
Interesting about the Microsoft Ergonomic board! Wish they we...
–
anonymous
comment
Oct 27 '22
Microsoft Natural Ergonomic 4000 Replacement
I'm in the same boat as you. I have 3 Microsoft Ergo 4000s l...
–
anonymous
created
Oct 2 '22
Microsoft Natural Ergonomic 4000 Replacement
![my old natural 4k][1] **They stopped making it!** I'm ac...
–
pknowles
created
Sep 30 '22
PIP and the user directory
This is a quick note about python + pip best practices: ***ne...
–
pknowles
created
Jan 17 '22
Starting KDE plasma wayland with Fedora 35 and nvidia drivers
A quick bit of background: X11 is a compositor and Wayland is...
–
pknowles
comment
Jan 4 '22
Making a real EMF Reader
Wow, It is that famous Ghost buster, isn’t it?. Very unique,...
–
anonymous
edited
Jan 3 '22
Making a real EMF Reader
The game **phasmophobia** by [Kinetic Games](https://kineticg...
–
pknowles
created
Jan 3 '22
Making a real EMF Reader
The game **phasmophobia** by [Kinetic Games](https://kineticg...
–
pknowles
edited
Sep 2 '21
CPU Raytracer
I hear all graphics programmers have made one. Well, after so...
–
pknowles
created
Sep 2 '21
CPU Raytracer
I hear all graphics programmers have made one. Well, after so...
–
pknowles
created
Sep 2 '21
University projects
These are some of the larger games and projects I worked on f...
–
pknowles
edited
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
edited
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
edited
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
edited
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
edited
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
edited
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
edited
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
edited
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
created
Aug 31 '21
My first graphics demos
This is an unsorted collection of graphics demos I wrote year...
–
pknowles
comment
Dec 27 '20
Prime Mover - Processor (final problem) [Spoilers!]
Looks like markdown tables are broken :(
–
anonymous
created
Dec 27 '20
Prime Mover - Processor (final problem) [Spoilers!]
[Prime mover](https://store.steampowered.com/app/693700/Prime...
–
pknowles
comment
Dec 26 '20
Vector Spaces
[deleted]
–
anonymous
…
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
Error failed to load