Question

I'm trying to use heightmap to visualize the data from Kinect (heightmap + color image). To do this I need to be able to update the heightmap frequently. Direct memory access would be nice (pointer or array).

Obviously terrainModel = Content.Load("Models\terrain"); won't do as it loads one static heightmap.

How can I achieve this? Alternatively, what is the best way (in XNA) to display a picture in 3 dimensions?

Examples of similar things others have done:

Was it helpful?

Solution

One approach is to maintain the heightmap position data in a texture. This texture can be passed into a shader and used to render the position of the terrain

This tut should give you an idea on how to do this. The obvious caveat is that this particular example is using a static texture for the displacement map, where you want to generate that texture dynamically:
http://www.catalinzima.com/tutorials/4-uses-of-vtf/terrain-rendering-using-heightmaps/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top