|
![](/i/fill.gif) |
The depth is scaled unevenly.
The bugfix does not actually scale the 'amount' property of the normal.
Instead, it rearranges the order of some events that happen.
You see, to determine a normal from a pattern (using a non-normal pattern),
the gradient of the pattern must be found. To determine this gradient, four
sample points are used. The location of those points and their distance
from the original center point will have a great affect on the apparant
depth of the bumps.
The problem was when POV-Ray applied warps (including turbulence and
transformations). Did it do this before choosing the four sample points or
after? The truth was that sometimes it did it before, sometimes after. Any
transformations applied to the deepest-level normals would get done after
choosing sample points. Any other transformations (such as to parent
patterns) would get done before.
Example:
normal{
average
normal_map{
[1 crackle 1 scale 2 ]
}
scale 10
}
Here's the order of events (original point is called P):
1) inverse-scale P by 10
2) choose 4 sample points, s1,s2,s3,s4
all 0.02 POV-units away from P
3) inverse-scale s1,s2,s3,s4 by 2
4) determine the gradient using s1,s2,s3,s4
So, in this case, the 'scale 10' in the outer pattern would increase the
apparant depth of the bumps by a factor of 10, while the inner 'scale 2'
would only stretch out the pattern without affecting the apparant depth.
I changed it so that the order of events will be consistent. In MegaPov,
the above sequence would look like this:
1) inverse-scale P by 10
2) inverse-scale P by 2
3) choose 4 sample points, s1,s2,s3,s4
all 0.02 POV-units away from P
4) determine the gradient using s1,s2,s3,s4
-Nathan
Chris Huff <chr### [at] yahoo com> wrote...
> In the documentation for MacMegaPOV, it says "Now, whenever you scale a
> normal pattern or an object that has a surface normal, the depth
> (amount) of the normal will scale proportionally.".
>
> Now, for most cases, this is fine, but what does it do when the normal
> is unevenly scaled? Like if you scale it by scale < 1, 5, 3>. How is the
> depth of the normal affected in this case?
>
> --
> Chris Huff
> e-mail: chr### [at] yahoo com
> Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
![](/i/fill.gif) |