朱峰社區(qū)首頁(yè) 朱峰社區(qū)

搜索資源 注冊(cè)|登陸

等待

返回 展開(kāi)菜單
按功能 按軟件

unity3d視頻教程

unity3d視頻教程

包含11節(jié)視頻教程

從零基礎(chǔ)學(xué)習(xí)unity3d游戲引擎,簡(jiǎn)單易學(xué)的視頻教程,讓你快速掌握unity3d,并喜歡上游戲開(kāi)發(fā)的樂(lè)趣。

關(guān)閉

Unity組件:Skinned Mesh Renderer 蒙皮的網(wǎng)格渲染器

關(guān)注:5537 留言:0 樓主:韻靈科技 發(fā)帖時(shí)間:15年11月16日

韻靈科技

普通會(huì)員

韻靈科技

社區(qū)新人:1級(jí)

關(guān)注2055人

  • 積分

    1

  • 登陸

    1

  • 發(fā)帖

    2

間隔線

The Skinned Mesh Renderer is automatically added to imported meshes when the imported mesh is skinned.

當(dāng)導(dǎo)入有蒙皮的網(wǎng)格時(shí),骨骼蒙皮渲染器會(huì)自動(dòng)添加到導(dǎo)入的網(wǎng)格。


An animated character rendered using the Skinned Mesh Renderer
使用骨骼蒙皮渲染器渲染一個(gè)動(dòng)畫人物

Properties 屬性
  • Cast Shadows (Pro only)
    投射陰影(僅專業(yè)版)
    If enabled, this Mesh will create shadows when a shadow-creating Light shines on it
    如果啟用,當(dāng)創(chuàng)建光照陰影時(shí)Mesh將會(huì)創(chuàng)建陰影。
  • Receive Shadows (Pro only)
    接受陰影(僅專業(yè)版)
    If enabled, this Mesh will display any shadows being cast upon it
    如果啟用,網(wǎng)格將會(huì)顯示對(duì)他的任何投射的陰影。
  • Materials 材質(zhì)列表
    A list of Materials to render model with.
    渲染模型的材質(zhì)列表。
  • Quality 質(zhì)量
    The maximum amount of bones affecting every vertex.
    最大數(shù)量的影響著每一個(gè)頂點(diǎn)的骨骼。
  • Update When Offscreen
    畫面外更新
    If enabled, the Skinned Mesh will be updated when offscreen. If disabled, this also disables updating animations.
    如果啟用時(shí),將更新屏幕外骨骼蒙皮。如果禁用,這也將禁用更新動(dòng)畫。
  • 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.
    這些范圍是確定當(dāng)蒙皮網(wǎng)格屏幕外使用。邊界框也顯示在Scene視圖下。范圍是在輸入網(wǎng)格和動(dòng)畫模型文件的基礎(chǔ)上預(yù)先計(jì)算好的。
  • Mesh 網(wǎng)格
    Meshed used by this renderer. 這個(gè)渲染器使用的網(wǎng)格。
Details 細(xì)節(jié)

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.

蒙皮網(wǎng)格用于渲染人物。人物動(dòng)畫使用的骨骼,而且每個(gè)骨骼影響網(wǎng)格的一部分。多個(gè)骨骼的影響相同的頂點(diǎn)和的權(quán)重。使用Unity骨骼人物的主要優(yōu)勢(shì)是可以使骨骼受到物理影響,制作你的角色布娃娃。您可以啟用/禁用通過(guò)腳本的骨骼,所以你的角色立即開(kāi)始布娃娃當(dāng)它擊中爆炸時(shí)。


A Skinned Mesh enabled as a Ragdoll 布娃娃系統(tǒng)啟用了蒙皮的網(wǎng)格

