Suppose I have a three-dimensional model:

The model is defined as vertices, faces (all triangles) and normal vectors. The model may have holes and / or transparent parts.
For an arbitrarily placed light source at infinity, I must determine:
- [ required ] whose triangles are (partially) obscured by other triangles
Then for partially shaded triangles:
- [ bonus ] what part of the area of โโthe triangle is shaded
- [ superbone ] came up with a new grid that accurately describes the shape of the shadows
My latest application should run on headless machines, i.e. they don't have a GPU . Therefore, all the standard things from OpenGL, OpenCL, etc. May not be the best choice.
What is the most efficient algorithm for determining these things, given this limitation?
source share