Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Mandelbulb Renderings => Topic started by: ajclinto on December 13, 2009, 06:58:44 AM




Title: raytracer upgrade
Post by: ajclinto on December 13, 2009, 06:58:44 AM
I've just spend about a day upgrading a school project raytracer that I wrote back in 2003 with a mandelbulb primitive.  This is the first decent result.  Originally rendered at 1600x1600, this uses a straight raymarcher with ambient occlusion and a point light.  I spent a bit of time optimizing the bulb evaluation function, it's about 10x faster than my first implementation that used the trig iteration formula.  It's now SSE'd, and uses the evaluation function from http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8470/#msg8470.

Let me know what you think.  It has been fun browsing all the incredible results on this forum over the last few days!

AJ


Title: Re: raytracer upgrade
Post by: cbuchner1 on December 13, 2009, 12:48:45 PM
Let me know what you think.  It has been fun browsing all the incredible results on this forum over the last few days!

AJ

The perspective is responsible for the distortion here?

How long did this render?

Impress us by putting mirrors and shiny metal balls around it ;)



Title: Re: raytracer upgrade
Post by: ajclinto on December 13, 2009, 04:03:41 PM
The perspective is responsible for the distortion here?

How long did this render?

Impress us by putting mirrors and shiny metal balls around it ;)

Yeah it uses a perspective camera.  The render time was about 1 hour, but I just realized it would probably make more sense to bound this thing with a sphere rather than a box - I'm going to test that out right away.

I'll work on some renders that include reflective spheres :)


Title: Re: raytracer upgrade
Post by: cbuchner1 on December 13, 2009, 05:40:47 PM
Yeah it uses a perspective camera.  The render time was about 1 hour

Hmm, may i suggest raytracing on the graphics chip instead. I get about 20 frames a second, as opposed to 1 per hour ;)


Title: Re: raytracer upgrade
Post by: ajclinto on December 13, 2009, 06:03:05 PM
Hmm, may i suggest raytracing on the graphics chip instead. I get about 20 frames a second, as opposed to 1 per hour ;)

Lol ;-) yes I'd like to try porting it to the GPU once I've finished optimizing the CPU implementation.  Are you using any special tools for your gpu renders or did you code it from scratch?

I just tested out bounding spheres and it cut the render time by 1/3.  So I'm sitting at 20 minutes now instead of 1 hour.  Going to try distance estimation next.


Title: Re: raytracer upgrade
Post by: David Makin on December 13, 2009, 06:10:19 PM
Hmm, may i suggest raytracing on the graphics chip instead. I get about 20 frames a second, as opposed to 1 per hour ;)

Lol ;-) yes I'd like to try porting it to the GPU once I've finished optimizing the CPU implementation.  Are you using any special tools for your gpu renders or did you code it from scratch?

I just tested out bounding spheres and it cut the render time by 1/3.  So I'm sitting at 20 minutes now instead of 1 hour.  Going to try distance estimation next.

To put your render times in context, what CPU are you using ?


Title: Re: raytracer upgrade
Post by: ajclinto on December 13, 2009, 06:24:02 PM
To put your render times in context, what CPU are you using ?

It's a core2 1.8GHz, single threaded.


Title: Re: raytracer upgrade
Post by: cbuchner1 on December 13, 2009, 06:28:02 PM
Hmm, may i suggest raytracing on the graphics chip instead. I get about 20 frames a second, as opposed to 1 per hour ;)

Lol ;-) yes I'd like to try porting it to the GPU once I've finished optimizing the CPU implementation.  Are you using any special tools for your gpu renders or did you code it from scratch?

I am not a from scratch guy. So I chose the nVidia Optix SDK, which is a pretty generic framework for raytracing on the GPU (nVidia products only). And the best news: It is free. However high performance GPUs from nVidia cost a bit... and consume a non-negligible amount of power when computing under full load (think in the order of 180 Watts for a GTX 260 graphics card).

And I have two of these cards, so my PC is a nice supplemental space heater for my home office room.

Christian


Title: Re: raytracer upgrade
Post by: David Makin on December 13, 2009, 09:29:38 PM
Hmm, may i suggest raytracing on the graphics chip instead. I get about 20 frames a second, as opposed to 1 per hour ;)

Lol ;-) yes I'd like to try porting it to the GPU once I've finished optimizing the CPU implementation.  Are you using any special tools for your gpu renders or did you code it from scratch?

I just tested out bounding spheres and it cut the render time by 1/3.  So I'm sitting at 20 minutes now instead of 1 hour.  Going to try distance estimation next.

You should find that using a distance estimator will reduce times by around 40% to 60% (depending on how your current version is coded) :)