30 July 2006
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.
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! ;-)
![](http://photos1.blogger.com/blogger/3559/180/400/ana_architecture.png)
(Architectural model by Ana Brütt - click to enlarge)
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... :-)
![](http://photos1.blogger.com/blogger/3559/180/400/ana_architecture.png)
(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)
![](http://photos1.blogger.com/blogger/3559/180/320/ibl_2_100rpp.png)
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:
Here it is, this night's nightly render:
Render info:
- 640 x 480 / 19.500 triangles / 3.5 hours rendering
- 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)
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:
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!!!
![](http://photos1.blogger.com/blogger/3559/180/400/kd_tree.0.png)
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 .
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:
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:
Both images were created from two HDR images from Paul Debevec's Light Probe Image Gallery.
Both images were created from two HDR images from Paul Debevec's Light Probe Image Gallery.
13 July 2006
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):
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!
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!
07 July 2006
JRay - Java Raytracer (or Joao's Raytracer :-) )
From last October to last December I spent some of my after-work time studying deeper some of the raytracing family of algorithms. I bought two great books (Henrik Wann Jensen's "Realistic Image Synthesis Using Photon Mapping" and Peter Shirley + R. Keith Morley's "Realistic Raytracing") which helped me entering in this world. Meanwhile I read several classical papers and after that I decided to implement a raytracer in Java (which is a great language to experiment algorithms, since it is simple enough to help one to be focused on the algorithm, and not on its implementation). The result was JRay - Java Raytracer (or Joao's Raytracer), which was uploaded into Sourceforge. Take a look in JRay's Sourceforge site to see some renders and to download its source-code. Some of the features implemeted are:
I was planning to implement other algorithms, such as Bidirectional Path-Tracing, Metropolis Light Transport and Photon Mapping, but my after-work time got shorter and shorter, and I had to stop my Java developments. Recently I started to rewrite JRay's algorithms in C++, my next posts will show the results.
- Whitted's Raytracing algorithm (shadows, reflections, refractions)
- Cook's Distributed Raytracing algorithm (antialiasing, soft shadows, depth-of-field)
- Kajiya's Path-Tracing (to solve the Rendering Equation: color bleeding from inter-object reflections, caustics)
- Abstract camera model (whith a pin-hole and thin-lens camera, which allows to render depth-of-field phenomena);
- Abstract shaders (with several implementations: lambertian, mirror, glass - with Fresnell effect)
- Abstract ray-object intersection accelerator (implementation of a Kd-Tree)
I was planning to implement other algorithms, such as Bidirectional Path-Tracing, Metropolis Light Transport and Photon Mapping, but my after-work time got shorter and shorter, and I had to stop my Java developments. Recently I started to rewrite JRay's algorithms in C++, my next posts will show the results.
05 July 2006
My first works in CG
My first work in CG was done by 1995 and it consisted in simple fractals renderer written in MS-DOS' QBasic. After that, by 1997 (already during my graduation studies in Computer Engineering in Oporto's University - FEUP) I've implemented a simple raster 3D graphics engine in C and Assembly with Z-Buffer, Gouraud Shading and corrected Texture-Mapping. Unfortunately I don't have any images produced by these programs nor the source code...
Meanwhile, I stoped these studies until 2005. By then, I started to study the basic (Whitted-style) Raytracing algorithm. Here is my first raytraced image, produced by a test program written in Java:
These were my first studies on CG... My interest on this area increases every day and I'm trying to dedicate myself professionally to it. Probably I'll post good news about this in a near future... ;-)
Meanwhile, I stoped these studies until 2005. By then, I started to study the basic (Whitted-style) Raytracing algorithm. Here is my first raytraced image, produced by a test program written in Java:
These were my first studies on CG... My interest on this area increases every day and I'm trying to dedicate myself professionally to it. Probably I'll post good news about this in a near future... ;-)
Introduction
Computer Graphics (Rendering, more precisely) is one of my greatest passions, and because of that I've decided to learn and implement some rendering algorithms. I'll start an MSc in Computer Animation in Bournemouth University (England) next October, untill then I'll be creating a C++ version of a raytracer I've been developing lately.
In this blog I expect the evolution of my developments in this area. Hope you enjoy it.
In this blog I expect the evolution of my developments in this area. Hope you enjoy it.