395 points · by ingve · 10y ago · 61 comments
Edit: googling "ray tracer on a business card" gave me this link[0] which is what I had read before.
But actually reading (and not skimming) the submitted link, gave me this paragraph:
> Sometime around September 2009, I posted a version of my program to the now-defunct ompf.org (whose demise is lamented here among other places), a web forum dedicated to the real-time raytracing community.
So that's why it sounded so familiar. Oh and the "spher-y" text was just the first image, which is also cited in the other post from 2013 that google found.
http://fabiensanglard.net/rayTracing_back_of_business_card/i...
https://github.com/jleppert/raytracing.js
It was based off the excellent introduction Ray Tracing in One Weekend (http://in1weekend.blogspot.com/2016/01/ray-tracing-in-one-we...).
and the "Build a renderer in a weekend"
http://in1weekend.blogspot.com/2016/01/ray-tracing-in-one-we...
I've recently been making a Julia version from the C++ source code
[1] http://pbrt.org/
The PBRT ray tracer is also a production quality ray tracer and uses many advanced techniques you won't find hobby ray tracers, such as differential geometry, which naturally increases it's size.
[1] Some utility classes are left out.
REDACTED as per author's request
I'm the author of the book.
Could you please not post links to pirated versions of it on HN?
Thanks, Matt
If you are an ACM member, it is also available to you as eBook: http://learning.acm.org/books/book_detail.cfm?id=1854996&typ...
It's feasible today, it just depends on what quality level, scene complexity, and frame rate you're looking for. I can trace a the standard bunny model with 2 light sources in a 640x480 window at >10 FPS on my dual core AMD64 from 2005. The problem is that we want better surface models, global illumination, and higher resolution. OTOH, we can get 8 core 3GHz+ processors today so that make simple renderings go pretty well. You should be able to render very complex geometry at HD resolution without any lighting effects at very interactive rates, but if that's all you want, just throw triangles at OpenGL.
Also, plain raytracing can look kind of bland. Most global illumination algorithms are based on ray tracing, but require tracing a very large number of rays. So, really the question is more whether we can get to real-time path tracing, which is a harder problem.
Another problem is tooling. Game developers know how to get good performance on GPUs, but ray-tracers have completely different performance characteristics. Re-building a bounding volume hierarchy is, in general, O(NlogN), so you have to be careful about partitioning your scene into things that move/deform and things that don't and only rebuild the parts of the BVH that need updating.
For open-source, I know that Blender uses Cycles, which fires ray-tracing renderings in the normal views on each change, and this so is for quite a while already.
https://www.google.com/search?q=nvidia+real+time+raytracing&...
(Yes I know the subtleties that distinguish ray[tracing|marching|casting].)
But please correct me if I'm wrong.
then it becomes very difficult to stop ;)
https://mzucker.github.io/2016/08/03/miniray.html
becomes
GitHub Pages uses their profile name as the github.io sub-domain.
>> Once I made a robot to play video games for me.Also, a path tracer in 100 lines of C++: http://www.kevinbeason.com/smallpt/
Is this not correct?
http://www.cse.chalmers.se/edu/year/2011/course/TDA361/2007/...
As for open source path tracing renderers, some well known ones are:
- LuxRender: http://www.luxrender.net/
- Mitsuba: https://www.mitsuba-renderer.org/
- Tungsten: https://github.com/tunabrain/tungsten (uses Embree)This is when I came across my second lesson, mentioned in this article, it doesn't render fast. In my case even though all the assets are downloaded, it's still too heavy.
Either way, when you get time to work on this type of stuff it can be pretty fun.
We have hard drives with terabytes of storage, and making descriptive variable names do not increase the file size of the binary by the way.
So if your program is 1kB because you shaved the white space and made it illegible, don't boast. Instead, shame on you.
It is still an impressive piece by the way, and i would have been fine with it if it was a few tens of kilobytes.