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 ;-)
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.
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 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.
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.
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.
Using the ‘–size=512’ option, my FPS were the same with the default screen @ 61. External Media
However… If I take it to full screen (1920x1200) my GPU’s 77% utilization will drop to 55% utilization.
What does that mean?
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.