Quality 質(zhì)量

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骨骼頂點(diǎn)蒙皮。4骨骼權(quán)重看起來(lái)很好并且是很費(fèi)資源的。2骨骼權(quán)重是一個(gè)很恰當(dāng)?shù)牟⑶以谟螒蛑薪?jīng)常用。

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設(shè)置為自動(dòng),質(zhì)量設(shè)置混合權(quán)中值將被使用。這允許最終用戶選擇質(zhì)量設(shè)置,使他們獲得最佳性能。

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 running around not taking up any processing power when they are not visible.

默認(rèn)情況下,蒙皮網(wǎng)格不可見(jiàn)網(wǎng)格并不會(huì)更新。直到網(wǎng)格返回屏幕上時(shí),蒙皮才會(huì)更新。這是一個(gè)重要性能優(yōu)化 - 這可以讓你周圍有很多角色,當(dāng)它們不可見(jiàn)時(shí),運(yùn)行時(shí)并不會(huì)采取任何處理。

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):

然而,能見(jiàn)度是取決于網(wǎng)格的邊界,這是在導(dǎo)入上預(yù)先計(jì)算的。Unity考慮所有附加動(dòng)畫預(yù)先計(jì)算的邊界量,但在某些情況下Unity可以不預(yù)先計(jì)算界限,以符合所有用戶的需求,例如(其中每個(gè)成為一個(gè)問(wèn)題,當(dāng)他們把骨骼或頂點(diǎn)預(yù)先計(jì)算包圍盒):

  • adding animations at run-time;
    在運(yùn)行時(shí)添加動(dòng)畫;
  • using additive animations;
    使用附加的動(dòng)畫;
  • proceduraly affecting positions of bones;
    程序影響骨骼位置;
  • using vertex shaders which can push vertices out of precalculated bounds;
    使用頂點(diǎn)著色器可以把預(yù)先計(jì)算的邊界頂點(diǎn);
  • using ragdolls.
    使用布娃娃。

In those cases there are two solutions:

在這種情況下,有兩種解決方法:

  1. modify Bounds to match potential bounding volume of your mesh;
    修改邊界匹配有可能的包圍盒網(wǎng)格;
  2. enable Update When Offscreen to skin and render skinned mesh all the time.
    使一直更新屏幕外的蒙皮和和渲染蒙皮網(wǎng)格。

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).

你應(yīng)該使用第一選項(xiàng)的大部分時(shí)間,因?yàn)樗哂懈玫男阅芎褪褂眯阅懿⒉恢匾挥性谀陌讣蚰鸁o(wú)法預(yù)測(cè)您的包圍體大。ɡ,當(dāng)使用布娃娃)的時(shí)候用第二選項(xiàng)。

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.

為了使骨骼蒙皮與布娃娃工作在導(dǎo)入骨骼蒙皮中Unity將自動(dòng)重新映射到根骨骼。然而Unity只有在模型文件中有一個(gè)單一的骨骼蒙皮渲染。因此如果不能所有骨骼蒙皮渲染附加根骨骼或子骨骼并且使用的布娃娃時(shí),你應(yīng)該關(guān)閉這個(gè)優(yōu)化。

Hints 提示
  • Skinned Meshes currently can be imported from:
    目前可以導(dǎo)入的蒙皮骨骼的軟件:
    • Maya
    • Cinema4D
    • 3D Studio Max
    • Blender
    • Cheetah 3D
    • XSI
    • Any other tool that supports the FBX format
      任何支持FBX格式的工具

贊0 踩0

未知用戶

2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2025 ZhuFeng Community All Rights Reserved

VIP

朱峰社區(qū)微信公眾號(hào)

回頂部

1.復(fù)制文本發(fā)給您的QQ好友或群、微信等;好友點(diǎn)擊鏈接以后,轉(zhuǎn)發(fā)就成功了。 2.如朋友點(diǎn)擊您的鏈接,您需要需刷新一下才行;同一個(gè)好友僅能點(diǎn)擊一次。
購(gòu)買VIP,觀看所有收費(fèi)教程!