prev index next |
Miscellaneous,
Odds & Ends
|
POV-Ray Tips,
Tricks, and Techniques |
Sharp Lighting
Falloff on Curved Surface?
|
Mario Becroft summarizes his concern: | I posted this question some time ago, but I was unable
to follow up to the responses I got at the time.
I tried rendering a sphere in POV-Ray, with a distant light source illuminating it. (It is, in fact, the moon, illuminated by the sun, to scale.) Strangely, at the border between the light and dark side of the sphere, the changeover from light to dark is not soft, but sudden. There is some softness, but still a definite line where the change occurs. Even stranger, the point just at the edge of the light side, the surface is in fact _darker_ than the dark side! If you get a real sphere, and shine a light on it, it is easy to observe that this lighting effect is certainly _not_ what happens in real life. My question was, why does this happen? How can it be avoided? I got a number of replies, most suggesting that I use an area light, because in real life, this is what causes the soft change from dark to light. This is, not true in this case, however, because the object in question is a perfectly smooth sphere. And in any case, in real life, although the sun is not a point but a huge area, this is really irrelevant when seen from the moon because at that distance the sun is as good as a point light source. So, I would look forward to hearing any other ideas on this problem.
|
|
Chris Colefax advises:
|
The "definite change" you see on the sphere does not actually
exist; the effect is caused by your eyes compensating for the fact that
one side of the sphere is brighter than the other (and both are brighter
than the background). If you don't believe me, try opening the image
in a paint program and using the eye-dropper tool to check the actual colour
values at the transition between light and dark; you will see that the
colours smoothly progress with no sudden change.
There are a number of ways to solve this problem; use an area-light
as suggested (for smooth shadows), and/or set the moon's finish to {ambient
0 diffuse 1}. This will make the dark-side of the moon completely
black (giving a crescent moon), and your eyes won't create any odd effects
when viewing the image. If you want to use a normal statement to
texture the moon, then using an area-light is probably your best option.
If you also want to see the texture on the dark-side of the moon, you will
probably want to add a faint light at the camera location (or behind the
moon) to simulate starlight and light reflected from other planets (without
this, the dark side of the moon will appear to be flat).
|
|