B2 中上級 2581 タグ追加 保存
The Mesh Renderer.
To render a mesh we need 2 components.
The Mesh Filter
and the Mesh Renderer.
When importing a mesh model
Unity will automatically create a
prefab asset that includes a mesh filter
component to hold the mesh data for the model
and a mesh renderer component
to render this mesh data in our scene.
The mesh renderer does not
render skinned meshes.
Skinned meshes are used for rendering characters.
Characters are animated using bones
and every bone effects part of the mesh.
If the model is skinned,
Unity will create a skinned mesh renderer
for the imported model instead.
Information on skinned mesh renderers
can be found in another lesson.
Each mesh asset needs it's own mesh filter
and mesh renderer.
If the model is made of several
separate meshes each will have it's own
prefab game object with it's own
mesh filter - mesh renderer pair.
The mesh filter holds the mesh data of the model
and passes it to the mesh renderer
for rendering on screen.
The mesh filter component
has only one property and this is
a reference to the mesh asset itself.
The mesh renderer takes the mesh model
data from the mesh filter and renders
it in our scene at the position,
rotation and scale defined by
the object's transform component.
The mesh renderer has properties that
define how the model will be rendered
or drawn in our scene.
These fall in to 3 broad categories.
Shadows, materials and light probes.
With shadows, if there is a shadow
casting light on the object we can
set whether the mesh renderer will
cast and or receive shadows.
Next there is a list of materials
to render the object with.
Unity needs at least one material assigned
to the mesh renderer to be able to draw
that object in our scene.
For more information on materials themselves
see the appropriate lesson.
Meshes imported in to Unity can
use multiple materials, if the mesh
model has been setup to do so
in the original modelling application.
The mesh renderer maintains a list
simply called Materials for all materials
used by the mesh model.
Often this list only contains one material.
This materials list should have one slot
in the list for each sub mesh
on the mesh model.
If any given slot has no material assigned
the associated mesh will show pink
indicating that the material is missing.
Lastly, there are light probes.
A mesh can be lit by light probes.
Light probes sample the lighting of a scene
at a point and cast that light on
on to the rendered mesh.
This is often used in conjunction
with light mapping.
Light probes light dynamic objects
such as characters that would not receive
baked lighting information from a light map.
To use light probes,
the Use Light Probes option must be enabled.
For more information on light probes,
including the Anchor Override property,
please see the appropriate lesson
and documentation link below.


メッシュレンダラとフィルター-Unity公式チュートリアル (Mesh Renderers and Filters - Unity Official Tutorials)

2581 タグ追加 保存
朱瑛 2014 年 5 月 2 日 に公開
  1. 1. クリック一つで単語を検索


  2. 2. リピート機能


  3. 3. ショートカット


  4. 4. 字幕の表示/非表示


  5. 5. 動画をブログ等でシェア


  6. 6. 全画面再生


  1. クイズ付き動画


  1. クリックしてメモを表示

  1. UrbanDictionary 俚語字典整合查詢。一般字典查詢不到你滿意的解譯,不妨使用「俚語字典」,或許會讓你有滿意的答案喔