Hacker News new | past | comments | ask | show | jobs | submit login
WebGL Path Tracing (madebyevan.com)
94 points by steren on Aug 10, 2011 | hide | past | favorite | 32 comments



That's fantastic. I've been meaning to get into WebGL (perhaps make some sort of tech demo game with it). I've held off because of performance issues (also, I admit, I'm not too excited about dealing with shaders).

I think I should stop procrastinating now and actually do something with it. This is very exciting!


Shaders are fun! Looks a bit like "scary c++" at first but not too steep a learning-curve actually. No header files, pointers and the likes. Just a couple of maths functions and maths types (vec3, float etc). Pixel shaders return a "color" vector, vertex shaders a vertex "position" and "that's about it".


Oh, really? That sounds eminently doable. Do you happen to have any fantastic resource for shaders?


Learn them together with WebGL -- I recommend "The Lessons" over at LearningWebGL.com very highly.


That's a great site, thanks very much.



I learned the basics of OpenGL from NeHe many years ago, and while things have gotten better, I can't recommend the site anymore. It's all written for old-school OpenGL (3 and below) and is generally a compendium of what you shouldn't do when writing OGL code. I still love it, but it's a bad resource for people new to OGL.


What's better?


The Orange Book, Red Book, Lighthouse3d tutorials, and general experimentation. One nice thing about WebGL is that the cruft is largely gone, due to its ES parentage. This means that a lot of old tutorials are completely irrelevant, but that you can safely use just about everything without running into horrible practices. (Not that there aren't plenty of pitfalls left.)


The OpenGL orange book has helped me tremendously http://www.amazon.com/gp/product/B002HMJYC4/ref=pd_lpo_k2_dp...


This is one of the coolest things I've seen all year, without exaggeration. The gradual rendering alone is new to me (and utterly fascinating), but the fact that diffuse lighting can be rendered in a browser... this completely redefines what I understand a browser to be capable of. Seriously amazing.


If you haven't seen path-tracing before, you should check out LuxRender: http://www.luxrender.net/ It's an open source unbiased renderer that uses similar techniques.

It's a massively parallel problem, so the recent abilities to run general purpose code on a graphics accelerator has really been a huge boost to performance something like: http://www.youtube.com/watch?v=70uNjjplYzA would have been impossible before CUDA came out.


Fantastic use of WebGL. It's amazing how much can be done in browsers today. Also amazing how much it heats up my MBP!


Warning: caused a complete system hangup here with Chrome 13 on Windows 7, Intel graphics.


Warning: This is incredibly epic, and worked fine for me. May cause heart attack due to awesomeness.


Chrome 13, Windows 7 - display driver (Intel Integrated) crashed but Windows managed to recover it. Intel graphics related issue maybe?


Exact same setup and experience for me.


Seems like a general WebGL issue -- I've seen most WebGL examples hang up or freeze on integrated graphics / Intel graphics but they always run absolutely smoothly on "full-blown" gamer-like GPUs (nVidia etc.) Unless your nVidia is on a MacBook but running Linux instead of OSX und thus odd drivers.


Worked great for me until I switched tabs back to HN to read comments. My screens instantly went black while my video card driver thew up all over my desk.


No problems for me at all. Chrome 14, Windows 7, nVidia graphics.


up-to-date Chrome, Mac Lion - worked without causing any disturbance.


This guy is an inspiration:

http://madebyevan.com/about/

I've been struggling to complete a web page app like this for a while, and he has finished several even though he's still in school.


Beautiful... the fading grain as it renders is extremely pleasing.


Indeed, very polished. It's so awesome! Nice experience, very smooth (OSX/Radeon/FF5).


This is killer. Be sure to try dragging the scene/objects!


Looks very promising. Congrats for the imp of the idea. Now I'll try to get out javascript/browser from the performance equation and see how it rocks.


Works splendidly - 2011 MBP w/Radeon latest FF stable.


Works great here too, FF8 on Linux with NVidia drivers.


Found a little easter egg. Enter

javascript:ui.setObjects(makeRecursiveSpheres())

in the location bar with the page open and you'll really torture your graphics card.


Works great! Until I overloaded it. Made my graphic driver crash.


well you should try http://www.3dtin.com too then


amazing! converges very fast.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: