Fun App: Voxel Plancton comes with source code

If you have a fast GPU, say a GT240, 8800GT, 250GTS or GTX260 or better then you might like this. Render some voxel plancton and enjoy yourself.

Use the cursor keys and Page Up/Page Down to adjust the appearance of the plancton.

When you reach Theta=0 and Theta=180 degree range (hitting the up or down key 9 times), you will end up with the classical Mandelbulb, which is interesting especially at the higher exponents (6,7,8…)

The source code is a modified volumeRender SDK sample. It takes 500-1000ms on a GTX260 to update the bulb after a parameter change. I warned you about needing a fast GPU ;-)


Looks good! :)

I had an issue, so far a no go for me.

Looks nice!

BTW, for these kind of images you could probably speed up the volume renderer by marching from front-to-back (instead of back-to-front), and terminating early if the opacity has exceeded some threshold (0.99).

The render phase is not the bottleneck for me. I get some 30 FPS. It’s the generation of the volume fractal where each vector Z goes through a series of 3D rotations and scalings in space - up to 100 iterations taking place per voxel. That is why I had to limit this to (256,256,256) resolution.


There is a free app called “Dependency Walker” that you can run on the .exe file to see which of the modules that it depends on would not load. It also gives better error codes than the dreaded Windows shell

NOTE: on lesser GPUs you can start the app with a command line parameter of --size=64 or --size=128
I just tried it on my 9600M GT GPU (laptop!) and it worked. It just doesn’t look as pretty.


Update: I went on a dll hunt searching my computer, and found the ones I needed. (All from my own system.)

One from the VMD directory (cudart.dll), and they all need to be x86 dll’s too I believe…

When I was done, it looked like this:

Running it, looks like it uses 1/2 of my 295 for calculating, with a high utilization…

Second 1/2 of my 295 is getting some action, but very low… Maybe video responsibilities only?

280 PhysX processor is out of the game on this app.

All 4 cores of my CPU get used… Sweet!

I vote higher res, use all GPU’s including my 280, and as always a benchmark button! ;)

Odd Trivia: I took the default screen that was getting 61FPS, made it full screen (1920x1200 for me) and FPS went down to 10.
CPU utilization went up a tad, but not much. The 1/2 of my 295 that was doing most of the work never would cross 66% utilization.
The default screen settles in at 49% utilization…

Even when only getting 10FPS, 65% utilization was the most it ever hit. I would have expected it to climb higher.
I did have more CPU to give…
The second 1/2 of my 295 held constant at 5% utilization the entire time.

A fine app… Well done. B)

A quick hack. Done in 48 hours ;) If I wanted to use all GPUs I would have to rewrite half of the nVidia code - and restructure my GPU code as well. I converted one of the existing SDK samples.

And going to higher res pretty much hits a memory limitation quickly.

A 512x512x512 voxel space needs 128 MB of memory. A 1024x1024x1024 cube already needs a gigabyte - and that’s where most consumer cards throw in the towel.

You can try calling this with --size=512 as a command line argument. It gives you some higher res (looks better in large windows)

–size=1024 is not supported currenty (the allowed grid dimensions for CUDA kernels will be exceeded).


The code ran fine on my 32 bit laptop as is. I believe your PATH variable has a folder with the CUDA 64bit cudart.dll in it first that is why that dependency failed - the code depends on 32 bit DLLs exclusively.

Strictly speaking, I should redistribute the 32 bit cudart.dll with this application because I cannot assume everyone has the DLL available. Will fix.


Thanks for the tip…

Not sure exactly what to type, and where to type it. :)

Are talking about entering ‘–size=512’ into the Voxel Plancton control box?
Sorry, dumb question, i know…

Either use the good old “DOS box” (Command prompt) and run it manually with that argument, or create a Shortcut in Explorer

and then use Properties and append --size=512 after the “C:\Users\Christian Buchner\Desktop\voxelPlancton\voxelPlancton.exe” (or whatever your full executable path name is) in the target field. Be sure to leave a space character inbetween.

Thanks again…

The target for my Shortcut now reads:
C:\VoxelPlancton\voxelPlancton\volumeRender\voxelPlancton.exe --size=512

FPS stayed the same…

Utilization went up to 77%… Good deal!

Memory used went from 100MB’s to 323MB’s…

You are correct too, looks better. B)

Nice render.

Uh, that processing time of 2.7 seconds gets awfully close to hitting the watchdog timer. 5 seconds or more and the video driver will reset. I believe when you make a few keystrokes to modify the appearance (say increase the exponent) you will run into that timer and the app terminates.


More performance trivia… :)

Using the ‘–size=512’ option, my FPS were the same with the default screen @ 61.

However… If I take it to full screen (1920x1200) my GPU’s 77% utilization will drop to 55% utilization.
What does that mean?

This app at 1920x1200 is CPU dependent?

I have no idea. I did not write the voxel renderer. I only programmed the fractal code: the part that creates the little creatures.

For a more “ghostly” appearance of the renders try this combination of settings:

density = 0.03, brightness = 1.00, transferOffset = -0.04, transferScale = 1.64.

Results in a much larger red aurora, but also requires less density to see through to the blue core.

Good honest answer…

I will try those settings out, and thanks again. :D

I did just play with some Control Panel Settings…

Forced V-Sync off too…

Now up to 70FPS! :P

Is 4XAA working ya think?

GPU utilization moved up to 89%… A new record for this app! (It was V-Sync holding my utilization back.)

Full screen still makes the GPU utilization drop.

There appears to be some sort of memory leak - after a couple minutes just leaving it idle, it crashes with an out of memory error. I was running at size=512, so higher load to begin with.

I just found that myself…

Then when I tried to fire up GPU-z, the system locked hard.

I had to use the reset button. :haha: