Version: 2022.3
言語: 日本語
テクスチャのインポート
Default Import Settings reference

テクスチャのインポート設定

テクスチャの Import Settings ウィンドウは、Unity がプロジェクトの Assets フォルダーから Unity エディターに画像をインポートする方法を定義します。

このウィンドウにアクセスするには、 Project ウィンドウで画像ファイルを選択します。 Import Settings ウィンドウが Inspector に表示されます。

ノート: 一般にあまり使用されないプロパティの中には、デフォルトで非表示のものもあります。Inspector ウィンドウの Advanced をクリックすると、それらを表示できます。

テクスチャの Import Settings ウィンドウ
テクスチャの Import Settings ウィンドウ

テクスチャの Import Settings ウィンドウにはいくつかのセクションがあります。

(A) Texture Type - 作成したいテクスチャのタイプを選択します。

(B) Texture Shape - 形状を選択し、このエリアでその形状に固有のプロパティを設定します。

(C) Type-specific and advanced properties. Depending on what Texture Type value you select, extra properties might appear in this area.

(D) プラットフォーム固有のオーバーライド - プラットフォーム固有のオーバーライド パネルを使用して、特定のプラットフォームのデフォルトオプションとそのオーバーライドを設定します。

(E) テクスチャプレビュー - ここでテクスチャをプレビューし、値を調整できます。

Texture Type

Texture Type プロパティを使って、ソース画像ファイルから作成したいテクスチャのタイプを選択します。他のプロパティ画像のソースファイルから作成したいテクスチャタイプを選択します。テクスチャの Import Settings の他のプロパティは、設定した値によって変わります。

The following table lists the available texture types and explains their purpose.

プロパティ 機能
Default This is the most common setting used for all Textures. It provides access to most of the properties for Texture importing. For more information, see the Default Texture type.
Normal Map The Normal map texture type formats the texture asset so it’s suitable for real-time normal mapping. For more information, see the Normal map texture type documentation.

For more information on normal mapping in general, see Importing Textures.
Editor GUI and Legacy GUI The Editor GUI and Legacy GUI texture type formats the texture asset so it’s suitable for HUD and GUI controls. For more information, see the Editor GUI and Legacy GUI texture type documentation.
Sprite (2D and UI) The Sprite (2D and UI) texture type formats the texture asset so it’s suitable to use in 2D applications as a Sprite. For more information, see the Sprite (2D and UI) texture type documentation.
Cursor The Cursor texture type formats the texture asset so it’s suitable to use as a custom mouse cursor. For more information, see the Cursor texture type documentation.
Cookie The Cookie texture type formats the texture asset so it’s suitable to use as a light cookie in the Built-in Render Pipeline. For more information, see the Cookie texture type documentation.
Lightmap 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). For more information, see the Lightmap texture type documentation.
Directional Lightmap The Directional Lightmap texture type formats the texture asset so it’s suitable to use as a directional Lightmap. For more information, see the Directional Lightmap texture type documentation.
Shadowmask The Shadowmask texture type formats the texture asset so it’s suitable to use as a shadowmask. For more information, see the Shadowmask texture type documentation.
Single Channel The Single Channel texture type formats the texture asset so it only has one channel. For information on the properties available only for the this type, see the Single Channel texture type documentation.

Texture Shape

Texture Shape プロパティを使って、 テクスチャの形状や構造を定義します。4 つの形状タイプがあります。

  • 2D は、すべてのテクスチャにおいてもっとも一般的な設定です。画像ファイルを 2D テクスチャとして定義します。テクスチャを、他のプロジェクト要素の中の 3D メッシュや GUI エレメントにマッピングするのに使用します。
  • Cube defines the Texture as a cubemap. You could use this for Skyboxes or Reflection Probes, for example. This type is only available with the Default, Normal Map), and Single Channel Texture types.
  • 2D Array は、テクスチャを 2D テクスチャ配列 として定義しています。これは、同じサイズや形式のテクスチャを多数使用するようなレンダリング技術の最適化としてよく使われます。
  • 3D は、テクスチャを 3D テクスチャ として定義しています。3D テクスチャは、ボリュメトリックデータを表現するレンダリング技術の一部で使用されます。

