How do you trace a ray from and to a point? Is the algorithm just to trace as many rays as possible from the camera? Or from the light source?
chaonanye
I notice there're soft shadow and hard shadow. How are they related to this algorithm or any variants in the computation formula?
kadl
The rays are traced from the point P to the light source. The number of rays traced depend on the number of light sources. For point light source it would be a single ray. For area light sources it would multiple rays to different sample points on the light source.
If the point P is in shadow of all light source points we would get a hard shadow. If it is in shadow of some of the light source points but not all, that would give us a soft shadow penumbra.
xiaoruiL
How could we take into account the reflected (perfect reflection or diffuse) light rays, which might be reflected many times, from the surrounding environment?
How do you trace a ray from and to a point? Is the algorithm just to trace as many rays as possible from the camera? Or from the light source?
I notice there're soft shadow and hard shadow. How are they related to this algorithm or any variants in the computation formula?
The rays are traced from the point P to the light source. The number of rays traced depend on the number of light sources. For point light source it would be a single ray. For area light sources it would multiple rays to different sample points on the light source. If the point P is in shadow of all light source points we would get a hard shadow. If it is in shadow of some of the light source points but not all, that would give us a soft shadow penumbra.
How could we take into account the reflected (perfect reflection or diffuse) light rays, which might be reflected many times, from the surrounding environment?