Archive for November, 2009

Fractal Landscapes

CPE 471 Fractal Landscape

This might be the most interesting graphics project I’ve worked on all quarter. Most of the other projects were pretty boring but this one… I just can’t seem to put down. I finished it at 2AM last night, but managed to stay up till 6AM tweaking it for performance. I didn’t even realize the time pass. Anyway, I spent most of today further modifying the lighting and various characteristics to make the scene look more realistic.

So first, if you haven’t heard of fractal landscapes, here is a little background reading: http://en.wikipedia.org/wiki/Fractal_landscape

The initial rendering: Recursion depth 9.

CPE 471 Fractal Landscapes

CPE 471 Fractal Landscapes

The first aesthetic addition I added was fog. Fog is very trivial to add in OpenGL. Then I added sky. Sky was pretty simple too, it is a square with a gradient sitting in the background.

CPE 471 Fractal Landscapes

CPE 471 Fractal Landscapes

CPE 471 Fractal Landscapes

At this point, I was pretty satisfied… but I was unhappy with the resolution of the landscape… the polygons were still too large and you can see where they join. So, in order to increase the recursion depth, I had to optimize my program further. The first optimization I had to do was to speed up the rendering. For 9 levels of recursion, about 262,144 polygons are drawn per frame. For 10 levels of recursion, about 1 million polygons are drawn per frame. Initially, without optimization to my original approach, I was able to get the program to run at an acceptable frame rate at 8 levels of recursion. After simple optimization, I got to 9. And after working on it today, my program handles 11 levels of recursion (just not smoothly :P). I think 11 looks pretty good so I actually have not tried more. The trick was to reduce the number of calculations that needed to be done at the time of rendering. I essentially performed all the calculations for the vertices, normals and colors before hand and stored them in a linear array. Then during rendering, I simply load them all into a GL_QUAD_STRIP.

After I was satisfied with this, I also played around with lighting. Initially, the scene was lit by a single light source from behind the camera. This is not very realistic because the sun isn’t always directly behind you. Anyhow, I turned that light off and added a light source from the right as well as a orange-ish light from the back to give the mountains some backlight and define the shape a little.

Here are some examples rendered at recursion depth 11.

CPE 471 Fractal Landscapes

CPE 471 Fractal Landscape

It was interesting to think about to light this landscape. Photographers constantly think about how their subjects are lit and how to light them, but rarely do they ever have the opportunity to light an entire mountain!

3 Comments

Free Portrait Day – Halloween 2009

Free Portrait Day - Halloween 2009People dress up in such great costumes for Halloween — instead of just giving out candy, why not some free portraits too! Some trick-or-treaters and some friends came over to be immortalized in their Halloween costumes. Photographs were shot by me (Prentice Wongvibulsin) and Brian Ujiie.

The hi-res photographs are available in this Flickr set. To obtain the hi-res version of the image, click on the “all sizes” button above the image and select “Original”. Leave a comment if you have problems getting to it. Also, I haven’t had time to go through all the portraits yet so also leave a comment if you don’t see yours here.

.

This post contains hi-res images: Please hide the sidebar by clicking HERE.

 

This post contains a few of the images from the set:

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Free Portrait Day - Halloween 2009

Be sure to view the entire set!

, , , , , , , , ,

1 Comment