Mandelbulbs Mandelbrot sets transformed into 3D
  1 / 3    
[url="http://www.skytopia.com/project/fractal/mandelbulb.html#renders"]http://www.skytopia.com/project/fractal/ma...lb.html#renders[/url]

we definitely need a CUDA port ;-) UPDATE: we have one - see below.

To get this puppy to screen you need a fast voxel renderer (e.g. 1024x1024x1024 volume segments) ideally with self shadowing and good illumination. And of course you want to use CUDA to compute the formula in the first place. Any takers? I am busy with fractal flames right now.

The zooming process would be somewhat similar to operating an electron microscope, I suppose...

More background here: [url="http://www.skytopia.com/project/fractal/mandelbulb.html"]http://www.skytopia.com/project/fractal/mandelbulb.html[/url]

Here's a z^3+c mandelbrot. Or should I say "mandelbot" ?

[img]http://img339.imageshack.us/img339/3137/mandelbot.jpg[/img]

Christian
http://www.skytopia.com/project/fractal/ma...lb.html#renders



we definitely need a CUDA port ;-) UPDATE: we have one - see below.



To get this puppy to screen you need a fast voxel renderer (e.g. 1024x1024x1024 volume segments) ideally with self shadowing and good illumination. And of course you want to use CUDA to compute the formula in the first place. Any takers? I am busy with fractal flames right now.



The zooming process would be somewhat similar to operating an electron microscope, I suppose...



More background here: http://www.skytopia.com/project/fractal/mandelbulb.html



Here's a z^3+c mandelbrot. Or should I say "mandelbot" ?



Image



Christian

#1
Posted 11/16/2009 09:49 AM   
It looks like someone has already done a GPU version. The iteration formula is pretty simple:
[url="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8493/#msg8493"]http://www.fractalforums.com/3d-fractal-ge...sg8493/#msg8493[/url]
It looks like someone has already done a GPU version. The iteration formula is pretty simple:

http://www.fractalforums.com/3d-fractal-ge...sg8493/#msg8493

#2
Posted 11/16/2009 10:42 AM   
[quote name='Simon Green' post='951511' date='Nov 16 2009, 11:42 AM']It looks like someone has already done a GPU version. The iteration formula is pretty simple:
[url="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8493/#msg8493"]http://www.fractalforums.com/3d-fractal-ge...sg8493/#msg8493[/url][/quote]

Yes, Iñigo Quílez ( [url="http://iquilezles.org/"]http://iquilezles.org/[/url] ) seems to be on it already. Currently he takes 2 seconds to render one voxel frame. If you look at his web page, he is the creator of some of the best (award winning) "demo scene" contributions in recent years - and he's currently working for Pixar. You can't really beat him at his game.

UPDATE: The realtime raytracing thread here hinted me at this. There is a procedural 3D Julia set sample in the Optix SDK. It should be a piece of cake to replace the 3D Julia set with the new Mandelbulb formula, right? ;-) Now if someone would please patch the Quadro FX / Tesla requirement out of the Optix DLLs...

Christian
[quote name='Simon Green' post='951511' date='Nov 16 2009, 11:42 AM']It looks like someone has already done a GPU version. The iteration formula is pretty simple:

http://www.fractalforums.com/3d-fractal-ge...sg8493/#msg8493



Yes, Iñigo Quílez ( http://iquilezles.org/ ) seems to be on it already. Currently he takes 2 seconds to render one voxel frame. If you look at his web page, he is the creator of some of the best (award winning) "demo scene" contributions in recent years - and he's currently working for Pixar. You can't really beat him at his game.



UPDATE: The realtime raytracing thread here hinted me at this. There is a procedural 3D Julia set sample in the Optix SDK. It should be a piece of cake to replace the 3D Julia set with the new Mandelbulb formula, right? ;-) Now if someone would please patch the Quadro FX / Tesla requirement out of the Optix DLLs...



Christian

#3
Posted 11/16/2009 01:22 PM   
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
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
Attachments

mandelbulb.zip

#4
Posted 11/17/2009 08:37 PM   
The current output of the program looks like the mouth of the giant Star Wars Sarlacc, or like some pollen under an Electron microscope. Either way, it's gross.

I've updated the software such that the keys +,-, D,d and I,i have some notable effect on the fractal. More tuning to come...

Christian
The current output of the program looks like the mouth of the giant Star Wars Sarlacc, or like some pollen under an Electron microscope. Either way, it's gross.



I've updated the software such that the keys +,-, D,d and I,i have some notable effect on the fractal. More tuning to come...



