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:

有帮助吗?

解决方案

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/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top