Mipmapping in a scalable view similar to google maps?
I have a huge map image (8192x6144px) which I'd like to display at scales ranging from 1x to 0.1x. At 1x this is about 24 mb using PVR 4-bpp compression--a little too much. So I'd like to load them at varying resolutions, depending on the map scale.
Does mipmapping accomplish what I need, which is to load/unload levels of mipmaps based on th开发者_C百科e map scale? From what I've read it sounds like all mipmap levels need to be loaded, and cannot be generated/released at runtime.
Well, technically, it can (you can select which one of the mipmap level you want to update / fetch from), but this leaves you with the initial problem : when you're at max zoom, you have to have the entire image in memory.
I can think of two options.
This first is a dynamic atlas texture, also known as megatexturing or virtual texturing. You'll find plenty of links on the subjects, but this is a little bit overkill for what you want.
The second is a standard LOD (level of detail). At zoom 0.1x, you draw only 1 quad, with a low-def texture. When you zoom in, you recursively split the quad depending on the distance to the camera (near = recurse more). For each medium or little quad, you create a new texture at the right resolution, and bind it.
So you'll have a series of 512x512 images, at different resolutions, organized in a hierarchy.
精彩评论