ライトマップには、Directional (指向性) と Non-Directional (非指向性) の 2 つの Directional Modes があります。どちらのモードも、Unity の Enlighten Realtime Global Illumination システムのリアルタイムライトマップ、および Unity の Progressive Lightmapper のベイクしたライトマップと互換性があります。デフォルトのモードは Directional です。
指向性ライトマップをベイクすると、Unity は 2 つのライトマップテクスチャを生成します。1 つのテクスチャには、ターゲットのサーフェス全体で受け取ったライトの強度と色に関する情報が格納されます。これは非指向性ライトマップと同じです。もう 1 つのテクスチャには、主なライトの方向と、その主な方向から受けた光が全体のどのくらいの割合を占めるかを表す係数が格納されます。
この画像の樽には、非指向性ライトマップがベイクされています。
この画像の樽には指向性ライトマップがベイクされています。
指向性モードのライトマップは 2 つのテクスチャで構成されており、シェーダーはレンダリング時に両方のテクスチャをサンプリングします。テクスチャの追加により、ビデオメモリの必要量が増加します。また、追加の指向性テクスチャを生成することは、ベイクのパフォーマンスにも影響します。
非指向性モードのライトマップには、1 つのテクスチャしか含まれていません。その結果、指向性マップに比べて、必要なビデオメモリとストレージが少なくて済み、シェーダーでのデコードも速くなります。これらの最適化は、視覚的な品質を低下させます。
Lighting Settings アセット でモードを設定するには、Lighting ウィンドウ (Window > Lighting > Settings) を開き、Scene をクリックし、Lightmapping Settings に移動し、Directional Mode を選択します。
1 つまたは複数のシーンに適用できる Lighting Settings アセットのインスタンスにライトマップモードを設定できます。個々のライトマップにライトマップモードを設定することはできません。
Unity はシーンを追加的に読み込むことができます。これは、例えば 複数シーンの編集 を使用できることを意味しています。 シーンを追加的にロードする場合、すべてのシーンは同じ指向性モードを使用しなければなりません。これには、UI エレメントや起動画面など、ベイクされていないシーンも含まれます。同じ Lightmap Parameters アセット をプロジェクトのすべてのシーンに使用することで、設定の矛盾を避けることができます。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.