If one looks at a program like terragen, it uses an 8 bit greyscale image to generate a landmass profile. I do the same in my software. When one uses a 3d texture, it is done to generate a bumpmap or surface roughness. When using a texture to represent a terrain, one cannot use the texture directly. What one must do is generate a trianglestrip. One goes from one pixel of the texture to the next and one would use four pixels to generate a square consisting of 2 trangles bonded diagonally. Then one generates the next square patch from four pixels, and so on and on till u have constructed a mesh that matches the data. If u look at my site on page http://www.zr6bri.co.za/
But there is no magical process that will create a 3d mesh from a texture map. That u gotta do in your own code. Does this help you. If not, please ask your question in a differnt way. Thanks. Regards Mike.
Main Topics
Browse All Topics





by: thegilbPosted on 2007-05-16 at 10:19:06ID: 19102522
3D textures consume a ton of memory and you'll need a relatively modern graphics card to have any hope of decent performance. The method is not dissimilar from working with 2D textures. Try downloading the DirectX9 SDK if you haven't already and look through an example program which loads a 2D texture. You can adapt the code to create a 3D texture, and then you can lock the pixels to update it, and unlock them to render it.
Very simple :-)