Jump to content
  • Advertisement


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


3D Clipping question

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

Ok guys, quick question. I'm writing my first 3d engine, real simple stuff. Flat shaded, nothing but triangles. Anyway, before making my poly list to send to the renderer, I have a simple 3d clipping filter. It excludes all polys outside the near and far clipping frustums, and the viewing planes. The problem is, I need to remove any poly that has even one vertice behind the near clipping frustum, or the projection will get all screwed up. How would I implement proper projection if a poly is partway past the clipping frustum, for example if there are two tris making a rectangular floor and the camera is in the middle? I've never actually seen anyone address this problem. For further clarification, here's a little diagram hope you're not using proportional fonts)

Camera |---->
| _____|_____ <- tri

There's gotta be a way to properly transform the tri, even though one of the vertices is behind the near frustum. Anyone have any suggestions?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!