POV-Ray : Newsgroups : povray.bugreports : average normal bug (still) Server Time
22 Dec 2024 18:11:58 EST (-0500)
  average normal bug (still) (Message 1 to 2 of 2)  
From: PoD
Subject: average normal bug (still)
Date: 22 Jun 1999 15:29:02
Message: <376FE534.2DBB660@merlin.net.au>
According to the change log for 3.1g, the average normal bug was fixed
some time before 3.1e.
I tried the scene file which I included with my first report of this bug
and the bug is still there.

// test file for average normal bug
#include "colors.inc"

camera{ right 4/3*x direction z*3 location <0,-.5, -28> look_at
<0,-.5,0> }

light_source{ <1000,2000,-5000> White }

#declare Norm1 = normal{radial .5 frequency 16 scallop_wave}
#declare Norm2 = normal{ average normal_map{[1 Norm1]}}
#declare Obj1 = cylinder{-y,y,1	pigment{White}	normal{Norm1}}
#declare Obj2 = cylinder{-y,y,1	pigment{White}	normal{Norm2}}

object{ Obj1 translate <-1.5,1.5,0> }
object{ Obj1 rotate z*180 translate <1.5,1.5,0> }
object{ Obj2 translate <-1.5,-1.5,0> }
object{ Obj2 rotate z*180 translate <1.5,-1.5,0> }

union{ //arrow pointing at faulty obj
	cone{ <1.5,-3,0>,0, <1.5,-3.5,0>,.5 }
	cylinder{ <1.5,-3.5,0>,<1.5,-4,0>,.25 }
	scale<1,1,.1>
	pigment{White}}


Post a reply to this message

From: Nathan Kopp
Subject: Re: average normal bug (still)
Date: 23 Jun 1999 01:34:01
Message: <377070F0.8119F02A@Kopp.com>
This would be a different average normal bug.  And this one's not just with
the average, but also with any patterened normal. Change Norm2 to:

#declare Norm2 = normal{ bozo normal_map{[0 Norm1][1 Norm1]}}

and you'll still see the problem.

-------- the next section is for programmers ---------

From what I can gather, The bug is in how warps (transformations)
are applied in relation to the Pyramid_Vect[] vectors that are used for
triangulating the normal from the slope_map.

In a patterend or averaged normal, the warps are applied, then
Pyramid_Vect[] is added into EPoint.

In a non-patterened normal, Pyramid_Vect[] is added to EPoint first, then
the warps are applied (inside Evaluate_TPat()).

All of this happens inside the function Perturb_Normal() in NORMAL.C.
I'd work more on a fix but it's getting late (and I can't skip work).

I just checked and this *is* the cause of the problem.  No fix yet,
though... I just forced non-patterend normals to exhibit the same
problem on my system.  ;-)

-Nathan

PoD wrote:
> 
> According to the change log for 3.1g, the average normal bug was fixed
> some time before 3.1e.
> I tried the scene file which I included with my first report of this bug
> and the bug is still there.
> 
> // test file for average normal bug
> #include "colors.inc"
> 
> camera{ right 4/3*x direction z*3 location <0,-.5, -28> look_at
> <0,-.5,0> }
> 
> light_source{ <1000,2000,-5000> White }
> 
> #declare Norm1 = normal{radial .5 frequency 16 scallop_wave}
> #declare Norm2 = normal{ average normal_map{[1 Norm1]}}
> #declare Obj1 = cylinder{-y,y,1 pigment{White}  normal{Norm1}}
> #declare Obj2 = cylinder{-y,y,1 pigment{White}  normal{Norm2}}
> 
> object{ Obj1 translate <-1.5,1.5,0> }
> object{ Obj1 rotate z*180 translate <1.5,1.5,0> }
> object{ Obj2 translate <-1.5,-1.5,0> }
> object{ Obj2 rotate z*180 translate <1.5,-1.5,0> }
> 
> union{ //arrow pointing at faulty obj
>         cone{ <1.5,-3,0>,0, <1.5,-3.5,0>,.5 }
>         cylinder{ <1.5,-3.5,0>,<1.5,-4,0>,.25 }
>         scale<1,1,.1>
>         pigment{White}}


Post a reply to this message

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