Search

US-12626466-B2 - Systems and methods for handling bevels in mesh simplification

US12626466B2US 12626466 B2US12626466 B2US 12626466B2US-12626466-B2

Abstract

A method, device, and computer-readable storage medium for simplifying a mesh including bevels. The method includes: receiving a polygonal mesh representing a three-dimensional (3D) object; identifying a set of edges in the polygonal mesh as bevel edges; performing a mesh simplification operation on the polygonal mesh to generate a simplified mesh, wherein the mesh simplification operation removes at least one edge that includes a vertex that is of a bevel edge, and wherein two vertices in the polygonal mesh are collapsed to a collapse vertex in the simplified mesh; and updating stored normals of the collapse vertex based on copying stored normals of the two vertices removed from the polygonal mesh to the collapse vertex.

Inventors

  • Ashton Mason

Assignees

  • ELECTRONIC ARTS INC.

Dates

Publication Date
20260512
Application Date
20240109

Claims (18)

  1. 1 . A method for simplifying a mesh including bevels, the method comprising: receiving a polygonal mesh representing a three-dimensional (3D) object; identifying a set of edges in the polygonal mesh as bevel edges; performing a mesh simplification operation on the polygonal mesh to generate a simplified mesh, wherein the mesh simplification operation removes at least one edge that includes a vertex that is of a bevel edge, and wherein two vertices in the polygonal mesh are collapsed to a collapse vertex in the simplified mesh; and updating stored normals of the collapse vertex based on copying stored normals of the two vertices removed from the polygonal mesh to the collapse vertex; wherein identifying the set of edges in the polygonal mesh as bevel edges comprises: identifying a candidate edge, wherein the candidate edge separates a first face and a second face; determining that the first face has a mean extent that is at least a first threshold multiple of a mean extent of the second face; determining that an absolute rate of normal curvature of the second face is at least a second threshold multiple of an absolute rate of normal curvature of the first face; and determining that the candidate edge is a bevel edge in the set of edges.
  2. 2 . The method according to claim 1 , wherein a mean extent of a given face is determined by computing distances of two wing vertices in the given face from a line of the candidate edge and calculating an average of the distances of the two wing vertices as the mean extent of the given face.
  3. 3 . The method according to claim 1 , wherein an absolute rate of normal curvature of a given face is a mean normal curvature angle of the given face divided by a mean extent of the given face.
  4. 4 . The method according to claim 1 , wherein a bevel face in the polygonal mesh comprises a first bevel edge, a second bevel edge, a third edge between a first vertex of the first bevel edge and a first vertex of the second bevel edge, and a fourth edge between a second vertex of the first bevel edge and a second vertex of the second bevel edge; wherein the first bevel edge separates the bevel face from a first adjacent surface and the second bevel edge separates the bevel face from a second adjacent surface; and wherein vertices of the first bevel edge are smooth shaded between the bevel face and the first adjacent surface and vertices of the second bevel edge are smooth shaded between the bevel face and the second adjacent surface.
  5. 5 . The method according to claim 4 , wherein performing the mesh simplification operation on the polygonal mesh to generate the simplified mesh comprises removing the third edge and the fourth edge; wherein the first vertex of the first bevel edge and the first vertex of the second bevel edge are collapsed to a first collapse vertex in the simplified mesh; wherein the second vertex of the first bevel edge and the second vertex of the second bevel edge are collapsed to a second collapse vertex in the simplified mesh; wherein stored normals from the first vertex of the first bevel edge and stored normals from the first vertex of the second bevel edge are copied to the first collapse vertex; wherein stored normals from the second vertex of the first bevel edge and stored normals from the second vertex of the second bevel edge are copied to the second collapse vertex; wherein the first collapse vertex is hard shaded after copying the stored normals from the first vertex of the first bevel edge and the first vertex of the second bevel edge to the first collapse vertex; and wherein the second collapse vertex is hard shaded after copying the stored normals from the second vertex of the first bevel edge and the second vertex of the second bevel edge to the second collapse vertex.
  6. 6 . The method according to claim 5 , wherein vertices of an edge that are hard shaded have different face-vertex normals on each side of the edge at the vertex; and wherein vertices of an edge that are smooth shaded have matching face-vertex normals on each side of the edge at the vertex.
  7. 7 . The method according to claim 1 , wherein the at least one edge removed from the polygonal mesh includes a first vertex and a second vertex; wherein updating the stored normals of the collapse vertex comprises: connecting each vertex that is incident to either the first vertex or the second vertex by new edges to the collapse vertex; determining which of the new edges should be hard shaded based on the set of edges in the polygonal mesh identified as bevel edges; copying stored normals to each face incident to the collapse vertex in the simplified mesh from corresponding stored normals in the polygonal mesh; and averaging the stored normals of the faces incident to the collapse vertex in groups between hard shaded edges incident to the collapse vertex.
  8. 8 . A non-transitory computer-readable storage medium storing instructions that, when executed by one or more processors, causes a computing device to simplify a mesh including bevels, by performing the steps of: receiving a polygonal mesh representing a three-dimensional ( 3 D) object; identifying a set of edges in the polygonal mesh as bevel edges; performing a mesh simplification operation on the polygonal mesh to generate a simplified mesh, wherein the mesh simplification operation removes at least one edge that includes a vertex that is of a bevel edge, and wherein two vertices in the polygonal mesh are collapsed to a collapse vertex in the simplified mesh; and updating stored normals of the collapse vertex based on copying stored normals of the two vertices removed from the polygonal mesh to the collapse vertex; wherein identifying the set of edges in the polygonal mesh as bevel edges comprises: identifying a candidate edge, wherein the candidate edge separates a first face and a second face; determining that the first face has a mean extent that is at least a first threshold multiple of a mean extent of the second face; determining that an absolute rate of normal curvature of the second face is at least a second threshold multiple of an absolute rate of normal curvature of the first face; and determining that the candidate edge is a bevel edge in the set of edges.
  9. 9 . The computer-readable storage medium according to claim 8 , wherein a mean extent of a given face is determined by computing distances of two wing vertices in the given face from a line of the candidate edge and calculating an average of the distances of the two wing vertices as the mean extent of the given face.
  10. 10 . The computer-readable storage medium according to claim 8 , wherein an absolute rate of normal curvature of a given face is a mean normal curvature angle of the given face divided by a mean extent of the given face.
  11. 11 . The computer-readable storage medium according to claim 8 , wherein a bevel face in the polygonal mesh comprises a first bevel edge, a second bevel edge, a third edge between a first vertex of the first bevel edge and a first vertex of the second bevel edge, and a fourth edge between a second vertex of the first bevel edge and a second vertex of the second bevel edge; wherein the first bevel edge separates the bevel face from a first adjacent surface and the second bevel edge separates the bevel face from a second adjacent surface; and wherein vertices of the first bevel edge are smooth shaded between the bevel face and the first adjacent surface and vertices of the second bevel edge are smooth shaded between the bevel face and the second adjacent surface.
  12. 12 . The computer-readable storage medium according to claim 11 , wherein performing the mesh simplification operation on the polygonal mesh to generate the simplified mesh comprises removing the third edge and the fourth edge; wherein the first vertex of the first bevel edge and the first vertex of the second bevel edge are collapsed to a first collapse vertex in the simplified mesh; wherein the second vertex of the first bevel edge and the second vertex of the second bevel edge are collapsed to a second collapse vertex in the simplified mesh; wherein stored normals from the first vertex of the first bevel edge and stored normals from the first vertex of the second bevel edge are copied to the first collapse vertex; wherein stored normals from the second vertex of the first bevel edge and stored normals from the second vertex of the second bevel edge are copied to the second collapse vertex; wherein the first collapse vertex is hard shaded after copying the stored normals from the first vertex of the first bevel edge and the first vertex of the second bevel edge to the first collapse vertex; and wherein the second collapse vertex is hard shaded after copying the stored normals from the second vertex of the first bevel edge and the second vertex of the second bevel edge to the second collapse vertex.
  13. 13 . The computer-readable storage medium according to claim 12 , wherein vertices of an edge that are hard shaded have different face-vertex normals on each side of the edge at the vertex; and wherein vertices of an edge that are smooth shaded have matching face-vertex normals on each side of the edge at the vertex.
  14. 14 . The computer-readable storage medium according to claim 8 , wherein the at least one edge removed from the polygonal mesh includes a first vertex and a second vertex; wherein updating the stored normals of the collapse vertex comprises: connecting each vertex that is incident to either the first vertex or the second vertex by new edges to the collapse vertex; determining which of the new edges should be hard shaded based on the set of edges in the polygonal mesh identified as bevel edges; copying stored normals to each face incident to the collapse vertex in the simplified mesh from corresponding stored normals in the polygonal mesh; and averaging the stored normals of the faces incident to the collapse vertex in groups between hard shaded edges incident to the collapse vertex.
  15. 15 . A device for simplifying a mesh including bevels, the device comprising: a memory storing instructions; and one or more processors configured to the execute the instructions to cause the device to: receive a polygonal mesh representing a three-dimensional ( 3 D) object; identify a set of edges in the polygonal mesh as bevel edges; perform a mesh simplification operation on the polygonal mesh to generate a simplified mesh, wherein the mesh simplification operation removes at least one edge that includes a vertex that is of a bevel edge, and wherein two vertices in the polygonal mesh are collapsed to a collapse vertex in the simplified mesh; and update stored normals of the collapse vertex based on copying stored normals of the two vertices removed from the polygonal mesh to the collapse vertex; wherein identifying the set of edges in the polygonal mesh as bevel edges comprises: identifying a candidate edge, wherein the candidate edge separates a first face and a second face: determining that the first face has a mean extent that is at least a first threshold multiple of a mean extent of the second face; determining that an absolute rate of normal curvature of the second face is at least a second threshold multiple of an absolute rate of normal curvature of the first face; and determining that the candidate edge is a bevel edge in the set of edges.
  16. 16 . The device according to claim 15 , wherein a bevel face in the polygonal mesh comprises a first bevel edge, a second bevel edge, a third edge between a first vertex of the first bevel edge and a first vertex of the second bevel edge, and a fourth edge between a second vertex of the first bevel edge and a second vertex of the second bevel edge; wherein the first bevel edge separates the bevel face from a first adjacent surface and the second bevel edge separates the bevel face from a second adjacent surface; and wherein vertices of the first bevel edge are smooth shaded between the bevel face and the first adjacent surface and vertices of the second bevel edge are smooth shaded between the bevel face and the second adjacent surface.
  17. 17 . The device according to claim 16 , wherein performing the mesh simplification operation on the polygonal mesh to generate the simplified mesh comprises removing the third edge and the fourth edge; wherein the first vertex of the first bevel edge and the first vertex of the second bevel edge are collapsed to a first collapse vertex in the simplified mesh; wherein the second vertex of the first bevel edge and the second vertex of the second bevel edge are collapsed to a second collapse vertex in the simplified mesh; wherein stored normals from the first vertex of the first bevel edge and stored normals from the first vertex of the second bevel edge are copied to the first collapse vertex; wherein stored normals from the second vertex of the first bevel edge and stored normals from the second vertex of the second bevel edge are copied to the second collapse vertex; wherein the first collapse vertex is hard shaded after copying the stored normals from the first vertex of the first bevel edge and the first vertex of the second bevel edge to the first collapse vertex; wherein the second collapse vertex is hard shaded after copying the stored normals from the second vertex of the first bevel edge and the second vertex of the second bevel edge to the second collapse vertex; wherein vertices of an edge that are hard shaded have different face-vertex normals on each side of the edge at the vertex; and wherein vertices of an edge that are smooth shaded have matching face-vertex normals on each side of the edge at the vertex.
  18. 18 . The device according to claim 15 , wherein the at least one edge removed from the polygonal mesh includes a first vertex and a second vertex; wherein updating the stored normals of the collapse vertex comprises: connecting each vertex that is incident to either the first vertex or the second vertex by new edges to the collapse vertex; determining which of the new edges should be hard shaded based on the set of edges in the polygonal mesh identified as bevel edges; copying stored normals to each face incident to the collapse vertex in the simplified mesh from corresponding stored normals in the polygonal mesh; and averaging the stored normals of the faces incident to the collapse vertex in groups between hard shaded edges incident to the collapse vertex.

