Sunday, 10 January 2010

Just a quick update

Four months without an update is too long, so I thought I would post a short summary of what I've been up to lately.

Land ahoy!
A few weeks ago I started toying with the idea of creating a terrain renderer, and started working on that. I managed to throw together a prototype in Python rather quickly.

This time I took advantage of OpenGL's vertex buffer objects to store the vertices. Calculation of normals happenes on the CPU, and proved rather costly, especially for Python. Per pixel lighting and texturing were done using shaders. My planned next step was to use pre-generated normal maps to achieve higher detail with less vertices. Quadtree based frustum culling was almost complete, before I lost interest in the project. If I pick it up again, I'll most likely fix the normal mapping and implement GeoMipMapping.


This weekend, I've been playing with Pickover attractors. Pickover's equation can create chaotic fractals with the right variables. The result of this is very fascinating. This application is written in C++ and for rendering it uses, you guessed it, OpenGL. Roughly speaking, it achieves the effect you see in the image below in three steps.

First, it calculates the vertices, about a million, of them on the CPU, uploading these to a vertex buffer. Second, it renders the fractal to a frame buffer with reduced size, then blurs the FBO with a gaussian blur filter. This done, it renders the FBO to the screen and superimposes the fractal on top of that. This creates a very nice glow effect.

Be sure to click the images and watch it in the resolution it deserves!

The source code for these projects will be released at some point in the future.

No comments:

Post a Comment