Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Polygon mesh

From Wikipedia, the free encyclopedia
Set of polygons to define the surface of a 3D model
icon
This articleneeds additional citations forverification. Relevant discussion may be found on thetalk page. Please helpimprove this article byadding citations to reliable sources in this article. Unsourced material may be challenged and removed.
Find sources: "Polygon mesh" – news ·newspapers ·books ·scholar ·JSTOR
(June 2009) (Learn how and when to remove this message)
Example of alow polytriangle mesh representing adolphin

In3D computer graphics andsolid modeling, apolygon mesh is a collection ofvertices,edges andfaces that defines the shape of apolyhedral object'ssurface. It simplifiesrendering, as in awire-frame model. Thefaces usually consist oftriangles (triangle mesh),quadrilaterals (quads), or other simpleconvex polygons (n-gons). A polygonal mesh may also be more generally composed ofconcave polygons, or evenpolygons with holes.

The study ofpolygon meshes is a large sub-field ofcomputer graphics (specifically 3D computer graphics) andgeometric modeling. Different representations of polygon meshes are used for different applications and goals. The variety of operations performed on meshes includesBoolean logic (Constructive solid geometry),smoothing, andsimplification. Algorithms also exist forray tracing,collision detection, andrigid-body dynamics with polygon meshes. If the mesh's edges are rendered instead of the faces, then the model becomes awireframe model.

Several methods exist formesh generation, including themarching cubes algorithm.[1]

Volumetric meshes are distinct from polygon meshes in that they explicitly represent both the surface and interior region of a structure, while polygon meshes only explicitly represent the surface (the volume is implicit).

Elements

[edit]

Elements of polygonal mesh modeling.

Objects created with polygon meshes must store different types of elements. These include vertices, edges, faces, polygons and surfaces. In many applications, only vertices, edges and either faces or polygons are stored. A renderer may support only 3-sided faces, so polygons must be constructed of many of these, as shown above. However, many renderers either support quads and higher-sided polygons, or are able to convert polygons to triangles on the fly, making it unnecessary to store a mesh in atriangulated form.

