Jump to content
  • Advertisement
Sign in to follow this  

Subdividing and slicing meshes by border

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

I am working on a strategy game that has the 'province' aspect (selectable regions), but want to use terrain underneath the provinces.

Say, I have a heightmap of the Earth. Under a simple concept, each pixel represents a quad (two triangles). A province could be drawn anywhere on this heightmap using vertices that are connected. Provinces would not be guaranteed to be convex. There could be any number of vertices within any pixel. Now, to generate a height-accurate border, you would obviously add vertices along the drawn border at every intersection point between pixels. The issue then becomes: how do I generate the geometry -within- the drawn border that would match the underlying heightmap? Basically, I want to cut a 'slice' out of the terrain based on given edges for the slice.

What would be the best way to do this?

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.

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!