POV-Ray : Newsgroups : povray.bugreports : Scaled bumps: definition problem or doc bug? : Re: Scaled bumps: definition problem or doc bug? Server Time
2 Jun 2024 07:16:35 EDT (-0400)
  Re: Scaled bumps: definition problem or doc bug?  
From: Ralf Muschall
Date: 18 May 1999 22:58:10
Message: <37421A8F.2F7E3B7A@t-online.de>
Rozzin wrote:
>     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)....
I guess you mean "left-handed" here (left is POV, right is normal,
both are just different *names* for the same space).

I did not mention the coordinate stuff and kept my posting pure
mathematical
(which is what I feel more at home with than with graphics, being a
physicist).

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

It is all the same problem: Let's assume POV's coordinates, have the
plane {-z,-1} as in my example (e.g. the outer normal points towards
the camera), and bumps on it, which peak into the negative z-direction
(which I call "up" for now). E.g. I call +x "east", +y "north",
and +z "down". (This can be made to agree with the usual interpretation
of the POV manual, if you imagine the *person* holding the camera
lying on his back, with the feet pointing in the +z direction (and
lifting the head in order to look at the feet).
Then the manual's interpretation holds for the camera, and my
sentence holds for the person. Neither of them is important here -
it is all math which doesn't care about what names we give to
the directions).

Since I scaled those bumps anisotropically, they have still the given
height
(i.e. "-z"), but a wide east-west-extension ("x"), and are rather narrow
north-south-wise ("y"). (At least they should if the manual chapter
about
bumps were right.)

Now, if we have a hill with a given height, which is long
east-west-wise,
but narrow north-south-wise, the wall on its north side has to be much
steeper than the one on the east side (they have to cover the same
height,
but the latter does so over a longer baseline).

OTOH, a steeper slope means that reflected light differs more from what
an ideal plane would reflect, e.g. hills which are located very far in
the north should still be visible, but hills far in the east should
should
not be. This would give the elliptical bright region which I asked for
(and
got a circular instead).

>     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).

The bright region (I avoided the word spot to avoid confusion with
the appearance of the single hills) has nothing to do with the
shape of a sphere - it is just the set of those points on the
textured plane where the perturbed surface reflects light from
the source into the camera. If such points on the plane exist 
far away, we get a large region, otherwise a small one.

What you could try instead of my textured plane is the following:

Make a heightfield of anistropic bumps and use that instead of
the bumpy plane. Then the x/y ratio of the diameters of the
bright region is approximately the *inverse* of the x/y-ratio of
the shape of the single bumps, whereas POV's faked normals
always give a ratio of 1 for the former, independently of the latter.

Your source example:
[camera and lightsources deleted]

> sphere {
>   0, 1
>   clipped_by {
>     plane {
>       -z, 0
>       scale <clock, 1, 1>
IMHO scaling a (not yet textured) plane along a direction which 
lies *in* the plane should not have eny effect at all (and every
other operation on a plane should be equivalent to a pure movement).
>     }
>   }
>   pigment {
>     rgb 1
>   }
>   finish {
>     specular .2
>     roughness .01
>   }
> }
> //end

Your scene (which I did not render yet, since I'm posting from 
another machine) seems to show me the inner side of a hemisphere.

OTOH, I intensionally avoided anything which might destroy
the symmetry of my scene (except the bumps themselves, of course)
in order to avoid any unwanted effects. Therefore I had
a plane (which is the same no matter how one looks at it),
and the lamp and camera both on the axis of the rotational
symmetry of the whole scene. In this situation, every
asymmetry could only come from the texture (but none came :-(
).

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

This would deform the sphere, but not its texture.
But what I really want is to get the physically correct appearance
of a bumpy surface whose bumps are elongated.

Ralf


Post a reply to this message

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