Christian

#5
Posted 11/17/2009 11:53 PM   
Looks promising, and nice to see somebody using Optix! Could you add some fake ambient occlusion to improve the shading?

BTW, I found another GPU Mandelbulb renderer here:
[url="http://frictionalgames.blogspot.com/2009/11/fractional-fun.html"]http://frictionalgames.blogspot.com/2009/1...tional-fun.html[/url]
Looks promising, and nice to see somebody using Optix! Could you add some fake ambient occlusion to improve the shading?



BTW, I found another GPU Mandelbulb renderer here:

http://frictionalgames.blogspot.com/2009/1...tional-fun.html

#6
Posted 11/19/2009 05:58 PM   
[quote name='Simon Green' post='953167' date='Nov 19 2009, 06:58 PM']Looks promising, and nice to see somebody using Optix! Could you add some fake ambient occlusion to improve the shading?

BTW, I found another GPU Mandelbulb renderer here:
[url="http://frictionalgames.blogspot.com/2009/11/fractional-fun.html"]http://frictionalgames.blogspot.com/2009/1...tional-fun.html[/url][/quote]

There is an ambient occlusion term, but it is not that effective. In the latest version there is a key to toggle it. Others have successfully implemented A.O. using orbit trapping. I shall try this too.

One of the main problems with this renderer is that the shader is plain awful. I want some real light source, self-shadowing and some realistic material - not this pseudo phong shader. Note that I was getting 2 FPS on the image below (rendered to a 1920x1200 screen, nVidia 9600GSO, image cropped for uploading to this forum)

[img]http://img690.imageshack.us/img690/7200/sobu.jpg[/img]

What an ugly son of a ball ;-)

Christian
[quote name='Simon Green' post='953167' date='Nov 19 2009, 06:58 PM']Looks promising, and nice to see somebody using Optix! Could you add some fake ambient occlusion to improve the shading?



BTW, I found another GPU Mandelbulb renderer here:

http://frictionalgames.blogspot.com/2009/1...tional-fun.html



There is an ambient occlusion term, but it is not that effective. In the latest version there is a key to toggle it. Others have successfully implemented A.O. using orbit trapping. I shall try this too.



One of the main problems with this renderer is that the shader is plain awful. I want some real light source, self-shadowing and some realistic material - not this pseudo phong shader. Note that I was getting 2 FPS on the image below (rendered to a 1920x1200 screen, nVidia 9600GSO, image cropped for uploading to this forum)



Image



What an ugly son of a ball ;-)



Christian

#7
Posted 11/19/2009 06:31 PM   
Definitely try this win32 binary of the Mandelbulb program !!! Please use the free 7-zip (www.7-zip.org) program to decompress this archive. The .zip file is actually a .7z archive, but the forum software only accepted the .zip file extension.

This program can display a camera flight and smooth morph of a 3D fractal through various powers p=1...10. The program uses the well-known z^p+c iterative formula. The difference to a 2D fractal (e.g. Mandelbrot) is that some extra transformations define the term "z^p" (raise z to the power p) in 3D space. Otherwise it is basically the 2D Mandelbrot formula with arbitrary powers chosen. Power 2 is actually pretty boring in 3D, but higher powers exhibit a lot of fractal patterns. Because of its shape in higher powers it was given the name Mandelbulb.

Start the animation with the space bar. OMG it's alive /banana.gif' class='bbc_emoticon' alt=':banana:' /> Looks a bit like it's hatching from an egg.

Hit f for full screen (I recommend a fast card, e.g. GTX 260 or better). On my 9600 GSO I get some 10-30 FPS in the VGA sized window during the animation. A GTX295 might do full screen on 1920x1200 just fine.

When not in animation mode you have control of the camera. I recommend that for zooming instead of moving the camera extremely close to the fractal that you instead use shift+right mouse button to change the camera field of view (much like a telefocus zoom). This allows for finer zooming and panning across the surface. Add more iterations (i) and more surface detail (d) as needed.

You can turn off reflections ( r ) and the background ( b ) if you like, which is also good for frame rates. The other key commands are explained in the DOS box. Cheers.

Next thing to add would be proper self shadowing, possibly even refraction (if that is even possible). Remember, it's a raytracer.

EDIT: binary has been moved to last post in this thread.

Cheers.
Definitely try this win32 binary of the Mandelbulb program !!! Please use the free 7-zip (www.7-zip.org) program to decompress this archive. The .zip file is actually a .7z archive, but the forum software only accepted the .zip file extension.



