Does Box of Smoke use CUDA?

We are two students who are just starting out on our university project to do real-time fluid simulation on a Geforce8 using the Lattice-Boltzmann method, after being very impressed by Nils Thuerey’s work in this field. After seeing the water simulation in Nvidia’s Box of Smoke demo, we have an even more concrete goal to aim for.

We are not sure, however, if the best solution is to use the new geometry shader in OpenGL or use CUDA. Right now, the idea is to use CUDA for the fluid simulation itself while using the geometry shader for marching cubes-tesselation. Partly because this will be an easy way of dividing the work, but mostly because of an assumption that CUDA would be best suited for general calculations while the geometry shader would be best suited for producing the tesselated mesh.

We cannot know if our assumptions are correct though, since we are new to the Geforce8. So we would appreciate any advice from people who have some knowledge about this. To start with, knowing if the Box of Smoke demo uses CUDA or not might give a few hints, if anyone here might know.

Box of smoke uses Cg.

My bad for not doing my homework. When the Box of Smoke demo was shown to me, I was told it uses CUDA. I skimmed thru some of the shader sources in there, but didn’t find the fluid simulation one then. The question for me became whether it really used CUDA or the geometry shader instead.

But now I just downloaded it and noticed I it will run fine on my Geforce6 card, so it obviously doesn’t use any Geforce8-specific features. Guess it shows you shouldn’t always trust the “minimum requirements” given. All the better, since it should mean even better results are possible to achieve with Geforce8-specific solution. The water simulation kind of freaks out on my computer though, but I guess that may just be numerical instability resulting from having a too long timestep.

Still, the question still remains whether our assumption that splitting the computation/tesselation between CUDA and the geometry shader respectively would give the optimal results. We probably won’t have time to investigate this ourselves during the project, so if anyone has some insight into this, i would be great if we could be led on the right track from the start.

The “Box of Smoke” demo does indeed use the OpenGL/Cg, but CUDA does offer some advantages for this kind of simulation. You can use shared memory to improve performance for iterative solvers, and scattered memory writes enable other algorithms that are difficult using the graphics API.

The demo doesn’t actually use marching cubes for isosurface extraction (it raycasts through the volume in the pixel shader), but we do have examples in our SDK of using the geometry shader for this:
http://developer.download.nvidia.com/SDK/1…html#cg_isosurf