(L) [2013/01/24] [tby ironwallaby] [A Little Path Tracer and a Little Dinosaur] Wayback![IMG #1 Image]
Nothing especially fancy, just a simple little path tracer and a cute little dinosaur, hacked together in a couple evenings and about 400 lines of JavaScript.
The path tracer itself is pretty crude (I really need to read up more on the right way to do this stuff); probably the only neat feature of the code (besides using HTML5 web workers to run in parallel and not make your browser crash) is how Nessie herself is defined: she's a 4D Catmull-Rom spline (x, y, z, radius) that's sampled a few hundred times and built hierarchically into a (sphere-only) BVH. It's a great little technique for making fun shapes without needing complex intersection maths (which are quite beyond me)! Since such a spline can be a complete binary tree, with a little cleverness, it could be built in a single-pass, too.
Live demo: [LINK http://ironwallaby.github.com/jellyjelly/]
Source code: [LINK http://github.com/ironwallaby/jellyjelly/]
[IMG #1]:Not scraped:
https://web.archive.org/web/20160823042608im_/https://raw.github.com/ironwallaby/jellyjelly/master/nessie.png
(L) [2013/01/24] [tby Dade] [A Little Path Tracer and a Little Dinosaur] Wayback!Ahah, funny  [SMILEY :D]
 >> ironwallaby wrote:(besides using HTML5 web workers to run in parallel and not make your browser crash)
It seems to run with only 2 threads on my Linux+Firefox+i7 3930K, is that expected ?
(L) [2013/01/24] [tby ironwallaby] [A Little Path Tracer and a Little Dinosaur] Wayback!>> Dade wrote:It seems to run with only 2 threads on my Linux+Firefox+i7 3930K, is that expected ?
It's supposed to use up to four threads, but I honestly don't know how browsers go about scheduling them!