Pages

Monday, 20 September 2010

New Ray Tracer Features

I mentioned a short while ago that I was creating a brand new ray tracer for actionscript 3. It is beginning to take shape and I thought I'd run through a quick feature list:

  • Objects: spheres, planes, boxes - triangular meshes in the pipeline
  • Materials - reflective, transparent, bitmap
  • Unlimited reflection and refraction (within reason)
  • Direction lighting (multiple light points)
  • Phong shading
  • Camera with 6 degrees of freedom
  • Sky object - simple sky rendering
  • Save output as .JPG, .PNG or .BMP
  • Render progress
  • Color lights
  • Soft lighting
  • Low resolution real-time rendering (for small numbers of objects/lights)
  • Antialiasing and effects
  • Anaglyph rendering

No doubt the feature list will grow and let me know if you have any requests. I would really like to have curved surface and formula collisions as part of the package, so I'll try to get this working then release the library under the name ASTrace. Currently the first below (10 spheres, 1100x800 resolution, 1 light) renders in about 10 seconds which I am very happy with, and the second scene (30 spheres, 1100x800, 1 light, 10 reflections) in about 150 seconds - not so good, but not bad.



I will post demos up as I make them, here is one showing reflection and planes. It looks like there is something wrong with the reflections despite the render looking fantastic, so I will look into that (100 seconds, 1100x800):



Another nice demo, still haven't fixed the reflection problem though:


A new example with the reflection problem ironed out (50 spheres, 2200x1600, about 15 minutes):



An example showing antialiasing and plane/sphere reflection:



No comments:

Post a Comment