Thursday, October 22, 2009

OpenGL Vertex Buffer Objects

I recently updated my 3d object rendering code to VBO, introduced in OpenGL 1.5. Using them is very simple, and only need 4 additional API calls. Basically, the vertex data, normals and indexes are sent to the graphics card, stored in there, and accessed through an ID. At draw time, only one or two call with IDs are sufficient and performance is very much improved over using previous Vertex Arrays API, because no data is transfered. My frame rate was multiplied by 2 at least and I can now display up to 150 000 000 tris/s on my GeForce 8800 GTS, hardly the fastest card these days.


I also found GLEW library during this work, very nice and useful to develop OpenGL applications, because of poor header support in MS SDK. It allows using API calls without bothering if they are in headers or not, thanks to clever dynamic loading features at runtime and extensive coverage of OpenGL extensions.

Update: After some tests, the number of tris/s is about 230 000 000 on my 8800 GTS.

Thursday, October 1, 2009

Chmutov surface 3d printed



I received today a new object I have computed, it is a Chmutov 8 order surface (see this for a description). I used Shapeways service and the object is 5cm square. The material is called "white glaze" and was actually quite cheap thanks to a promotion. The result is very nice, with a glossy finish and handling the object is a pleasure.

Here is a picture.

Friday, September 25, 2009

Parallelizing code

I have modified my fractal generation code to use Intel TBB. While before, on an 8 core machine I was only able to get 13% CPU usage, I now have almost 100%.

The first part I did was layer generation. This means a single parallel_for.

I have then parallelized the triangle generation part (the so-called marching cubes). To do so I have a simple parallel_for and each thread writes its computed triangles to a shared concurrent_vector. Very simple and impressively effective.

So this scales quite well and I was able to achieve an overall speedup of 6x on a 8 core machine, over a single core.

Monday, July 27, 2009

Support for JPEG2000 in VLIV

I have added minimal support for JPEG2000 in VLIV using Jasper. Current support is not very well tested, but I have been able to load sample images. They come from The Library of Congress American Memory Maps, and take quite a while to load (at least one minute, for 5000x2700 pixel image).

The implementation takes the form a a very simple C plugin, source is available on request. It can certainly be improved much, for example I use jas_image_readcmptsample 3 times for every pixel.

Please advise if you have ideas for performance or feature improvements.

UPDATE: it is now much faster using jas_image_readcmpt on whole image width...

Wednesday, July 8, 2009

New version of IJG JPEG library

A new version has appeared on IJG web site. It looks like new version called 7 (dated 27-Jun-2009) has few changes from previous one (6b dated 27-Mar-1998 !). Mostly it says that scaled DCT are implemented, I have found that this version is not binary compatible with previous one wrt scaling. I will have to experiment a little more before using this version in Vliv.

One of the other libs I use is zlib, latest version 1.2.3, dated July 18, 2005.

LibPng has not been updated for a while, only libtiff seems to be work in progress.

I am still looking for a JPEG2000 C library that is as good and simple as these ones.

Monday, July 6, 2009

Another impressive large image

Very large images do not have to be panoramas. This one is created by stitching hundreds of images coming from a Scanning Electron Microscope. You can find more information here.

Monday, January 26, 2009

Gigapixel images becoming mainstream on the web

Here is the latest gigapixel image available on the web. As it is related to Barack Obama's inaugural address, it has received all possible attention and reviews. Image credit goes to David Bergman.

While not new, such a large image is very interesting because of how it has been made, and how it is distributed.

The process for image creation involves a robotic arm called Gigapan Imager, that automatizes completely the process of taking an array of pictures. Having such almost perfectly aligned images allows their custom software to stitch the images with a very impressive quality. Device price is about $279 as Beta ($379 otherwise).

The image is then made available on the Web using a Google Maps like interface provided by Gigapan.org.

This makes creating and distributing giant images much easier than it was before.