Jump to content
  • Advertisement
Sign in to follow this  
polyfrag

Fast terrain mesh collision detection

This topic is 2042 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'm thinking if using a mesh instead of a heightmap for terrain because I can add detail where needed like mountains and add overarching ridges. How would I do fast collision detection with it, on the magnitude O(1) like a heightmap if possible? Also if you can advice about having a large terrain the size of a basin for a greater city region (I want to eventually make a city-building/RTS game).

Share this post


Link to post
Share on other sites
Advertisement
you won't be able to get O(1) without using a uniform technique. you could use voxels, with marching cubes algo to smooth out the geometry. as voxels are partially an extension to the theory behind heightmaps(uniform grids).

with appropriate scene subdividing, and using things like k-trees, and AABB's for initial detection, you can quickly throw out many cases where collision does not occur very fast. from there you have to use refined techniques, such as OBB, or convex hulls for more refined collision detections, and then apply an appropriate reaction.

I'd recommend using an actual physics library such as bullet if your game is heavy on collision detection, and your looking for realistic physic results. Edited by slicer4ever

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!