Title: OpenGL+cuda renderer (video+src) Post by: kyrlian on January 24, 2010, 11:30:48 AM Hi,
I've been lurking on this forum last autumn, I thought I should at last post the result : A ray tracing renderer with one light source, phong shading, full movement around the mandelbulb, automatic level of detail (depending on distance to object). You can also change the power (negative and positive). About 0.8 seconds per image on my GeForce 9800GT. An image : (http://kyrlian.free.fr/binaries/cudafractal/3d.jpg) A video : http://kyrlian.free.fr/binaries/cudafractal/rotate_zoom.avi (http://kyrlian.free.fr/binaries/cudafractal/rotate_zoom.avi) Sources with visual C project (for win): http://kyrlian.free.fr/binaries/cudafractal/fractal3d_win_src_20091207.zip (http://kyrlian.free.fr/binaries/cudafractal/fractal3d_win_src_20091207.zip) Sources with makefile (for *nix): http://kyrlian.free.fr/binaries/cudafractal/fractal3d_linux_src_20091206.zip (http://kyrlian.free.fr/binaries/cudafractal/fractal3d_linux_src_20091206.zip) To compile and run, you'll need a Nvidia card, latest nvidia drivers, toolkit and sdk from http://www.nvidia.com/object/cuda_get.html (http://www.nvidia.com/object/cuda_get.html) Algorithm comes from various posts in this forum (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/?action=printpage (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/?action=printpage)), cuda code from NVidia samples in the cuda toolkit. usage (for azerty kb, change in opengls.cu): z, q, s, d : move e, c : strafe up-down r, v : zoom in-out i, j, k, l : rotate view around origin 4, 5, 6, 8 : look around g, h : rotate light around view vertical axis w, W : decrease, increase maxiter f : toggle full screen (you can also resize the window as usual) o : print position u : print (this) usage a : quit Thanks for the ride, k. Title: Re: OpenGL+cuda renderer (video+src) Post by: cbuchner1 on January 25, 2010, 12:29:23 AM Thank you so much for open sourcing it. Title: Re: OpenGL+cuda renderer (video+src) Post by: itisnt on March 30, 2010, 07:16:24 PM Thanks also from my side. With your code, i've a starting point to play around with CUDA on NVIDIA and the mandelbulb stuff.
~300ms on my GeForce GTX 280 edit: ~100ms with blocksize set to 16 in cuda_draw.cu My fare away target would be to improve the speed of http://www.fractalforums.com/mandelbulb-software/mandelbulber-open-source-program-for-rendering-high-quality-mandelbulbs/ (http://www.fractalforums.com/mandelbulb-software/mandelbulber-open-source-program-for-rendering-high-quality-mandelbulbs/), with supporting NVIDIA GPU's. But for that, i've a long way to go. The only thing i can in the moment is C-Programming (C++ is a bit rosty) and i like the mandelbulb images a lot ;-) Regards, Daniel Title: Re: OpenGL+cuda renderer (video+src) Post by: keldor314 on April 12, 2010, 05:32:34 AM Make sure your blocksize is a multiple of 32, or else it won't be able to utilize the entire SIMD. 128 is probably a good block size. |