Jump to content


JSRay - Javascript Raytracer


6 replies to this topic

#1 Guest_Marc Breuer_*

  • Guests

Posted 15 April 2010 - 02:00 PM

Posted Image


Description
I've been working on this little Javascript Raytracer for quite some time. My goal was real-time, knowing that I would likely not succeed, but you have to aim high sometimes. The raytracer now supports spheres, boxes(not rotated...) one plane, a sunlight, point-lights, reflection, anti-aliasing and not much more :). I use very weird techniques to achieve speed-ups, have not implemented any well known methods at all I believe. I tried adding a sort of tree structure but this really hammered the performance, so it was removed again. Possibly the tree only makes sense when scene complexity increases.

Real-time remains fictional, but I have managed to create a preview thats kind of fun. Using the mouse buttons and wheel you can navigate around the scene fairly easily with a low resolution preview to find the spot you would like to render. give it a shot :)

Don't use Internet Explorer, it really won't work... Chrome works best.

http://jsray.user2dev.com

#2 TheNut

    Senior Member

  • Moderators
  • 1719 posts
  • LocationCyberspace

Posted 15 April 2010 - 04:03 PM

Nice work. I believe you have the finest ray tracer demo written for the web. You should give this demo to the browser giants and tell them that JavaScript will not be considered fast unless you can render my demo with speeds equivalent to native code ;)

So what are your plans with this? Or simply the web and graphics in general. Any thoughts about building 3d games using similar tech (web 3d or whatnot)?
http://www.nutty.ca - Being a nut has its advantages.

#3 /rant/

    New Member

  • Members
  • PipPip
  • 15 posts

Posted 16 April 2010 - 11:21 AM

This is quite impressive, raytracers are like a hobby for me :D It even works on my new HTC, although it would drain power quickly. And something's wrong with the canvas... but it works :D

#4 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1621 posts

Posted 16 April 2010 - 12:11 PM

Very cool. Moving around in low res was a good idea, but I think it should have possibly diverted to just low everything also because when I tried some of the higher things, it slowed down when moving around.
Currently using Blender and Unity.

#5 marcgfx

    New Member

  • Members
  • PipPip
  • 12 posts

Posted 16 April 2010 - 03:57 PM

thanks for the comments :) . yeah, I'll have microsoft get IE up to date, wouldn't that be fine! my

plans were to maybe once make a small game with rendered graphics online, but... currently that doesnt seem to be an option :) it would be possible with some kind of faked raytracing though, might look into that :) . have some more javascript fun in the pipeline, no raytracing involved there though, stay tuned!

#6 legloups

    New Member

  • Members
  • PipPip
  • 21 posts

Posted 16 April 2010 - 07:57 PM

Impressive as to raytracer, very good work :)

#7 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2762 posts

Posted 18 April 2010 - 07:15 AM

Beautiful shot you picked off it, looks like a really pretty story book.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users