|
From: Keith W. <kw...@cs...> - 2004-07-13 18:19:22
|
On Tue, 13 Jul 2004, Frank C wrote: > On 13-Jul-04, at 1:36 PM, Keith Wiley wrote: > > > On Tue, 13 Jul 2004, Frank C wrote: > > > >> To get back to the original topic of this post, I think your reasoning > >> for wanting mipmapping may be flawed - it's probably faster to simply > >> _not_ use mipmapping at all, at the cost of image quality. > > > > By which you mean that I should use pixmaps and let the engine do it > > automatically, or you mean I shouldn't be decreasing resolution when an > > object is distant from the camera? > > To not use mipmaps you create a mipmap texture and set it's > useMipmapping field to false... (I know it sounds weird to use a mipmap > texture when you don't want mipmaps but that's how it's done). No, I understand this fine. Thanks. This is how I've done it so far. I create multiple trimeshes and attach different res textures. Then each frame I only submit the trimesh that corresponds to the proper distance, with lower res trimeshes appearing in the distance and the highest res trimesh appear underneath the user's camera position. I can do it this way, but if there are built in routines for doing this stuff, it seems wasteful to have spare trimeshes hanging around for no reason, especially if I am not presently reducing the vertex geometry of the trimesh itself (which is a later plan, but for now I'm not worrying about it because of the hassle of cleanly blending edges of terrain tiles that are presented with differing geometry resolutions). > Depending on your needs this may indeed be faster than letting > Quesa/OpenGL handle it, since you can control exactly how many textures > to use whereas Quesa always uses a full set. I'm actually very > surprised you see a speed up when using more textures rather than just > using one, but maybe your full-size texture is a little much for your > hardware, or it's being uploaded more often than it needs to be. Sorry, I don't think I'm explaining it properly. It's not too surprsing to me. Each render cycle I calculate the distance from the camera to the terrain tile in question (there are several tiles active at any given time of course). Each tile has multiple trimeshes, each with a texture of different size attached to it. I only submit the trimesh that is appropriate for the distance. Clearly, the rendering is faster because many of the distant objects are mapping very very small textures to their surfaces. It's a much smaller buffer of pixel values to have to look through for surface values. Makes sense to me that it would be faster. It offers a serious speedup, I don't remember what factor right now. ________________________________________________________________________ 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 ________________________________________________________________________ |