[WebGL2.0][Basic]skinned model

Reene - Nov 3 - - Dev Community

1. Relative defination

Mesh

Definition of Triangle Count:

  • The number of triangles in a mesh is determined by the complexity of the object you want to represent. For example:
    • Simple Shapes: A simple cube only requires 12 triangles (6 faces, with each face consisting of 2 triangles).
    • Complex Shapes: A detailed character model may require thousands or even millions of triangles, allowing for finer details such as facial features and clothing folds.

Primitive

Examples:

  1. Triangle: This is the most basic primitive. Each triangle is defined by 3 vertices (positions) and associated attributes (like color, normals, etc.). During rendering, each triangle can be drawn individually.

  2. Line Segment: This is another type of primitive. A line segment consists of 2 vertices and is commonly used to draw edges or connect points. For instance, line segments can represent the edges of a mesh.

  3. Point: Points are also a primitive type, representing a single position. They are typically used to represent particles in a particle system or the position of lights.

Example

Suppose we are creating a 3D cube mesh:

  • Mesh Definition: This cube can be made up of 12 triangles. Each face has two triangles, together forming the shape of a cube.

  • Primitive Usage: When rendering this cube, we will utilize multiple primitives (triangles), each containing information about 3 vertices, along with their colors, normals, and other data.

This combination of meshes and primitives allows for the construction and rendering of complex objects in a 3D environment efficiently. If you have more questions or need further clarification, feel free to ask!

. . . . .
Terabox Video Player