Mip Maps do not save any VRAM memory in build, memory snapshot profiler - Riddle

Hi there! (check image below) I am trying to understand why Mipmaps do not reduce VRAM need when a texture is loaded on an object; Isn’t this what they are supposed to do? I heard lots of things (conflicting things) about Mip maps; it’s supposed to reduced VRAM memory need by loading the ‘lowest’ mip map - from the view (camera distance to object with texture on it); this low Mip Map is a ‘low res texture’ of the Full Texture…so this mip map is loaded when (camera) is ‘far’ from an textured object/the object is far in the distance – hence, only needing a low res texture/low mip map…

But, that’s not what’s happening – in the build; I checked in the editor, and I can see that the lowest mip map is loaded; I tried this example:

I put a camera very far from a plane; made a plane…with a texture on it…with streamed mip maps…I checked in the game view…and clearly, the texture on it is very low res — the lowest mip map (loaded…because the camera is Very Far…from the object);

Then, I build this, made a ‘developer build/deep profiling build’…then, I connected the build – to the Unity ‘memory profiler’; I selected to use the ‘Build’ / to get a snaptshot out of it… and clicked ‘Capture Snapshot’…and it made a snapshot.

Then, I hopened the snapshot (in memory profiler)…and checked the list of things in it…

It says: Texture2D (the texture is named: ‘test3d’) - 10.7MB…it makes no sense, this texture is 4K (4096x4096) resolution, with Streaming Mip Maps On…on it…
The Camera is Very Far…and shows the lowest mip map is loaded…then why does it say 10.6MB…that,s the Full Texture Size…in VRAM memory…

Plus, I know it’s the full texture in VRAM (and not Only the Mipmap)…
because, when I Remove mip maps…(untick ‘streaming mipmaps’ and ‘generate mipmaps’… in texture inspector)…I get 8.6MB…which is the Full Texture in VRAM (I use BC1|DC1 100% crunch compression…which reduces the texture to 8MB in VRAM (instead of 16MB…for a 4K resolution texture); then, when is it still Full 8MB in VRAM…if it’s loading not even a ‘128x128’ pixel ultral-low res ‘mip map 10’…???

If it were correctly 128x128…it would show only, like, 100kb…or 0.1MB… VRAM use for this texture – as in, ONLY, the mip map is loaded…not the Full Texture???

Please, if only can explain, because; I mean I’m going to use Mip Maps…but not if does this…I mean, there is - 0 - reduction of VRAM…by these mip maps…in fact, Mip maps incur 33% more Memory VRAM need…(when I tick off mip maps…I get 8 MB…when I tick on mip maps – I get 10.7, 11.7…which is, about 33% more VRAM memory due to ‘Generating mip maps’…

In my game, I cannot use Virtual Textures – which would save me a ton VRAM (Since I have 20s of thousands of textures 4K 8K…); so I am trying to reduce VRAM need (since I get use Virtual Textures, had tons of problem and the quality is awful); so I am stuck using regular textures loading on VRAM… they cost much more VRAM (than Virtual Textures); thus, to me, 33% increase in VRAM…by doing mipmaps is massive (33% x 20,000 textures…= a lot); I would only do it…if it Reduces the VRAM – by Loading ONLY the mip maps…that are needed…not loading the Entire texture in memory in the build??? It defeats the point of mip maps…if in the case it does not Only Load mip maps (not full texture in VRAM)?..20,000 textures x mip maps = saving a lot of VRAM…not if the textuers are Fully Loaded…and the mip maps are not.
I know that mip maps are ‘camera dependent’…as in if very close the camera, the mip map loads ‘mip map 0’ pretty much the Full Texture…I put a camera Very Far…to load Only the mip map…and it does not -only- load mip map…of the texture;; it loads the Entire Texture in memory in the build…Even If…the camera is very far from the object with texture on it???

As you can see the snap shot is grey with a little white sqaure (on the top left corner of the provided screenshot of it; where it says ‘Snapshot - 6384’), you see a little white square in the grey rectangle; the rectangle is the camera view…the lil white square is – the plane, with the texture on it…viewed, from afar (by camera).

Do you think this is some bug from the ‘memory snap shot profiler’?..
Or why is the full texture loaded?..if mip maps supposedly reduce VRAM (when camera is far and loads only?? a low mip map)…they don’T…from this memory snap shot capture of the final build.

Thank you very much for any help.

No, not at all. Where did you get the idea from that mipmaps should save memory? The opposite is the case. You may want to start reading the wikipedia article about mipmapping. To quote the most important parts:

They are intended to increase rendering speed and reduce aliasing artifacts.

Since mipmaps, by definition, are pre-allocated, additional storage space is required to take advantage of them.

Mipmaps are not intended to reduce memory overhead. Actually in most cases, especially when anisotropic filtering is used, the memory overhead would grow at least 33% or up to 300% (4 times with the anisotropic filtering)

ps: Maybe you were thinking about Unity’s Mipmap streaming solution? If you don’t use that, the texture with all mipmap levels would be loaded regardless.

The Memory Profiler version/Unity version you’re using doesn’t actually distinguish between RAM vs VRAM as it doesn’t have that information yet. That was added in 2022 and version 1.0 of the Memory Profiler. So this could be CPU memory for all we know, and the CPU will need to have all of the mipmaps handy in case the GPU needs it.

PS: Answer from halley on Forum, says that mip maps are not loaded in GPU VRAM…thus they do not save any memory.