Some early Mandelbulbs source code for the Optix SDK is attached. It was based on the “julia” sample, but I ripped out some unnecessary fluff. Place this in the Optix SDK subfolder where all the other projects are, and include this project in the SDK’s main CMakeLists.txt file. Then run CMake for the Optix SDK and build.
You can spin around this ugly barnacle ball which is an 8th order fractal in 3 dimensions. Rendering is done with the “distance estimation” method, i.e. we’re not intersecting with actual voxels, but instead we’re iteratively using a function that estimates the distance to the fractal’s surface.
I am still pretty dissatisfied with the shading and with the lighting in general. It is hard to make out any detail when zooming in. But still pretty rad for a 3 hour shot at this.
As far as I know the Optix SDK requires GT200 based cards, and without any binary patch only Teslas and Quadro FXs will work. UPDATE: Hmm I also was able to run the samples on a G92b card (Compute 1.1)
UPDATE2: new version of the source code. More surface detail, better key controls.
UPDATE3: can now toggle ambient occlusion, phong shading, reflection - but reflection don’t seem to produce reasonable results. I can’t see reflected images of the bulb on the bulb itself. Some problem with the surface normals?
UPDATE4: automatic level of detail algorithm (always fits window resolution). More controls.
UPDATE5: fixed serious bug in iteration formula, optimized the code, the animation mode now smoothly animates through powers 1-10
UPDATE6: supporting negative powers in the iterative formula, added fake ambient occlusion based on orbit traps, animation mode now includes negative powers.
UPDATE7: Added environment map, enabled reflections, the phong shader is now more similar to some other SDK samples and supports multiple light sources.
UPDATE 8: More animation modes, faster renderung (due to scalar derivative evaluation), go-inside mode
Christian
mandelbulb.zip (12.9 KB)