POV-Ray : Newsgroups : povray.general : Huh? Normal averaging bug? : Re: Test scene (was Re: Huh? Normal averaging bug?) Server Time
5 Aug 2024 00:23:43 EDT (-0400)
  Re: Test scene (was Re: Huh? Normal averaging bug?)  
From: Remco de Korte
Date: 4 Mar 2003 06:36:59
Message: <3E648F09.3FCBB007@onwijs.com>
Xplo Eristotle wrote:
> 
> Kari Kivisalo wrote:
> > The method of calculating the normal vector from the scalar
> > field may not be precise. Averaging these vectors would leave
> > a small residue or error. This is purely a guess based on the
> > existence of accuracy keyword for normals.
> 
> Thank you, Kari.
> 
> I'm not sure I'd call the results of the averaging a "small residue",
> though. There are some fairly deep bumps and pockmarks; it looks a
> little like the surface of a wooden baseball bat that's been used to hit
> rocks and pieces of metal junk.. like the dents normal, but messier.
> 
> I'll post a pic in p.b.i., since the usually-reasonable Warp seems to
> think that my code is a nightmare. 9_9
> 
> -Xplo

If you change the scene and use boxes with crackle normal the effect is
a bit less obvious, but easier to trace.
Here's the code I used:
{as part of a game of Truth and Dare}

#default { texture { pigment { color rgb <1, 0, 0> } finish { diffuse 1
ambient 0 } } }

camera{
  location <0, 2, -15>
  look_at <0, 0, 0>
  angle 20
}
        
light_source{<-10, 100, -100> rgb 1}         

box{-.8,.8
  normal{crackle 1 scale 1}
  finish { specular 1 }
  translate <-1,1,0>
}
box{-.8,.8
  normal{crackle -1 scale 1}
  finish { specular 1 }
  translate <1,1,0>
}
box{-.8,.8
  normal{
    average
    normal_map{
      [ crackle 1 scale 1 ]
      [ crackle -1 scale 1]
    }
  }
  finish { specular 1 }
  translate <0,-1,0>
}

Anyway, the ridges stand out a bit as do the parts that are particularly
light or dark. 
Someone with a bit of understanding of the POV-code might be able to
explain.

Remco


Post a reply to this message

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