【Unity3D】Mesh Mesh (Mesh concept | Mesh example | 3D object rendering mode in Unity | Shading mode | Wireframe mode | Wireframe shading mode)





1. Introduction to Mesh



1. Mesh concept

Each 3D model is composed of many small planes , and the interior of the model is empty ; the grid Mesh specifies the shape of the 3D model , which encapsulates the following data of the 3D model:

  • Vertex coordinates
  • noodle
  • normal direction of face

Once the mesh Mesh is defined, the basic shape of the object in the 3D space is defined ;


2. Mesh example

Game objects in Unity are composed of triangular planes , and the data of these triangular planes and vertices are recorded in the mesh ;

  • Each face of the cube is composed of 2 triangles , and the entire cube is composed of 12 triangles;

Insert image description here

  • The sphere is composed of many planes spliced ​​together by triangles, and is hollow inside; the surface of the sphere is not smooth, but is composed of planes; the more triangle planes used to make up the sphere, the smoother it looks, and the displayed The more precise it is, the higher the corresponding GPU consumption will be;
    • High model: a very detailed 3D model with a very large number of faces, such as tens of millions;
    • Low model: As opposed to high model, the faces that make up the model are very simple;

Insert image description here





2. 3D object rendering mode in Unity



Rendering mode of 3D objects in the Unity editor:

  • Shading mode
  • Wireframe mode
  • Wireframe shading mode

1. Coloring mode

Shading mode: Shaded mode , only the rendering material of the surface is displayed;
Insert image description here


2. Wireframe mode

Wireframe mode: Wireframe mode, only displays the surface mesh;
Insert image description here


3. Wireframe shading mode

Wireframe shading mode: Shaded Wireframe mode displays both the material and the grid;
Insert image description here


4. Switch rendering mode

In the Scene window of the Unity editor, the material of the 3D object is displayed by default, and the Shaded material option is displayed in the upper left corner of the window;

Insert image description here

Click the Shaded option, and a menu will pop up. Select the second item, Wireframe, to display the mesh information of the 3D object;

Insert image description here

Guess you like

Origin blog.csdn.net/han1202012/article/details/127739729