Introduction to mipmap streaming
Configure mipmap streaming
Enable mipmap streaming
To enable mipmap streaming, follow these steps:
- Go to Edit > Project Settings > Quality.
- In the Textures section, enable Mipmap Streaming.
By default, this enables mipmap streaming for all the camerasA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary in your project.
In the Editor, mipmap streaming is active in both Edit mode and Play mode by default. For more information about configuring mipmap streaming in the Editor, refer to Editor settings
Make a texture work with mipmap streaming
Follow these steps:
- Select a texture asset in the Project window.
- In the Texture Import Settings window, select Advanced to open advanced settings.
- Ensure that Generate Mipmap is enabled.
- Enable Stream Mipmap Levels.
If you build your project for Android, you must also follow these steps:
- Open the Build Profiles window.
- Set CompressionA method of storing data that reduces the amount of storage space it requires. See Texture Compression, Animation Compression, Audio Compression, Build Compression.
See in Glossary Method to LZ4 or LZ4HC.
Lightmaps
To enable mipmap streaming for lightmapsA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary, follow these steps:
- Go to Edit > Project Settings > Player.
- In the Other Settings section, enable Lightmap Streaming.
You can edit the mipmap streaming settings of the lightmap assets in the same way that you can edit settings of any other texture, but they reset to their default values when Unity regenerates the lightmaps. To solve this, you can tell Unity to apply these values when it generates the lightmaps. Use the Lightmap Streaming Enabled and Streaming Priority in the Player settings window.
Custom meshes
If you create a custom meshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary in a Unity script, Unity doesn’t automatically calculate the UV density of the mesh. This means Unity loads the wrong mipmap levels.
To prevent this, do either of the following:
Unsupported objects
Unity can’t automatically calculate the correct mipmap level for textures on some objects, because it can’t get the mesh and UV data it needs from them. This includes objects such as:
-
Decals textures.
- Reflection ProbeA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More info
See in Glossary textures, because they use mipmap levels to store lookup tables for material roughness.
- SpritesA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary, which use a Sprite RendererA component that lets you display images as Sprites for use in both 2D and 3D scenes. More info
See in Glossary component.
- Objects rendered with Entities Graphics.
- Objects that generate their geometry procedurally at runtime, such as Particle SystemsA component that simulates fluid entities such as liquids, clouds and flames by generating and animating large numbers of small 2D images in the scene. More info
See in Glossary, Visual Effects, Line RenderersA component that takes an array of two or more points in 3D space and draws a straight line between each one. You can use a single Line Renderer component to draw anything from a simple straight line to a complex spiral. More info
See in Glossary, and Trail RenderersA visual effect that lets you to make trails behind GameObjects in the Scene as they move. More info
See in Glossary.
- ShadersA program that runs on the GPU. More info
See in Glossary that use UV texture coordinates in a channel other than Mesh.uv (also called UV0).
- Shaders that change texture coordinates other than scale and translation.
For these objects, set the mipmap level manually. If you don’t do this, Unity uses low-resolution mipmap levels, which might display as blurry depending on the distance from the camera. Refer to Override the mipmap level of a texture.
Additional resources
Introduction to mipmap streaming
Configure mipmap streaming