POV-Ray : Newsgroups : povray.text.scene-files : 'normal' Bug demonstration Server Time
1 Nov 2024 13:19:36 EDT (-0400)
  'normal' Bug demonstration (Message 1 to 2 of 2)  
From: Nathan Kopp
Subject: 'normal' Bug demonstration
Date: 14 Dec 1999 23:01:14
Message: <3857128a@news.povray.org>
Here is a scene that demonstrates the 'normal' bug.  This is based on
Nieminen Juha's code in povray.images.  The 'Size' variable at the top is
used to scale all objects in the scene (light, camera, and sphere).  Thus
the scene should be the same (relatively speaking).  You would (probably)
expect that everything would look the same no matter what Size is set to.
This is true of most things (the pigment, the finish, the highlights, the
shadows, etc..).  But it is not true for the surface normal.  As you change
Size, the normal will look different.

When rendered with the official POV-Ray, as you scale it larger, the
apparant depth of the bumps from the normal won't get bigger with the
sphere, so everything looks really flat.  For example, if you have a sphere
with a radius of 1000 but bumps are still only 1 unit deep, then it doesn't
look very bumpy.  Oh the other hand, if you scale the sphere to a radius of,
say, 0.001, and the bumps are still a full unit in depth, things are going
to look pretty strange.

If you declare UseAverage to be true in the official version, it will start
to work as you (or at least I) would expect it.

In MegaPov, both of these will work 'properly'.

-Nathan


// ---------------- begin scene -------------
#declare Size=5;
#declare UseAverage=false;

camera

  location -z*Size
  look_at 0
  angle 35
}
light_source { <100,100,-20>*Size*0.2, 1 }

sphere
{ 0,1
  pigment
  { granite color_map
    { [0 rgb <1,.7,.3>][.5 rgb <.8,.4,.1>][1 rgb <1,.7,.3>]
    }
  }
  normal{
#if(UseAverage)
    average
mal_map{ 
    [1  
#end
     granite 1 slope_map
     { [0 <1,0>][1 <0,-1>] }
     
#if(UseAverage)
    ]
    }
#end
  }

  
  finish { specular .5 }
  
  scale .2*Size

  rotate x*60
}
// ---------------- end scene -------------


Post a reply to this message

From: Nieminen Juha
Subject: Re: 'normal' Bug demonstration
Date: 15 Dec 1999 04:06:37
Message: <38575a1d@news.povray.org>
Nathan Kopp <Nat### [at] koppcom> wrote:
: If you declare UseAverage to be true in the official version, it will start
: to work as you (or at least I) would expect it.

: In MegaPov, both of these will work 'properly'.

  If 'properly' means the same as 'wrong', then you are right. Sorry, scaling
the slope of the normals in uniform scale is just plain wrong.
  I'll write a longer article in p.u.patches.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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