In order to render our self -made Mesh, we first increased on a vacant component.
The mesh renderer component for our stored storage is to read itself to obtain Mesh for rendering, so these two components are used for use.
The mesh is composed of points and lines as literally.
It Figure 2 is a plane grid, Figure 3 is our common CUBE grid.
The smallest unit of our common grid is a triangle, which is the smallest unit composed of three vertices.
is very simple to make a Mesh. We only need to New a Mesh and then assign the component to our components to pull.
But so we still can't see anything because there are no other information and no apex information.
In this step, we will start to formally add a vertex to the MESH that we make, first try to add 3 points.
It's vertex coordinates successfully added to our Mesh lirak. The coordinate point here corresponds to the coordinate point of world coordinates.
The 0 here is 0 in the bidding of the vertex coordinate information, which is corresponding to vertices. The storage is the setting of the apex coordinates. But setting here you found that it is useless. There is no thing in the scene. There is no reaction. Because we need to connect a minimum unit, that is, a triangle, from the perspective of the connection, we are a line and we cannot form a surface, so we only need to adjust a slight adjustment to get a triangle.
In click MESH to view it to see a mesh of a triangular surface;
This also corresponds to a purple -free triangle surface in the scene.
But some friends may not see the triangle surface in the scene after generation, as shown below.
why is this? First of all, you need to confirm that your component's Materials SIZE is greater than 0
It to eliminate this problem, you need to pay attention to Triangles, Mesh's triangle bidding information. The coordinate system in Figure 6 and Figure 7 found that the triangle interview displayed in Figure 6 is in the positive direction of the Z axis, and the displayed Figure 7 is in the opposite direction of the Z axis. This is because we only rendered one side, so the back information was not rendered. So what information determines the positive rendering? is actually the sequence of our triangle. The order of our here is 0 2 1 to rotate clockwise. So the Z axis is rendered on the front.
Is when we use the sequence of 0 1 2 points, that is, the triangular surface seen by the counterclockwise sequence should be rendered in the Z -axis negative side
It we add materials in it, you will be you will add the material in it, you will be you will add materials to you. It is discovered that it turns black, why is it black? It is because the material does not correspond to this Mesh, this Mesh has no UV coordinate information. So what exactly is UV coordinates?
UV coordinates are a coordinate system of horizontal coordinates U, and vertical coordinates. The general value range is between (0,1). It represents the position relationship of the texture information, and the specific location corresponds to each pixel point of the texture.
If the texture you loaded is a pure black map, you must consider whether the auto Greerate Lighting is not set to ON.
Under the premise of understanding what the legal line is, let's take a look at the impact of the method line on Mesh.
The effect is obvious. When there is no legal line, there is no light information, and no reflex light looks gray. and FIG. 13 14 adds the method, it will be affected by the light information. From different perspectives, it has different effects.
The method lines are divided into vertex lines and face lines. There are three vertices and a triangle surface on this triangle surface, and there are three vertices and a facade lines corresponding to the corresponding. The method line is perpendicular to the point and surface. The simply adding method line information can be used here. You can use the
of course you can add the method line information to it yourself.
Why is it -1 here, not Zheng 1. We just said that the direction of the law line is outward. When the direction of our lights is the same as the direction of the method, we cannot see the effect of light information, and on the contrary, we can well reflect the reflection effect of light.
It is just to introduce some basic information about the Mesh grid. There must be many places that there are ambiguity and embarrassment, and you are welcome to point out if there are incorrect places. thank you all.
In order to render our self -made Mesh, we first increased on a vacant component.
The mesh renderer component for our stored storage is to read itself to obtain Mesh for rendering, so these two components are used for use.
The mesh is composed of points and lines as literally.
It Figure 2 is a plane grid, Figure 3 is our common CUBE grid.
The smallest unit of our common grid is a triangle, which is the smallest unit composed of three vertices.
is very simple to make a Mesh. We only need to New a Mesh and then assign the component to our components to pull.
But so we still can't see anything because there are no other information and no apex information.
In this step, we will start to formally add a vertex to the MESH that we make, first try to add 3 points.
It's vertex coordinates successfully added to our Mesh lirak.
The coordinate point here corresponds to the coordinate point of world coordinates.
The 0 here is 0 in the bidding of the vertex coordinate information, which is corresponding to vertices. The storage is the setting of the apex coordinates.
But setting here you found that it is useless. There is no thing in the scene. There is no reaction.
Because we need to connect a minimum unit, that is, a triangle, from the perspective of the connection, we are a line and we cannot form a surface, so we only need to adjust a slight adjustment to get a triangle.
In click MESH to view it to see a mesh of a triangular surface;
This also corresponds to a purple -free triangle surface in the scene.
But some friends may not see the triangle surface in the scene after generation, as shown below.
why is this? First of all, you need to confirm that your component's Materials SIZE is greater than 0
It to eliminate this problem, you need to pay attention to Triangles, Mesh's triangle bidding information.
The coordinate system in Figure 6 and Figure 7 found that the triangle interview displayed in Figure 6 is in the positive direction of the Z axis, and the displayed Figure 7 is in the opposite direction of the Z axis.
This is because we only rendered one side, so the back information was not rendered.
So what information determines the positive rendering?
is actually the sequence of our triangle.
The order of our here is 0 2 1 to rotate clockwise. So the Z axis is rendered on the front.
Is when we use the sequence of 0 1 2 points, that is, the triangular surface seen by the counterclockwise sequence should be rendered in the Z -axis negative side
It we add materials in it, you will be you will add the material in it, you will be you will add materials to you. It is discovered that it turns black, why is it black? It is because the material does not correspond to this Mesh, this Mesh has no UV coordinate information. So what exactly is UV coordinates?
UV coordinates are a coordinate system of horizontal coordinates U, and vertical coordinates. The general value range is between (0,1). It represents the position relationship of the texture information, and the specific location corresponds to each pixel point of the texture.
If the texture you loaded is a pure black map, you must consider whether the auto Greerate Lighting is not set to ON.
Under the premise of understanding what the legal line is, let's take a look at the impact of the method line on Mesh.
The effect is obvious. When there is no legal line, there is no light information, and no reflex light looks gray.
and FIG. 13 14 adds the method, it will be affected by the light information. From different perspectives, it has different effects.
The method lines are divided into vertex lines and face lines. There are three vertices and a triangle surface on this triangle surface, and there are three vertices and a facade lines corresponding to the corresponding. The method line is perpendicular to the point and surface.
The simply adding method line information can be used here. You can use the
of course you can add the method line information to it yourself.
Why is it -1 here, not Zheng 1. We just said that the direction of the law line is outward. When the direction of our lights is the same as the direction of the method, we cannot see the effect of light information, and on the contrary, we can well reflect the reflection effect of light.
It is just to introduce some basic information about the Mesh grid. There must be many places that there are ambiguity and embarrassment, and you are welcome to point out if there are incorrect places. thank you all.