Reflection probes come in three basic types as chosen by the Type property in the inspector (see the component reference page for further details).
下面将详细说明这三种类型。
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.
You should set the probe’s Type property to Baked or Custom in order to make it behave as a baked probe (see below for the additional features offered by Custom probes).
The reflections captured by baked probes can only include scene objects marked as Reflection Probe Static (using the Static menu at the top left of the inspector panel for all objects). You can further refine the objects that get included in the reflection cubemap using the Culling Mask and Clipping Planes properties, which work the same way as for a Camera (the probe is essentially like a camera that is rotated to view each of the six cubemap faces).
When the Auto option is switched on (from the Lighting window), the baked 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 Generate Lighting button in the Lighting window will also trigger the probes to update.)
无论使用自动烘焙还是手动烘焙,烘焙过程都将继续在 Editor 中工作时异步进行。但是,如果移动任何静态对象、更改其材质或以其他方式改变其视觉外观,则会重新启动烘焙过程。
默认情况下,自定义探针的工作方式与烘焙探针的工作方式相同,但自定义探针还有其他选项可以更改此行为。
The Dynamic Objects property on a custom probe’s inspector allows objects that are not marked as Reflection Probe Static to be included in the reflection cubemap.
Note: The positions of these objects are still “frozen” in the reflection at the time of baking.
The Cubemap property allows you to assign your own cubemap to the probe and therefore make it completely independent of what it can “see” from its view point. You could use this, say, to set a skybox or a cubemap generated from your 3D modelling app as the source for reflections.
烘焙探针可用于许多用途,并具有良好的运行时性能,但它们的缺点是不能在播放器中实时更新。这意味着对象可在场景中移动但不能让它们的反射随之移动。如果这种问题带来了太多限制,可以使用实时探针,它们会在运行时更新反射立方体贴图。这种效果会带来更高的处理开销,但可提供更强的真实感。
To enable a probe to update at runtime, you should set its Type property to Realtime in the Reflection Probe Inspector. You don’t need to mark objects as Reflection Probe Static to capture their reflections (as you would with a baked probe). However, you can selectively exclude objects from the reflection cubemap using the Culling Mask and Clipping Planes properties, which work the same way as for a Camera (the probe is essentially like a camera that is rotated to view each of the six cubemap faces).
In the editor, real-time probes have much the same workflow as baked probes, although they tend to render more quickly.
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 won’t cause an update even though those objects appear in the reflection. You should choose the Bake Reflection Probes option from the Generate Lighting button dropdown in 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.