Mesh Filter & Mesh Render


Mesh Filter

  The Mesh Filter takes a mesh from your assets and passes it to the Mesh Renderer for rendering on the screen.

  Mesh Filter決定使用哪一個Mesh。Mesh Filter只有一個參數,就是指定Mesh。

  

  When importing mesh assets, Unity automatically creates a Skinned Mesh Renderer if the mesh is skinned, or a Mesh Filter along with a Mesh Renderer, if it is not.

Mesh Render

  The Mesh Renderer takes the geometry from the Mesh Filter and renders it at the position defined by the object's Transform component.

  Mesh Render 負責渲染 Mesh Filter 指定的 Mesh,在 Transform 的位置渲染這個Mesh。

  

  Mesh Render參數主要指定是否產生和接受陰影,以及使用了Meterial。

  Meshes imported from 3D packages can use multiple Materials.  Each submesh will use one material from the materials list. If there are more materials assigned to the Mesh Renderer than there are submeshes in the mesh, the first submesh will be rendered with each of the remaining materials, one on top of the next. At a cost of performance, this will let you set up multi-pass rendering on that submesh. Fully opaque materials, however, will simply overwrite the previous layers, costing performance for no advantage.

  如果有多個Meterial,並且Meterial數量多過Submesh的數量,則第一個Mesh會使用自己對應的meterial以及剩下的meterial。排最后的meterial會被前面的meterial覆蓋或混合。

  一個GameObejct如果擁有多個Material,則Unity會將多個Material轉化為多個Pass。

參考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/class-MeshRenderer.html

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM