灯光探测器LightProbe[Unity]
灯光探测器的目的,抄手册上的话就是:
Although lightmapping adds greatly to the realism of a scene, it has the disadvantage that non-static objects in the scene are less realistically rendered and can look disconnected as a result. It isn't possible to calculate lightmapping for moving objects in real time but it is possible to get a similar effect using light probes. The idea is that the lighting is sampled at strategic points in the scene, denoted by the positions of the probes. The lighting at any position can then be approximated by interpolating between the samples taken by the nearest probes. The interpolation is fast enough to be used during gameplay and helps avoid the disconnection between the lighting of moving objects and static lightmapped objects in the scene.
尽管使用光照贴图可以大大提升场景的真实程度,但是它有一个缺点,那就是场景中非静态物体缺少真实的渲染,看上去就好像和场景格格不入。实时为移动物体计算光照贴图是不可能的,但是通过使用灯光探测器我们可以模拟达到类似的效果。大概原理是这样的,在场景中的标记为探测器的静态点的位置采样光照,然后对相邻的几个光照探测器位置所采样的灯光照明进行差值,在游戏进行的过程中计算差值的速度很快,玩家察觉不到。这样就可以帮助我们避免移动物体的光照和烘培场景格格不入的感觉。
Adding Light probes 添加灯光探测器
The Light Probe Group component (menu: Component -> Rendering -> Light Probe Group) can be added to any available object in the scene. The inspector can be used to add new probes to the group. The probes appear in the scene as yellow spheres which can be positioned in the same manner as GameObjects. Selected probes can also be duplicated with the usual keyboard shortcut (ctrl+d/cmd+d).
灯光探测器组 组件(菜单:Component -> Rendering -> Light Probe Group)可以被添加到场景中任何可利用的物体。可以通过检视面板为探测器组中添加新的探测器。探测器在场景中用黄色的球体表示,并且可以像其他游戏物体那样编辑移动它的位置,被选择的探测器可以通过键盘快捷键进行复制。(ctrl+d/cmd+d).
Using Light Probes 使用灯光探测器
To allow a mesh to receive lighting from the probe system, you should enable the Use Light Probes option on its MeshRenderer:
如果想要使一个网格接受来自探测器系统的光照,只需要将MeshRenderer组件上个LightProbes选项勾选就可以。
The probe interpolation requires a point in space to represent the position of the mesh that is receiving light. By default, the centre of the mesh's bounding box is used but it is possible to override this by dragging a Transform to the MeshRenderer's Light Probe Anchor property (this Transform's position will be used as the interpolation point instead). This may be useful when an object contains two separate adjoining meshes; if both meshes are lit individually according to their bounding box positions then the lighting will be discontinuous at the place where they join. This can be prevented by using the same Transform (for example the parent or a child object) as the interpolation point for both MeshRenderers.
探测器差值需要使用空间中的一点来表示接受灯光的网格的位置。通常情况下使用包围盒的中心来表示。我们也可以使用自定义的位置覆盖默认的位置只需要将一个Transform(变换)拖拽到MeshRenderer组件的 LightProbeAnchor(光照探测器锚点)插槽上。(这个Transform的位置将被用来表示计算差值的物体中心点)。当我们的游戏物体是由两个分离的相邻网格组成的时候,这个功能非常有用,如果这个这些网格都按照各自独立的包围盒中心作为光照差值点的时候,光照会在他们结合的位置断开。这也能使由多个MeshRenderer组件的组成的游戏物体公用一个Transform(比如使用一个父物体或者子物体)。
When an object using light probes is the active selected object in the Light Probes Scene View mode, its interpolated probe will be rendered on top of it for preview. The interpolated probe is the one used for rendering the object and is connected with 4 thin blue lines (3 when outside of the probe volume) to the probes it is being interpolated between:
当一个使用了光照探测器的物体在Light Probes Scene View(在场景中查看光照探测器)。模式下被高亮选择以后,它的差值探测器将被渲染到物体的前面这样用户就能够预览到探测器的位置。差值探测器通常被渲染为一个物体,并在探测器的差值范围内显示四条蓝色的线(当物体超出探测器的覆 的范围后将显示三条)。
Dual Lightmaps vs. Single Lightmaps mode
双重光照贴图VS单光照贴图模式
In Single Lightmaps mode all static lighting (including lights set to 'Auto' lightmapping mode) is baked into the light probes.
在单光照贴图模式下所有的静态光照(包括被设置为"Auto"(自动)光照贴图模式的灯光)都将烘培到光照探测器中。
In Dual Lightmaps mode light probes will store lighting in the same configuration as 'Near' lightmaps, i.e. full illumination from sky lights, emissive materials, area lights and 'Baked Only' lights, but only indirect illumination from 'Auto' lights. Thanks to that the object can be lit in real-time with the 'Auto' lights and take advantage of dynamic elements such as real-time shadows, but at the same time receive indirect lighting added to the scene by these lights.
使用双重光照贴图模式的,灯光探测器只存贮了"Near"(近端)光照贴图配置。例如:天光产生的全局光照,自发光材质,面积光和被是设置为"Baked Only"(仅烘培)模式的灯光。和被设置为"Auto"模式的间接照明。我们要感谢物体可以被设置为"Auto"模式的灯光实时照明。并且产生一些高级的动态成分。例如实时阴影,同时接受探测器存贮的这些灯光的间接光照信息并叠加到场景中。
灯光探测器LightProbe[Unity]的更多相关文章
- 在Unity中高效工作(下)
原地址:http://www.unity蛮牛.com/thread-20005-1-1.html Tips for Creating Better Games and Working More Eff ...
- 【Unity】4.1 创建组件
分类:Unity.C#.VS2015 创建日期:2016-04-05 一.简介 组件(Component)在Unity游戏开发工作中非常重要,可以说是实现一切功能所必需的. 1.游戏对象(Game O ...
- Unity 5 中的全局光照技术详解
貌似是某位好人翻译的 https://unity3d.com/cn/learn/tutorials/topics/graphics/unity-5-lighting-and-rendering#rd? ...
- Unity 5 中的全局光照技术详解(建议收藏)
本文整理自Unity全球官方网站,原文:UNITY 5 - LIGHTING AND RENDERING (文章较长,请耐心阅读)简介全局光照,简称GI,是一个用来模拟光的互动和反弹等复杂行为的算法, ...
- Unity 3D 游戏上线之后的流水总结
原地址:http://tieba.baidu.com/p/2817057297?pn=1 首先.unity 灯光烘焙 :Unity 3D FBX模型导入.选项Model 不导入资源球.Rig 不导入骨 ...
- Unity 5--全局光照技术
本文整理自Unity全球官方网站,原文:UNITY 5 - LIGHTING AND RENDERING 简介全局光照,简称GI,是一个用来模拟光的互动和反弹等复杂行为的算法,要精确的仿真全局光照非常 ...
- 04、Unity 5--全局光照技术
本文整理自Unity全球官方网站,原文:UNITY 5 - LIGHTING AND RENDERING 简介全局光照,简称GI,是一个用来模拟光的互动和反弹等复杂行为的算法,要精确的仿真全局光照非常 ...
- Unity3D用户手册
Unity Manual 用户手册 Welcome to Unity. 欢迎使用Unity. Unity is made to empower users to create the best int ...
- Unity3D Optimizing Graphics Performance for iOS
原地址:http://blog.sina.com.cn/s/blog_72b936d801013ptr.html icense Comparisons http://unity3d.com/unity ...
随机推荐
- Kafka流处理平台
1. Kafka简介 Kafka是最初由Linkedin公司开发,是一个分布式.支持分区的(partition).多副本的(replica),基于zookeeper协调的分布式消息系统,它的最大的特性 ...
- eclipse的jdk版本和spring冲突问题WARN XmlWebApplicationContext:1060 - Exception thrown from LifecycleProcessor on context close
项目环境: jdk1.8 tomcat7 问题:eclipse启动tomcat后控制台报如下错误: WARN XmlWebApplicationContext:1060 - Exception thr ...
- 使用安全rm
rm命令像一把刀子一样,玩不好会伤到自己.不要觉得自己头脑清醒,人总有犯迷糊的时候. 在.bashrc中设置PATH=/home/me/bin/:$PATH 在自己的bin目录下,添加rm脚本mv - ...
- C语言学习笔记 (008) - C语言字符串操作总结大全(超详细)(转)
1)字符串操作 strcpy(p, p1) 复制字符串 strncpy(p, p1, n) 复制指定长度字符串 strcat(p, p1) 附加字符串 strncat(p, p1, n) 附加指定长度 ...
- sudo: add-apt-repository: command not found
错误来啦:sudo: add-apt-repository:command not found 网上解决办法是直接安装工具包 命令:sudo apt-get install python-s ...
- 【Smali】Smali文件的动态调试
1.简介 smalidea是一个IntelliJ IDEA/Android Studio smali语言插件,可实现动态调试smali代码.下载地址为:https://github.com/Jesus ...
- thinkphp日志分析
#!/usr/bin/perl -w use strict; use warnings; use Tie::File; #### # Thinkphp日志分析 # 日志基本格式:{$now} &quo ...
- MongoDB 学习笔记(9)--- Limit与Skip方法
MongoDB Limit() 方法 如果你需要在MongoDB中读取指定数量的数据记录,可以使用MongoDB的Limit方法,limit()方法接受一个数字参数,该参数指定从MongoDB中读取的 ...
- mvc 使用预置队列类型存储异常对象
using PaiXie.Utils; using System; using System.Collections.Generic; using System.Linq; using System. ...
- cassandra java 兼容性问题及其解决方法
1.安装 http://wiki.apache.org/cassandra/DebianPackaging 2.java兼容性问题 由于cassandra运行于sun jdk6上,而ubuntu默认是 ...