[UE5.2]How to save custom texture MIPS?

I’m generating my own texture MIPS, but I can’t seem to save them. Every time I save, it regenerates the MIPS and overwrites what I created.

I tried writing to the source mips. That doesn’t work. I then tried compressing the data to DXT1 and saving to the PlatformData’s BulkData MIPS and this does show up correctly in the texture viewer. But if I reload the editor, it’s all gone. The highest resolution does stay, but I believe that’s because it grabs the data from the source, but not any of the other mips.

I also don’t know how to limit the number of mips. I need to limit it to 7, but it keeps going to 13.

Anyone know how to save mips? This is editor only BTW.

Been searching for this for several days and just as I post this, I found the answer.

There’s an option “Mip Gen Settings” that you can set to LeaveExistingMips.

In C++, it’s:

IOTexture->MipGenSettings = TMGS_LeaveExistingMips;

And for the number of mips, just delete the ones you don’t want:

Assuming you filled in the source mips…

  while (IOTexture->GetPlatformData()->Mips.Num() > IOTexture->Source.GetNumMips())
    IOTexture->GetPlatformData()->Mips.RemoveAt(IOTexture->Source.GetNumMips());
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.