Sign in to follow this  
Hiyar

Terrain Picking Optimization

Recommended Posts

Hi, I have a vertex texture based terrain, meaning I'm using a heightmap texture in the shader. For terrain picking I'm using traditional approach, with quadtree aabb ray intersection, then in the leafnode triangle ray intersection. I was wondering if there is a better method for terrain picking that works with vertex texture based terrain without intersection tests? Thanks

Share this post


Link to post
Share on other sites
The way I've always done is to read back the value under the cursor from the depth-buffer and convert it to a world-position. If i need to perform any ray casting for object selection etc, then it's really simple to do using this approach.

Share this post


Link to post
Share on other sites
Thanks

Well, the depth buffer method is explaned in this paper -> Click

And it is mentioned that there are some drawbacks. Do you have this issue with overlapping geometry?
Also, I'm using DirectX and want to do this API independent.
I thought there might be a simple method, that uses terrain heightmap directly to get the picking position.

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