|
![](/i/fill.gif) |
Le_Forgeron <lef### [at] free fr> wrote:
> > Distance Fields are similar to isosurfaces, but the isosurface value is
> > used to store the minimum possible distance to any surface. Then it
> > makes your raymarcher algorithm very simple:
> >
> > do{
> > point = rayStart + rayDirection * distance
> > stepSize = EvaluateDistanceField(point)
> > distance += stepSize
> > }
> > while( stepSize > someVerySmallAmount)
> >
> > The functions and methods are very similar to isosurfaces:
> >
> > http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm
> >
> > There are also some clever tricks you can do to get soft shadows and
> > ambient occlusion for free.
> >
> ahem...
>
> The described distance fields are exactly povray isosurface :
> first vector (vec p) is the position, and the other optional parameters
> are the formula's specific constants if any. (the threshold parameter of
> povray is a bonus to adjust the surface, but you can keep it at 0 and
> change the formula instead).
So why do POV's isosurfaces render with so many artifacts? Take a simple sphere
function. Should turn out almost flawless, but it doesn't! POV's isosurfaces
look all sliced up, even with an ideal max_gradient. Lower accuracy values only
raymarching code I've used looks a lot better. Why?
Post a reply to this message
|
![](/i/fill.gif) |