vertex
A position (usually in 3D space) along with other information such as color, normal vector and texture coordinates.
edge
A connection between two vertices.
face
A closed set of edges, in which atriangle face has three edges, and aquad face has four edges. Apolygon is acoplanar set of faces. In systems that support multi-sided faces, polygons and faces are equivalent. However, most rendering hardware supports only 3- or 4-sided faces, so polygons are represented as multiple faces. Mathematically, a polygonal mesh may be considered anunstructured grid, or undirected graph, with additional properties of geometry, shape and topology.
surfaces
More often calledsmoothing groups, are useful, but not required to group smooth regions. Consider a cylinder with caps, such as a soda can. For smooth shading of the sides, allsurface normals must point horizontally away from the center, while the normals of the caps must point straight up and down. Rendered as a single,Phong-shaded surface, the crease vertices would have incorrect normals. Thus, some way of determining where to cease smoothing is needed to group smooth parts of a mesh, just as polygons group 3-sided faces. As an alternative to providing surfaces/smoothing groups, a mesh may contain other data for calculating the same data, such as a splitting angle (polygons with normals above this threshold are either automatically treated as separate smoothing groups or some technique such as splitting or chamfering is automatically applied to the edge between them. Additionally, very high resolution meshes are less subject to issues that would require smoothing groups, as their polygons are so small as to make the need irrelevant. Further, another alternative exists in the possibility of simply detaching the surfaces themselves from the rest of the mesh. Renderers do not attempt to smooth edges across noncontiguous polygons.
groups
Some mesh formats containgroups, which define separate elements of the mesh, and are useful for determining separate sub-objects forskeletal animation or separate actors for non-skeletal animation.
materials
Generallymaterials will be defined, allowing different portions of the mesh to use differentshaders when rendered.
UV coordinates
Most mesh formats also support some form ofUV coordinates which are a separate 2d representation of the mesh "unfolded" to show what portion of a two-dimensionaltexture map to apply to different polygons of the mesh. It is also possible for meshes to contain other such vertexattribute information such as colour, tangent vectors,weight maps to controlanimation, etc. (sometimes also calledchannels).

Vertices

[edit]
UML class diagram
UML class diagram

Avertex (pluralvertices) in computer graphics is a data structure that describes at least the position of a point in 2D or 3Dspace on asurface. The vertices of triangles often are associated not only with spatial position but also withattributes, other values used torender the object correctly. Most attributes of a vertex represent vectors in the space to berendered. These vectors are typically 1 (x), 2 (x, y), or 3 (x, y, z) dimensional and can include a fourthhomogeneous coordinate (w). These values are given meaning by amaterial description. Inreal-time rendering these properties are used by avertex shader orvertex pipeline. Such attributes can include:

Position
2D or 3D coordinates representing a position in space
Color
Typically diffuse or specularRGB values, either representing surface colour orprecomputed lighting information.
Reflectance
of the surface at the vertex, e.g.specular exponent, metallicity, fresnel values.
Texture coordinates
Also known asUV coordinates, these control thetexture mapping of the surface, possibly for multiple layers.
normal vectors
These define an approximated curved surface at the location of the vertex, used for lighting calculations (such asPhong shading),normal mapping, ordisplacement mapping, and to control subdivision.
tangent vectors
These define an approximated curved surface at the location of the vertex, used for lighting calculations (such asPhong shading),normal mapping, ordisplacement mapping, and to control subdivision.
Blend weights
Bone weights
Weighting for assignment to bones to control deformation inskeletal animation.
Blend shapes
Multiple position vectors may be specified to be blended over time, especially forfacial animation.

Polygons

[edit]

Polygons are used incomputer graphics to compose images that arethree-dimensional in appearance,[2] and are one of the most popular geometric building blocks in computer graphics.[3] Polygons are built up ofvertices, and are typically used as triangles.

Amodel's polygons can be rendered and seen simply in awire frame model, where the outlines of the polygons are seen, as opposed to having them be shaded. This is the reason for a polygon stage incomputer animation. Thepolygon count refers to the number of polygons being rendered perframe.

Beginning with thefifth generation of video game consoles, the use of polygons became more common, and with each succeeding generation, polygonal models became increasingly complex.

Representations

[edit]

Polygon meshes may be represented in a variety of ways, using different methods to store the vertex, edge and face data. These include:

Face-vertex meshes
A simple list ofvertices, and a set of polygons that point to the vertices it uses.
Winged-edge
in which each edge points to two vertices, two faces, and the four (clockwise and counterclockwise) edges that touch them. Winged-edge meshes allow constant time traversal of the surface, but with higher storage requirements.
Half-edge meshes
Similar to winged-edge meshes except that only half the edge traversal information is used. (seeOpenMesh)
Quad-edge meshes
which store edges, half-edges, and vertices without any reference to polygons. The polygons are implicit in the representation, and may be found by traversing the structure. Memory requirements are similar to half-edge meshes.
Corner-tables
which store vertices in a predefined table, such that traversing the table implicitly defines polygons. This is in essence thetriangle fan used in hardware graphics rendering. The representation is more compact, and more efficient for retrieving polygons, but operations to change polygons are slow. Furthermore, corner-tables do not represent meshes completely. Multiple corner-tables (triangle fans) are needed to represent most meshes.
Vertex-vertex meshes
A VV mesh represents only vertices, which point to other vertices. Both the edge and the face information is implicit in the representation. However, the simplicity of the representation does not allow for many efficient operations to be performed on meshes.

Each of the representations above have particular advantages and drawbacks, further discussed in Smith (2006).[4]The choice of the data structure is governed by the application, the performance required, size of the data, and the operations to be performed. For example, it is easier to deal with triangles than general polygons, especially incomputational geometry. For certain operations it is necessary to have a fast access to topological information such as edges or neighboring faces; this requires more complex structures such as the winged-edge representation. For hardware rendering, compact, simple structures are needed; thus the corner-table (triangle fan) is commonly incorporated into low-level rendering APIs such asDirectX andOpenGL.

Vertex-vertex meshes

[edit]
Figure 2. Vertex-vertex meshes
Figure 2. Vertex-vertex meshes

Vertex-vertex meshes represent an object as a set of vertices connected to other vertices. This is the simplest representation, but not widely used since the face and edge information is implicit. Thus, it is necessary to traverse the data in order to generate a list of faces for rendering. In addition, operations on edges and faces are not easily accomplished.

However, VV meshes benefit from small storage space and efficient morphing of shape. The above figure shows a four-sided box as represented by a VV mesh. Each vertex indexes its neighboring vertices. The last two vertices, 8 and 9 at the top and bottom center of the "box-cylinder", have four connected vertices rather than five. A general system must be able to handle an arbitrary number of vertices connected to any given vertex.

For a complete description of VV meshes see Smith (2006).[4]

Face-vertex meshes

[edit]
Figure 3. Face-vertex meshes
Figure 3. Face-vertex meshes

Face-vertex meshes represent an object as a set of faces and a set of vertices. This is the most widely used mesh representation, being the input typically accepted by modern graphics hardware.

Face-vertex meshes improve on VV mesh for modeling in that they allow explicit lookup of the vertices of a face, and the faces surrounding a vertex. The above figure shows the "box-cylinder" example as an FV mesh. Vertex v5 is highlighted to show the faces that surround it. Notice that, in this example, every face is required to have exactly 3 vertices. However, this does not mean every vertex has the same number of surrounding faces.

For rendering, the face list is usually transmitted to the GPU as a set of indices to vertices, and the vertices are sent as position/color/normal structures (in the figure, only position is given). This has the benefit that changes in shape, but not geometry, can be dynamically updated by simply resending the vertex data without updating the face connectivity.

Modeling requires easy traversal of all structures. With face-vertex meshes it is easy to find the vertices of a face. Also, the vertex list contains a list of faces connected to each vertex. Unlike VV meshes, both faces and vertices are explicit, so locating neighboring faces and vertices is constant time. However, the edges are implicit, so a search is still needed to find all the faces surrounding a given face. Other dynamic operations, such as splitting or merging a face, are also difficult with face-vertex meshes.

Winged-edge meshes

[edit]
Figure 4. Winged-edge meshes
Figure 4. Winged-edge meshes

Introduced by Baumgart in 1975,winged-edge meshes explicitly represent the vertices, faces, and edges of a mesh. This representation is widely used in modeling programs to provide the greatest flexibility in dynamically changing the mesh geometry, because split and merge operations can be done quickly. Their primary drawback is large storage requirements and increased complexity due to maintaining many indices. A good discussion of implementation issues of Winged-edge meshes may be found in the bookGraphics Gems II.

Winged-edge meshes address the issue of traversing from edge to edge, and providing an ordered set of faces around an edge. For any given edge, the number of outgoing edges may be arbitrary. To simplify this, winged-edge meshes provide only four, the nearest clockwise and counter-clockwise edges at each end. The other edges may be traversed incrementally. The information for each edge therefore resembles a butterfly, hence "winged-edge" meshes. The above figure shows the "box-cylinder" as a winged-edge mesh. The total data for an edge consists of 2 vertices (endpoints), 2 faces (on each side), and 4 edges (winged-edge).

Rendering of winged-edge meshes for graphics hardware requires generating a Face index list, which is usually done only when the geometry changes. Winged-edge meshes are ideally suited for dynamic geometry, such as subdivision surfaces and interactive modeling, since changes to the mesh can occur locally. Traversal across the mesh, as might be needed for collision detection, can be accomplished efficiently.

See Baumgart (1975) for more details.[5]

Render dynamic meshes

[edit]

Winged-edge meshes are not the only representation which allows for dynamic changes to geometry. A new representation which combines winged-edge meshes and face-vertex meshes is therender dynamic mesh, which explicitly stores both, the vertices of a face and faces of a vertex (like FV meshes), and the faces and vertices of an edge (like winged-edge).

Render dynamic meshes requires slightly less storage space than standard winged-edge meshes, and can be directly rendered by graphics hardware since the face list contains an index of vertices. In addition, traversal from vertex to face is explicit (constant time), as is from face to vertex. RD meshes do not require the four outgoing edges since these can be found by traversing from edge to face, then face to neighboring edge.

RD meshes benefit from the features of winged-edge meshes by allowing for geometry to be dynamically updated.

See Tobler & Maierhofer (WSCG 2006) for more details.[6]

Summary

[edit]
Summary of mesh representation
OperationVertex-vertexFace-vertexWinged-edgeRender dynamic
V-VAll vertices around vertexExplicitV → f1, f2, f3, ... → v1, v2, v3, ...V → e1, e2, e3, ... → v1, v2, v3, ...V → e1, e2, e3, ... → v1, v2, v3, ...
E-FAll edges of a faceF(a,b,c) → {a,b}, {b,c}, {a,c}F → {a,b}, {b,c}, {a,c}ExplicitExplicit
V-FAll vertices of a faceF(a,b,c) → {a,b,c}ExplicitF → e1, e2, e3 → a, b, cExplicit
F-VAll faces around a vertexPair searchExplicitV → e1, e2, e3 → f1, f2, f3, ...Explicit
E-VAll edges around a vertexV → {v,v1}, {v,v2}, {v,v3}, ...V → f1, f2, f3, ... → v1, v2, v3, ...ExplicitExplicit
F-EBoth faces of an edgeList compareList compareExplicitExplicit
V-EBoth vertices of an edgeE(a,b) → {a,b}E(a,b) → {a,b}ExplicitExplicit
FlookFind face with given verticesF(a,b,c) → {a,b,c}Set intersection of v1,v2,v3Set intersection of v1,v2,v3Set intersection of v1,v2,v3
Storage sizeV*avg(V,V)3F + V*avg(F,V)3F + 8E + V*avg(E,V)6F + 4E + V*avg(E,V)
Example with 10 vertices, 16 faces, 24 edges:
10 * 5 = 503*16 + 10*5 = 983*16 + 8*24 + 10*5 = 2906*16 + 4*24 + 10*5 = 242
Figure 6: summary of mesh representation operations

In the above table,explicit indicates that the operation can be performed in constant time, as the data is directly stored;list compare indicates that a list comparison between two lists must be performed to accomplish the operation; andpair search indicates a search must be done on two indices. The notationavg(V,V) means the average number of vertices connected to a given vertex;avg(E,V) means the average number of edges connected to a given vertex, andavg(F,V) is the average number of faces connected to a given vertex.

The notation "V → f1, f2, f3, ... → v1, v2, v3, ..." describes that a traversal across multiple elements is required to perform the operation. For example, to get "all vertices around a given vertex V" using the face-vertex mesh, it is necessary to first find the faces around the given vertex V using the vertex list. Then, from those faces, use the face list to find the vertices around them. Winged-edge meshes explicitly store nearly all information, and other operations always traverse to the edge first to get additional info. Vertex-vertex meshes are the only representation that explicitly stores the neighboring vertices of a given vertex.

As the mesh representations become more complex (from left to right in the summary), the amount of information explicitly stored increases. This gives more direct, constant time, access to traversal and topology of various elements but at the cost of increased overhead and space in maintaining indices properly.

Figure 7 shows theconnectivity information for each of the four technique described in this article. Other representations also exist, such as half-edge and corner tables. These are all variants of how vertices, faces and edges index one another.

As a general rule, face-vertex meshes are used whenever an object must be rendered on graphics hardware that does not change geometry (connectivity), but may deform or morph shape (vertex positions) such asreal-time rendering of static or morphing objects. Winged-edge or render dynamic meshes are used when the geometry changes, such as in interactive modeling packages or for computing subdivision surfaces. Vertex-vertex meshes are ideal for efficient, complex changes in geometry or topology so long as hardware rendering is not of concern.

Other representations

[edit]
Streaming meshes
store faces in an ordered, yet independent, way so that the mesh can be transmitted in pieces. The order of faces may be spatial, spectral, or based on other properties of the mesh. Streaming meshes allow a very large mesh to be rendered even while it is still being loaded.
Progressive meshes
transmit the vertex and face data with increasing levels of detail. Unlikestreaming meshes, progressive meshes give the overall shape of the entire object, but at a low level of detail. Additional data, new edges and faces, progressively increase the detail of the mesh.
Normal meshes
transmit progressive changes to a mesh as a set of normal displacements from a base mesh. With this technique, a series of textures represent the desired incremental modifications. Normal meshes are compact, since only a single scalar value is needed to express displacement. However, the technique requires a complex series of transformations to create the displacement textures.

File formats

[edit]

There exist many differentfile formats for storing polygon mesh data. Each format is most effective when used for the purpose intended by its creator.Popular formats include.fbx,.dae,.obj, and.stl. A table of some more of these formats is presented below:

File suffixFormat nameOrganization(s)Program(s)Description
.rawRaw meshUnknownVariousOpen, ASCII-only format. Each line contains three vertices, separated by spaces, to form a triangle, like so: X1 Y1 Z1 X2 Y2 Z2 X3 Y3 Z3
.blendBlender File FormatBlender FoundationBlender 3DOpen source, binary-only format
.fbxAutodesk FBX FormatAutodeskVariousProprietary. Binary and ASCII specifications exist.
.3ds3ds Max FileAutodesk3ds MaxA common but outdated format with hard 16-bit limits on the number of vertices and faces. Neither standardised nor well documented, but used to be a "de facto standard" for data exchange.
.daeDigital Asset Exchange (COLLADA)Sony Computer Entertainment,Khronos GroupN/AStands for "COLLAborativeDesignActivity". A universal format designed to prevent incompatibility.
.dgnMicroStation FileBentley SystemsMicroStationThere are two dgn file formats: pre-version 8 and version 8 (V8)
.3dmRhino FileRobert McNeel & AssociatesRhinoceros 3D
.dxf,.dwgDrawing Exchange FormatAutodeskAutoCAD
.objWavefront OBJWavefront TechnologiesVariousASCII format describing 3D geometry. All faces' vertices are ordered counter-clockwise, making facet normals implicit. Smooth normals are specified per vertex.
.plyPolygon File FormatStanford UniversityVariousBinary and ASCII
.pmdPolygon Movie Maker dataYu HiguchiMikuMikuDanceProprietary binary file format for storing humanoid model geometry with rigging, material, and physics information.
.stlStereolithography Format3D SystemsManyBinary and ASCII format originally designed to aid inCNC.
.amfAdditive Manufacturing File FormatASTM InternationalN/ALike the STL format, but with added native color, material, and constellation support.
.wrlVirtual Reality Modeling LanguageWeb3D ConsortiumWeb BrowsersISO Standard 14772-1:1997
.wrzVRML CompressedWeb3D ConsortiumWeb Browsers
.x3d, .x3db, .x3dvExtensible 3DWeb3D ConsortiumWeb BrowsersXML-based, open source, royalty-free, extensible, and interoperable; also supports color, texture, and scene information. ISO Standard 19775/19776/19777
.x3dz, .x3dbz, .x3dvzX3D Compressed BinaryWeb3D ConsortiumWeb Browsers
.c4dCinema 4D FileMaxonCINEMA 4D
.lwoLightWave 3D object FileNewTekLightWave 3D
.smbSCOREC apfRPI SCORECPUMIOpen source parallel adaptive unstructured 3D meshes for PDE based simulation workflows.
.mshGmsh MeshGMsh DevelopersGMsh ProjectOpen source, providing an ASCII mesh description for linear and polynomially interpolated elements in one to three dimensions.
.meshOGRE XMLOGRE Development TeamOGRE, purebasicOpen Source. Binary (.mesh) and ASCII (.mesh.xml) format available. Includes data for vertex animation andMorph target animation (blendshape).Skeletal animation data in separate file (.skeleton).
.vegVega FEM tetrahedral meshJernej BarbičVega FEMOpen Source. Stores a tetrahedral mesh and its material properties for FEM simulation. ASCII (.veg) and binary (.vegb) formats available.
.z3dZ3dOleg MelashenkoZanoza Modeler-
.vtkVTK meshVTK,KitwareVTK,ParaviewOpen, ASCII or binary format that contains many different data fields, including point data, cell data, and field data.
.l4dLAI4D drawingLaboratory of Artificial Intelligence for DesignLAI4DASCII data format that describes a hierarchical tree of entities.

See also

[edit]

References

[edit]
  1. ^Lorensen, William E.; Cline, Harvey E. (1 August 1987). "Marching cubes: A high resolution 3D surface construction algorithm".ACM SIGGRAPH Computer Graphics.21 (4):163–169.CiteSeerX 10.1.1.545.613.doi:10.1145/37402.37422.
  2. ^Bailey, Kat (Apr 18, 2016)."Star Fox's History of Innovation, For Better or Worse".usgamer. Archived fromthe original on 2022-10-22. Retrieved2022-07-17.Developed in part by Argonaut Software, a studio that included a young Dylan Cuthbert, it pushed the Super Nintendo to the absolute limits. It looks dated now, but at the time Star Fox's polygonal graphics were sleek and cool, and well beyond anything available on the competition
  3. ^Heckbert, Paul S. (1994). "Polygons and Polyhedra". In Heckbert, Paul S. (ed.).Graphics Gems IV. Vol. 4. Morgan Kaufmann. p. 1.ISBN 978-0-12-336155-4.
  4. ^abColin Smith,On Vertex-Vertex Meshes and Their Use in Geometric and Biological Modeling, (PDF)
  5. ^Bruce Baumgart, Winged-Edge Polyhedron Representation for Computer Vision. National Computer Conference, May 1975."Use of Polyhedra in computer vision".baumgart.org. May 1975. Archived fromthe original on 2005-08-29. Retrieved2005-08-29.
  6. ^Tobler & Maierhofer,A Mesh Data Structure for Rendering and Subdivision. 2006. (PDF)

External links

[edit]
Types of mesh
Methods
Related
Retrieved from "https://en.wikipedia.org/w/index.php?title=Polygon_mesh&oldid=1323084067"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp