clipka <ano### [at] anonymousorg> wrote:
> There's that `evaluate` mechanism; but I have no idea how it even works.
POV-Ray can also dynamically adapt the used max_gradient. To activate this
technique you have to specify the evaluate keyword followed by three parameters:
P0: the minimum max_gradient in the estimation process,
P1: an over-estimating factor. This means that the max_gradient is multiplied
by the P1 parameter.
P2: an attenuation parameter (1 or less)
In this case POV-Ray starts with the max_gradient value P0 and dynamically
changes it during the render using P1 and P2. In the evaluation process, the P1
and P2 parameters are used in quadratic functions. This means that
over-estimation increases more rapidly with higher values and attenuation more
rapidly with lower values. Also with dynamic max_gradient, there can be
artefacts and holes.
If you are unsure what values to use, start a render without evaluate to get a
value for max_gradient. Now you can use it with evaluate like this:
P0 : found max_gradient * min_factor
'min_factor' being a float between 0 and 1 to reduce the max_gradient to a
'minimum max_gradient'. The ideal value for P0 would be the average of the found
max_gradients, but we do not have access to that information.
A good starting point is 0.6 for the min_factor
P1 : sqrt(found max_gradient/(found max_gradient * min_factor))
'min_factor' being the same as used in P0 this will give an over-estimation
factor of more than 1, based on your minimum max_gradient and the found
P2 : 1 or less
0.7 is a good starting point.
When there are artifacts / holes in the isosurface, increase the min_factor and
/ or P2 a bit. Example: when the first run gives a found max_gradient of 356,
#declare Min_factor= 0.6;
evaluate 356*Min_factor, sqrt(356/(356*Min_factor)), 0.7
//evaluate 213.6, 1.29, 0.7
This method is only an approximation of what happens internally, but it gives
faster rendering speeds with the majority of isosurfaces.
Post a reply to this message