キューブマップのマッピング

Cubemap 形状のテクスチャは、以下のプロパティでさらに細かく設定できます。

プロパティ 機能
Mapping Mapping を使用して、テクスチャをゲームオブジェクトに投影する方法を指定します。デフォルトでは Auto に設定されています。
Auto Unity はテクスチャ情報からレイアウトを作成しようとします。
6 Frames Layout (Cubic Environment) テクスチャには標準のキューブマップレイアウト (クロス、または、直列 (+x -x +y -y +z -z) ) のうち 1 つで用意された 6 つの画像が含まれています。画像は平行、または垂直、いずれかの方向になります。
Latitude Longitude (Cylindrical) テクスチャを 2D の緯度経度の表現にマップします。
Mirrored Ball (Sphere Mapped) テクスチャを球状のキューブマップにマップします。
Convolution Type Choose the type of pre-convolution (filtering) that you want to use for this Texture. The result of pre-convolution is stored in mips.
This property is only available for the Default Texture type.
None テクスチャにはプレコンボリューションがありません (フィルタリングなし)。これがデフォルトの設定です。
Specular (Glossy Reflection) キューブマップをリフレクションプローブとして使用します。テクスチャミップマップはエンジンの BRDF (双方向反射率分布関数) でプレコンボリューション (フィルタリング) されます。 詳しくは、ウイキペディアの Bidirectional reflectance distribution function を参照してください。
Diffuse (Irradiance) テクスチャはコンボリューション (フィルタリング) され照射します。これは、通常、キューブマップをライトプローブとして使用したいときに役立ちます。
Fixup Edge Seams この設定は、 NoneDiffuse コンボリューション (フィルタリング) でのみ可能です。これは、ローエンドのプラットフォームで、キューブマップの面が誤ってフィルタリングされるなどの、フィルタリングの制限の回避策として使用します。

2D 配列と 3D の列と行

2D 配列3D テクスチャのソーステクスチャファイルはセルに分割されており、これらのテクスチャはフリップブックテクスチャと呼ばれます。Unity がフリップブックテクスチャをインポートすると、各セルのコンテンツは、それぞれの 2D 配列階層または 3D テクスチャスライスに配置されます。

Texture Shape プロパティを 2D Array または 3D に設定すると、Unity は ColumnsRows プロパティを表示します。これらを使って、フリップブックのテクスチャをセルに分割する方法を Unity に指示します。

プロパティ 機能
Columns ソースフリップブックのテクスチャを分割する列数。
Rows ソースフリップブックのテクスチャを分割する行数。

例えば、8x8 セルのスモークエフェクトフレームを持つ画像は、デフォルトの 2D テクスチャとして次のように表示されます。

フリップブックの画像、2D の形状として
フリップブックの画像、2D の形状として

しかし、8 列 x 8 行の 3D テクスチャとして正しくインポートすると、次のようになります。

フリップブックの画像を 3D 形状として
フリップブックの画像を 3D 形状として

Type-specific and advanced properties

Depending on which Texture Type you select, different properties can appear in the Texture Import Settings window. Some of these properties are specific to the Texture Type itself, such as Sprite Mode available with the Sprite (2D and UI) type.

Use Advanced settings to make finer adjustments to the way Unity handles the Texture. The order and availability of these settings can vary depending on the Texture Type you choose.

For information on the properties for each texture type, see the documentation for that texture type:

プラットフォームに特化したオーバーライド

When building for different platforms, you need to think about the resolution, the file size with associated memory size requirements, the quality of your Textures, and what compression format to use for each target platform. The Platform-specific overrides panel provides one tab for the Default options, and one tab for every target platform you are building for. Some texture import settings can also be overridden globally in Build Settings, mostly to speed up iteration time during development.