This program can display a camera flight and smooth morph of a 3D fractal through various powers p=1...10. The program uses the well-known z^p+c iterative formula. The difference to a 2D fractal (e.g. Mandelbrot) is that some extra transformations define the term "z^p" (raise z to the power p) in 3D space. Otherwise it is basically the 2D Mandelbrot formula with arbitrary powers chosen. Power 2 is actually pretty boring in 3D, but higher powers exhibit a lot of fractal patterns. Because of its shape in higher powers it was given the name Mandelbulb.



Start the animation with the space bar. OMG it's alive /banana.gif' class='bbc_emoticon' alt=':banana:' /> Looks a bit like it's hatching from an egg.



Hit f for full screen (I recommend a fast card, e.g. GTX 260 or better). On my 9600 GSO I get some 10-30 FPS in the VGA sized window during the animation. A GTX295 might do full screen on 1920x1200 just fine.



When not in animation mode you have control of the camera. I recommend that for zooming instead of moving the camera extremely close to the fractal that you instead use shift+right mouse button to change the camera field of view (much like a telefocus zoom). This allows for finer zooming and panning across the surface. Add more iterations (i) and more surface detail (d) as needed.



You can turn off reflections ( r ) and the background ( b ) if you like, which is also good for frame rates. The other key commands are explained in the DOS box. Cheers.



Next thing to add would be proper self shadowing, possibly even refraction (if that is even possible). Remember, it's a raytracer.



EDIT: binary has been moved to last post in this thread.



Cheers.

#8
Posted 11/19/2009 11:18 PM   
Nice!

I'm getting 5-10 FPS on the animation when running fullscreen at 2048x1536 on my GTX 295. 50-100 FPS at VGA resolution.
Nice!



I'm getting 5-10 FPS on the animation when running fullscreen at 2048x1536 on my GTX 295. 50-100 FPS at VGA resolution.

#9
Posted 11/20/2009 07:43 AM   
[quote name='Keldor314' post='953422' date='Nov 20 2009, 08:43 AM']Nice!

I'm getting 5-10 FPS on the animation when running fullscreen at 2048x1536 on my GTX 295. 50-100 FPS at VGA resolution.[/quote]

I've discovered that negative powers lead to hollow objects when the iteration limit is an odd number.

[img]http://img297.imageshack.us/img297/1464/mandelier2.jpg[/img]

I've named these things "mandeliers" because they have the appearance of a chandelier and are based on the Mandelbrot equation ;)

The updated version I've just attached in above postings has better ambient lighting and will also display the mandeliers in the animation mode.

For the mandeliers to render without overstepping errors, you may have to hit the "s" key a couple of times to reduce the raycasting step size.

Christian
[quote name='Keldor314' post='953422' date='Nov 20 2009, 08:43 AM']Nice!



I'm getting 5-10 FPS on the animation when running fullscreen at 2048x1536 on my GTX 295. 50-100 FPS at VGA resolution.



I've discovered that negative powers lead to hollow objects when the iteration limit is an odd number.



Image



I've named these things "mandeliers" because they have the appearance of a chandelier and are based on the Mandelbrot equation ;)



The updated version I've just attached in above postings has better ambient lighting and will also display the mandeliers in the animation mode.



For the mandeliers to render without overstepping errors, you may have to hit the "s" key a couple of times to reduce the raycasting step size.



Christian

#10
Posted 11/20/2009 06:02 PM   
Shiny new shaders and an environment map! For this screen shot I reduced the fractal detail so you can see the reflections better.

[img]http://img41.imageshack.us/img41/9403/newshader.jpg[/img]

NOTE: I switched the .zip compression to 7-zip compression, but had to keep the original .zip file extension.

