POV-Ray : Newsgroups : povray.general : A normal question : Re: A normal question Server Time
11 Aug 2024 11:20:07 EDT (-0400)
  Re: A normal question  
From: Nathan Kopp
Date: 1 Aug 1999 16:25:41
Message: <37A4AD0B.69F11D2F@Kopp.com>
"Rune S. Johansen" wrote:
> 
> The texture is only scaled small and then big again, so why does the normal
> look different (same size but "deeper" bumps)?

It's a bug relating to slope_maps.  See my post "Patterned slope_map bug
(and Ghost of POV)" in povray.bugreports for more information.  In that
article I only mentioned the problem (and fix) as it related to normal_map
patterns, but it appears that texture_map patterns have the same problem.

To summarize, the problem is this:  When dealing with a slope map, POV must
sample a few points (it uses 4) around the intersection point and
interpolate between the results to get the normal at a point.  But which
points to use?  Unfortunately, it chooses the points after the warps
(transformations) of the parent pattern have been applied but before the
warps of the child pattern.  Therefore, the sample points are not the same:

find intersection point
scale intersection point by 100
choose 4 points evenly spaced around the intersection point
scale these 4 points by 1/100
now the distances between the points are 1/100 what they used to be

The solution is to choose the 4 points before anything else is done.  But the
problem is that you only want to apply transformations to these 4 extra points
throughout the process if they will be needed (i.e. if the texture has a
slope_map).  Otherwise, you do extra work and slow down the process for no
reason.

-Nathan


Post a reply to this message

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