POV-Ray : Newsgroups : povray.general : Normal map vs Bump Map... How hard to implement? : Re: Normal map vs Bump Map... How hard to implement? Server Time
30 Jul 2024 06:23:20 EDT (-0400)
  Re: Normal map vs Bump Map... How hard to implement?  
From: clipka
Date: 26 Aug 2009 22:21:41
Message: <4a95edb5$1@news.povray.org>
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

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