|
From: Keith W. <kw...@cs...> - 2004-07-13 04:55:12
|
I have a trimesh with a texture. Actually, I have lots of these. In the distance from the camera position I want to use lower res textures on the object, basically lower dimension textures. For the moment, I am considering not scaling down the mesh geometry by removing less crucial vertices and triangles, just downsampling the texture. I think there are three ways to do this. One is to use a mipmap and let Quesa automatically generate the downsampled mipmaps. One is to create my own downsampled images and not let Quesa generate mipmaps (I know how to do this) and transfer them to the trimesh whenever the distance passes a crossover distance designating a switch in resolutions. I think this requires copying the array of the new dimension texture into the texture shader pixel array. I don't think there is any way to simply point the texture shader at a different downsampled array. I think I have to copy the whole thing over. The last way is to create multiple trimeshes during initialization, each one containing identical geometry by varying dimensions of texture. I then only submit the trimesh that is appropriate for the present distance at any given time and ignore the other trimeshes until I need them for their respective distances. Question 1: how wasteful is it to have extra trimeshes of identical geometry floating around in memory. Is that just stupid, to have trimeshes of identical geometry and just different textures? Question 2: of these three methods, which is best, which is fastest? Question 3: is there a fourth way to do this that I haven't thought of? Thanks. ________________________________________________________________________ Keith Wiley kw...@cs... http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley "Yet mark his perfect self-contentment, and hence learn his lesson, that to be self-contented is to be vile and ignorant, and that to aspire is better than to be blindly and impotently happy." -- Edwin A. Abbott, Flatland ________________________________________________________________________ |