Jump to content
  • Advertisement
Sign in to follow this  
coollofty

Unity Who knows how to generate view frustum from some planes?l

This topic is 4148 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

One week ago I post a question there, the main content about clip view frustum against a portal, original thread link is : http://www.gamedev.net/community/forums/topic.asp?topic_id=433973 But nobody answer the last question that my post, so I have no choice but to post a new thread to continue this question. Because I really really dont know how to do :(

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
[google]

Share this post


Link to post
Share on other sites
Sorry man, I tried to reply to your PM a few days ago, but GD.net was being slow and never let me send the message, and I forgot. :(

Anyway, I just treat "frustum"s as a list of planes; that is, a frustum can be any number of planes (not just 6). I know it's technically not a frustum unless it's exactly six planes (in a pyramid with the top chopped off shape), but it works just fine for everything I'm using it for, and the 'meaning' remains the same.

Share this post


Link to post
Share on other sites
Quote:
Original post by PfhorSlayer
Sorry man, I tried to reply to your PM a few days ago, but GD.net was being slow and never let me send the message, and I forgot. :(

Anyway, I just treat "frustum"s as a list of planes; that is, a frustum can be any number of planes (not just 6). I know it's technically not a frustum unless it's exactly six planes (in a pyramid with the top chopped off shape), but it works just fine for everything I'm using it for, and the 'meaning' remains the same.


Technically, I don't think a frustum has to be pyramidal. It's just the part of a solid which lies between two parallel planes. Typically the viewing frustum has six sides, but after clipping it against a portal it could have any number. And if you have an infinite far plane, you might use a degenerate frustum with only one plane cutting the solid (the near plane).

Note that if you're implementing a portal engine, you may find it faster on modern hardware to do the clipping in screen space. I've never implemented the technique myself, but I believe in the past it's been recommended that a rectangle bounding the portal be projected into screen space. This is not an accurate bound, but with a modern GPU the overdraw is less significant than it once was.

Of course, you should profile the two methods yourself to decide which is appropriate for your needs.

[Edited by - MumbleFuzz on February 13, 2007 7:23:42 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!