Description

FIELD This disclosure generally relates to computer graphics and, more particularly, to systems and methods for handling bevels in mesh simplification. BACKGROUND For three-dimensional (3D) graphics applications, such as video games or animated films, efficient processing of data by reducing computational complexity of a given operation is often useful. This is particularly the case in real-time applications, such as video games. Various operations can be performed using computer generated objects in a scene. An object may be represented as a polygonal mesh, which comprises a collection of vertices, edges, and faces that define the shape and/or boundary of the object. One technique to reduce the computational complexity of a given graphics operation involving a 3D object is to use a lower complexity stand-in for the 3D object. For 3D objects that comprise a polygonal mesh, mesh simplification can be performed on the 3D object to produce simplified versions of the polygonal mesh called Levels of Detail (LODs). For example, a LOD can be used as a stand-in for the original (full resolution model) in-game when the modelled 3D object is far from the camera and thus small on screen. Polygonal meshes can be simplified by edge collapse to generate LODs, where an edge in a mesh is replaced with a single vertex in the simplified mesh. Some mesh simplification methods collapse single edges at each pass. Other mesh simplification methods collapse multiple edges at once in what is called polychord collapse, allowing the simplified mesh to preserve the grid-like topology of semi-regular quad mesh models that are often used in games. Many artist-authored models contain a modelling trick called bevels, in which a strip of narrow faces is inserted between the faces of adjacent large, flat surfaces, to cheaply create the visual impression of a curved edge that would otherwise take many small faces to approximate. Because these bevel faces are typically smooth-shaded (yet act as proxies for what would otherwise have been hard edges), when bevels are collapsed using conventional approaches, shading artifacts can be introduced where the curved normals of the bevel face bleed onto the adjacent flat surfaces, making them appear curved. Accordingly, there remains a need in the art for an improved system and method for generating simplified meshes that can properly handle bevels without introducing artifacts. SUMMARY Embodiments of the disclosure provide a method, device, and computer-readable storage medium for simplifying a mesh including bevels. The method includes: receiving a polygonal mesh representing a three-dimensional (3D) object; identifying a set of edges in the polygonal mesh as bevel edges; performing a mesh simplification operation on the polygonal mesh to generate a simplified mesh, wherein the mesh simplification operation removes at least one edge that includes a vertex that is of a bevel edge, and wherein two vertices in the polygonal mesh are collapsed to a collapse vertex in the simplified mesh; and updating stored normals of the collapse vertex based on copying stored normals of the two vertices removed from the polygonal mesh to the collapse vertex. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of a computer system for rendering images, according to aspects of the present disclosure. FIG. 2 is a block diagram illustrating processor and buffer interaction, according to one embodiment. FIG. 3 is a block diagram of a scene to be rendered, according to one embodiment. FIG. 4A is a block diagram illustrating rendering of a scene, according to one embodiment. FIG. 4B is an example of an image of a scene, according to one embodiment. FIG. 5 is an example of a polygonal mesh, according to one embodiment. FIG. 6 is an exploded view of the object defined by the polygonal mesh shown in FIG. 5, according to one embodiment. FIG. 7 is an example of a level-of-detail mesh corresponding to the polygonal mesh in FIG. 5, according to one embodiment. FIG. 8 is an example of a graphics mesh and multiple LODs for the graphics mesh, according to one embodiment. FIG. 9 is a conceptual diagram illustrating a face of a polygonal mesh, in one embodiment. FIG. 10 is a conceptual diagram illustrating a 3D object, in one embodiment. FIG. 11A is a conceptual diagram of a six-sided cube, in one embodiment. FIG. 11B is a conceptual diagram of a six-sided cube 1104 with added bevels, in one embodiment. FIG. 12 is a conceptual diagram illustrating a bevel face and its adjacent flat face separated by a bevel edge, in one embodiment. FIG. 13 is a conceptual diagram of a character mesh, in one embodiment. FIG. 14A is a conceptual diagram illustrating a portion of a polygonal mesh to be simplified using edge collapse, in one embodiment. FIG. 14B is a conceptual diagram illustrating the portion of the polygonal mesh in FIG. 14A after edge collapse, in one embodiment. FIGS. 15A-15C illustrate mesh simplification using edge collapse, i