POV-Ray : Newsgroups : povray.bugreports : Scaled bumps: definition problem or doc bug? : Re: Scaled bumps: definition problem or doc bug? Server Time
10 Jun 2024 16:35:13 EDT (-0400)
  Re: Scaled bumps: definition problem or doc bug?  
From: Rozzin
Date: 15 May 1999 18:30:04
Message: <373DE664.522CC263@geekspace.com>
Ralf Muschall wrote:

> The Povray doc says (in many places) that scaling bumps affects
> only the horizontal size of them, not their height.

    I'm going to assume that you've got the correct understanding of `height'
(height not being equal to y-size), and that you're dealing with typical
right-handed POV-space (rather than cartesian space)....

> [...]

> Unfortunately, scaling and taking the derivative
> (which is what creates the surface normal from the height)
> are not exchangeable. Scaling first and deriving then multiplies
> the derivative with the inverse of the scaling factor,
> which gets lost if the operations are permuted.

    I can understand this, but I /don't/ understand how this relates to the
example code that you've given, or the `problem' stated immediately after it--

> //start
> #declare here=<0,0,-4>
> light_source { here color rgb 1 }
> camera { location here look_at 0 }
>
> plane { -z,-1
>   texture {
>     pigment { color rgb 1 }
>     finish { ambient 0 diffuse 0 phong 0
>              specular 1 roughness 0.01
>     }
>     normal { bumps 0.1 scale <0.3, 0.03, 1> }
>     // the anisotropy is 0.3 != 0.03
>  }
> }
> //end
> [...]
> Now, the problem is that the bright region as a whole should be
> much larger in the y-direction than in the x-direction, instead
> of being circular. (Theoretically, it should be an ellipse with
> approximately the inverse x-y-ratio as that of the individual bumps.)

    I really don't understand your reasoning, here--as far as the `bright spot'
is concerned, it doesn't matter how you scale the normal-perturbation, because
the bright spot is the result of the light-source, which /is circular/ (even if
you apply a scaling transformation to the light-source, it'll still be
circular, because, as you know, you can't really change the form of a
point--you can just move it).
    Perhaps you could explain /why/ the sphere of illumination (or, rather, the
circular intersection of the sphere and the plane) should be scaling when you
scale the bumps on the plane(?). I'm really not seeing why--my thinking is
(partially) explained by the this scene, rendered with clock values between...
umm... .01 and 3 (+KI0.01 +KF3) (generate however many frames you want):

//start
camera {
  location -z*6
  angle 30
  look_at 0
  rotate <30, -30, 0>
}

light_source {
  <.35, .35, .35>
  rgb 1
}
light_source {
  <5, 5, 5>
  rgb 1
}

sphere {
  0, 1
  clipped_by {
    plane {
      -z, 0
      scale <clock, 1, 1>
    }
  }
  pigment {
    rgb 1
  }
  finish {
    specular .2
    roughness .01
  }
}
//end

    Now, if you were to move that `scale' expression out of the plane, into the
main body of there sphere, you'd have something that exhibited the behaviour
that it looks like you're expecting, but, of course, that's from scaling the
sphere.

> Is this a known problem?

    I don't think that it's a problem, let along a known problem, but, pleas,
help understand your thinking, if I've misunderstood it.

> I just tried wrinkles and dents - they have the same problem.

    I'd expect the same family of things to behave the same (or, at least,
similarly)


                    -Rozzin.


Post a reply to this message

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