Projector 投影器
A Projector allows you to project a Material onto all objects that intersect its frustum. The material must use a special type of shader for the projection effect to work correctly - see the projector prefabs in Unity's standard assets for examples of how to use the supplied Projector/Light and Projector/Multiply shaders.
投影器(Projector)可以将任意与它的平截头体相交的材质投影到场景上。该材质必须使用特殊类型的着色器的才能正常工作。-参见在Unity中的standard assets的投影机预设(Projector prefabs),举例讲到如何使用提供的投影器(Projector)/灯光和投影器(Light and Projector)/乘着色(Multiply shaders.)。
The Projector Inspector
Properties 属性
- Near Clip Plane 近裁剪面 Objects in front of the near clip plane will not be projected upon.
在近裁剪面之前的物体将不会被投影。(投影器将不会影响任何比这个距离近的物体。) - Far Clip Plane 远裁剪面 Objects beyond this distance will not be affected.
超出这个距离的物体将不会受到影响。 - Field Of View 视野 The field of view in degrees. This is only used if the Projector is not Ortho Graphic.
该投影的视野,以度为单位。当投影器是正交时fieldOfView被忽略 - Aspect Ratio 宽高比 The Aspect Ratio of the Projector. This allows you to tune the height vs width of the Projector.
投影的宽高比。这允许你来调整投影器的高度与宽度的比 - Is Ortho Graphic 正交? If enabled, the Projector will be Ortho Graphic instead of perspective.
如果启用,投影器将用正交替代透视投影。 - Ortho Graphic Size 正交大小 The Ortho Graphic size of the Projection. this is only used if Is Ortho Graphic is turned on.
投影器正交大小。这仅在正交(Is Ortho Graphic)启用后才可用。--(投射器不是正交时, orthographicSize被忽略) - Material 材质 The Material that will be Projected onto Objects.
要投射到每个物体上的材质。 - Ignore Layers 忽略层 Objects that are in one of the Ignore Layers will not be affected. By default, Ignore Layers is none so all geometry that intersects the Projector frustum will be affected.
在忽略层里的物体不受影响。默认情况下,是没有忽略层的。因此与投影机平截头体相交的几何体都会受到影响。
Details 细节
With a projector you can 用投影器,你可以:
- Create shadows. 创建阴影。
- Make a real world projector on a tripod with another Camera that films some other part of the world using a Render Texture.
通过使用渲染纹理(Render Texture),在三脚架上的投影器与其他相机所拍摄一些世界其它地方,制作真实世界。 - Create bullet marks. 创建弹痕。
- Funky lighting effects. 时髦的光照效果
A Projector is used to create a Blob Shadow for this Robot
投影器用于为这机器人制造Blob阴影
If you want to create a simple shadow effect, simply drag the StandardAssets->Blob-Shadow->Blob shadow projector Prefab into your scene. You can modify the Material to use a different Blob shadow texture.
如果你想创建一个简单的阴影效果,只需拖动StandardAssets->Blob-Shadow->Blob shadow projector Prefab 到场景中即可。您可以使用不同的Blob阴影纹理来修改材质。
Note: When creating a projector, always be sure to set the wrap mode of the texture's material of the projector to clamp. else the projector's texture will be seen repeated and you will not achieve the desired effect of shadow over your character.
注意:当创建一个投影机,一定要设置投影器的纹理材质的循环模式为强制拉伸(Clamp),否则投影机的纹理将被视为重复,你的人物就得不到你预期的阴影效果。
Hints 提示
- Projector Blob shadows can create very impressive Splinter Cell-like lighting effects if used to shadow the environment properly.
如果阴影在环境中妥善的使用,投射圆阴影(Blob shadows)可以创建非常不错的像细胞分裂一样(其实就是一个圆形渐变阴影)的光照效果。 - When no Falloff Texture is used in the projector's Material, it can project both forward and backward, creating "double projection". To fix this, use an alpha-only Falloff texture that has a black leftmost pixel column.
当投影机的材质没有使用衰减纹理,它可以向前和向后投影,创建"双投影"( "double projection".)。 为了解决这个问题,使用只有alpha通道衰减的纹理,最左边有一个黑色的像素列。