查看: 2322|回复: 0
打印 上一主题 下一主题

[Unity 组件参考手册]组件:网格组件之蒙皮的网格渲染器

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

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

跳转到指定楼层
楼主
发表于 2013-2-2 17:39:14 |只看该作者 |倒序浏览
3D Meshes are the main graphics primitive of Unity. Various components exist in Unity to render regular or skinned meshes, trails or 3D lines.3D网格是Unity中最重要的图形元素。在Unity中存在多种组件用于渲染标准网格或者蒙皮网格、拖尾或者3D线条。
下面介绍蒙皮的网格渲染器:The Skinned Mesh Renderer is automatically added to imported meshes when the imported mesh is skinned.当导入有蒙皮的网格时,骨骼蒙皮渲染器会自动添加到导入的网格。
An animated character rendered using the Skinned Mesh Renderer
使用骨骼蒙皮渲染器渲染一个动画人物
----------------------------------------------------------------------------[Properties 属性]    Cast Shadows (Pro only)
    投射阴影(仅专业版)
    If enabled, this Mesh will create shadows when a shadow-creating Light shines on it
    如果启用,当创建光照阴影时Mesh将会创建阴影。
    Receive Shadows (Pro only)
    接受阴影(仅专业版)
    If enabled, this Mesh will display any shadows being cast upon it
    如果启用,网格将会显示对他的任何投射的阴影。
    Materials 材质列表
    A list of Materials to render model with.
    渲染模型的材质列表。
    Quality 质量
    The maximum amount of bones affecting every vertex.
    最大数量的影响着每一个顶点的骨骼。
    Update When Offscreen
    画面外更新
    If enabled, the Skinned Mesh will be updated when offscreen. If disabled, this also disables updating animations.
    如果启用时,将更新屏幕外骨骼蒙皮。如果禁用,这也将禁用更新动画。
    Bounds 范围
    These bounds are use for determining when skinned mesh is offscreen. Bounding box is also displayed in the SceneView. Bounds are precalculated on import based on Mesh and animations in the model file.
    这些范围是确定当蒙皮网格屏幕外使用。边界框也显示在Scene视图下。范围是在输入网格和动画模型文件的基础上预先计算好的。
    Mesh 网格
    Meshed used by this renderer. 这个渲染器使用的网格。----------------------------------------------------------------------------[Details 细节]Skinned Meshes are used for rendering characters. Characters are animated using bones, and every bone affects a part of the mesh. Multiple bones can affect the same vertex and are weighted. The main advantage to using boned characters in Unity is you can enable the bones to be affected by physics, making your characters into ragdolls. You can enable/disable bones via scripting, so your character instantly goes ragdoll when it is hit by an explosion.蒙皮网格用于渲染人物。人物动画使用的骨骼,而且每个骨骼影响网格的一部分。多个骨骼的影响相同的顶点和的权重。使用Unity骨骼人物的主要优势是可以使骨骼受到物理影响,制作你的角色布娃娃。您可以启用/禁用通过脚本的骨骼,所以你的角色立即开始布娃娃当它击中爆炸时。
A Skinned Mesh enabled as a Ragdoll 布娃娃系统启用了蒙皮的网格
Quality 质量Unity can skin every vertex with either 1, 2, or 4 bones. 4 bone weights look nicest and are most expensive. 2 Bone weights is a good compromise and can be commonly used in games.Unity可以用1,2,或4骨骼顶点蒙皮。4骨骼权重看起来很好并且是很费资源的。2骨骼权重是一个很恰当的并且在游戏中经常用。If Quality is set to Automatic, the Quality Settings Blend Weights value will be used. This allows end-users to choose a quality setting that gives them optimum performance.如果Quality设置为自动,质量设置混合权中值将被使用。这允许最终用户选择质量设置,使他们获得最佳性能。
Update When Offscreen and Bounds 画外和范围的更新By default, skinned meshes that are not visible are not updated. The skinning is not updated until the mesh comes back on screen. This is an important performance optimization - it allows you to have a lot of characters&nbsp***nning around not taking up any processing power when they are not visible.默认情况下,蒙皮网格不可见网格并不会更新。直到网格返回屏幕上时,蒙皮才会更新。这是一个重要性能优化 - 这可以让你周围有很多角色,当它们不可见时,运行时并不会采取任何处理。However, visibility is determined from the Mesh's Bounds, which is precalculated on import. Unity takes into account all attached animations for precalcualating bounding volume, but there are cases when Unity can't precalculate Bounds to fit all user's needs, for example (each of these become a problem when they push bones or vertices out of precalculated bounding volume):然而,能见度是取决于网格的边界,这是在导入上预先计算的。Unity考虑所有附加动画预先计算的边界量,但在某些情况下Unity可以不预先计算界限,以符合所有用户的需求,例如(其中每个成为一个问题,当他们把骨骼或顶点预先计算包围盒):    adding animations at&nbsp***n-time;
    在运行时添加动画;
    using additive animations;
    使用附加的动画;
    proceduraly affecting positions of bones;
    程序影响骨骼位置;
    using vertex shaders which can push vertices out of precalculated bounds;
    使用顶点着色器可以把预先计算的边界顶点;
    using ragdolls.
    使用布娃娃。 In those cases there are two solutions:在这种情况下,有两种解决方法:    modify Bounds to match potential bounding volume of your mesh;
    修改边界匹配有可能的包围盒网格;
    enable Update When Offscreen to skin and render skinned mesh all the time.
    使一直更新屏幕外的蒙皮和和渲染蒙皮网格。 You should use fist option most of the time since it has better performance and use second option only if performance is not important in your case or you can't predict the size of your bounding volume (for example when using ragdolls).你应该使用第一选项的大部分时间,因为它具有更好的性能和使用性能并不重要只有在您的案件或您无法预测您的包围体大小(例如,当使用布娃娃)的时候用第二选项。In order to make SkinnedMeshes work better with Ragdolls Unity will automatically remap the SkinnedMeshRenderer to the rootbone on import. However Unity only does this if there is a single SkinnedMeshRenderer in the model file. So if you can't attach all SkinnedMeshRenderers to the root bone or a child and you use ragdolls, you should turn off this optimization.为了使骨骼蒙皮与布娃娃工作在导入骨骼蒙皮中Unity将自动重新映射到根骨骼。然而Unity只有在模型文件中有一个单一的骨骼蒙皮渲染。因此如果不能所有骨骼蒙皮渲染附加根骨骼或子骨骼并且使用的布娃娃时,你应该关闭这个优化。
----------------------------------------------------------------------------[Hints 提示]    Skinned Meshes currently can be imported from:
    目前可以导入的蒙皮骨骼的软件:
        maya
        cinema4d
        3D Studio Max
        Blender
        Cheetah 3D
        XSI
        Any other tool that supports the FBX format
        任何支持FBX格式的工具 【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

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

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

GMT+8, 2024-11-10 18:07 , Processed in 0.105076 second(s), 33 queries .

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

© 2008-2019 Narkii Inc.

回顶部