POV-Ray : Newsgroups : povray.binaries.images : adding a 'normal' to a camera-- some notes : Re: adding a 'normal' to a camera-- some notes Server Time
28 Nov 2022 13:56:52 EST (-0500)
  Re: adding a 'normal' to a camera-- some notes  
From: Mr
Date: 8 Jan 2022 07:30:00
Message: <web.61d982f9ac36aa6bb26de31b6830a892@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> The documentation at   '3.4.2.4 Camera Ray Perturbation'  does not mention this,
> nor does the example scene 'camera2' that is referenced there.  I had always
> thought that a  camera normal was independent of the actual IMAGE aspect ratio,
> or would automatically compensate for it; but not so. I tested only the
> perspective camera; I don't know what happens with the other types.
>
> An 'un-corrected' camera normal is meant only for a *square* 1:1 rendered image.
> That makes sense of course, because any normal or pattern is intrinsically 1:1:1
> in 3-D space. But when used in a CAMERA, a scaling has to be added to keep the
> normal's pattern correct re: a chosen aspect ratio.
>
> This 'extra' distortion is not obvious when using, for example, a bumps pattern
> for the normal. So I set up a  test scene with a strict 45-degree gradient x+y
> normal, where the resulting aspect-ratio distortion is obvious. (I added the
> white lines later, in an image-editing app.)
>
> -----
> #version 3.8;
> global_settings{assumed_gamma 1.0}
> #default{finish{ambient .4 emission 0 diffuse 0}}
>
> camera {
>   perspective
>   location  <0, 0, -20>
>   look_at   <0, 0,  0>
>   right     x*image_width/image_height
>   // direction z
>   // angle 67
>
>   normal{
>   gradient x+y // a 45-degree pattern
>   sine_wave
>   scale .1
>   bump_size .4
>   / /scale <3/4,1,1> // for 4/3 render
>   // OR...
>   // scale <9/16,1,1> // for 16/9 render
>   // -- etc. --
>   }
> }
>
> #declare S = seed(21);
> #for(i,1,100)
> sphere{0,1
>  pigment{rgb <.1 + .9*rand(S),.1 + .9*rand(S),.1 + .9*rand(S)>}
>  translate <-15 + 30*rand(S), -10 + 20*rand(S),0>
>  }
> #end


If this was to be added to that section of the docs (by some superior autority
than me), how would you rephrase all of this in the most concise simplified
caveat warning apposition to fit in ? maybe something like :

"All camera rays will be perturbed using this one unit sized pattern. "

?


Post a reply to this message

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