Mipmapping / level of detail for assets loaded

I have maybe made the bad assumption that mipmapping with Defold was being used as an optimization method (texture streaming) with textures to only load as large versions of textures as are needed, and not load largest versions of textures. I’m now assuming this is wrong, because I can’t find confirmation, but could I get confirmation? Are there any level of detail optimizations for loaded resources like this or is it all or nothing with how textures are processed in the texture profiles, and in that case enabling mipmaps would only increase total memory size?

The proper way to deal with this is the have multiple collections with different sizes of textures within, multiple sizes need to be made manually for apps to be able to target different device sizes from the same binary? Or am I wrong about being wrong?

For now, we include all of the mipmap levels when building the content, as well as when loading the textures when the game is running. So the cost is roughly 1.3x-2x, depending on the width/height ratio of the textures. The plan is to fix this in an automated fashion, something like not loading larger mipmap levels on some platforms. Bottom line is that you should not have to deal with it in terms of how you are building your content.

2 Likes

so the workflow would be to design your textures/assets in the largest possible format and mipmaps are generated for lower res version?

Let’s say, design for iphone plus resolution?

Maybe in the texture profiles be able to define tags for sets of resources, and then be able to in scripting be able to define the maximum level of detail allowed to use. This way we can detect screen size, auto set highest level of detail that makes sense for sets of textures, and allow users to force higher resolution too.

Exactly, highest res and then strip that out when not applicable. The details will be worked out as we start working on the design.

3 Likes