> No.
>
> As you'll recall, you have to specify the max_gradient for a POV-Ray
> isosurface. That means that if you evaluate the function at a specific
> point, based on the maximum gradient you can compute a sphere of maximum
> radius that cannot contain any solutions. And that's how far you move
> along the ray. (Rather than having a constant step width.)
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.
Post a reply to this message
|