查看: 2425|回复: 1
打印 上一主题 下一主题

[Unity 组件参考手册]组件:渲染组件之遮挡区域(仅专业版)

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

活跃会员 优秀版主 荣誉管理 论坛元老

跳转到指定楼层
楼主
发表于 2013-2-5 15:50:25 |只看该作者 |倒序浏览
This group contains all Components that have to do with rendering in-game and user interface elements. Lighting and special effects are also included in this group.这个组包括在游戏中渲染和界面元素的所有组件。光照和特定效果也包含在这个组。
下面介绍遮挡区域(仅专业版)。 [Occlusion Area 遮挡区域]To apply occlusion culling to moving objects you have to create an Occlusion Area and then modify its size to fit the space where the moving objects will be located (of course the moving objects cannot be marked as static). You can create Occlusion Areas is by adding the Occlusion Area component to an empty game object (Component->Rendering->Occlusion Area in the menus)如 果想在运动物体应用遮挡剔除,你必须创建一个Occlusion Area(遮挡区域)然后修改其大小来适应运动物体的活动空间(注意:运动物体不能被标示为静态)。 您可以创建遮挡区域,把遮挡区域组件添加到一个空的游戏物体(菜单Component->Rendering->Occlusion Area )After creating the Occlusion Area, just check the Is Target Volume checkbox to occlude moving objects.创建遮挡区域( Occlusion Area)后, Is Target Volume  复选框打勾, 来遮挡剔除运动物体。
Occlusion Area properties for moving objects.移动物体的遮挡区域属性-----------------------------------------------------------------------------    Size 大小
    Defines the size of the Occlusion Area.定义遮挡区域大小
    Center中心
    Sets the center of the Occlusion Area. By default this is 0,0,0 and is located in the center of the box.
    设定遮挡区域的中心。默认0,0,0 并位于盒子的中心
    Is View Volume是否视图体
    Defines where the camera can be. Check this in order to occlude static objects that are inside this Occlusion Area.
    定义摄像机能到哪里。选中这个选项,来遮挡遮挡区域内的静态物体
    Is Target Volume是否目标体
    Select this when you want to occlude moving objects.
    当你想遮挡剔除运动物体时选上。
    Target Resolution目标分辨率
    Determines how accurate the occlusion culling inside the area will be. This affects the size of the cells in an Occlusion Area. NOTE: This only affects Target Areas.
    确定区域内的遮挡剔除的精度。这影响遮挡区域的单元格大小。注意: 这个选项只对 Target Areas(移动物体)起作用
        Low低
    This takes less time to calculate but is less accurate.
    这花费较少的时间来计算,但是不够准确。
        Medium中
    This gives a balance between accuracy and time taken to process the occlusion culling data.
    平衡准确性和花费时间处理遮挡剔除数据。
        High高
    This takes longer to calculate but has better accuracy.
    计算时间长但精度高
        Very High非常高
    Use this value when you want to have more accuracy than high resolutions, be aware it takes more time.
    当你想要比高分辨率(high resolutions)更高的精度,使用这个值。注意这会花费更多时间。
        Extremely High极高
    Use this value when you want to have almost exact occlusion culling on your moveable objects. Note: This setting takes a lot of time to calculate.
    使用这个值,当你想在可移动的物体上得到几乎确切的遮挡剔除。 注意:这个设定需要大量的时间来计算。 -----------------------------------------------------------------------------After you have added the Occlusion Area, you need to see how it divides the box into cells. To see how the occlusion area will be calculated, Select Edit and toggle the View button in the Occlusion Culling Preview Panel.添加完遮挡区域后, 你需要了解盒子是如何划分成单元格。要查看遮挡区域如何被计算,在遮挡剔除预览面板,选择"编辑Edit "和勾上"视图View "按钮。
Testing the generated occlusion测试生成的遮挡After your occlusion is set up, you can test it by enabling the Occlusion Culling (in the Occlusion Culling Preview Panel in Visualize mode) and moving the Main Camera around in the scene view.遮挡设置完毕后, 启用遮挡剔除(在遮挡剔除预览面板Occlusion Culling Preview Panel,可视化模式) 并在场景视窗移动主摄像机Main Camera进行测试。
The Occlusion View mode in Scene View场景视图 中的遮挡 View 模式As you move the Main Camera around (whether or not you are in Play mode), you'll see various objects disable themselves. The thing you are looking for here is any error in the occlusion data. You'll recognize an error if you see objects suddenly popping into view as you move around. If this happens, your options for fixing the error are either to change the resolution (if you are playing with target volumes) or to move objects around to cover up the error. To debug problems with occlusion, you can move the Main Camera to the problematic position for spot-checking.当你在左右移动主相机 (无论是否在播放模式下), 你将会看到各种物体禁用自己,你在这里需要找出的是遮挡数据中的任何错误。当你移动摄像机时你可能会发现会有物体突然出现在视野当中,如果这种情况发生, 通过修改分辨率来修复错误(如果是在target volumes模式播放)或左右移动物体左右掩饰错误。要调试遮挡的问题,你可以移动主相机来检查问题的位置。When the processing is done, you should see some colorful cubes in the View Area. The blue cubes represent the cell divisions for Target Volumes. The white cubes represent cell divisions for View Volumes. If the parameters were set correctly you should see some objects not being rendered. This will be because they are either outside of the view ***stum of the camera or else occluded from view by other objects.运算处理结束后,你会在View Area看到一些不同颜色的cube, 蓝色 cubes表示的是Target Volumes 的单元划分, 白色 cubes表示的是 View Volumes的单元划分,如果参数设置正确你会看到一些物体不被渲染,这表示要么这些物体不在摄像机视角范围内要么被其他物体遮挡住了。After occlusion is completed, if you don't see anything being occluded in your scene then try breaking your objects into smaller pieces so they can be completely contained inside the cells.如果遮挡完成后,场景内任何物体也没有被遮挡,拆分物体至更小的块,以便它们能被完整地包含在一个单元格中。  【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

nts    

3

主题

1

听众

743

积分

初级设计师

Rank: 3Rank: 3

纳金币
7
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2013-10-20 11:30:43 |只看该作者
这个是要bake一下吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2024-9-20 14:32 , Processed in 0.088158 second(s), 31 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部