Sign in to follow this  
Matt Aufderheide

Hardware displacement and collision

Recommended Posts

(This may not be exactly the correct forum, but involves shaders and graphics programming, so i think its appropriate.) My problem is how to best determine collisions when using geometry clipmaps, or essentially, terrain with hardware displacement mapping through vertex textures. One cant use normal collision methods when using vertex displacement, so some other, possibly shader-based system may have to be employed. The main problem is to determine the correct height for various objects, and to handle collision with the terrain. While objects can certainly be displaced in the same way as the terrain, perfectly matching the terrain height, this height shift exists only in hardware, and has no meaning for the game/app code. my first thought was to use the heightmap to determine object placement and detect collison, but this has proven unsatisfactory because the height calculated in the game according the heightmap seems not to always corrispond exactly with the displaced terrain. Now i wonder perhaps if collision can be determined in hardware, using a simple vertex shader, and return the data using a small floating point render target.. How have others dealt with this issue? Am i missing something?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this