リフレクションプローブは、インスペクターの Type プロパティ (詳細については、リフレクションプローブ ページを参照) で選択する 3 つの基本的なタイプがあります。
上記の 3 タイプの詳細を説明します。
A Baked Reflection Probe is one whose reflection cubemap is captured in the Unity editor and stored for subsequent usage in the player (see the Reflection Probes Introduction for further information). Once the capture process is complete, the reflections are “frozen” and so baked probes can’t react to runtime changes in the scene caused by moving objects. However, they come with a much lower processing overhead than Realtime Probes (which do react to changes) and are acceptable for many purposes. For example, if there is only a single moving reflective object then it need only reflect its static surroundings.
ベイクしたプローブとして動作させるために、プローブの Type プロパティを Baked または Custom に設定する必要があります (カスタムプローブによって提供される付加的な機能については以下を参照してください)。
ベイクしたプローブによってキャプチャされたリフレクションには、Reflection Probe Static としてマークされたシーンオブジェクトのみを加えることができます (オブジェクトのインスペクターの左上にある Static メニューを使用)。さらに、Culling Mask と Clipping Planes プロパティを使って、リフレクションキューブマップに加えるオブジェクトを絞り込むことができます (プローブは、基本的に 6 つのキューブマップ面のそれぞれを表示するために回転するカメラのようなものです)。
Auto オプションをオンの場合 (Lighting ウィンドウ から)、シーンにオブジェクトを配置すると ベイクしたリフレクションが自動的に更新されます。自動ベイクを使用しない場合は、Reflection Probe インスペクターの Bake ボタンをクリックする必要があります。(Lighting ウィンドウの Build ボタンもプローブの更新を始動します)。
自動または手動のベイクを使うかどうかにかかわらず、エディターで作業を続ける間、ベイク処理は非同期に行われます。ただし、静的オブジェクトを移動したり、それらのマテリアルを変更したり、あるいは、他の方法でその外観を変更すると、ベイク処理が再開されます。
デフォルトでは、カスタムプローブはベイクしたプローブと同じように動作しますが、動作を変更する追加のオプションもあります。
カスタムプローブのインスペクターの Dynamic Objects プロパティを使うと、Reflection Probe Static としてマークされていないオブジェクトを、リフレクションキューブマップに加えることができます。ただし、これらのオブジェクトの位置は、ベイクする際、リフレクション内で固定であることに注意してくださ。
Cubemap プロパティを使用すると、プローブに独自のキューブマップを割り当てることができます。したがって、その視点から “見る” ことができるものと完全に独立しています。これを利用して、例えば、リフレクションのためのソースとして、3D モデリングアプリケーションから生成されたスカイボックスやキューブマップを設定することができます。
ベイクしたプローブはさまざまな場面で有用であり、ランタイムのパフォーマンスが優れていますが、それらは、プレイヤー内をリアルタイムで更新しないという欠点があります。つまり、オブジェクトのリフレクションが一緒に移動しなくても、オブジェクトはシーン内を移動できます。これがあまりに制約となる場合は、リアルタイム プローブを使うことができます。リアルタイム プローブはランタイムにリフレクションキューブマップを更新します。この効果は、より高い処理オーバーヘッドとなりますが、よりリアルな外観を実現できます。
プローブがランタイムに更新できるようにするには、Reflection Probe インスペクターで Type プロパティを Realtime に設定する必要があります。(Baked プローブで行うように)、リフレクションをキャプチャするために Reflection Probe Static としてオブジェクトをマークする必要はありません。ただし、カメラにするのと同じように、Culling Mask と Clipping Planes プロパティを使用し、リフレクションキューブマップからオブジェクトを選択的に除外することができます (プローブは、基本的に 6 つのキューブマップ面のそれぞれを表示するために回転するカメラのようなものです)。
In the editor, real-time probes have much the same workflow as baked probes, although they tend to render more quickly. When the Auto option is switched on (from the Lighting window, the reflections will update automatically as you position objects in the scene. If you are not making use of auto baking then you will need to click the Bake button in the Reflection Probe inspector to update the probes. (The Build button in the Lighting window will also trigger the probes to update.)
自動または手動のベイクを使うかどうかにかかわらず、エディターで作業を続ける間、ベイク処理は非同期に行われます。ただし、静的オブジェクトを移動したり、それらのマテリアルを変更したり、あるいは、他の方法でその外観を変更すると、ベイク処理が再開されます。
Note: Currently, real-time probes will only update their reflections in the Scene view when Reflection Probe Static objects are moved or change their appearance. This means that moving dynamic objects will not cause an update even though those objects appear in the reflection. You should choose the Bake Reflection Probes option from the Build button popup on the Lighting window to update reflections when a dynamic object is changed.
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.