I’m currently trying to port a scene from a friend raytracer (completely different than the one we made here) and his main (only) type of light are spot light (with soft shadows)
All I’ve found into so far about spot lights is a bit confusing to me, and unless tweaking the scene (which I don’t want, the idea was to compare the render from a similar description, not having the same render!) I can’t use point or area light as unless there is shadow, all point on each object take the full intensity of the all the lights.
Does anyone have hints on spot light? That would be really helpful
In the book (p 240) there is a small paragraph about spotlights. The main idea is that a spotlight is like a point light but rays of light are not sent in every direction but only in a cone. The cone is defined by : - its top (= light's position) - a direction (cone axis) - it's angle
When you check if your shape's intersection point receives some light from a source, you compute the ray from the intersection to the light position. With a spot light you will have to compute the angle of this ray with the cone axis, if it's higher than the angle value, there is no light.