Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Lightmap texture Import Settings window reference

Explore the settings for a lightmap texture.
Read time 1 minuteLast updated 19 days ago

The
Lightmap

?

texture type formats the texture asset so it's suitable to use as a Lightmap. This option enables encoding into a specific format (RGBM or dLDR depending on the platform) and a post-processing step on texture data (a push-pull dilation pass). Unity locks Texture Shape to 2D for this texture type. For more information, refer to Texture Shape.

Property

Description

Non Power of 2
Specifies how Unity scales the dimension size if the texture source file has a non-power of two (NPOT) dimension size. For more information on NPOT dimension sizes, see Importing Textures.
  • None: Texture dimension size stays the same.
  • To nearest: Scales the Texture to the nearest power-of-two dimension size at import time. For example, a 257x511 px Texture is scaled to 256x512 px.
  • To larger: Scales the Texture to the power-of-two dimension size of the largest dimension size value at import time. For example, a 257x511 px Texture is scaled to 512x512 px.
  • To smaller: Scales the Texture to the power-of-two dimension size of the smallest dimension size value at import time. For example, a 257x511 px Texture is scaled to 256x256 px.
Read/Write
Indicates whether to access the texture data from scripts using
Texture2D.SetPixels
,
Texture2D.GetPixels
and other
Texture
methods. Internally, Unity uses a copy of the texture data for script access, which doubles the amount of memory required for the texture. This property is therefore disabled by default. However, if you're using the Particle System Shape Module or Terrain Paint Detail component, then you must enable this setting for Unity to build your project. For more information, refer to
Texture.isReadable
.
Generate Mipmap
Indicates whether to generate a mipmap for this texture.
Mipmap Limit
Disable this option to use all mipmap levels, regardless of the Mipmap Limit settings in the Quality menu. This property only appears if you set Texture Shape to 2D or 2D Array. Other texture shapes always use all mipmap levels.
Mipmap Limit Group
Select the Mipmap Limit group this texture should be part of. The default option is None (Use Global Mipmap Limit). This property only appears if you set Texture Shape to 2D or 2D Array. Other texture shapes always use all mipmap levels.
Mipmap Filtering
Specifies the method Unity uses to filter mipmap levels and optimize image quality. This property is visible only when Generate Mipmap is enabled.
  • Box: Makes mipmap levels smoother as they decrease in dimension size.
  • Kaiser: Runs a sharpening algorithm on mipmap levels as they decrease in dimension size. Use this option if your textures are too blurry when far away. The algorithm is of the Kaiser Window type. For more information, see Wikipedia.
Preserve Coverage
Indicates whether the alpha channel in generated mipmaps preserves coverage during the alpha text. For more information, see TextureImporterSettings.mipMapsPreserveCoverage. This property is visible only when Generate Mipmap is enabled.
Alpha Cutoff
The reference value that controls the mipmap coverage during the alpha test. This property is visible only when Preserve Coverage is enabled.
Replicate Border
Indicates whether to stop colors bleeding out to the edge of the lower mipmap levels. This is useful for light cookies.
This property is visible only when Generate Mipmap is enabled.
Fadeout to Gray
Indicates whether mipmap levels should fade to gray as the mipmap levels progress. This is useful for detail maps. The left-most scroll is the first mipmap level to begin fading out. The right-most scroll defines the mipmap level where the texture is completely grayed out. This property is visible only when Generate Mipmap is enabled.
Ignore PNG Gamma
Indicates whether to ignore the gamma attribute in PNG files.
This option is only visible if the texture source file is a PNG.
Swizzle
Specifies how to order the texture source file color channel data.
Wrap Mode
Specifies how the texture behaves when it tiles.
  • Repeat: Repeats the texture in tiles.
  • Clamp: Stretches the texture’s edges.
  • Mirror: Mirrors the texture at every integer boundary to create a repeating pattern.
  • Mirror Once: Mirrors the texture once, then clamps it to edge pixels. Note: Some mobile devices don’t support Mirror Once. In this case, Unity uses Mirror instead.
  • Per-axis: Provides options you can use to individually control how Unity wraps textures on the u-axis and v-axis.
Filter Mode
Specifies how Unity filters the texture when the texture stretches during 3D transformations.
  • Point (no filter): The texture appears blocky up close.
  • Bilinear: The texture appears blurry up close.
  • Trilinear: Like Bilinear, but the texture also blurs between the different mipmap levels.
Aniso Level
Controls the texture quality when you view the texture at a steep angle. Anisotropic filtering is good for floor and ground Textures but is resource intensive. For more information, see Importing textures.
In addition, you can use the Platform-specific overrides panel to set default options and overrides for specific platforms.