Ignacio Castaño wrote:
> instead of a 'real' frustum to frustum test you could try to test four
> triangles against the view frustum, that's easy to code, and should be
> faster than testing your world against both frustums. Anyway i have to
think
> further about that.
i will clarify:
if the camera is inside the frustum of the light, you definitely have to
test the faces against both the view, and the light frustum.
if the camera is outside the light, i have to test if the light and frustum
intersect, to know if the light affects to any of the polys inside the
camera. If they do not intersect, the light can be ignored.
to do that, i do the view frustum test first, and mark the visible faces and
the visible nodes of the hierarchy.
then i cull against the ligth (sphere, cone or frustum), testing only the
visible nodes and set a second flag of the visible faces.
and then i test both face flags for each face.
> That won't cut it. If I understand you correctly, you want to replace the
> light frustum with the 4 triangles which represent the surface of its
> pyramid. But you have to test entire volumes for such culling, otherwise
> you will have false rejects. Example: Entire view frustum inside light
> volume. This may not seem highly likely, but I could imagine a situation
> where you are facing away from a car's headlight which is right behind
you.
yes, but that's the easy case!
> Maybe I should not have been so quick to discard your idea. If I combine
it
> with a vertex-frustum containment test, it will eliminate most false
> negatives. I could then be convinced that it is at least practical enough
> to try. :-)
exactly! ;-)
> Another possible alternatives to the separating axis approach which is
> becoming easier to compete with due to the high number of possible axes
> would be to do the frustum vs frustum test in the homog. clip space of one
> of them, transforming the other frustum into a general 5 or 6 sided
> polyhedron in the process.
yes, the idea is interesting, but my maths are starting to flaw... How do
you transform a plane to homogeneous space? And after that you just need to
do a simple box to frustum test, right?
Ignacio Castaño
castano@...
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|