|
|
Warp wrote:
> andrel <a_l### [at] hotmailcom> wrote:
>> Just curious, why should it not be evenly distributed
>
> Because the diffuse illumination of a surface depends on the angle from
> which the light is coming: The more perpendicular the incoming light is to
> the surface, the stronger its contribution. The strength of the contribution
> decreases as a function of the cosine of the angle. If the incoming light
> is parallel to the light, it has zero contribution.
In theory the contribution is zero, in reality it is not though, due to the
lack of perfectly flat surfaces. Micro-facets and a high-intensity light
source can have surprising effects...
> You could sample evenly along the hemisphere, but then you will be taking
> tons of samples which contribute only little to the illumination. (In fact,
> rather ironically, if you sample evenly, the majority of the samples will
> be on the parts of the hemisphere which contribute the least to the
> illumination.)
Actually, that they contribute the least is not universally correct: It is
only correct if all contributions of light are about the same intensity
range. Now, if one light source is significantly brighter than all other
contributing light sources, even a small angle contribution can be brighter
than all other contributions. -- While this may sound like a rare case, it
actually is not: Sunlight and a 100W light bulb would be an example. This
case is relevant in architecture.
However, the probability that small area but high intensity contributions
are missed increases with the unevenness of the distribution (because it is
a function of the sample density). The computational complexity can be cut
by exploiting ray coherence (presorting samples into coherent groups is
easiest). Of course this would actually require POV-Ray to support coherent
ray tracing, which it does not yet do (the bounding code and SIMD
abstraction is in Perforce though).
Thorsten
Post a reply to this message
|
|