30 July 2006

Nightly Render - Happy Buddha

Here it is, a render of the famous Happy Buddha from the Stanford 3D Scanning Repository. It is a 1 million triangles model rendered with Pathtracing with 150 rays per pixel. It took about 60.000 seconds to render.

(The Stanford's Happy Buddha - click to enlarge)

25 July 2006

Nightly Render - First Architectural Render

Actually, this was a daily render, since I left yesterday my PC at home rendering this model during my working time. This is a model created by my friend Ana Brütt in Autocad. She is studying Architecture, so I guess this is my first real architectural render. Thanks, Ana! ;-)


(Architectural model by Ana Brütt - click to enlarge)

This was a loooong 10 hours render, and still it has lots of noise. I really wanted to see the light being scattered inside the building, so I chose a recursion depth of 15 ray bounces and 300 rays per pixel (these two factors are the reason for this long rendering time) . The model has about 2.700 triangles. The model is lighten by an panoramic image of a sky with a far landscape and with a far triangle light to imitate the sun.

Path tracing is not a good choice for this kind of render with lots of indirect light. The next step will be, definitively, to implement Bi-Directional Path Tracing and Photon Mapping. Both these algorithms find probably more easily good paths through the entrances of light, since part of the emission is done from the lights into the model. Another interesting algorithm that seems to be very good finding the right paths in this kind of scene is Metropolis Light Transport. Well... there's lots of work in front of me... :-)

22 July 2006

Nightly Render - Animation with IBL

This time I rendered a small animation of a previously rendered scene lighten with IBL and uploaded it to YouTube:(click to see the video at YouTube)

21 July 2006

Nightly Render - Blue Guy

From time to time I do some renders that take looong times (hours) during the night while I'm sleeping. Usually in the next morning I have good surprises waiting for me. I'll be posting these nightly renders from now on, even if there are no new techniques being used.

Here it is, this night's nightly render:

(The Blue Guy - click to enlarge)

Render info:
  • 640 x 480 / 19.500 triangles / 3.5 hours rendering
Used features:
  • Pathtracing (200 rays per pixel, max depth of 2 bounces)
  • Low Dinamic Range Image-based Lighting
  • KD-Tree ( max depth=30 / min objects per node = 50)
  • .obj to .mr file converter

Boosting the Render with a KD-Tree

I'm astonished with the speed increase of my renders with the use of a KD-Tree! A KD-Tree is a binary space partitioning data-structure that sub-divides the space, dramatically decreasing the time spent in the Ray-Objects intersections. Take a look on the KD-Tree entry at Wikipedia.

The folowing render consists of a 19.500 triangles mesh rendered into a 320x200 pixels image, with 4 rays-per-pixel with standard Raytracing. Without the KD-Tree it took 1 hour to render, using KD-Tree it took only 2 minutes!!!

(19.500 tris 320p x 200p x 4 rays/p : 2 mins with KD-Tree)

I'm sure that the result could be even faster with the ringht KD-Tree settings.

An even better result was the gargoyle int the previous post. Without the KD-Tree it took 1 hour to render, with the KD-Tree it took only 24 seconds!!!!! In that case I used a tree with a depth of 20 and with a minumum number of objects per node of 100.

To be effective, the KD-Tree must be balanced. I'm using the following method to do so:
  • Split a bounding box of a node of the tree, I choose the axis along which the bounding-box is longer;
  • And split it in the median of the positions of the objects in the node on that axis .
I think now I'm almost ready for Bi-Directional Path-tracing or Photon Mapping...

18 July 2006

MR File Format & .OBJ Importer

Importing a scene modeled in other programs is essencial to test my raytracer. Today I've finished the definition of a file format (.mr) capable of represent objects, normals, UVW maps, lights, shaders, camera and some rendering settings. I've also implemented an .MR parser and a .OBJ to .MR converter. Here is a render of gargoile with about 30.000 triangles:

(render of a gargoile model - imported from .obj format into .mr - click to enlarge)

This gargoile render took about 3 hours! I definitely have to implement some ray-object acceleration method soon! My next development will probably be a KD-Tree data structure...

Phong Material

This time I implemented a simple material with a BRDF according to the specular part of the Phong model. Here is the result (look at that glossy material on half of the table):

(Phong Glossy Material - notice the metal-like half of the table - click to enlarge)

14 July 2006

Basic Image-Based Lighting

Today I've been working on a basic Image Based Lighting. I'm using simple BMP files (8bits per channel) as a light source comming from a globe around the scene with an infinite radius. I was inspired by the works being done by Paul Debevec, but I didn'r read any of his papers yet. This was a simple, intuitive implementation, based on what I think Image-Based Lighing (IBL) is. Here are two renders produced with a simple scene inserted in two different lighting environments:

(Scene inside Grace Cathedral, San Francisco - click to enlarge)


(Scene inside Eucalyptus Grove, UC Berkeley - click to enlarge)

Both images were created from two HDR images from Paul Debevec's Light Probe Image Gallery.

13 July 2006

Texture Mapping

Today I've implemented the Texture Mapped Lambertian Shader. Here is the result:

(click to enlarge)

This image took about 2 hours to render on my Pentium IV at 2.4 GHz. I used 600 rays-per-pixel and an extra point light near the camera (that's why there are those strange shadows in the front wall).

MonteRay - the C++ Raytracer

Finally, I'm back in business! I've decided to re-write everything from scratch in C++. Right now I'm not interested in writing the perfect code because I'm re-learning C++ (a lot more difficult than Java, but also a lot faster). The new program was baptized as "MonteRay" (Montenegro Raytracer or Monte-Carlo Raytracer). Here is MonteRay's first light, a 1000 ray-per-pixel Pathtracing render of a Cornell Box (for change):

(click to enlarge)

It was a lot faster than JRay (it took about 3 hours to be rendered, against the 8 to 9 hours that Jray would have taken). Notice that there is almost no noise in the image.

Well, now that I've recovered the lost time, now it is time for new challenges... let's see which new stuff will be implemented in the next days!