Archived

This topic is now archived and is closed to further replies.

Polygon-to-Polygon Line Of Sight?

This topic is 6279 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Anyone willing to give me some tips or point me in the right direction for info on performing poly-to-poly line of sight tests? If it helps any, the purpose of this test is for PVS construction. I''m subdividing a world (made up of tri''s) against a grid. Then, for each region, I use the region''s bounding edges (i.e. the 6 edges of the cube) as portals into the neighboring regions. Thus, each region can contain a number of unsorted convex poly''s that can occlude region-to-region visibility. For the time being, I''m work on what amounts to a brute force (read: stupid) method. I start at an extreme angle of visibility between the portal-poly''s, and render the poly''s between the them into a scanline span buffer, and see if the portal I''m testing against is occluded. If it is, I decrement the angle, and test it again (and again and again), until I''ve either exhausted all the angles of vision between the portals or find the an angle where there isn''t complete occlusion. As is pretty obvious, this method will require quite a few rendering passes, and is only as accurate as the granularity of my scanline and ray spacing. While I can think of a few things to speed up early out testing, I''d rather not try to optimize a crappy algo in the first place. So, if anyone has any tips or info they can point me to, I''d *really* appreciate it. C=64 ps. Since I''m dealing with regions that contain a small subset of the what the entire world holds, it shouldn''t be too difficult for me to brute-force sort the poly''s in each region in relation to each of the 6 portals for these pre-calculations, if need be.

Share this post


Link to post
Share on other sites
I hope I understand you problem. I was working (in theory only) on a similar problem. I was designing a landscape visibility occluder. The one that appealed to me the best is known as a beamtree, which I think you might be interested in.

for a better explaination see flipcodes ..."harmless algorithms"



Share this post


Link to post
Share on other sites
Thanks for the reply Gimp.

Yeah, I also looked at Harmless''s "Fine Occlusion Culling Algorithms", and was (at first) very excited about beamtrees.

However, as Harmless is currently describing it, beamtrees are viewpoint (rather then viewport) centric. So, if I were to use beamtrees (as described), I''d still have to do the slew of varying angle tests, since I want polygon-to-polygon visibility, as opposed to point-to-polygon visibility.

Thus, the only problem really solved is the scanline stepping accuracy, leaving the (much) bigger problem of the ray stepping and large number of rendering passes.

I also posted this question on FlipCode''s message board, and got a response from DirtyPunk that you may find useful.


C=64

Share this post


Link to post
Share on other sites