Hello Guest

OpenCL test: rendering the buddhabrot

  • 4 Replies
  • 8461 Views
OpenCL test: rendering the buddhabrot
« on: June 08, 2011, 10:42:47 »
I used the OpenCL part of LWJGL to render a fractal animation of the Buddhabrot (a variation of the classic Mandelbrot).

Although the problem is not very well suited for OpenCL (density maps with random access patterns, and I am to dumb to implement Metropolis-hasting) I got some performance improvement over calculating it on the CPU.

Here it is a video showing  the result:
http://www.youtube.com/watch?v=jnh53UYZGe8

In the description you will find a link to more highres screenshots and to the source code.

Re: OpenCL test: rendering the buddhabrot
« Reply #1 on: June 08, 2011, 11:11:56 »
Ooh, pretty.

Looks very nice.

About what FPS did you get, btw?

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: OpenCL test: rendering the buddhabrot
« Reply #2 on: June 08, 2011, 13:55:07 »
Awesome, looks great!

Just a heads-up though, CLKernel.setArgSize(int index, long size) and the low-level equivalent clSetKernelArg(CLKernel kernel, int arg_index, long arg_value_arg_size) will crash when called on the trunk version. This problem has been fixed in the OpenGL ES branch, so better switch to that if you'd like to use OpenCL's work-group local memory (you may have to in order to optimize the implementation for the GPU).

Re: OpenCL test: rendering the buddhabrot
« Reply #3 on: June 09, 2011, 18:45:58 »

Re: OpenCL test: rendering the buddhabrot
« Reply #4 on: June 09, 2011, 21:08:33 »
Ooh, pretty.
Looks very nice.
About what FPS did you get, btw?

Actually about 0.016FPS because it took 24 hours to render. Sorry to disappoint you, Buddhabrot is a very time consuming fractal as it involves calc of density maps for the orbits (sometimes, very long orbits) of billions of points. Of course it is not the best implementation.
BTW you avatar is very cool : )

Nice render, then.

Thank you. The rabbit is the mascot of the soon-to-be released open source 2D game engine I'm making.