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)可以將任意與它的平截頭體相交的材質(zhì)投影到場景上。該材質(zhì)必須使用特殊類型的著色器的才能正常工作。-參見在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.
投影的寬高比。這允許你來調(diào)整投影器的高度與寬度的比
-
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 材質(zhì)
The Material that will be Projected onto Objects.
要投射到每個物體上的材質(zhì)。
-
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 細節(jié)
With a projector you can 用投影器,你可以:
- Create shadows. 創(chuàng)建陰影。
- 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. 創(chuàng)建彈痕。
- 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.
如果你想創(chuàng)建一個簡單的陰影效果,只需拖動StandardAssets->Blob-Shadow->Blob shadow projector?Prefab 到場景中即可。您可以使用不同的Blob陰影紋理來修改材質(zhì)。
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.
注意:當創(chuàng)建一個投影機,一定要設置投影器的紋理材質(zhì)的循環(huán)模式為強制拉伸(Clamp),否則投影機的紋理將被視為重復,你的人物就得不到你預期的陰影效果。
Hints 提示
- Projector Blob shadows can create very impressive Splinter Cell-like lighting effects if used to shadow the environment properly.
如果陰影在環(huán)境中妥善的使用,投射圓陰影(Blob shadows)可以創(chuàng)建非常不錯的像細胞分裂一樣(其實就是一個圓形漸變陰影)的光照效果。
- 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.
當投影機的材質(zhì)沒有使用衰減紋理,它可以向前和向后投影,創(chuàng)建"雙投影"( "double projection".)。 ?為了解決這個問題,使用只有alpha通道衰減的紋理,最左邊有一個黑色的像素列。