プラットフォームに特化したオーバーライドパネル
プラットフォームに特化したオーバーライドパネル

オーバーライド値を設定するには、以下の手順を行います。

  1. Default タブでデフォルトのプロパティを設定します。
  2. 特定のターゲットプラットフォームタブに移動し、 Override For <ターゲットプラットフォーム> オプションを有効にします。
  3. オーバーライドのプロパティを設定します 。

次の表は、使用可能なプロパティを示しています。

プロパティ 機能
Max Size インポートしたテクスチャの最大サイズをピクセル単位で設定します。多くの場合、アーティストは巨大な寸法のテクスチャでの作業を好みますが、テクスチャを適切な寸法に縮小することができます。
Resize Algorithm テクスチャの寸法が指定された Max Size よりも大きいとき、テクスチャをダウンスケーリングするためのアルゴリズムを選択します。
Mitchell Mitchell アルゴリズムを使用してテクスチャのサイズを変更します。これはデフォルトのサイズ変更アルゴリズムです。
Bilinear バイリニア補間を使用してテクスチャのサイズを変更します。小さくシャープな詳細が重要な画像の場合、Mitchell よりも詳細さを維持できます。
Format 自動システムをバイパスして、テクスチャにどの内部形式を使用するかを特定します。使用できる形式のリストは、プラットフォームとテクスチャタイプによります。詳細は、プラットフォーム特化用オーバーライドのテクスチャ形式 を参照してください。

ノート: プラットフォームをオーバーライドしないときでも、このオプションは自動的に選択された形式が表示します。このプロパティは、特定のプラットフォームをオーバーライドしたときにのみ選択可能で、デフォルト設定では使用できません。
Compression テクスチャの圧縮タイプを選択します。これによって、Unity が、適切なテクスチャの圧縮形式を選択できます。プラットフォームや圧縮形式の使用可否によって、異なる設定でも、結果的に内部的に同じ形式になる場合があります。例えば、 Low Quality Compression はモバイルプラットフォームに効果的ですが、デスクトッププラットフォームには効果がありません。
None テクスチャを圧縮しません。
Low Quality 低品質の形式でテクスチャを圧縮します。メモリの消費量は Normal Quality よりも少ない場合があります。
Normal Quality 標準形式を使用してテクスチャを圧縮します。
High Quality テクスチャを高品質形式で圧縮します。 Normal Quality よりも多くのメモリを使用する場合があります。
Use Crunch Compression 使用可能な場合は、クランチ圧縮を使用します。クランチは DXT テクスチャや ETC テクスチャの圧縮に使用できる不可逆圧縮形式です。テクスチャは CPU で DXT か ETC に解凍され、ランタイムに GPU に読み込まれます。クランチ圧縮は、ディスク上やダウンロード時に使用するスペース量をできるだけ少なくしたいときに役立ちます。クランチテクスチャは、圧縮するのにかなり時間がかかりますが、ランタイムでの解凍は高速です。
Compressor Quality クランチテクスチャ圧縮では、スライダーを使って品質を調整することができます。高品質な圧縮は、より大きなテクスチャや、より長い圧縮時間を意味します。

ノート: ** Android プラットフォームの場合、CompressorQuality の値は少し異なるオプションになります。詳細については、プラットフォーム固有のオーバーライドのテクスチャ形式 を参照してください。 | | Split Alpha Channel**
Allows alpha splitting for this Texture on these platforms: tvOS, iOS, and Android. For more information, see the Notes on Android for Texture compression formats.
Override ETC2 fallback ETC2 texture decompression fallback override on Android devices that don’t support ETC2.

Allows to choose which texture format to decompress the texture to on Android devices that have no ETC2 texture format support. For more information, see the Notes on Android for Texture compression formats.


  • クランチ圧縮形式は 2017.3 で更新NewIn20173
  • Ignore PNG ファイルガンマを無視は 2020.1 で追加NewIn20201

TextureImporter

テクスチャのインポート
Default Import Settings reference