标题: [Unity 组件参考手册]组件:效果之镜头光晕 [打印本页] 作者: . 时间: 2013-2-4 16:48 标题: [Unity 组件参考手册]组件:效果之镜头光晕 Lens Flares simulate the effect of lights refracting inside camera lens. They are used to represent really bright lights or, more subtly, just to add a bit more atmosphere to your scene.
The easiest way to setup a Lens Flare is just to assign the Flare property of the Light. Unity contains a couple of pre-configured Flares in the Standard Assets package.
Otherwise, create an empty GameObject with GameObject->Create Empty from the menu bar and add the Lens Flare Component to it with Component->Rendering->Lens Flare. Then and choose the Flare in the Inspector.
To see the effect of Lens Flare in the Scene View, check the Fx button in the Scene View toolbar:
想要在场景视图中看到镜头光晕的效果,选上场景视图工具栏中的Fx按钮。
Enable the Fx button to view Lens Flares in the Scene View
选上Fx 按钮才能看到场景视图上的镜头光晕(Lens Flares)效果。
【Properties 属性】
Flare 光晕
The Flare to render. The flare defines all aspects of the lens flare's appearance.
要渲染的光晕(Flare ),光晕定义了镜头光晕外观的所有方面。
Color 颜色
Some flares can be colorized to better fit in with your scene's mood.
一些光晕可以填上颜色以更加适合你场景的风格。
Brightness 亮度
How large and bright the Lens Flare is.
镜头光晕(Lens Flare)的大小和明亮程度。
Directional 方向
If set, the flare will be oriented along positive Z axis of the game object. It will appear as if it was infinitely far away, and won't track object's position, only the direction of Z axis.
如果设置了,光晕将以游戏对象的Z轴为方向。它会看上去好像是无限远,而且不会跟踪对象的位置,只沿着Z轴作为方向。
Details 详情
You can directly set flares as a property of a Light Component, or set them up separately as Lens Flare component. If you attach them to a light, they will automatically track the position and direction of the light. To get more precise control, use this Component.
Be discrete about your usage of Lens Flares. 使用镜头光晕应分散(Lens Flares)。(即不要都叠在一起)
If you use a very bright Lens Flare, make sure its direction fits with your scene's primary light source.
如果你用的是一个很明亮的镜头光晕(Lens Flare),保证它的方向与你的场景主要光源的方向相符合
To design your own Flares, you need to create some Flare Assets. Start by duplicating some of the ones we provided in the the Lens Flares folder of the Standard Assets, then modify from that.
你自己的光晕时,你需要创建一些光晕的资源。通过复制一些在Standard Assets的文件夹中提供的镜头光晕(Lens Flares)的开始,然后修改。
Lens Flares are blocked by Colliders. A Collider in-between the Flare GameObject and the Camera will hide the Flare, even if the Collider does not have a Mesh Renderer.
镜头光晕会被碰撞器遮挡。一个介于光晕游戏对象 (Flare GameObject)和相机之间的碰撞器会把光晕隐藏掉(即使碰撞器没有Mesh Renderer)。