Shadows 阴影
本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://docs.unity3d.com/Manual/Shadows.html
Unity’s lights can cast Shadows from an object onto other parts of itself or onto other nearby objects. Shadows add a degree of depth and realism to a scene since they bring out the scale and position of objects that can otherwise look “flat”.
Unity的灯光可以将物体的阴影投射到自身的其他部分或者附近的物体上。阴影给场景增加了深度感和真实感,因为它们突出了物体的比例和位置,否则会看起来“单调”。
Scene with objects casting shadows
How do shadows work?
Consider the simplest case of a scene with a single light source. Light rays travel in straight lines from that source and may eventually hit objects in the scene. Once a ray has hit an object, it can’t travel any further to illuminate anything else (ie, it “bounces” off the first object and doesn’t pass through). The shadows cast by the object are simply the areas that are not illuminated because the light couldn’t reach them.
考虑使用单一光源的场景的最简单情况。光线从那个光源以直线传播,最终可能击中场景中的物体。一旦光线击中一个物体,它就不能再移动到更远的地方去照亮其他任何物体(也就是说,它从第一个物体上“反弹”而不穿过)。物体投下的阴影只是因为光线无法到达而没有被照亮的区域。
Another way to look at this is to imagine a camera at the same position as the light. The areas of the scene that are in shadow are precisely those areas t