News for hackers. Stuff that matters.
Re:A reasonably speedy Python ray tracer by IvanK_net on Saturday October 21, 2017 @02:15PM (#15522818)
I made one in Javascript a long time ago :) http://renderer.ivank.net/

After some time you can get this: http://renderer.ivank.net/balls.jpg :)

Edit: I am glad you like it! I also made this fully-GPU renderer (actually, it is a game): http://powerstones.ivank.net/

Re:A reasonably speedy Python ray tracer by FeepingCreature on Saturday October 21, 2017 @02:53PM (#15523017)
I also made one in Javascript. http://feep.life/~feep/jsfarm/info.html

It uses a Lisp-based scene description language (with macros!) and WebRTC to form a P2P network of compute nodes, entirely in the browser, with near-native performance thanks to dynamic compilation to AsmJS.

It got 0 votes on Hacker News.

I'm not salty.

edit: Source on Github! https://github.com/FeepingCreature/jsfarm/

edit: I reproduced your scene, give it a bit to render.

edit: Wow, you have a lot of neat scenes!

edit: And here you go. rendered at ~2.5 million samples a second, thanks JumboCargoCable whoever you are! (You can set your nick in the settings menu accessible via the gear icon in the top left.) https://i.imgur.com/UvdBhq1.jpg and scene http://bit.ly/2yYciCS though I think I made it too bright.

edit: Some people appear to have buggy systems that always return black pixels. :-(

edit: Could whoever is SilkyDoorGame please post their cpu, os and browser?

Re:A reasonably speedy Python ray tracer by dang on Saturday October 21, 2017 @03:11PM (#15523118)
If you email [email protected] we'll send you a repost invite. I don't want to do it now because once a particular theme (in this case ray tracers) has made the front page it's usually not a good idea to post another one too soon.
Re:A reasonably speedy Python ray tracer by FeepingCreature on Saturday October 21, 2017 @03:14PM (#15523132)
Awesome, will do! Thanks a bunch.
Re:A reasonably speedy Python ray tracer by wdfx on Saturday October 21, 2017 @03:00PM (#15523053)
That a great concept. I'd vote for that :)
Re:A reasonably speedy Python ray tracer by FeepingCreature on Saturday October 21, 2017 @03:04PM (#15523078)
Yeah in retrospect my mistake was to bet on a single announcement post instead of a series of smaller posts over the months I developed it. That's the sort of thing you only realize is a mistake after you'd made it, though.
Re:A reasonably speedy Python ray tracer by nathancahill on Saturday October 21, 2017 @03:09PM (#15523112)
Repost it now with "Show HN:" in the title. Helps distinguish OC work.
Re:A reasonably speedy Python ray tracer by CyberDildonics on Saturday October 21, 2017 @04:14PM (#15523396)
Why not just us json for scene description?
Re:A reasonably speedy Python ray tracer by FeepingCreature on Saturday October 21, 2017 @04:19PM (#15523415)
It's not strictly speaking a "scene description language", it just looks like that at first glance.

It's a fully capable compiled programming language, which I happen to have written a raytracer in. Check out the "pathtrace" tab.

The advantage is if there's some issue with the raytracer, you can fix it yourself. And you can use arbitrary scripts for making scenes. (Though the scene in memory must not exceed 32MB, which may limit you somewhat.)

Re:A reasonably speedy Python ray tracer by IvanK_net on Sunday October 22, 2017 @10:14AM (#15526910)
BTW. do yo perform Gamma correction in your pictures? They look like you skipped it.
Re:A reasonably speedy Python ray tracer by FeepingCreature on Sunday October 22, 2017 @12:42PM (#15527621)
Nope, they're purely summed up. What do I have to do?
Re:A reasonably speedy Python ray tracer by IvanK_net on Sunday October 22, 2017 @03:50PM (#15528574)
The results (R,G,B) that you calculate are physical quantities (amount of photons, or Watts). But when you double the amount of photons, the human eye sees it like 40% brighter, not 2x brighter.

RGB values, that you give to the monitor (through the canvas), were constructed according to the human eye, so rgb(40,40,40) looks 2x brighter than rgb(20,20,20).

Long story short, when you have your physical Red value between 0 and 1, do Red = Math.pow(Red,1/2.2);

Re:A reasonably speedy Python ray tracer by gt_ on Saturday October 21, 2017 @03:48PM (#15523296)
Great scene description language