A detailed discussion of mesh grids in unity

Source: Internet
Author: User

3D Models

The points and polygons created by 3D modeling software, such as triangles-based points and polygons, such as a ball in the head of a person, are points and polygons made up of various triangles.

Point and polygon and texture coordinates are modeled by 3D modeling software.

Unity will help us to store the information of the model in the mesh, and mesh into Chinese is the grid.

Vertices, triangles, texture coordinates, normals, and tangents.

3D modeling Software

1:autodesk 3D Studio Max supports Mac OS windows;
2:autodesk 3D Maya supports Windows
3:CINEMA4D support for Mac OS Windows
4:blender Open Source Cross-platform of all-round three-dimensional production software, support Mac OS windows, Linux;
5:CHEETAH3D: Support for Mac OS
Unit ratio of 6:unity to modeling software:
Unity system Unit m, modeling software size of M is different, so when the import is different:

The size of the internal meter after unity is imported from/m to the Unity unit's proportional relationship
3Dmax 1 0.01 100:1
Maya 1 100 1:100
Cinema 4D 1 100 1:100
Light Wave 1 0.01 100:1


Grid Mesh

1:unity provides a mesh class that allows scripts to be created and modified to create or modify meshes of objects through mesh classes, making very cool object morphing effects.
The 2:mesh filter grid filters out the grid from the resource and passes it to Meshrender, which is used to draw and import the model, and unity automatically creates one such component;
3:mesh is a mesh that is instantiated by the grid filter, the properties of the mesh storing the object's grid data and the method of generating or modifying the object mesh.
4: Point----> Vertex array <vector3>: x, y, z coordinate for each vertex. Vector3 objects, polygons and polygons have common vertices, so in order to save memory, first save the vertex, and then save the triangle;
5: Polygon----> Triangle index array <int>: Mesh inside each triangle is a polygon, because the polygon and polygon vertices are common, so, using an index to represent a polygon of the triangle, you can save the model memory space, 0, 1, 2 polygons, corresponding vertices in the vertex array in the index, The order of the triangle vertices is counterclockwise to the front and clockwise to the opposite.
6: Vertex normal: The plane's normal is the line perpendicular to the face, strictly speaking, the point is no normal, in the light calculation, the use of normal to light calculation,

If all the normals on a face are the same, then the light coloring is the same and looks strange, so through some algorithm, the normals of the vertices common to multiple faces are interpolated according to the algorithm, and the vertex normals are obtained.
7: Vertex texture coordinates <vector2>: The UV coordinates of the vertices corresponding to the texture;
6: Vertex tangent <Vector4> vertex tangent, know that there is this thing on the line;

Important properties of Mesh

(1) vertices mesh vertex array;
(2) A normal array of normals meshes;
(3) Tangent array of the tangents grid;
(4) The base texture coordinates of the UV mesh;
(5) The second texture coordinate set by the uv2 grid;
(6) The bounding box of the bounds grid;
(7) An array of vertex colors for the Colors grid;
(8) Triangles contains an array of vertex indices for all triangles;
(9) The number of vertices in the vectexcount grid (read-only);
(ten) The number of Submeshcount sub-grids, each with a separate grid list;
(one) Bonesweights: The bone weight of each vertex;
Bindposes: Bind posture, each index-bound pose uses the same index bone;

A detailed discussion of mesh grids in unity

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.