|
|
Fabien Mosen <fab### [at] skynetbe> wrote...
> I hope this is the right place to ask that...
>
> Can someone explain to me how the perturbated normal of a given
> point of a surface is calculated ?
>
> I think I uderstood partially, but I miss parts of the
> reasoning. AFAIK, the "apparent height" of a point is determined
> by the pattern value of the point (0 to 1) and the bump_size.
> Now, how do you determine the "apparent" normal at that point ?
> Do you have to take the "height" of adjacent points in
> order to determine the slope ? If so, how much points, and
> how far ?
Yes. When turning a pattern (3d potential function with an output range of
0..1) into a bump map, POV uses a pyramid of four (I think) sample points to
determine the gradient of the function. This gradient is used to perturb
the surface normal. The specific details of when and where this pyramid of
sample points is selected differs between POV 3.1 and MegaPov (MegaPov fixes
some bugs). Also, the perturbed normal at times needs to be transformed
sometimes, too. The exact algorithm, taking into account layered textures,
averaged textures, and various transformations and warps, is actually rather
complex and difficult to explain, but I hope that this has helped at least a
little bit.
-Nathan
Post a reply to this message
|
|