|
 |
Wow Mike, what can I say? Thankyou so much.
All the best,
Andy Cocker
"Mike Williams" <mik### [at] nospam please> wrote in message
news:+cWYoAAcCHD6Ew+f### [at] econym demon co uk...
>
> I don't know how to fix the line (I can't reproduce it) but I can speed
> it up by a factor of more than 2.
>
> The trick is to notice that isosurfaces can render faster when the
> contained_by surface is a reasonably close fit, and can render slowly if
> the fit is loose. I guess that's partly because the code starts from the
> point where the ray intersects the contained_by shape and then starts
> hunting up and down the ray looking for the actual surface.
>
> In this case, your Gloop shape doesn't fit at all neatly into a single
> box or a single sphere, but we can cut it up into two pieces, each of
> which fit reasonably neatly into smaller boxes.
>
> There are a couple of side effects. Firstly we have to bump up the
> accuracy, otherwise the join becomes visible (the slight speed penalty
> caused by increasing the accuracy is insignificant compared to the time
> saved). Secondly, the max_gradients of the pieces are lower than that of
> the original isosurface, presumably the high gradient areas were in the
> upper corners of the original contained_by box.
>
> It may even happen that the significant increase in accuracy that you
> can now use, in half the rendering time, might possibly get rid of the
> strange line.
>
> #declare F = function { pigment { crackle form <1,0,0> color_map { [0.0
> rgb 0.0 ] [1.0 rgb 1 ] } scale 1/2 }}
>
> #declare Gloop2=
> union {
> isosurface{
> function { x^2+y^3+z^2+F-1 }
> contained_by{ box { -1, 1 } }
> max_gradient 6
> accuracy 0.000001
> }
> isosurface{
> function { x^2+y^3+z^2+F-1 }
> contained_by{ box { -2.1, <2.1,-0.8,2.1> } }
> max_gradient 12
> accuracy 0.000001
> }
> }
>
> --
> Mike Williams
> Gentleman of Leisure
--
---------------------------------------------------------------
www.mariner9.net
..... for my music and graphics.
---------------------------------------------------------------
'I spilled spot remover on my dog. He's gone now. '
'I went to a restaurant that serves "breakfast at any time."
So I ordered french toast during the Renaissance. '
- Steven Wright.
Post a reply to this message
|
 |