Severi Salminen wrote:
> Ok, I'll try. Let's assume we have found the first intersection point
> along the ray. Instead of choosing a random new direction (if it is a
> diffuse surface) you can do this:
>
> 1. Pick a random point on a light source.
> 2. Check if it is visible or not.
> 3. If it is, add the radiance it contributes. You must take the
> cosine term into account as well as the ratio of solid angle of the
> source and hemisphere (the last one thus handles the distance of the
> light source).
> 4. After this you can continue tracing the path normally. But if the
> ray next hits the same light source, ignore it as otherwise you have
> calculated it twice.
Do you still trace some random diffuse rays too? Otherwise how do you end
up with diffuse inter-reflection?
In either event the maths sounds pretty tricky :(
It also appears to mean that you need to treat your light sources
differently to normal objects. At the moment my light sources are just
high-ambient primitives.
Ray
Post a reply to this message
|