The updated binary is in my (cbuchner1's) last post in this thread. Source code is a few more postings up (#4 I belive).
Shiny new shaders and an environment map! For this screen shot I reduced the fractal detail so you can see the reflections better.



Image



NOTE: I switched the .zip compression to 7-zip compression, but had to keep the original .zip file extension.



The updated binary is in my (cbuchner1's) last post in this thread. Source code is a few more postings up (#4 I belive).

#11
Posted 11/21/2009 01:37 AM   
Who says that the algorithm doesn't work for power 2?? Looks like a genuine 3D mandelbrot to me!

[img]http://i4.photobucket.com/albums/y136/Keldor314/Power2.jpg[/img]
Who says that the algorithm doesn't work for power 2?? Looks like a genuine 3D mandelbrot to me!



Image

#12
Posted 11/21/2009 07:15 AM   
[quote name='Keldor314' post='953856' date='Nov 21 2009, 08:15 AM']Who says that the algorithm doesn't work for power 2?? Looks like a genuine 3D mandelbrot to me![/quote]

It gets even closer to a mandelbrot shape when you increase the iteration count. However the problem is that there is little fractal detail outside the x,y plane. For the low powers most of the 3D detail (when zoomed in) has the shape of "whipped cream" and is not all that interesting. It takes higher powers to get self-similar patterns. See the links in the first posting for more background and renders.

The guys on fractalforums.com have continued their quest for the "true 3D mandelbrot" - the Mandelbulb was a hot contender, but not quite it.

Here's a pretty cool render of a power 3 fractal. Looks a bit like an alien encounter. Definitely beats a Quaternion Julia fractal in terms of creepiness.

[img]http://img23.imageshack.us/img23/9108/takemetoyourleader.jpg[/img]

Christian
[quote name='Keldor314' post='953856' date='Nov 21 2009, 08:15 AM']Who says that the algorithm doesn't work for power 2?? Looks like a genuine 3D mandelbrot to me!



It gets even closer to a mandelbrot shape when you increase the iteration count. However the problem is that there is little fractal detail outside the x,y plane. For the low powers most of the 3D detail (when zoomed in) has the shape of "whipped cream" and is not all that interesting. It takes higher powers to get self-similar patterns. See the links in the first posting for more background and renders.



The guys on fractalforums.com have continued their quest for the "true 3D mandelbrot" - the Mandelbulb was a hot contender, but not quite it.



Here's a pretty cool render of a power 3 fractal. Looks a bit like an alien encounter. Definitely beats a Quaternion Julia fractal in terms of creepiness.



Image



Christian

#13
Posted 11/21/2009 12:59 PM   
Hi, I also got some fun rendering the Mandelbul set on the GPU :-)
Here is a video of the set rendered in real-time by our GigaVoxels rendering engine implemented with CUDA. The fractal is computed on the GPU, not during the ray-casting as for Christian's demo, but as voxels stored into an Octree. Voxels are produced on-the-fly and stored into a cache in video memory in order to be reused while they stay visible. The octree is also subdivided on-the-fly and the subdivision is triggered directly by the ray-casting kernel. That prevents to generated any occluded data.
I compute Ambient Occlusion very efficiently using filtered low resolution voxels and soft shadows are computed with secondary rays. Everything runs at around 20Hz.

[url="http://www.youtube.com/watch?v=PFr-cEEb8y0"]GigaBroccoli: YouTube video[/url]

[img]http://artis.imag.fr/Membres/Cyril.Crassin/GigaBroccoli1.png[/img]
Hi, I also got some fun rendering the Mandelbul set on the GPU :-)

Here is a video of the set rendered in real-time by our GigaVoxels rendering engine implemented with CUDA. The fractal is computed on the GPU, not during the ray-casting as for Christian's demo, but as voxels stored into an Octree. Voxels are produced on-the-fly and stored into a cache in video memory in order to be reused while they stay visible. The octree is also subdivided on-the-fly and the subdivision is triggered directly by the ray-casting kernel. That prevents to generated any occluded data.

I compute Ambient Occlusion very efficiently using filtered low resolution voxels and soft shadows are computed with secondary rays. Everything runs at around 20Hz.







Image

#14
Posted 11/23/2009 03:18 PM   
I have uploaded another video showing more small details and with a better and more impressive camera trajectory.
[url="http://www.youtube.com/watch?v=xF4mTGyskr0"]http://www.youtube.com/watch?v=xF4mTGyskr0[/url]

A better quality video can be downloaded there: [url="http://artis.imag.fr/Membres/Cyril.Crassin/GigaBroccoli2.avi"]http://artis.imag.fr/Membres/Cyril.Crassin/GigaBroccoli2.avi[/url]

[img]http://artis.imag.fr/Membres/Cyril.Crassin/GigaBroccoli2.png[/img]

[attachment=14811:cudaGiga...16_12_34.png][attachment=14812:
cudaGiga...37_06_48.png][attachment=14813:cudaGiga...11_59_5
7
.png]
I have uploaded another video showing more small details and with a better and more impressive camera trajectory.





A better quality video can be downloaded there: http://artis.imag.fr/Membres/Cyril.Crassin/GigaBroccoli2.avi



Image



[attachment=14811:cudaGiga...16_12_34.png][attachment=14812:

cudaGiga...37_06_48.png][attachment=14813:cudaGiga...11_59_5

7

.png]

#15
Posted 11/23/2009 06:11 PM   
  1 / 3    
Scroll To Top