POV-Ray : Newsgroups : povray.bugreports : Scaled bumps: definition problem or doc bug? : Scaled bumps: definition problem or doc bug? Server Time
2 Jun 2024 06:18:16 EDT (-0400)
  Scaled bumps: definition problem or doc bug?  
From: Ralf Muschall
Date: 11 May 1999 22:23:50
Message: <3738D80E.4600C646@t-online.de>
The Povray doc says (in many places) that scaling bumps affects
only the horizontal size of them, not their height.

OTOH, the source [normal.c, function bumps()] computes essentially
the derivative (i.e. an additive term for the surface normal)
of "unit" bumps, taken at the inversely scaled location.
(Unless I misunderstood it.)

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.

This gives an (IMHO) unrealistic look if the
bump normal is scaled anisotropically.

E.g. the following scene gives a bright region (consisting
of horizontal bright spots) in an otherwise black image:

//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

The bright spots in this central region are wide in the
x-direction and narrow in the y-direction (as expected).

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 believe that this behavior (whilst unphysical (see below))
is intended - it just disagrees with the manual.

After looking for some time at this image, one gets a strange
feeling - there *is* just no surface which might look like this
picture.

Doing the math shows why: The surface normal of a real surface
is a vector field which fulfills some differential equation
(A x (rot A)=0, where "x" is the vectorial product), called
surface orthogonality (it just means that the vector A is parallel
to some gradient). Now, the "normal" in the picture is not orthogonal
to any imaginable surface, since it violates that equation.

Is this a known problem?

(Btw., I'd prefer to see povray being changed in order to fit
the manual rather than the other way around, but this probably
would break many other peoples' code).

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

Ralf


Post a reply to this message

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