POV-Ray : Newsgroups : povray.off-topic : Hello again : Re: Hello again Server Time
19 Jul 2024 23:29:11 EDT (-0400)
  Re: Hello again  
From: scott
Date: 6 Jul 2015 04:47:04
Message: <559a4088$1@news.povray.org>
> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.