Reputation: 11
I am trying to write raytracer but actually I have some problem.
I have data structure for smooth triangle mesh and there is problem with shadow/shading (images)
http://ubuntuone.com/5PzgIFMPofsUfSusGE25jt
and
http://ubuntuone.com/0M37JviVUKiwu5b5iBhFKS
I know where is the problem. By interpolated normal is part of triangle "on light" but for shadow ray is triangle flat and it is in shadow.
Question is, how I can remove this artifact. Thank you for the answer.
Upvotes: 1
Views: 764
Reputation: 12922
This is a well-known artifact. You can see this page for a complete description as it relates to POV-Ray.
One potential solution, as mentioned there, is to have that object not cast any shadows. If it is part of a larger scene, perhaps have it cast shadows on other objects, but not on itself.
That page suggests a more complicated general algorithm as well, in the last section.
Upvotes: 1