Mipmaps / zooming

does anyone know if you can map a 512 x 512 image into a 256 x 256 viewport and then increase the mipmap gradually to give a zooming effect. I need to get more resolution as I zoom in.
ie image 512 X 512
_______________________
|\ /|
| \ ________________ / |
| | | |
| | 256 X 256 | |
| | | |
| | | |
| /|| |
|/
_____\

sorry about the example it did’nt display right.

Originally posted by MACCERS:
[b]does anyone know if you can map a 512 x 512 image into a 256 x 256 viewport and then increase the mipmap gradually to give a zooming effect. I need to get more resolution as I zoom in.
ie image 512 X 512
_______________________
|…/|
|…________________ /.|
|…|…|…|
|…|…256.X.256…|…|
|…|…|…|
|…|…|…|
|…/||…|
|/
_____[/b]

Not sure, I’m working on the same idea. I’ve been told that if your using mipmaps that the mipmap takes the best fit for the viewport. so your 512512 image should map into 256256. I’m not sure if you can increase the image mipmap? Sorry if you know this already.
A05087

Originally posted by MACCERS:
[b]does anyone know if you can map a 512 x 512 image into a 256 x 256 viewport and then increase the mipmap gradually to give a zooming effect. I need to get more resolution as I zoom in.
ie image 512 X 512
_______________________
|\ /|
| \ ________________ / |
| | | |
| | 256 X 256 | |
| | | |
| | | |
| /|| |
|/
_____[/b]

I’ve had a go at it and it maps the whole image onto the 256 x 256. Is it something to do with the viewing?

i dont get it… what does mipmaps has to do with zooming?

mipmpas are just smaller versions of the original texture, and are used for minimize flickering and increase cachehits when the texturewill be drawn on screen as a smaller image than the resolution originally is.

if you want to zoom, just scale the quad you are mapping the texture on.

[edit]
Didnt read the question properly
if you should increase the resolution, and still not store the whole texture, specify WHERE you should zoom, and create a new texture in that area, use blending to fade up the smaller image when it seams appropriate, and when the new textuer fills the screen you can stop drawing the old one. then have another texture of a smaller place and continue… this has been done a number of times, and are almost invisible…

check out ‘contour’ from the black lotus http://www.tbl.org/pcdemo2.htm

[This message has been edited by Mazy (edited 12-17-2002).]

Mazy can you expand in more detail?

for example, to zoom into a forest…

you need a few textures for this.
all textures have the same dimensions

  1. a texture of the forest.
  2. a texture of a tree in the forest but here the tree fills the whole texture.
  3. a textuere of a branch of the tree, still this texture fills the whole texture, thus beeing much higher detailed than before.
  4. maybe an insect on the branch.

tehn teh booring job, put each texture on a unique quad… and place/zoom the quads so that the different images fits perfectly on the one underneath ( the less detailed ones).

Then just zoom and translate all textures so that you moves to the higher detailed image all the time…

this will look like a infinte zoom of several thousand magnification…

just add a few more detaild images ( the eye on the insect, the cellstructure of the eye, the atoms in the cell) and you have a very large magnification factor…

Cheers mazy I’ll try it out!

Originally posted by Mazy:
[b]for example, to zoom into a forest…

you need a few textures for this.
all textures have the same dimensions

  1. a texture of the forest.
  2. a texture of a tree in the forest but here the tree fills the whole texture.
  3. a textuere of a branch of the tree, still this texture fills the whole texture, thus beeing much higher detailed than before.
  4. maybe an insect on the branch.

tehn teh booring job, put each texture on a unique quad… and place/zoom the quads so that the different images fits perfectly on the one underneath ( the less detailed ones).

Then just zoom and translate all textures so that you moves to the higher detailed image all the time…

this will look like a infinte zoom of several thousand magnification…

just add a few more detaild images ( the eye on the insect, the cellstructure of the eye, the atoms in the cell) and you have a very large magnification factor…[/b]