|
![](/i/fill.gif) |
Mike Raiford schrieb:
> I had no idea POV-Ray was handling bump-maps incorrectly. Interesting,
> I've only skimmed the code for POV-Ray, so I wouldn't know... At the
> time, I was more interested in poking around with the root solver code.
Basically what happens is that POV-Ray calculates the slope components
of the bump map (U and V), and computes the pertubed normal vector as
something along the lines of:
VNormal = VNormal * slopeN + VAxis1 * slopeU + VAxis2 * slopeV;
While this is not fundamentally wrong, the problem is that POV-Ray fails
to make sure that VAxis1 and VAxis2 match the U and V axes in texture
coordinate space - it instead basically picks them at random, just
making sure they are perpendicular to VNormal.
With more or less random normal pertubations like bozo this is not
really a problem because you won't be able to tell the difference;
however, if you're using a bump map image with a clearer structure, this
may cause apparent inside/outside flipping at best - at worst it will
look as if the light source had been rotated around the geometric
surface normal; usually this will look noticeably weird, but often not
noticeably enough to tell exactly /why/.
Post a reply to this message
|
![](/i/fill.gif) |