![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Greetings, POV-Ray people! I've had a bit of a break from raytracing for a while
& have just started getting into it again a couple of months ago. So some of my
old POV-Ray knowledge is a little rusty. :)
Invisible <voi### [at] dev null> wrote:
> Darren New wrote:
> > http://www.skytopia.com/project/fractal/mandelbulb.html#renders
>
> Any idea how you render something like this?
>
> I mean, I suppose you could use a sphere-tracing algorithm like
> POV-Ray's isosurface{} construct. But is there any better way?
I've been playing with the Mandelbulb for the last few days. I generate the
voxel information in Python, but I plan to change that to C shortly.
My first attempts simply rendered each voxel as a sphere or box, but it took
ages to parse the data. I've also tried to render the Mandelbulb as a blob of
spheres, but it took ages to render. I got some interesting images, but the
shape of the Mandelbulb is dominated by the artifacts from the process of
turning a rectangular 3D array of spheres into a blob.
My more recent versions generate the data as a simple df3 file, with a value of
255 for voxels inside the Mandelbulb & 0 outside. My largest data file so far is
300x300x300. I tried rendering this as an emissive media, but it just looks like
a big cloud. :(
My most successful images render the Mandelbulb as an isosurface. The image
linked below uses a slope based pigment.
#declare f = function{pattern{density_file df3 FName interpolate 1}}
isosurface {
function{f(x, y, z)}
contained_by{box{0, 1}}
threshold 0.5
max_gradient Max_gradient
accuracy 0.01
open
translate -0.5
}
http://i2.photobucket.com/albums/y43/PM2Ring/MandelbulbD7S90.jpg
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> http://www.skytopia.com/project/fractal/mandelbulb.html#renders
>
> Any idea how you render something like this?
>
> I mean, I suppose you could use a sphere-tracing algorithm like
> POV-Ray's isosurface{} construct. But is there any better way?
Marching cubes?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> Any idea how you render something like this?
>>
>> I mean, I suppose you could use a sphere-tracing algorithm like
>> POV-Ray's isosurface{} construct. But is there any better way?
>
> Marching cubes?
You'd need a *hell* of a lot of RAM to store a mesh of anything
approaching the necessary resolution - and you'd waste time and space
computing high-resolution data for parts of the model that are occluded
or very distant.
Plain ordinary sphere tracing avoids both of these problems. But that's
designed to work for isosurfaces of arbitrary functions. I'm wondering
if there's some way we can use the specific characteristics of this
function to make the process faster. (E.g., it's iterative, it's a known
polynomial, etc.)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible wrote:
> Darren New wrote:
>> http://www.skytopia.com/project/fractal/mandelbulb.html#renders
>
> Any idea how you render something like this?
>
> I mean, I suppose you could use a sphere-tracing algorithm like
> POV-Ray's isosurface{} construct. But is there any better way?
From the site itself:
Any decent 3D software to render the beast?
Not from what I've seen. I originally looked for a 3D program, but
nothing out there seems to render arbitrary functions. Perhaps POVray
comes closest with its isosurface approach, but even then one can't use
local variables or constructs such as While loops.
In the end, I had to create my own renderer (as did the other peeps at
FractalForums.com)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Tom Austin wrote:
>> Any idea how you render something like this?
>
>
> From the site itself:
>
> In the end, I had to create my own renderer (as did the other peeps at
> FractalForums.com)
Indeed, my plan is to write a custom renderer. I was more asking about
which kinds of algorithms might be appropriate to use.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Indeed, my plan is to write a custom renderer. I was more asking about
> which kinds of algorithms might be appropriate to use.
AFAIK they are just using a normal backward raytracer like POV, but with
some optimisations to find the fractal surface quickly rather than just
binary search along the ray. You know how when you render a 2D mandelbrot
you can use that double-log formula to get a smooth iteration count? Well I
think they're using a similar formula to get an indicator of how far away
they are from the surface. If you calculate that at 2 or 3 points close
together on your ray, you should be able to extrapolate to get a pretty good
estimate of where the surface actually is. Repeat until you're at
sufficient accuracy.
To estimate the surface normal I think you could re-calculate the fractal
(using the smooth iteration count formula) a short distance away on each
axis. This can then be used for the lighting algorithm or your choice (it
seems a lot of them then shoot a few hundred rays out for some AO lighting
in addition to diffuse and shadows).
It certainly looks exciting, after my df3 isosurface attempts I'm very
tempted to try this myself too. I'm going to think about if a GPU version
is possible.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
If you really want to render the mandelbulb with povray you either have to
unroll the iterations or you have modify povray itself. I chose the latter.
You can see here how Povray rendered an isosurface using a mandelbulb function.
http://softwareprocess.es/x/x/mandelbulb/1povAA.png
I just added a user function in fnintern.cpp. You can do this too or you can use
my patch found at:
http://softwareprocess.us/index.cgi/Mandelbulb
The patch itself: http://softwareprocess.es/x/x/mandelbulb/fnintern.cpp.patch
abram
"scott" <sco### [at] scott com> wrote:
> > Indeed, my plan is to write a custom renderer. I was more asking about
> > which kinds of algorithms might be appropriate to use.
>
> AFAIK they are just using a normal backward raytracer like POV, but with
> some optimisations to find the fractal surface quickly rather than just
> binary search along the ray. You know how when you render a 2D mandelbrot
> you can use that double-log formula to get a smooth iteration count? Well I
> think they're using a similar formula to get an indicator of how far away
> they are from the surface. If you calculate that at 2 or 3 points close
> together on your ray, you should be able to extrapolate to get a pretty good
> estimate of where the surface actually is. Repeat until you're at
> sufficient accuracy.
>
> To estimate the surface normal I think you could re-calculate the fractal
> (using the smooth iteration count formula) a short distance away on each
> axis. This can then be used for the lighting algorithm or your choice (it
> seems a lot of them then shoot a few hundred rays out for some AO lighting
> in addition to diffuse and shadows).
>
> It certainly looks exciting, after my df3 isosurface attempts I'm very
> tempted to try this myself too. I'm going to think about if a GPU version
> is possible.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
abram wrote:
> If you really want to render the mandelbulb with povray you either have to
> unroll the iterations or you have modify povray itself. I chose the
> latter.
>
> You can see here how Povray rendered an isosurface using a mandelbulb
> function. http://softwareprocess.es/x/x/mandelbulb/1povAA.png
>
> I just added a user function in fnintern.cpp. You can do this too or you
> can use my patch found at:
> http://softwareprocess.us/index.cgi/Mandelbulb
>
> The patch itself:
> http://softwareprocess.es/x/x/mandelbulb/fnintern.cpp.patch
That's awesome!
"Later I considered that if you were only going to do so many iterations
that povray's own internal language would've sufficed as it'd just be loop
unrolling."
Heh, I don't think so... It would have been a few orders of magnitude
slower. How long did your two renders take?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nicolas Alvarez <nic### [at] gmail com> wrote:
> "Later I considered that if you were only going to do so many iterations
> that povray's own internal language would've sufficed as it'd just be loop
> unrolling."
>
> Heh, I don't think so... It would have been a few orders of magnitude
> slower. How long did your two renders take?
27 minutes for 1920x1200 with nothing on (no AA, etc.).
27 hours for 1920x1200 with everything I could turn on at the command line
(radiosity and antialiasing).
The scenes are garbage, I just had to see the Mandelbulb. I'm hoping that
someone with some taste picks up this patch and produces something nice.
abram
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nicolas Alvarez schrieb:
> "Later I considered that if you were only going to do so many iterations
> that povray's own internal language would've sufficed as it'd just be loop
> unrolling."
>
> Heh, I don't think so... It would have been a few orders of magnitude
> slower.
Not really. more like a factor of 4 or so, from my experience. Enough to
want the POV-Ray internal function, but not enough to be unable to live
without.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |