Wednesday 29 April 2009

Visual Studio 2008 and CUDA

As promised I received my Visual Studio 2008 on Friday from polyhedron and set about installing it on Saturday. This post will describe how to get VS 2008 to work with CUDA.  I use CUDA 2.2 which is still under NDA so I wont be making any comments about its performance improvements today. Rather I will describe how to set up syntax highlighting, building and Intellisense.

Dynamic Holographic Displays

Every few days I have a look and see who has been visiting my site. There are lots of companies and Universities doing very interesting things and as they have found this site its likely they are interested in the same things I am, so its worth having a look at what they are busy with.

Today I found Zebra Imaging who have designed and built (alpha prototype) a dynamic holographic display. Although its difficult to see how it works on a 2D screen I'm imagining something like what R2D2 produced in Star Wars. Truly stuff of science fiction and will be interesting to see how well it works / what type of takeup it will get in the various fields they are targeting. Good luck guys! :)

Also worth a visit is the University of Rostock who are doing interesting things with liquid modeling and object<->liquid interactions. 

On the subject of visitors, I get a lot of Universities having a look here but in particular a big "hello" to Stanford who seem to visit their bunny on a regular basis :)

Tuesday 28 April 2009

3D Gaussian - in sections

After installing VS2008 it took me a little while to get all my projects to compile nicely again. Quite a big jump from 2003->2008 :) and a lot of my paths were a bit out. I'll post later about getting CUDA 2.2 to work in VS2008 and the problems I had making it cross compile.

Just time this evening for a quick update: I finished my 3D Gaussian convolution on my generated data set - the attached image has clearly visible joins in it, these are to make sure my segmented approach of processing big data sets works correctly. The are easily removed by overlapping the non-boundary segments. The colours are based on my transfer function and don't reflect the underlying data accurately yet. It renders the volume at around 40fps.

3D Gaussian convolution (segmented) output



OpenGL Bindless Graphics

When picking up my rss feeds this morning from Google Reader (which is really good) I came across a very exciting article from NVidia claiming a massive speed increase in OpenGL. The article is here

In the past I mostly used PBO's but have been using more and more VBO's in the CFD visualizations so I will give these new extensions a try soon. Keep in mind it only applies to 185 and above drivers.

Wednesday 22 April 2009

CUDA Processing of Large Data Sets

As those who follow this blog will know, I have been playing with large generated volumetric data sets (around 16GB). The first operation I performed on them was a 3D Gaussian convolution in order to smooth a lot of the randomness out. My first implementation of the kernel was just the naive one - take a point and look at all the surrounding points. As I'm using a 5x5x5 kernel this means 125 memory reads per point - very poor!

Monday 20 April 2009

Qt Creator or Visual Studio 2008

I have been using Visual Studio 2003 for a long time now - since it first came out in fact. It has performed it's job well. The random crashing of Studio 6 seemed to have been resolved and the autocomplete worked (75% of the time) Intellisense was still a bit of a nightmare but overall I lived with it quite happily.

Sunday 19 April 2009

Volumetric Test Data

Here are two screenshots of my 512x512x512 generated volume.  The one on the left is formed by generating random points in rough bands along the y axis with a higher noise factor towards the top - hopefully representing less dense material. Hidden inside the volume is a cube of much lower density than the surrounding regions.

The one in the centre is the same volume after the 3D Gaussian kernel was applied although it is at a slightly different angle. The right hand side screen capture is using a higher transparency function to show the little hidden cube.

 [gallery]

I did run into a problem with the watchdog timer generating a timeout when running the kernel on the full 4kx4kx4k data set. Strangely switching the device to my non-display card didn't help at first. It turns out that Win XP had decided that my second 8800GT had a monitor attached to it, which seems to have activated the watchdog timer for the video driver. Something worth looking out for if you get watchdog timeouts on secondary cards.

Friday 17 April 2009

Large Data Sets and 3D Gaussian

Firstly a small fix:

In the post about the 2D gaussian there was a typo:

\$f(2,2) = Ae^{-(\sfrac{2^2+2^2}{1.4^2})}\$

should read

\$f(2,2) = Ae^{-(\frac{2^2+2^2}{2(1.4^2)})}\$ 

this has now been fixed in the original article.



Last night I successfully made my 2048*2048*2048 * 2 bytes data set. The random data was generated using the mersenne twister algorithm with a fixed seed so I can recreate it later if needed. I also created a smaller set of 512x512x512 in order to interactively test my kernels.

Thursday 16 April 2009

Oil and Gas

Oil and Gas: What a fascinating industry! With all the different technologies and processes involved there is so much to learn.

Why the sudden interest you may ask? Well I may have an opportunity to work for a company involved in supplying software to the oil and gas sector in a part of the UK in which we would very much like to live and doing a job with such a wide variety of interwoven fields is rather appealing. As I have no oil industry experience I have been reading and googling as much as possible.

It seems like the software and technologies required revolve around:  3D visualization and analysis of volumetric data (seismic), construction of data based on field measurements, Geographic Information Systems, GPS, fluid / gas flow simulations in porous media or in hollow volumes, visualization of the strutures (rigs etc), drilling planning and plotting. And I'm sure there are even more things to discover.

Wednesday 15 April 2009

Playing with the Lattice Boltzmann Method

I've been learning more and more about the LBM (Lattice Boltzmann Method) recently and decided to implement a very basic 2D one last night. More to educate myself than for anything useful.

I decided on the D2Q9 Lattice as it should give nice results in 2D while being less complex to implement then the D3Q19 (3D) one.

My colour mapping isnt great and for some reason the simulation isnt responding as expected to different Reynolds Numbers. My initial conditions and boundary conditions need work too. For what its worth here are two screenshots of the velocity field in a pipe with 2 Cylinders projected through it. (Lighter colours indicate higher velocity)

[gallery]

Married!

At 2:30 on 4/4/2009 Catriona and I got married :)

We had a lovely weekend at Loch Ness Lodge with our families and some close friends, culminating with our wedding ceremony on Saturday followed by the wedding breakfast.

After three days of sunshine it was inevitable to get rain on Saturday, but as wearing a kilt/waistcoat/jacket can get rather warm having a cooler day was rather pleasant. By early evening the rain had cleared which gave us an opportunity to have some outdoor photographs. (will post some soon)

[gallery]

Scott and the team at Loch Ness Lodge do a fantastic job and really do make you feel at home, if "home" is a well appointed lodge with "fairies" whom you never see but do everything for you. The food they prepare from tea to sandwiches to five course wedding breakfast is superb using really fresh and high quality ingredients.