Method and system for generating polygon meshes approximating surfaces using root-finding and iteration for mesh vertex positions

By employing root-finding and iterative techniques to refine vertex positions within a voxel grid, the method addresses inaccuracies in existing mesh generation methods, resulting in a more efficient and accurate polygon mesh for surface approximation.

KR103043046B1Active Publication Date: 2026-11-06ROBLOX CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
KR1020250062510
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-06-02
Filing Date
2025-05-14
Publication Date
2026-11-06
Estimated Expiration
2043-06-02

AI Technical Summary

Technical Problem

Existing techniques for generating polygon meshes from surface data, particularly when the data is provided in formats like occupancy or density values, often result in inaccurate approximations due to non-linear variations along voxel edges or lack of distance functions, leading to inefficiencies and resource consumption.

Method used

The method employs root-finding techniques and iterative processes to determine vertex locations, using a voxel grid to identify intersecting voxels and refine vertex positions, ensuring accurate mesh generation by adjusting vertices until error criteria are met, thus producing a more precise polygon mesh.

Benefits of technology

This approach reduces computational resources and power consumption while achieving higher accuracy in mesh approximation, avoiding discontinuities and cracks, and is deterministic, making it more efficient than previous methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 112025053891917-PAT00005_ABST
    Figure 112025053891917-PAT00005_ABST
Patent Text Reader

Abstract

A polygon mesh approximating the surface is generated using iteration over mesh vertex locations and root finding. In some implementations, the method includes the step of receiving input data representing a surface that distinguishes the interior and exterior of a volume. A voxel grid containing the surface is determined, and the voxel grid contains multiple voxels. Specific voxels in the voxel grid that intersect the surface are identified. A mesh approximating the surface is generated by a mesh containing multiple polygons defined by the vertices of specific voxels. Generating the mesh involves determining the locations of the vertices using a root finding technique that finds the roots of the surface function describing the surface.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present disclosure relates to the field of computer-generated surface approximations, and in particular to a method, system, and computer-readable medium for generating a polygon mesh that is an approximation of a surface. Background Technology

[0002] Rendering three-dimensional (3D) objects and surfaces for display on display devices is used in various applications. Images, videos, games, simulations, virtual reality systems, medical imaging, and many other applications render 3D objects and surfaces to display them on two-dimensional (2D) screens and / or in 3D virtual environments based on data describing the objects and surfaces. Various techniques have been developed that allow a device to efficiently generate, store, and display approximations of surfaces as meshes of polygons, such as triangles, based on input data describing the surfaces.

[0003] In many systems, surface data is received in various formats. For example, surface data may be encoded as mathematical functions, grids of voxels containing scalar values, sets of points, or other representations. However, standard techniques for approximating a mesh from surface data may not provide an accurate approximation of the surface, for instance, if the surface data is provided in a specific format or possesses specific characteristics in other cases. For instance, in some applications, the data to be rendered may not be provided as a distance function but may include a density or occupancy value representing the amount of each voxel occupied by the volume containing the surface. In other examples, the surface may vary non-linearly along the edges of the voxels. In such cases, rendering by existing techniques for approximating a mesh for the surface may be inaccurate. Therefore, there may be a need for improved techniques capable of efficiently generating a mesh that more accurately approximates the surface.

[0004] The background description provided herein is intended for the purpose of generally presenting the context of the present disclosure. The work of the presently named inventor is not recognized as prior art to the present disclosure, expressly or implied, not only to the extent described in this background section, but also for any modes of description that may not otherwise qualify as prior art at the time of filing.

[0005] The implementation of this application involves generating a polygon mesh that approximates a surface using iteration over mesh vertex locations and / or root finding. In some implementations, the method includes the step of receiving input data representing a surface that distinguishes the interior and exterior of a volume, by one or more processors. A voxel grid containing the surface is determined by one or more processors, and the voxel grid contains multiple voxels. Specific voxels in the voxel grid are identified by one or more processors, and these intersect the surface. A mesh is generated by one or more processors that approximates the surface, and the mesh contains polygons defined by the vertices of specific voxels. Generating the mesh involves determining the locations of the vertices using a root finding technique that finds the roots of the surface function describing the surface.

[0006] Various implementations and examples of the method are described. For instance, in some implementations, the method further includes the step of mapping each of a plurality of voxels to each intersection case from a set of stored intersection cases based on input data, each mapped intersection case represents an intersection path of the surface through the voxels, and identifying a specific voxel includes identifying the edge or other line segment of the specific voxel that the surface intersects based on the mapped intersection cases. In some implementations, the root-finding technique approximates the location of a vertex by iteratively evaluating the vertex location and adjusting the vertex location toward the surface. In some implementations, each vertex is limited to the dimensions of the voxel space of the voxel associated with the specific voxel. In various implementations, the input data may include scalar values ​​of a distance field representing the spatial distance of a data point to the surface, scalar values ​​representing the density or occupancy of the voxels by volume, etc.

[0007] In some implementations, the root-finding technique involves using the finite difference of a surface function to approximate the derivative of a surface function based on discrete samples of input data, and using the derivative to approximate the root of a surface function to determine the location of a vertex. In some implementations, the root-finding technique involves, for each vertex, determining the approximate location of the vertex based on the root of the surface function determined based on the derivative of the surface function, determining the error between the approximate location and the surface, and determining a new approximate location of the vertex within the associated voxel to reduce the error.

[0008] In some implementations, the method further includes the step of using one or more processors to determine an error and repeating the determination of additional approximate locations to reduce the error until the error meets a predetermined criterion. In some implementations, the root-finding technique includes analytically solving a surface function describing the surface to find the root of the surface function, where the root is used to determine the location of a vertex. In some implementations, the root-finding technique includes, for each vertex of the vertex: the step of performing linear interpolation between a first set of vertices to determine an approximate location of the vertex along an edge of an associated voxel or another line segment; the step of determining an error between the surface and the approximate location of the vertex; and the step of performing linear interpolation between a second set of vertices containing the approximate location of the vertex to determine a new approximate location of the vertex within the associated voxel to reduce the error. In some implementations, the method further includes the step of using one or more processors to determine an error and repeating the determination of an error and performing linear interpolation between a set of vertices containing a newer approximate location of the vertex to reduce the error until the error meets a predetermined criterion.

[0009] In some implementations, the method further comprises the steps of determining the curvature of a surface across one or more voxels of a specific voxel, determining that the curvature of the surface in at least one of the one or more voxels is greater than a threshold, subdividing the mesh by inserting an additional vertex into the mesh between two vertices of the mesh in at least one voxel in response to the curvature of the surface exceeding the threshold in at least one voxel, determining a second error between the additional vertex and the surface, and adjusting the additional vertex closer to the surface to reduce the second error. In some implementations, the method further comprises the step of using one or more processors to repeat the step of determining the second error and the step of adjusting the additional vertex until the second error satisfies a predetermined second criterion. In some implementations, the method further comprises the step of generating a feature surface based on the mesh by one or more processors, and the feature surface may be displayed by a display device.

[0010] In some implementations, a computer-implemented method includes the step of receiving input data representing a surface that distinguishes the interior and exterior of a volume by one or more processors. A voxel grid containing the surface is determined by one or more processors, and the voxel grid contains multiple voxels. Specific voxels of the voxel grid are identified by one or more processors, and these intersect the surface. A mesh is generated by one or more processors that approximates the surface, and the mesh contains multiple polygons defined by vertices of the mesh in specific voxels. Generating the mesh includes determining the approximate location of the vertices of the polygons in the voxels, determining the curvature of the surface across one or more of the specific voxels, determining that the curvature of the surface in specific voxels exceeds a threshold in response to determining that the curvature of the surface exceeds a threshold in specific voxels, refining the mesh by inserting additional vertices into the mesh between two vertices of the mesh in specific voxels, determining the error between the additional vertices and the surface, and adjusting the additional vertices within the specific voxels to reduce the error.

[0011] Various implementations and examples of the method are described. For instance, in some implementations, adjusting additional vertices involves using one or more processors to determine an error and repeating the adjustment of additional vertices until the error satisfies a predetermined criterion. In some examples, the error satisfies a predetermined criterion in response to an error below a predetermined threshold, such as a predetermined number of iterations performed in response to the error. In some implementations, the method further includes the step of mapping each of a plurality of voxels to each of a set of stored intersection cases based on input data by one or more processors, wherein each mapped intersection case represents an intersection path of a surface through a voxel, and identifying a specific voxel involves identifying an edge or other line segment of the specific voxel that the surface intersects based on the mapped intersection case. In some implementations, each vertex is limited to the dimensions of the voxel space of the voxel associated with the specific voxel.

[0012] In some implementations, determining the curvature of the mesh involves determining the surface tangent at the vertices of one or more specific voxels. In some implementations, determining the curvature of the mesh involves sampling the mesh at the midpoint of an edge of a specific voxel or another line segment and determining the distance from the midpoint to the surface. In some implementations, adjusting additional vertices within a specific voxel involves using a root-finding technique to find the root of a surface function describing the surface. In some implementations, after inserting additional vertices, the method further includes the steps of: determining whether the curvature of a portion of the surface of a specific voxel at the additional vertices exceeds a threshold; further subdividing the mesh by inserting a second additional vertex into the mesh between the additional vertex and the other of two vertices of the mesh in the specific voxel in response to determining that the curvature of the portion of the surface exceeds the threshold; determining the error between the second additional vertex and the surface; and adjusting the second additional vertex within the specific voxel to reduce the error. In some implementations, the method further includes the step of generating a feature surface based on the mesh, and the feature surface may be displayed by a display device.

[0013] In some implementations, the system comprises at least one processor and memory having instructions stored coupled to at least one processor, and the instructions cause at least one processor to perform an operation when executed by at least one processor. The operation includes receiving input data representing a surface that distinguishes the interior and exterior of a volume; determining a voxel grid containing the surface—the voxel grid contains multiple voxels—; identifying specific voxels of the voxel grid that the surface intersects; and generating a mesh that approximates the surface, wherein the mesh contains multiple polygons defined by vertices of the mesh at specific voxels. Generating the mesh includes determining the locations of the vertices using a root-finding technique that finds the roots of surface functions describing the surface.

[0014] Some implementations may include a system comprising at least one processor coupled to a non-transient computer-readable medium having stored software instructions that cause one or more processors to perform an operation when executed by one or more processors. The operation may include one or more features of any one of the above methods.

[0015] In some implementations, a non-transient computer-readable medium has stored software instructions that cause the processor to perform an operation when executed by the processor of the device. The operation may include one or more features of either the method or system.

[0016] The implementation of the application involves generating a polygon mesh that approximates a surface using iteration over mesh vertex positions. In some implementations, the method includes the step of receiving input data representing a surface that distinguishes the interior and exterior of a volume by one or more processors. A voxel grid containing the surface is determined by one or more processors, and the voxel grid contains multiple voxels. Specific voxels of the voxel grid are identified by one or more processors, which intersect the surface. A mesh is generated by one or more processors that approximates the surface, and the mesh contains polygons defined by the vertices of specific voxels. Generating the mesh includes determining the approximate positions of a subset of vertices of the mesh's polygons in a subset of specific voxels based on the interpolation of positions within a subset of specific voxels where the surface intersects a subset of specific voxels; determining the error between the assigned voxel value and the approximate voxel value of the specific voxels—where the approximate voxel value is based on the approximate position and the assigned voxel value is determined from the input data—and adjusting the approximate positions of at least one vertex of the subset of vertices using a continuous over-relaxation technique to reduce the error.

[0017] Various implementations and examples of the method are described. For instance, in some implementations, adjusting the approximate location of at least one vertex involves using one or more processors to determine the error and repeating the adjustment until the error satisfies a predetermined criterion. In some implementations, the error satisfies a predetermined criterion in response to a predetermined number of iterations performed or in response to an error satisfying one or more predetermined thresholds. In some implementations, the approximate location of a subset of vertices of a polygon is determined based on position interpolation on the edges of a specific subset of voxels where the surface intersects the edges.

[0018] In some implementations, the method further comprises the step of mapping each of a plurality of voxels to each cross case from a set of stored cross cases based on input data by one or more processors, wherein each mapped cross case represents a cross path of a surface through a voxel, and identifying a specific voxel includes identifying an edge or other line segment of a specific voxel that the surface intersects based on the mapped cross cases. In some implementations, determining the approximate location of a subset of vertices of a polygon of a mesh includes determining the initial approximate location of the vertices using a marching cube technique or a surface net technique.

[0019] In some implementations, a continuous over-relaxation technique is used to determine multiple approximate locations of a subset of vertices of a polygon, and a subset of specific voxels includes multiple adjacent voxels of a mesh. In some implementations, a subset of specific voxels includes multiple adjacent voxels of a voxel grid, and the method further includes the step of determining the approximate locations of a second subset of vertices of a polygon of a mesh in a second subset of adjacent voxels of a specific voxel.

[0020] In some implementations, determining the error includes determining an approximate voxel value based on an approximate location and comparing the approximate voxel value with an assigned voxel value, wherein determining the approximate voxel value includes, for each approximate voxel value, determining the volume of the mesh intersecting the voxel associated with the approximate voxel value and determining the approximate voxel value based on the volume of the mesh. In some implementations, determining the volume of the mesh intersecting the voxel associated with the approximate voxel value includes determining the three-dimensional integral of the mesh within the voxel associated with the approximate voxel value.

[0021] In some implementations, the method further includes a step of generating a feature surface based on a mesh, and the feature surface can be displayed by a display device. In some implementations, each vertex is limited to the dimensions of the voxel space of the voxel associated with a specific voxel. In some implementations, the input data includes a scalar value representing the density or occupancy of the voxels by volume.

[0022] In some implementations, the system comprises at least one processor and memory coupled to at least one processor having stored instructions, and when the instructions are executed by at least one processor, at least one processor performs an operation. The operation includes receiving input data representing a surface that distinguishes the interior and exterior of a volume; determining a voxel grid containing the surface—the voxel grid contains multiple voxels—; identifying specific voxels of the voxel grid that the surface intersects; and generating a mesh that approximates the surface, wherein the mesh contains multiple polygons defined by vertices of the mesh at specific voxels. Generating the mesh involves determining approximate locations of a subset of vertices of the mesh polygons at a subset of specific voxels based on the interpolation of locations within a subset of specific voxels at which the surface intersects a subset of specific voxels; determining an error between the assigned voxel value and the approximate voxel value of a specific voxel—the approximate voxel value is based on the approximate location, and the assigned voxel value is determined from the input data—; and to reduce the error, it includes adjusting the approximate location of at least one vertex of a subset of vertices using a continuous over-relaxation technique.

[0023] Various implementations and examples of the system are described. For instance, in some implementations, the operation of adjusting the approximate position of at least one vertex includes determining an error and repeating the adjustment until the error meets a predetermined criterion. In some implementations, a continuous over-relaxation technique is used to determine multiple approximate positions of a subset of vertices of a polygon, and a subset of a specific voxel includes multiple adjacent voxels of a mesh. In some implementations, a subset of a specific voxel includes multiple adjacent voxels of a voxel grid, and at least one processor performs an additional operation including determining the approximate position of a second subset of vertices of a polygon of a mesh in a second subset of adjacent voxels of the specific voxel.

[0024] In some implementations, the operation of determining the error includes determining an approximate voxel value based on an approximate position and comparing the approximate voxel value with an assigned voxel value, wherein determining the approximate voxel value includes, for each approximate voxel value, determining the volume of the mesh intersecting the voxel associated with the approximate voxel value and determining the approximate voxel value based on the volume of the mesh. In some implementations, the operation of determining the volume of the mesh intersecting the voxel associated with the approximate voxel value includes determining the three-dimensional integral of the mesh within the voxel associated with the approximate voxel value. In some implementations, each vertex is limited to the dimensions of the voxel space of the voxel associated with a specific voxel. In some implementations, at least one processor performs an additional operation including generating a feature surface based on the mesh, and the feature surface is displayable by a display device.

[0025] In some implementations, a non-transient computer-readable medium has stored software instructions that cause the processor to perform an operation when executed by the processor of the device. The operation includes receiving input data representing a surface that distinguishes the inside and outside of a volume; determining a voxel grid containing the surface—the voxel grid contains a plurality of voxels—; identifying a specific voxel of the voxel grid that the surface intersects; and generating a mesh that approximates the surface, wherein the mesh comprises a plurality of polygons defined by vertices of the mesh at a specific voxel. Generating the mesh includes determining approximate locations of a subset of vertices of the polygons of the mesh at a subset of specific voxels based on interpolation of locations within a subset of specific voxels where the surface intersects a subset of specific voxels; determining an error between an assigned voxel value and an approximate voxel value of a specific voxel—where the approximate voxel value is based on the approximate location and the assigned voxel value is determined from the input data—and adjusting the approximate location of at least one vertex of the subset of vertices using a continuous over-relaxation technique to reduce the error. Brief explanation of the drawing

[0026] FIG. 1a is a schematic diagram of a surface to which a voxel grid is applied; FIG. 1b is a schematic diagram of an example mesh approximating the surface of FIG. 1a according to some implementation; FIG. 2 is a flowchart of an exemplary method for generating a polygon mesh that approximates a surface shown in input data, depending on some implementation; FIG. 3 is a flowchart of an exemplary method for determining the positions of vertices of a mesh approximating a surface, depending on some implementation; FIG. 4 is a flowchart of an exemplary method for determining the positions of vertices of a mesh approximating a surface using a numerical root-finding technique based on the derivative of a surface function, depending on some implementation; FIG. 5 is a schematic diagram of a graph illustrating an example of using a root-finding technique with differentiable surface functions to find the positions of the vertices of a mesh, depending on some implementation; FIG. 6 is a flowchart of an exemplary method for determining the positions of vertices of a mesh approximating a surface using a numeric root-finding technique with iterative refinement, depending on some implementations; FIG. 7 is a schematic diagram of a graph illustrating an example of using a root-finding technique with iterative refinement to find the positions of the vertices of a mesh, depending on some implementation; FIG. 8 is a flowchart of an exemplary method for determining the positions of vertices of a mesh approximating a surface using a continuous over-relaxation technique, depending on some implementations; FIG. 9 is a flowchart of an exemplary method for determining the location of a mesh vertex approximating a surface by subdividing one or more parts of the mesh, depending on some implementation; FIG. 10-11 is a schematic diagram of a graph illustrating an example of subdividing a portion of a mesh to add vertices to a mesh and to refine the positions of the added vertices, depending on some implementation; FIG. 12 is a block diagram illustrating an exemplary system that may be used to implement one or more of the features described herein, depending on some implementation; and FIG. 13 is a block diagram illustrating an exemplary computing device that can be used to implement one or more of the features described herein, depending on some implementation. Specific details for implementing the invention

[0027] One or more implementations described herein relate to generating a polygon mesh that approximates a surface represented in input data. The described features include using one or more root-finding techniques and / or iterations to determine the polygon vertices constituting the mesh.

[0028] In some exemplary applications, input data representing a surface or features having such a surface (e.g., objects, terrain features, etc.) is received. The input data may be provided or transmitted from, for example, a terrain editing program, a structural solid geometry application, a 3D modeling program, a magnetic resonance imaging (MRI) scanner, an X-ray or other volumetric scanner, an image capture device, a virtual reality (VR) or augmented reality (AR) program or device, or other sources. In some cases, a mesh of polygons approximating the surface or object is generated. The mesh may be defined with sufficiently reduced complexity so that it can be rapidly processed, transmitted, and / or rendered for display and stored in reduced storage space compared to other representations of the surface and object. For example, such a mesh is typically used in applications such as the efficient rendering of terrain, medical images, or objects modeled in a manner such as clay.

[0029] Input data may be encoded in various forms and formats, for example, as mathematical functions, grids of discrete voxels containing scalar values, sets of points, or any other representation suitable for mapping 3D locations to values. In some examples, the input data is a 3D field that associates every (x,y,z) location with a scalar value. f(x,y,z) can be defined. Depending on the application, the scalar value of this field can generate a "signed distance field" to represent the distance from a desired surface. In other applications, the scalar value can generate an "occupancy field" by representing density or occupancy, or represent any continuous but non-distance value. Occupancy is referred to here as the proportion of volume occupied (e.g., by a solid material) within a single voxel, and it is not a continuous field in three dimensions because it cannot be evaluated at any arbitrary location in space. Occupancy values ​​are known as discreet voxels because the occupancy value of a voxel is the integral of the infinitesimal occupancy across each voxel. Mesh generation techniques can be applied to the occupancy field as if it were a distance function, but this may limit the quality of the results.

[0030] An isosurface (e.g., a set of levels) (referred to as "surface" here) is a surface where a field has a constant value. Typically, an isosurface threshold f is used, where f = 0 (for distance and random data) and f = 0.5 (for occupancy data) are the most interesting isosurfaces to identify. A surface is a continuous and potentially smooth shape in 3D space. A surface distinguishes the interior and exterior of a volume.

[0031] In some cases, input data is encoded in voxels, and there are interpolation techniques where the generated voxels can define the field. In some examples, the field can be interpolated through 3-linear interpolation, nearest neighbor (e.g., point sampling), or higher-order methods. 3-linear interpolation generates cubic (third-order) variation along a line, which means the field varies non-linearly. Input data of any form can be 3D rasterized into voxels as a preprocessing step.

[0032] The described technique determines and generates a polygon mesh (e.g., a triangle mesh or a mesh made of other types of polygons) that approximates a surface defined in the input data. In some cases, a line mesh can be determined and generated for a two-dimensional (2D) field defined in the input data. The technique described herein can convert input data expressed in various forms into a mesh that allows for efficient physical simulation, rendering, and storage, as well as further editability.

[0033] One or more of the techniques described herein can achieve higher quality than the preceding techniques, even when the input data contains discrete occupancy values. The described techniques can also be applied to actual distance fields inferred from occupancy fields.

[0034] For example, known mesh generation techniques for "marching cubes" (including related methods for their 2D equivalents of marching tetrahedrons, marching squares, and marching triangles) impose a voxel grid and classify each vertex of the mesh as either inside or outside the volume (this can be, for example, 1 bit per vertex / corner of a voxel cage). A triangle template is generated that identifies the edges the surface passes through but does not identify the location along those edges. The marching cube algorithm uses linear interpolation to estimate the location where the actual surface intersects the voxels based on the value of a signed distance function at the voxel corners. In some cases, for example, the field f If is a linear gradient, f Linear interpolation along the edge at a position (x,y,z) proportional to the value of can accurately identify the intersection location on the actual surface. However, f If the edge changes non-linearly, the vertices of the generated mesh are placed at positions off from the actual surface, resulting in an inaccurate mesh representation of the surface.

[0035] Extensions of the marching cube use quadratic interpolation to better match the nonlinear density functions of human bones and tissues in computer tomography and X-ray scans when locating surfaces. However, another limitation of the marching cube technique is that it produces a good approximation only when applied to true metric distance functions. Input f If is not in the metric system (e.g., the distance to the surface is monotonous but not directly proportional) or includes occupancy / density information instead of distance, the marching cube not only generates inconsistent slopes for the generated triangles but also determines the vertex positions away from the surface.

[0036] A related technique known as a "surface net" is designed to operate more robustly on the distance function. Mesh vertices are placed at the center of the voxels on the boundary and connected to adjacent vertices, and then the entire surface is smoothed for smoothness while restricting the vertices so as not to go outside the cage of the original voxels.

[0037] Some extensions of the surface net technique place a vertex at each corner between eight voxels, where at least one voxel is below a threshold and at least one voxel is above the threshold surface. The vertex is then moved to a calculated position by interpolating between the corresponding voxel centers based on that value. One approach is to interpolate between each pair of voxels using the same linear interpolation as in the marching cube technique, where one voxel is above the threshold and another is below, and then average the positions. However, since the surface net technique uses data from function values ​​outside each cell, it is not local and cannot be parallelized. This is not memory efficient on digital processors because it uses data dependencies that require communication between individual processor threads processing different voxels.

[0038] The techniques and features described herein have several advantages. This disclosure details techniques that can be used to generate polygon meshes that approximate surfaces. The described techniques are independent and can be used alone or in combination. Each technique improves the accuracy of surface finding and generation where prior techniques, such as marching cubes, produce poor results due to fields that vary non-linearly along edges or fields not described by distance functions. Features are described in relation to the 3D cube case, but the same features can be applied to 3D tetrahedrons, 2D quadrilaterals, and 2D triangles.

[0039] Unlike surface networks and other machine learning methods, the described technique offers efficiency because it is local and fully parallelizable. Therefore, only the data for function values ​​near each cell is used. This is memory-efficient on digital processors and ensures there are no data dependencies requiring communication between separate processor threads handling different voxels. Furthermore, the results of using this technique are deterministic, avoiding cracks or discontinuities in the surface generated between voxels. For example, according to the described technique, mesh vertices can be computed independently for two adjacent voxels along the face of the generated surface, so the technique independently yields the same vertex value. This provides a mesh that more accurately approximates the surface without increasing processing requirements to resolve discontinuities between voxels.

[0040] The technical effect of one or more described implementations is that the device consumes fewer computational resources to obtain results that may be more accurate. For example, the technical effect of the described technique is a reduction in the consumption of system processing resources and power resources compared to a preceding system that does not provide one or more of the described technique or features. For example, a preceding system using a preceding technique such as a surface network may require more memory storage due to data dependencies that require communication between separate processor threads processing different voxels. The technique described herein can be implemented locally on a processor or processor thread and does not require such communication. A preceding system or technique that does not provide deterministic results may require additional processing to mitigate or otherwise resolve discontinuities occurring between independently processed voxels. The technique described herein provides deterministic results to avoid this additional processing and offers greater accuracy. Some preceding systems produce inaccurate results due to surfaces that vary non-linearly along voxel edges or surfaces not described by distance functions. The technique described herein can provide a mesh that more accurately approximates surfaces that may vary non-linearly or are not explained by distance functions (e.g., explained by occupancy values ​​or density values).

[0041] Example Voxel Grid and Surface

[0042] FIG. 1a is a schematic diagram (100) of an exemplary surface (102) described in input data according to some implementation. The surface (102) may be a feature such as terrain or landscape, part of a virtual object, etc. A voxel grid (104) is applied over the surface (102). In this example, the voxel grid (104) consists of a plurality of cubic voxels (106) all having the same dimensions. A subset of the voxels (106) is detailed for visual simplicity. The voxels (106) include vertices (108), which in this example are the corners of the voxels. The surface (102) has an intersecting path through the voxels (106) of the voxel grid (104), for example, the surface (102) intersects the faces and edges of some of the voxels (106) of the grid. Here, the "face" of a voxel refers to a two-dimensional aspect of the voxel, and the "edge" of a voxel refers to a one-dimensional aspect of the face. A "line segment" may be an edge of a voxel, or a line defined from a vertex of a voxel, such as a line connecting two center vertices or another vertex of an adjacent voxel used in some surface netting techniques.

[0043] FIG. 1b is a schematic diagram of an exemplary mesh (120) approximating the surface (102) illustrated in FIG. 1a, depending on some implementation. The mesh (120) consists of polygons that are triangles (122) defined by mesh vertices (124) in this example. The triangles (122) are oriented to approximate the contour of the surface (102). The mesh (120) is generated by finding the location of the mesh vertices (124) within the voxels (106) of the voxel grid (104) illustrated in FIG. 1a. The location of the mesh vertices (124) is determined within the set of voxels intersected by the surface (102). The location of the mesh vertices (124) relative to the voxels (106) may be determined using one or more techniques described herein, which can generate a mesh similar to the mesh (120) and / or other meshes, such as a mesh made of a different number and / or type of polygons (e.g., quads, additional triangles, etc.).

[0044] Mesh generation method

[0045] FIG. 2 is a flowchart of an exemplary method (200) for generating a polygon mesh that approximates a surface shown in input data, depending on some implementation. In some implementations, the method (200) may be performed, for example, on a server system, such as the online platform (1202) shown in FIG. 12 or the computing device (1300) shown in FIG. 13. In some implementations, part or all of the method (200) may be implemented in a system such as one or more client devices (1210 and 1216) as shown in FIG. 12 and / or 13, and / or in both a server system and one or more client systems. In the described example, the implementation system includes one or more processors or processing circuits, and one or more storage devices such as a database or other accessible storage. In some implementations, different components of one or more server and / or client devices may perform different blocks or different parts of the method (200).

[0046] The method (200) may begin at block (202). At block (202), input data is received by a device or system performing the method (200). In some implementations, the input data includes a representation of one or more surfaces (e.g., isosurfaces) within a 3D field. The surface may be a continuous and potentially smooth shape in 3D. For example, the surface may be the surface of a 3D object represented in a video game, a virtual reality environment, or other virtual environment. In some examples, the surface may be a representation of the surface of a physical object or other feature of a scanned or detected volume or area, such as an organ of the human body, an object in a specific environment (e.g., within a material or element, underground, outer space, underwater, etc.), a geographical landscape, or other environment.

[0047] In some implementations, a surface distinguishes the interior and exterior of a volume. For example, a represented object may have a volume, where the interior of the volume contains one or more of the object's materials, and the exterior of the volume is the environment in which the object is located. In some examples, a surface can define where the interior of an object is located (e.g., walls representing the interior volume of a car object) and where the exterior of an object is located (e.g., walls and other exterior surfaces representing the space surrounding the vehicle, the surface on which the vehicle is located, etc.).

[0048] In some implementations or cases, the input data describes a 3D field having scalar values ​​at each (x, y, z) position of the field. In some implementations or cases, each scalar value may represent a distance from a surface and thus form a signed distance field (e.g., positive or negative outside or above the surface, and the opposite sign (negative or positive) inside or below the surface). In some implementations or cases, each scalar value may represent the ratio of the voxel volume occupied by the volume defined by the surface (e.g., volume of solid material) and thus form an occupancy field representing the density or amount of occupancy of the voxels. In some implementations, this occupancy is not a continuous field in 3D because it cannot be evaluated at any position in space; the occupancy value may be known only for discrete voxels. The occupancy value of a voxel may be the integral of the infinitesimal occupancy across each voxel. In some implementations or cases, each scalar value may represent a continuous, distanceless value or other value.

[0049] In some implementations, the surface is an isoplane (e.g., a set of levels) where the field has a constant value. In some implementations, isoplane thresholds may be used. In some examples, thresholds of 0 (for distance and random data) and 0.5 (for occupancy data) may be used for isoplane identification.

[0050] In various examples, input data may be encoded as a mathematical function, a grid of discrete voxels containing scalar values, a set of points, or any other representation, such as a representation suitable for mapping 2D or 3D locations on a surface to values. In some examples, when input data is encoded as voxels, the interpolation method used to encode the voxels defines a surface field. The surface field may be interpolated using various techniques, such as 3-linear interpolation, nearest neighbor (e.g., point sampling), or higher-order methods. 3-linear interpolation can generate cubic (3rd-order) variations along a line so that the surface field varies non-linearly. In additional examples, input data of any form is 3D rasterized into voxels as a preprocessing step prior to method (200). In some implementations, when input data is encoded in a voxel grid, the voxel grid used in method (200) (and any other method described herein) may be a grid different from the grid of the input data (e.g., a grid having a different resolution or voxel dimensions). In some implementations, a voxel grid of input data or a duplex thereof (e.g., having values ​​considered to be at the voxel corners instead of the center) may also be used in the method described herein.

[0051] In various examples, input data may be provided by an application program, a device, or other source. For example, a terrain editing program, a structural solid geometry application, a 3D modeling program, an MRI, an X-ray, or other volumetric scanner may generate input data received in block (202). In some implementations, data output from such sources is preprocessed before being received, for example, in block (202), and is encoded, for example, into one of the aforementioned representations (e.g., mathematical functions, voxels, etc.).

[0052] In some implementations, the 2D equivalent of the surface may be represented in input data such as a line (e.g., an isoline or contour line). The represented line may be approximated using a technique similar to that described herein, including method (200) instead of the surface. For example, the line may be approximated by providing a number of different straight line segments (e.g., a polyline) and / or approximated curvature. Block (204) may follow block (202).

[0053] In block (204), a voxel grid including a surface represented in the input data is determined, wherein the voxel grid includes a plurality of voxels. In some implementations, the voxels may be cube-shaped. For example, the voxel grid may be assigned to the input data, and then each corner of each voxel may be classified as inside or outside the volume defined by the surface of the input data. In some examples, one bit may be assigned to each corner of each voxel of the voxel grid. The voxel size of the grid may be determined based on the desired resolution, available storage, and / or other considerations.

[0054] In some implementations, the input data received in block (202) may have a previously encoded voxel and a voxel grid in the input data, and these same voxels may be used in method (200) so that block (204) does not define any different voxels in the input data and on the surface. In some implementations, a grid similar to such an existing voxel grid, for example, a double of an existing grid in which the voxel value is considered to be at the voxel corner instead of the voxel center, may be determined in block (204). In some implementations, a new voxel grid defining a new voxel may be determined in block (204) for the input data, which may be different from the existing encoded voxel grid, where the new voxel is used in method (200). Block (206) may follow block (204).

[0055] In block (206), specific voxels that the surface intersects are identified. For example, this may include identifying line segments, such as edges, of specific voxels (e.g., the intersecting path of the surface) that the surface passes through. In some implementations, this is done by mapping one or more voxels of a voxel grid to each intersecting case from a stored set of intersecting cases. For example, each voxel of a voxel grid may be assigned to an associated intersecting case. In some implementations, intersecting cases from a marching tetrahedron or marching cube technique may be used, or intersecting cases used in different techniques may be used (e.g., intersecting of line segments in some surface net or other techniques). In some implementations, a number of unique intersecting cases may be provided (e.g., stored and accessed in a lookup table of the system), and each intersecting case describes a different path of the surface (or volume) through the voxels and represents, for example, a different set of voxel edges (or other voxel line segments) intersected by the surface (or volume). Cross cases can be based on various rotations and / or reflections of possible paths on a surface through a voxel. For example, in the marching cube technique, a set of 14 unique cross cases describes all possible edge intersections on a surface passing through 12 edges of a voxel. In some implementations, a set of 8 bits may be associated with the 8 collective corners of each voxel, and each different set of bits maps to a different one of the cross cases. For example, a set of bits may be a vector serving as an index to a cross case table.

[0056] In some examples, for the trivial case where the voxel is entirely outside the volume and there are no surfaces intersecting the voxel, the voxel may be assigned an intersection case labeled with all zero values ​​for the set of bits. In another example, for yet another trivial case where the voxel is entirely inside the volume and there are no surfaces intersecting the voxel, the voxel may be assigned an intersection case labeled with every single value for the set of bits. In other intersection cases, a surface passes through one or more faces of the voxel, and an appropriate intersection case is assigned to the voxel based on the corners of the voxel inside the volume and the corners outside the volume. In another example, the marching tetrahedron technique may be used. This technique is similar to the marching cube except that each voxel cube is divided into six tetrahedra and 19 edges are assigned instead of the 12 edges of the voxel. Eight intersection cases are possible for each tetrahedron. Other implementations may assign intersection cases or labels / bits in different ways. Other techniques may be used alternatively or additionally to determine the voxel line segments intersected by the surface. Block (208) may follow block (206).

[0057] In block (208), a template of a polygon is generated based on a specific identified voxel. For example, the template may be generated based on the identified line segment (e.g., an edge) of the specific identified voxel. For example, in some implementations, the polygon may be a triangle; in other implementations, the polygon may be of a different type (e.g., a tetrahedron). The template identifies the edges (or other line segments) where the surface intersects, but does not identify a specific location along those edges. In some implementations, the vertices of the polygon in the template may be assigned initial locations along the identified edges of the specific voxel. For example, the initial location may be a corner or midpoint of the identified edge. A different initial location may be used in other implementations (e.g., a specific part of the edge distance, etc.). Block (210) may follow block (208).

[0058] In block (210), a mesh is generated based on the template of block (208), where the mesh approximates a surface. For example, the mesh may be a polygon mesh for a 3D field and surface, or a line mesh for a 2D field and line. Mesh generation involves determining the vertex positions of the polygons of the mesh using one or more root-finding and / or iterative techniques according to the features described herein. This block estimates the location of the surface based on the value of input data, which may be an occupancy value or a density value, or a value of a signed distance function describing the surface at the vertices (e.g., corners) of the intersecting voxels. Using the described technique, the locations of the mesh vertices are determined more accurately than with the preceding technique. Various implementations for determining the locations of the vertices for block (210) are described below with reference to FIG. 3-11.

[0059] The mesh generated from the block (210) can be used as an approximation of the surface represented in the input data. After the vertex positions are determined using one or more described techniques, the mesh can be defined and finalized. In some implementations, the mesh can be further processed in various ways, for example, by assigning properties (e.g., colors or textures to fill the polygons), modifying it to fit a specific object, storing it in a specific repository, or displaying it by a display device. The generation of the mesh provides a conversion of field input data represented in various forms into a polygon mesh that can be used for efficient physical simulation, rendering, storage, and / or further editing of the data. Common applications include the efficient rendering of objects modeled in a manner such as terrain, medical images, or clay. For example, the mesh can be used to generate feature surfaces of features such as terrain features (landscapes, mountains, etc.), organs or other body parts, or the surfaces of digital objects.

[0060] Selection of a method for mesh determination

[0061] FIG. 3 is a flowchart of an exemplary method (300) for determining the location of vertices of a mesh approximating a surface, depending on some implementation. For example, the method (300) may be an exemplary implementation for determining vertex locations in block (210) of the method (200) of FIG. 2 described above. In some implementations, the method (300) may be performed on a server system and / or a client system, for example, similar to how the method (200) is described. In various implementations, only parts of the method (300) are used, for example, only for a specific type of input data and / or only a subset of the described mesh generation technique. For example, some implementations may use only block (304); some implementations may use only blocks (302, 304, and 314); some implementations may use only blocks (302-308); some implementations may use only blocks (302, 304, and 310-314), etc.

[0062] Some of the techniques described here are root-finding techniques. In the described examples, root-finding techniques may use rules to represent surfaces or lines that have an equation with a zero on one side. For example, x² + y² = r² defines a circle, and in the described implementation, the equation is x² + y² - r² = 0 It is arranged as follows. This allows for a single expression instead of two, and defines a surface function such that the zero result of the function becomes a point on the surface defined by the function. The technique described here can find zero, for example, determine the x and y values ​​that satisfy the function becoming zero. The set of values ​​that yield a zero result is the square root of the equation.

[0063] One or more described root-finding techniques determine the nearest neighbors where the zero of a surface function should be located. More specifically, f(x1,y1) < 0 (e.g., this point is outside the volume) and f(x2,y2) > 0 (For example, this point is inside the volume) and f() If f(x,y) = 0 This lies somewhere between these points. The surface is where the sign changes to the opposite sign. Whether results less than zero are inside and results greater than zero are outside, or vice versa, is an arbitrary rule, and any rule may be used in the described technique. In some implementations, if one vertex (corner) of a voxel edge (or other voxel line segment) is inside the volume and another corner is outside the volume, then searching along that edge can be guaranteed to find a point (e.g., a zero) on the surface. There may be multiple zeros, but this particular zero is the intersection of the surface and the edge.

[0064] Method (300) may begin in block (302). In block (302), it is determined whether the surface is described by a known surface function. Method (300) may be used in some implementations that process input data containing a representation of the surface described by the surface function. In some examples, the surface function may be a signed distance function in which the input data value represents the distance of a voxel corner (or other voxel reference point) to the surface. In some implementations, the surface function describing the surface may be specified and may be included in the input data received by the system implementation method (300), or the function may be otherwise known by the system (e.g., stored by the system, associated with the input data, specified by a user command, etc.). In some examples, it may be useful to describe the function by converting the specified function into a mesh.

[0065] In the additional example, the value may have been previously specified at the corner of the voxel, and the surface function may have been generated based on previous linear interpolation representing how the surface changes through space. In the additional example, the command may specify changing the existing voxel grid of the input data to a different voxel grid used to generate the mesh (e.g., a grid with a different resolution), and the surface function is specified to enable this transformation to a different grid.

[0066] In some implementations, any of the various methods may be used to determine whether there is a surface function describing (or associated with) the input data, such as the system performing method (300) providing a field or flag to the input data indicating the existence of a surface function, or receiving a command from a user. In some implementations, the surface function may be determined in a different way, for example, input data of a specific type or input data from a specific source may be associated with a specific surface function.

[0067] If the surface represented in the input data is described by a known surface function, one or more root-finding techniques may be used, and the method continues to block (306) described below. If the surface represented in the input data is not described by a known surface function, for example, if the input data is in the form of occupancy values ​​or density values, the method may continue to block (304) where one or more techniques other than root-finding may be used. For example, the method (800) of FIG. 8 described later may be used in the input data in the form of occupancy values ​​or density values. In some implementations, the method (900) of FIG. 9 may be used. In some implementations, even if the surface is described by a known surface function, other techniques (such as methods (800 and / or 900)) may be used through block (304) instead of or in addition to one or more root-finding techniques. In some implementations, in addition to the other described techniques, other techniques, such as linear interpolation, may be used to find mesh vertices. A mesh is generated using one or more techniques of a block (304) that includes estimating the vertex positions of the mesh.

[0068] Block (306) is performed when the input data is described by a known surface function determined in block (302). In block (306), it is determined whether the surface function has an (practical) analytic solution (e.g., whether it is an analytic function). An example of such a function is a field function that is analytically expressed and accepts a closed-form solution. Since the surface function is known and analytic, its value can be solved directly at any location, for example, to find the exact root of the surface function. Examples of analytic functions include first-order polynomials, second-order polynomials, third-order polynomials, fourth-order polynomials, or other functions.

[0069] In some examples, the 3-linear interpolation of discrete voxels is cubic and may qualify as a function having an analytical solution. Other functions may be analytically solvable. For example, input data may be based on a specified function that can be analytically solvable (e.g., an equation describing how air flows over a wing) to provide a visualization of the data as a mesh. In some implementations, any various method may be used to enable the system to perform method (300) to determine whether a surface function is analytically solvable, such as a field or flag of the input data, a user command, a stored feature that the system can access and compare with the received surface function, a machine learning model trained as an example of an analytical function and used to detect whether there is a surface function that is an analytical function.

[0070] If the surface is not described by a surface function having an analytical solution, the method continues to block (310) described below. If the surface is described by a surface function having an analytical solution, the method continues to block (308), where the vertex positions of the mesh are determined using an analytical root finding technique, which involves solving the analytical surface function for the roots. For example, the exact positions along the edges (and mesh vertex positions) at each edge (or other line segment) of the voxel detected as intersecting the surface are determined by solving the surface function roots. In some implementations, the values ​​of the voxels specified in the input data or other values ​​derived from the input data may be used for the solution for the roots (e.g., depending on how the surface is represented in the input data). The mesh is generated based on the mesh vertex positions determined based on the solution for these roots. Directly solving the surface function for the vertex positions of the mesh allows the vertices of the mesh to be accurately placed on the surface at the intersection points with the intersecting voxels.

[0071] Block (310) is performed when it is determined in block (306) that the surface is not described by a surface function having an analysis solution. In block (310), it is determined whether the surface function is differentiable, for example, whether a derivative can be derived from the surface function. In some implementations, any various methods may be used to enable the system to perform method (300) to determine whether the surface function has a derivative, such as a field or flag of input data, a command from a user, a stored characteristic of a differentiable function that the system can access and compare with the received surface function, a machine learning model trained as an example of a differentiable function and used to detect whether the surface function is a differentiable function.

[0072] If the surface function is differentiable as determined in block (310), the method continues to block (314), which is described below. If the surface function is differentiable as determined in block (310), the method continues to block (312), where the positions of the mesh vertices are determined using a root-finding technique based on the derivative of the surface function. For example, this block can find the numeric root(s) of the surface function and iterate to find the positions of the vertices closer to the surface. The numeric root-finding technique determines the root by evaluating the derivative of the surface function and can find the positions of the mesh vertices closer to the surface through iterations of root-finding. An example of implementing block (308) is described in more detail below with reference to FIG. 4. By using the numeric root-finding technique with the derivative, the mesh can be generated as an estimate of mesh vertex positions close to the actual locations of the voxel and surface intersections.

[0073] Block (314) is performed if the surface function in block (310) is not differentiable. In some implementations or cases, block (314) may also be performed even if the surface function is differentiable, for example, if it is desirable to find mesh vertices in addition to or instead of the root finding technique of block (312) by using one or more other root finding techniques that do not use function derivatives.

[0074] In block (314), the positions of the mesh vertices are determined using a numeric root finding technique with iterative refinement. For example, this block may use one of various techniques to find the root of the surface function, where the derivative of the surface function is not required. In some implementations, multiple techniques may be used. The iterative refinement of the described technique provides a more accurate position of the vertex (e.g., closer to the surface) than when using a root finding technique without iteration. An example of implementing block (314) is described in more detail below with reference to FIG. 6. By using a root finding technique with iterative refinement, the mesh can be generated by estimating vertex positions close to the actual positions of the surface intersecting the voxels.

[0075] In some implementations, after determining the location of the mesh vertices (e.g., in block (304), block (308), block (312), or block (314)), additional processing may be performed by performing one or more additional techniques to position one or more of the vertices more accurately (e.g., closer to the actual surface). For example, the method (900) of FIG. 9 may subdivide the mesh into additional mesh line segments, which may be performed in addition to one or more other techniques described herein (e.g., later or earlier).

[0076] Use the derivative of the surface function to determine the mesh

[0077] FIG. 4 is a flowchart of an exemplary method (400) for determining the location of vertices of a mesh approximating a surface using a numeric root finding technique based on the derivative of a surface function, depending on some implementation. For example, the method (400) may be an exemplary implementation of block (312) of the method (300) of FIG. 3, or it may be performed independently or separately from the method (300). In some implementations, the method (400) may be performed on a client system, for example, a server system, and / or similarly to the methods (200 and 300) described.

[0078] It should be noted that the term “edge” or “edge of a voxel” is used in the description of method (400) for illustrative purposes. An edge of a voxel may more generally be described as a line segment of a voxel. For example, in some implementations, a line segment may be an actual edge of a face of a cubic voxel. In some implementations, such as some surface nets or similar techniques that may be used with method (400), a line segment may be a line connecting adjacent voxel centers (or connecting different parts of two adjacent voxels). In these latter implementations, such a line segment may be used instead of an edge of a voxel, and, for example, a vertex of method (400) may be determined or selected along such a line segment of a voxel rather than an actual edge of a voxel.

[0079] The method (400) may start at block (402). In block (402), a voxel is selected from a grid of voxels to be processed. The voxel is, for example, one of the voxels in the grid determined to be intersected by a surface in block (206) of FIG. 2. The method continues to block (404).

[0080] In block (404), a vertex of the selected voxel is selected. In some implementations, a vertex on an edge of the selected voxel is selected, and the edge is intersected by a surface. The selected vertex has a current position. In some implementations, the selected vertex may be a corner of the selected voxel represented by a voxel value in the input data (in other implementations, the voxel value in the input data may represent a different reference point (part) of the voxel, e.g., the center of the voxel). In some implementations, the selected vertex may be determined using other techniques, e.g., the midpoint of the intersecting edge of the selected voxel or a position estimated by other techniques. In an iteration of method (400), the selected vertex may be limited to the dimensions of the voxel space of the selected voxel.

[0081] In some implementations, after the edge (line) to search for the mesh vertex is determined, the surface function is transformed from a 2D or 3D function into a linear function of that edge. The transformation may involve plugging the equation of the line into the surface function. For example, if the surface function is a sphere (e.g., x 2 +y 2 = 100), and if the edge being searched is y=3 (e.g., a horizontal edge with a constant y-axis value), plugging the line into a surface function is x 2 + 3 2 = 100, i.e., x 2 + 9 = 100 or x 2 The result of = 91 is calculated as the equation of the corresponding edge. In this simple example, the solution can be determined accurately, but using more complex surface functions, it may be difficult to solve the result. The method continues to block (406).

[0082] In block (406), the new location of the selected vertex is determined as the root of the surface function (e.g., the aforementioned transformed function) using a root-finding technique that uses the derivative of the surface function. The surface function is defined to be equal to zero on the surface, and finding the root corresponds to finding a point on the surface. In method (400), the surface function does not have an analysis solution and is differentiable.

[0083] For example, a root-finding technique can find the root of an equation containing the derivative of a surface function. The new location of a selected vertex may be where the tangent to the derivative at the selected vertex intersects the surface. The zero of the tangent to the surface function at the current location can be used as an approximation of the surface function zero. In some examples, the Newton-Raphson root-finding technique can be used. In some implementations, the finite difference of the surface function can be used to approximate the derivative of the surface function from input data values ​​or discrete samples. In some examples, the Newton-Raphson technique uses the equation below to solve for the derivative to be zero.

[0084]

[0085] Here (x n , f(x n )) is the vertex selected (in 2D) for the nth iteration, so X n is the current position of the selected vertex on the voxel edge, and f(x n ) is the surface function evaluated at the selected vertex location; (X n+1 , f(x n+1 )) is the result vertex, and f'(x n ) is the derivative of the surface function evaluated at the current location of the selected vertex. This equation divides the surface function at the selected vertex by the derivative of the surface function at the selected vertex and subtracts the result from the current location of the selected vertex. The result is the vertex (X) that is closer to the actual intersection point of the voxel edge and the surface.n+1 , f(x n+1 )) and, here X n+1 is the new location of the selected vertex. The method continues to block (408).

[0086] In block (408), the error between the new position of the selected vertex determined in block (406) and the surface is determined. For example, this error can be determined by evaluating the surface function with respect to the value of the new position determined in block (406), and determining the difference between the function result and 0. From the surface function evaluation, a result of 0 indicates that the new position of the selected vertex is accurately on the surface, providing an accurate intersection point between the surface and the voxel edge. The method continues to block (410).

[0087] In block (410), it is determined whether the error determined in block (408) satisfies one or more predetermined criteria (and / or otherwise whether the predetermined criteria are satisfied). For example, if a threshold error amount is predetermined for use with block (410), it is then checked whether the error is smaller than the threshold (or larger than the threshold in other implementations). Other or additional criteria may also be used in various implementations. In some implementations, the number of iterations of blocks (406-410) performed may be an alternative or additional criterion for determining block (410). For example, if the number of iterations performed exceeds a repetition threshold (e.g., 3 iterations), then the predetermined criteria are satisfied. If the predetermined criteria are satisfied, the method continues to block (412) described below.

[0088] If the predetermined criteria of block (410) are not met, the new position of the selected vertex in the current iteration is set as the current position of the selected vertex, and another iteration of the root-finding technique is initiated and continues to block (406) to determine the new position of the selected vertex. Thus, the selected vertex is adjusted (e.g., moved) to a (new) current position closer to the actual intersection position along the edge of the voxel. In the next iteration, the newer position of the selected vertex is determined in block (406) using the root-finding technique from the (new) current position as described above. This new position is closer to the actual intersection position of the voxel and the surface than the previous position. Until the predetermined criteria in block (410) are met, the newer position in block (408) is evaluated for error in a manner similar to that described above.

[0089] In some implementations, the current position of a selected vertex may be adjusted (e.g., moved) by an additional amount or magnitude closer to the actual intersection point. For example, the additional amount may be based on a determined error or may be a predetermined amount. For example, the magnitude of the error determined in block (408) may indicate how close the approximate position is to the actual position, and the vertex may be further moved to an estimated position closer to the actual position based on the error (e.g., proportionally thereto).

[0090] In block (412), the predetermined criteria of block (410) are satisfied, and the determined location of the selected vertex is assigned to the mesh being generated. The method continues to block (414).

[0091] In block (414), it is determined whether there are other mesh vertices of the selected voxel to be processed. For example, one or more mesh vertex locations on other edges of the selected voxel may not yet be determined through method (400). If there are other mesh vertices of the selected voxel to be processed, the method continues to block (404) to select other vertices to be processed. If there are no more vertices of the selected voxel to be processed, the method continues to block (416).

[0092] In block (416), it is determined whether there are other voxels in the voxel grid to process. If there are other voxels to process, the method continues to block (402) to select the other voxels to process. In various implementations, a voxel adjacent to the voxel just processed may be selected, or a different voxel in the voxel grid may be selected. In some implementations, for example, based on a predetermined threshold or other criteria, not all voxels that the surface intersects are processed by method (400). If there are no more voxels in the voxel grid to process, the method continues to block (418) to finish the mesh. For example, additional processing of the mesh may be optionally performed, such as further adjusting mesh vertices using one or more additional techniques (e.g., method (900) of FIG. 9), saving the mesh, displaying the mesh, etc.

[0093] FIG. 4 illustrates a voxel-by-voxel determination of a mesh, but it will be understood that one or more blocks of the method (400) may be performed substantially in parallel. For example, block (402) may be performed to select multiple voxels, and blocks (404-414) may be performed substantially in parallel for each selected voxel. In another example, in block (404), one or more vertices may be selected; for each selected vertex, blocks (406-412) may be performed substantially in parallel. Parallel execution can improve the speed of mesh determination (because multiple voxels / vertices can be computed simultaneously). Additionally, parallel execution can make better use of processor resources, for example, if the processor includes multiple processing cores (e.g., a GPU or a multi-core processor) and / or can support multi-threaded parallel execution.

[0094] Graph illustrating root finding using differentiable surface functions

[0095] FIG. 5 is an example of a graph (500) illustrating an example of using a root-finding technique that uses a differentiable surface function to find the location of a vertex of a mesh, depending on some implementation. In some implementations, the example of FIG. 5 is based on the method (400) of FIG. 4.

[0096] Graph (500) illustrates a 2D example for simplification. Graph (500) illustrates a curve (502) representing a surface function for a position on an edge between two original vertices (e.g., corners) of a voxel. The surface function has been transformed from a 2D or 3D function into a linear function on that (edge) line, as previously described for block (404) in FIG. 4. The x-axis represents a position crossing the edge of the voxel between two original vertices V0 and V1 of the voxel (e.g., corners of the voxel). The y-axis represents the value of the surface function at that position. Vertices (V0, V1) are voxel values ​​representing the value of the surface function at each position, having a y value (of xy coordinates) included in the input data. The y value at V0 is positive, and the y value at V1 is negative, indicating that the surface intersects the voxel edge at a position between the x values ​​of vertices (V0 and V1). Vertex V A is at the actual intersection position between the surface and the voxel edge (here, V A (It is unknown). The intersection of the surface and the edge is at y = 0, where the surface function is 0 (the root of the surface function). This location is neither above the surface (positive values ​​on the y-axis) nor below the surface (negative values ​​on the y-axis).

[0097] In some cases, vertex V A The location of can be directly determined by evaluating the surface function to find this location where the surface function becomes 0 (root), and the surface function has an analytical solution as described with reference to blocks (306 and 308) in FIG. 3. If the surface function does not have an analytical solution, location V A Other root-finding techniques can be used to find a vertex location close to . In this example, since the surface function is differentiable, a root-finding technique using the derivative of the surface function, such as the Newton-Raphson root-finding technique, can be used.

[0098] The tangent line (504) is determined in the first iteration using a root-finding technique, wherein the line (504) represents the tangent line of point V0 based on the derivative of the surface function. The tangent line (504) is the position V where the line (504) intersects the horizontal axis. R1 It has a root at. Location (V R1 ) is not the actual location of the intersection (VA), and therefore the surface function is the location (V R1 Point V on the curve (502) on the x-axis as illustrated when evaluated as ) N1 Provides. Location V R1 V, which is depicted as segment (506) in some implementations R1 and V N1 It has an error that can be expressed as the difference in position (along the y-axis) between them.

[0099] V N1 An error (y-value of VA) between 0 and 0 is determined not to meet the criteria (e.g., the error exceeds the threshold), and another iteration of the root-finding technique uses point V as the mesh vertex location instead of point V0 from the last iteration. N1 It is performed as. In effect, the vertex position is from V0 to V N1 Adjusted (moved) to. Point V N1 The tangent line (508) is determined based on the derivative of the surface function. The tangent line (508) is the position V where the line (508) intersects the horizontal axis. R2 It has a root at position V R2 The surface function is at position V R2 Point V on the curve (502) on the x-axis as illustrated when evaluated as N2 To provide the actual location V of the intersection A It is different from. Point V N2 is point V N1 See V A It is closer to. Location V R2 V, illustrated in segment (510) R2 and V N2There is an error that can be expressed as a difference in position (along the y-axis) between them.

[0100] V R2 and 0(V A If the error between (y-value) still does not meet the criteria, V N1 Instead, point V as the starting point N2 Another iteration may be performed with; additional iterations are performed as needed. The determined zero position and V A If the error between them meets the criteria, the iteration does not continue, and the zero point position is considered the position of the mesh vertex.

[0101] Use root finding with iterative refinement to determine the mesh

[0102] FIG. 6 is a flowchart of an exemplary method (600) for determining the location of vertices of a mesh approximating a surface using a numeric root-finding technique having iterative refinement, depending on some implementation. For example, the method (600) may be an exemplary implementation of block (314) of the method (300) of FIG. 3, or it may be performed independently or separately from the method (300). For the method (600), the surface function to which the mesh is approximated may be a non-differentiable function or a differentiable function. In some implementations, the method (600) may be performed on a server system and / or a client system, for example, similar to that described for the methods (200 and 300).

[0103] It should be noted that the terms “edge” or “edge of voxel” are used in the description of method (600) for illustrative purposes. Similar to how method (400) is described, in some implementations, the line segment may be an actual edge of a face of a cubic voxel, whereas in some implementations, when used with method (600) in some mesh generation techniques such as some surface net or similar techniques, the line segment may be a line connecting adjacent voxel centers (or connecting different parts of two adjacent voxels). In these latter implementations, such a line segment may be used instead of an edge of the voxel, and, for example, the vertex of method (600) may be determined or selected along such a line segment of the voxel rather than an actual edge of the voxel.

[0104] The method (600) may start at block (602). In block (602), a voxel is selected from a grid of voxels to be processed. The voxel is, for example, one of the voxels in the grid determined to be intersected by a surface in block (206) of FIG. 2. The method continues to block (604).

[0105] In block (604), a vertex of a selected voxel is selected for meshing. In some implementations, a vertex on an edge of the selected voxel is selected, and the edge is intersected by a surface. The selected vertex has a current position. In some implementations, the selected vertex may be a corner of the selected voxel whose value is known from input data. In some implementations, two vertices are selected in block (604), and the selected vertex is one of two known vertices of the voxel, for example, two known vertices, such as a line intersecting these vertices that brackets the root across the surface. In some implementations, the selected vertex may be determined using another technique, for example, the midpoint of the intersecting edge of the selected voxel or a position estimated by another technique. In an iteration of method (600), the selected vertex may be limited to the dimensions of the voxel space of the selected voxel.

[0106] In some implementations, after the edge to be searched for at the mesh vertex is determined, the surface function is converted from a 2D or 3D function to a linear function of the corresponding edge, for example, similar to what was described above for block (404) of FIG. 4. The method continues to block (606).

[0107] In block (606), the new location of the selected vertex (or one of the selected vertices) is determined as the root of the surface function (e.g., the aforementioned transformed function) using a numeric root finding technique. The root finding technique can find the root of the surface function, for example, the location where the surface function becomes 0 and the surface intersects the edge of the voxel.

[0108] One or more of various numerical root finding techniques may be used. In some examples, the root finding techniques may include the bisection technique (e.g., finding the midpoint of a line between two known voxel edge vertices that bracket the root and evaluating the surface function at the midpoint), the secant technique (e.g., linear interpolation through the two most recent points or two endpoints), the Bezier clipping technique (e.g., transforming the function into a Bezier curve and clipping the ends), the stray position technique (e.g., interpolating through the two most recent points using bracketing), Ridders' technique (e.g., exponential fitting of the function at positive, negative, and midpoints), the Van Wijngaarden-Dekker-Brent technique (e.g., inverse quadratic fitting to the three most recent points), and / or other root finding techniques. The zero result of the root-finding technique can be used as an approximation of the surface function zero. The result is a vertex that is closer to the actual intersection point of the voxel edge and the surface.

[0109] In an example using linear interpolation in the bisection technique, two vertices are selected in block (604), known as bracketing the roots of the surface function; for example, one of the vertices has a positive value and the other has a negative value. A line is extended between these vertices, and the midpoint of the line is determined as the approximate root. For example, if the underlying surface function is linear (e.g., in some implementations, the function may be non-linear, e.g., bilinear or bicubic), the midpoint generates a vertex interpolated between the two vertices that is proportional to the positions of the two vertices. The method continues to block (608).

[0110] In block (608), the error between the new location of the selected vertex determined in block (606) and the surface is determined. In some examples, this error may be determined by evaluating a surface function with respect to the value of the new location determined in block (606), and determining the difference between the function result and 0. A result of 0 from the surface function evaluation indicates that the new location of the selected vertex is exactly on the surface. The method continues to block (610).

[0111] In block (610), it is determined whether the error determined in block (608) satisfies one or more predetermined criteria (and / or whether the predetermined criteria are otherwise satisfied). For example, if a threshold amount of error is predetermined for use with block (610), it is determined whether the error is smaller than the threshold (or larger than the threshold in other implementations). Other or additional criteria may also be used in various implementations. In some implementations, the number of iterations of blocks (606-610) performed may be an alternative or additional criterion for determining block (610). For example, if the number of iterations performed is greater than or equal to the iteration threshold (e.g., 3 iterations), the predetermined criteria are satisfied. If the predetermined criteria are satisfied, the method continues to block (612) described below.

[0112] If the predetermined criteria of block (610) are not met, the new position of the selected vertex in the current iteration becomes the current position of the selected vertex (or, if two vertices are selected, one of the selected vertices), and another iteration of the root finding technique is started by continuing block (606) to determine the new position of the selected vertex. Thus, the selected vertex is adjusted (e.g., moved) to a (new) current position closer to the actual intersection position along the edges of the voxels.

[0113] For example, in some implementations of the above example using the bisection technique and two selected vertices, a new location may replace one of the selected vertices. For example, if the evaluation of the surface function at the new location yields a positive result, the new location may be assigned to replace the first of the two selected vertices that yields a positive result. If the evaluation of the surface function at the new location yields a negative result, the new location may be assigned to replace the second of the two selected vertices that yields a negative result. Thus, the two vertices continue to bracket to the 0 location.

[0114] In the next iteration, a newer location of the selected vertex in block (606) is determined from the (new) current location, similar to what was described above. This newer location is closer to the actual intersection location of the surface and the voxel than the previous location. Until a predetermined criterion in block (610) is satisfied, the newer location in block (608) is evaluated for the error, similar to what was described above. Thus, this method can provide repeated subdivision of the error interval over multiple iterations.

[0115] In some implementations, the current position of a selected vertex may be adjusted (e.g., moved) by an additional amount or magnitude closer to the actual intersection point. For example, the additional amount may be based on a determined error or may be a predetermined amount. For example, the magnitude of the error determined in block (608) may indicate how close the approximate position is to the actual position, and the vertex may be further moved to an estimated position closer to the actual position based on the error (e.g., proportionally thereto). In some implementations, the parameters used for the successive over-relaxation of the method (600) may be tuned for different types of input data.

[0116] In block (612), the predetermined criteria of block (610) are satisfied, and the determined position of the selected vertex is assigned to the mesh being generated. The method continues to block (614).

[0117] In block (614), it is determined whether there are other mesh vertices of the selected voxel to be processed. For example, one or more mesh vertex locations on other edges of the selected voxel may not yet be determined through method (600). If there are other mesh vertices of the selected voxel to be processed, the method returns to block (604) to select other vertices to be processed. If there are no more vertices of the selected voxel to be processed, the method continues to block (616).

[0118] In block (616), it is determined whether there are other voxels in the voxel grid to be processed. If there are other voxels to be processed, the method returns to block (602) to select the other voxels to be processed. In some implementations, a voxel adjacent to the voxel just processed may be selected, or a different voxel in the voxel grid may be selected. In some implementations, not all voxels that the surface intersects are processed by method (600) based, for example, on a predetermined threshold or other criteria. If there are no more voxels in the voxel grid to be processed, the method continues to block (618) to finish the mesh. For example, additional processing of the mesh may be optionally performed, such as further adjusting mesh vertices using one or more additional techniques (e.g., method (900) of FIG. 9), saving the mesh, displaying the mesh, etc.

[0119] FIG. 6 illustrates the determination of a mesh by voxel, but it will be understood that one or more blocks of the method (600) may be performed substantially in parallel. For example, block (602) may be performed to select multiple voxels, and blocks (604-614) may be performed substantially in parallel for each selected voxel. In another example, in block (604), one or more vertices may be selected; for each selected vertex, blocks (606-612) may be performed substantially in parallel. Parallel execution can improve the speed of mesh determination (because multiple voxels / vertices can be computed simultaneously). Additionally, parallel execution can make better use of processor resources, for example, if the processor includes multiple processing cores (e.g., a GPU or a multi-core processor) and / or can support multi-threaded parallel execution.

[0120] An example of one implementation of method (600) is shown below as pseudocode for a marching triangle technique using a bisecting root finding technique that divides the error interval in half for each iteration and linear interpolation. Other implementations may use other mesh generation techniques similar to the root finding technique of method (600), such as surface nets.

[0121] / * Result is an array of {x:, y:} vertices for a polygon in pixel coordinates, or null if there is no polygon. There will be either 3 or 4 vertices to the polygon, depending on the case.

[0122] A, B, C are in pixel coordinates. * /

[0124] function getIsoPoly(density, A, B, C) {

[0125] const vertex = [{point:A}, {point:B}, {point:C}];

[0126] let numInside = 0;

[0127] for (let V of vertex) {

[0128] V.density = density(V.point);

[0129] V.inside = (V.density >= THRESHOLD) ? 1 : 0;

[0130] if (V.inside) { ++numInside;}

[0131] }

[0132] / / Switch based on which of the 8 cases we're in, which reduce to

[0133] / / 2 trivial cases plus 2 cases with 3-way rotational symmetry.

[0134] switch (numInside) {

[0135] case 0: / / All outside (case 000)

[0136] return null;

[0137] case 1: / / One inside -> tri (cases 100, 010, 001)

[0138] / / Cyclic shift until vertex[0] is the one inside

[0139] while (! vertex[0].inside) { vertex.unshift(vertex.pop());}

[0140] / / Produce the triangle with tip at 0

[0141] return [cloneXY(vertex[0].point),

[0142] rootFindVertex(vertex[1], vertex[0], density),

[0143] rootFindVertex(vertex[2], vertex[0], density)];

[0144] case 2: / / Two inside -> quad (cases 101, 110, 011)

[0145] / / Cyclic shift until vertex[0] is the one outside

[0146] while (vertex[0].inside) { vertex.unshift(vertex.pop());}

[0147] / / Produce the quad cutting off point 0

[0148] return [cloneXY(vertex[1].point),

[0149] rootFindVertex(vertex[0], vertex[1], density),

[0150] rootFindVertex(vertex[0], vertex[2], density),

[0151] cloneXY(vertex[2].point)];

[0152] return;

[0153] case 3: / / All inside (case 111)

[0154] return [cloneXY(A), cloneXY(B), cloneXY(C)];

[0155] } / / switch

[0156] }

[0157] / * Given two vertices {point: {x:, y:}, value:},

[0158] produces the vertex interpolated between them proportional to their positions, so as to interpolate to the THRESHOLD (surface)... if the underlying density was linear (it is typically bilinear or bicubic, so this is only a single-iteration root finding).

[0159] Assume A.density < THRESHOLD and B.density >= THRESHOLD.

[0160] * /

[0161] function rootFindVertex(A, B, density) {

[0162] console.assert(A.density < THRESHOLD);

[0163] console.assert(B.density >= THRESHOLD);

[0164] if (ROOT_ITERATIONS === 0) {

[0165] / / 0 iterations; just move halfway

[0166] return {x: (A.point.x + B.point.x) * 0.5,

[0167] y: (A.point.y + B.point.y) * 0.5};

[0168] } else {

[0169] / / General case. Binary search

[0170] for (let i = 0; i < ROOT_ITERATIONS - 1; ++i) {

[0171] / / Slide C between A and B

[0172] const C = {point: lerpXY(A.point, B.point,

[0173] (THRESHOLD - A.density) / (B.density - A.density))};

[0174] / / Prepare for the next iteration

[0175] C.density = density(C.point);

[0176] if (C.density >= THRESHOLD) {

[0177] / / Isosurface is between A and Cs

[0178] B = C;

[0179] } else {

[0180] / / Isosurface is between C and B

[0181] A = C;

[0182] } / / binary search

[0183] } / / for i

[0184] / / Final iteration

[0185] return lerpXY(A.point, B.point,

[0186] (THRESHOLD - A.density) / (B.density - A.density));

[0187] }

[0188] }

[0190] Graph illustrating root finding using a root finding technique with iterative refinement

[0191] FIG. 7 is an example of a graph (700) illustrating an example of using a root-finding technique with iterative refinement to find the location of a vertex of a mesh, depending on some implementation. In some implementations, the example of FIG. 7 is based on the method (600) of FIG. 6. For example, the surface function used in the example of FIG. 7 may be a differentiable function or a non-differentiable function.

[0192] Graph (700) illustrates a 2D example for simplification. Graph (700) illustrates a curve (702) representing a surface function for a position on an edge between two original vertices of a voxel (e.g., a corner), similar to the curve (502) in FIG. 5. The surface function has been transformed from a 2D or 3D function into a linear function on that (edge) line, as previously described for block (604) in FIG. 6. The x-axis represents a position crossing the edge of the voxel between two original vertices (V0 and V1) of the voxel (e.g., a corner of the voxel). The y-axis represents the value of the surface function at the position. The y-value of V0 is positive, and the y-value of V1 is negative, which indicates that the surface is at a position V between the x-values ​​of vertices V0 and V1. A Indicates intersection with a voxel edge (where V A (is unknown).

[0193] When the surface function is continuous and there is no analytical solution, the root-finding technique is used at location V A It can be used to find vertex locations close to . In this example, the surface function may or may not be differentiable; the root-finding technique can find the root for all continuous functions.

[0194] The line (704) is determined in the first iteration using a root-finding technique for vertex V0. For example, linear interpolation can be used with a secant root-finding technique, where point V S1 This is interpolated. For example, point V S1It can be determined using the following equation of the secant method.

[0195]

[0196] In this example, the line (704) is a straight line extending between points V0 and V1 to approximate the surface function curve (702). The root position VS1 of the line (704) is where the line (704) intersects the horizontal axis having a y-value of 0. Position V S1 The actual root position V of the surface function curve (702) A It is different from, and therefore the surface function f The surface function is at position V S1 Point V on the curve (702) below the x-axis as illustrated when evaluated as N1 Provides. Location V S1 In some implementations, V is depicted as segment (706). S1 and V N1 (V S1 It has an error that can be expressed as the difference in position (along the y-axis) between the surface function results at).

[0197] In this case, V N1 Error between and 0 (V A The y-value of is determined not to meet the desired criteria (e.g., the error is above the threshold), and point V instead of point V1 of the last iteration. N1 Another iteration of the root-finding technique is performed. In effect, the vertex position is from V1 to V N1 It was adjusted (moved) to.

[0198] Line (708) is V0 and V in the second iteration N1 It is a straight line extending the space. Line (708) is at position V where line (708) intersects the horizontal axis. S2 It has a root at position V S2 The surface function is at position V S2 Point V on the curve (702) below the x-axis as illustrated when evaluated as N2To provide the actual location V of the intersection A It is different from. Point V N2 is point V N1 See V A It is closer to. Location V S2 is V shown in segment (710) S2 and V N2 It has an error that can be represented as the difference in position (along the y-axis) between them.

[0199] V S2 and 0(V A If the error between the y-value of ) does not satisfy the error criterion, another iteration can be performed with point VN2 replacing point VN1; additional iterations are performed as necessary. The determined zero position and V A If the error between them meets the criteria, the iteration is not continued, and the zero position can be considered as the position of the mesh vertex.

[0200] Use of successive over-relaxation techniques for mesh determination

[0201] FIG. 8 is a flowchart illustrating an exemplary method (800) for determining the location of vertices of a mesh approximating a surface using a continuous over-relaxation technique, depending on some implementation. For example, the method (800) may be an exemplary implementation for determining vertex locations in block (210) of the method (200) of FIG. 2 described above. In some implementations, the method (800) may be a technique used in block (304) of the method (300) of FIG. 3, or may be used independently or separately from the method (300) of FIG. 3 to determine vertex locations in a mesh. In some implementations, the method (800) may be performed on a server system and / or a client system, for example, similar to how methods (200 and 300) are described.

[0202] It should be noted that the term “edge” or “edge of a voxel” is used in the description of method (800) for illustrative purposes. Similar to methods (400 and 600), in some implementations, a line segment may be an actual edge of a face of a cubic voxel, whereas in some implementations, when used with method (800) in some mesh generation techniques such as some surface net or similar techniques, a line segment may be a line connecting two adjacent voxel centers (or other parts of two adjacent voxels). In these latter implementations, such a line segment may be used instead of an edge of a voxel, and, for example, a vertex of method (800) may be determined or selected along such a line segment of a voxel rather than an actual edge of a voxel.

[0203] Method (800) may be used in some implementations where input data is provided in the form of occupancy values ​​or density values ​​(both referred to as “occupancy values” in this method). These values ​​may represent the amount of each defined voxel occupied by a volume containing a surface. In some implementations, any various forms of input data, such as input data representing a surface described by a function, input data representing a surface not described by a function, etc., may be used in Method (800).

[0204] The method (800) may start in block (802). In block (802), a set of voxels of input data is selected from a voxel grid to be processed. In some implementations, the set of voxels is a subset of the entire set of voxels that the surface intersects. In some implementations, the set of voxels is a set of adjacent voxels in the voxel grid. For example, the set of adjacent voxels may be a set of 3x3 adjacent voxels, a set of 5x5 adjacent voxels, etc. By selecting a set of voxels smaller than the entire set, memory and / or processing power requirements for the computing system used to generate the mesh can be reduced. In some implementations, only the selected set of voxels is processed by the method (800), and other voxels are ignored by the method (800); in other implementations, multiple different sets of voxels may be selected for processing, for example, in different iterations, for different processors or processor cores, either partially or entirely sequentially. In some implementations, all voxels of the grid intersected by the surface can be selected in block (802). This may be impractical in some implementations due to memory and processing power requirements for handling a large number of voxels. The method continues to block (804).

[0205] In block (804), the initial approximate location of a mesh vertex is determined from a set of selected voxels. In some implementations, the initial approximate location of a mesh vertex is determined from an edge of the set of selected voxels. The approximate location is determined based on the voxel values ​​of the input data applied to the voxels of the selected set. For example, the approximate location may be determined through the use of linear interpolation. In some examples, values ​​of known adjacent voxels may be obtained from the input data, and linear interpolation is applied between these adjacent values ​​to find the initial approximate location of the mesh vertex. In some implementations, the initial approximate location of a vertex may be determined using other techniques. In some implementations, the selected vertex in an iteration of method (800) may be limited to the dimensions of each voxel space of each associated selected voxel of the set of voxels. The method continues to block (806).

[0206] In block (806), the approximate volume occupied by each voxel of the selected set of voxels is determined based on the approximate location of the vertex determined in block (804). In some implementations, the approximate volume occupied by each voxel determined is an approximate volume occupied by an input data that can be compared with the input data if the input data is in the form of a volume occupied by a voxel. The input data may have specified a voxel value for each voxel representing the volume occupied by the voxel. In some implementations, a 3D integral may be determined for each voxel where the approximate volume is determined in block (804). The result of this integral is the volume of the mesh occupied (e.g., internal) of the voxel, and thus is a current approximation of the volume occupancy of the corresponding voxel. The method continues to block (808).

[0207] In block (808), an error is determined between the corresponding voxel value of a voxel of input data and the approximate volume of a set of selected voxels. For example, each determined approximate volume can be compared with the corresponding voxel value of input data, and the difference between these values ​​is determined to represent the error for that voxel. An associated error can be determined for each voxel of a set of selected voxels. In some implementations, the input data may include an occupancy value that can be directly compared with the determined approximate value. In some implementations, the input data may be converted into a format compatible with the determined approximate volume so that a comparison can be made based on, for example, a new voxel grid or other format assigned to the input data in method (200). This method continues to block (810).

[0208] In block (810), it is determined whether the error determined in block (808) for a selected set of voxels satisfies one or more predetermined criteria. For example, if a threshold error amount is predetermined for use with block (810), it is determined whether the error of each voxel in the set is smaller than the threshold (or, in other implementations, larger than the threshold). Other or additional criteria may also be used in various implementations. In some implementations, the number of iterations of blocks (806-812) performed may be an alternative or additional criterion for determining block (810). For example, if the number of iterations is greater than or equal to the iteration threshold (e.g., 3 iterations), the predetermined criterion is satisfied. If the predetermined criterion is satisfied, the method continues to block (814) described below.

[0209] If the predetermined criteria of block (810) are not met for the voxels of the set, the process continues to block (812), where one or more approximate positions of vertices in one or more of the selected voxels are adjusted (e.g., moved) to reduce the error according to a continuous over-relaxation technique. In some examples, one vertex may be selected and moved, or multiple vertices may be selected and moved. For example, if the approximate volume is higher than the corresponding voxel value, one or more of the approximate vertices are moved inward toward the volume, and if the approximate volume is lower than the corresponding voxel value, one or more of the approximate vertices are moved outward from the volume. In some implementations, the continuous over-relaxation technique determines the voxels to which the vertices are to be moved, and the vertices to be moved may be selected based on a specific method, e.g., moving one of the vertices or moving all vertices. In some implementations, the amount by which these vertices are moved may be determined based on a tunable heuristic (e.g., based on the desired properties of the mesh). For example, a selected vertex can be moved by the same amount, or a selected vertex that was moved in the previous iteration can be moved by a smaller amount than a selected vertex that was not moved.

[0210] Continuous over-relaxation is an iterative technique that takes the form of a weighted average between the previous iteration and the calculated Gauss-Seidel iteration (using the Gauss-Seidel technique) for each component, for example, as follows:

[0211]

[0212] Here represents the Gaussian-Seidel iteration, and ω is the relaxation factor. You can choose a value for the relaxation factor that accelerates the convergence speed of the iteration for the solution (the actual location of the surface intersection).

[0213] In some implementations, the Gauss-Seidel method may be used, which can be considered as a continuous over-relaxation method with a relaxation factor of 1.

[0214] After one or more vertices have been moved, the method continues to block (806) in the next iteration to determine the approximate volume of the selected voxel based on the new approximate position of the vertex determined in block (812), determines the error for the new approximate volume in block (808), and determines whether the error satisfies a predetermined criterion in block (810). This iteration is repeated using the newly determined vertex position in block (812) for each successive iteration until the error satisfies the predetermined criterion in block (810), at which point the method continues to block (814). Thus, the method repeatedly converges to a vertex position within a threshold error.

[0215] In some implementations, in subsequent iterations, one or more different vertices of a selected set of voxels may be moved in place of one or more vertices that were moved in a previous iteration; and / or one or more identical vertices of a selected set of voxels may be moved in subsequent iterations. In some examples, one vertex is moved in one iteration of block (812), and another vertex adjacent to the moved vertex is moved in the next iteration of block (812), etc. In other examples, multiple vertices are moved in one iteration, and multiple different vertices are moved in the next iteration, etc. In yet another example, multiple vertices are moved in one iteration, and one or more of those identical vertices are moved in the next iteration. For example, different vertices may be moved in each iteration in a random or regular order. In yet another example, all vertices of a selected set are moved in each iteration. The technique used to move the vertices may rely on a technique that causes better (e.g., faster) convergence to the actual intersection with the format and / or content of the input data, for example.

[0216] In block (814), the predetermined criteria of block (810) are satisfied, and the determined approximate location of the vertex in the selected set of voxels is assigned to the generated mesh. The method continues to block (816).

[0217] In block (816), it is determined whether there are one or more other voxels in the voxel grid (outside the selected set of voxels) to find mesh vertices. For example, one or more vertex locations on other edges of voxels that the surface intersects may not yet be determined through method (800). In some implementations, one or more voxels adjacent to the voxel just processed may be selected, or different voxels in the voxel grid may be selected. In some implementations, not all voxels that the surface intersects are processed by method (800), for example, based on a predetermined threshold or other criteria. If there are one or more other voxels to process, the method returns to block (802) and selects a set of other voxels to process. If no more voxels in the voxel grid are processed, the method continues to block (818).

[0218] In block (818), the method finishes the mesh. For example, additional processing of the mesh may be optionally performed, such as using one or more additional techniques (e.g., method (900) of FIG. 9) to further adjust the mesh vertices, save the mesh, display the mesh, etc.

[0219] In some implementations, parallel processing of mesh vertices and / or voxels may be performed, for example, in one or more blocks of method (800) for each voxel of a set of voxels being processed. In various implementations, one or more blocks of method (800) may process vertices and / or voxels in sequence or substantially in parallel. For example, block (802) may be performed to select a set of multiple voxels, and blocks (804-816) may be performed substantially in parallel for each selected set of voxels. Parallel execution can improve the speed of mesh determination (because multiple voxels / vertices can be computed simultaneously). Additionally, parallel execution can make better use of processor resources, for example, if the processor includes multiple processing cores (e.g., a GPU or a multi-core processor) and / or can support multi-threaded parallel execution.

[0220] Surface approximation by mesh subdivision

[0221] FIG. 9 is a flowchart illustrating an exemplary method (900) for determining the position of a vertex of a mesh approximated by a surface by subdividing one or more parts (e.g., lines) of the mesh, depending on some implementation. For example, the method (900) may iteratively adjust (e.g., move) the added vertices so as to be on or approximated by the surface. For example, the method (900) may be an exemplary implementation for determining the vertex position in block (210) of the method (200) of FIG. 2 described above. In some implementations, the method (900) may be a technique used in block (304) of the method (300) of FIG. 3, or may be used independently or separately from the method (300) of FIG. 3 to determine the vertex position in the mesh. In some implementations, method (900) may be implemented after, before, or in combination with one or more other techniques, such as any of the methods described herein (400, 600, or 800), or other known techniques (e.g., marching cubes, surface nets, or related techniques). In some implementations, method (900) may be performed on a server system and / or a client system, for example, similar to how methods (200 and 300) are described.

[0222] It should be noted that the term “edge” or “edge of a voxel” is used in the description of method (900) for illustrative purposes. Similar to the method described above, in some implementations, a line segment may be an actual edge of a face of a cubic voxel, or in some implementations, such as some surface net or similar technique that may be used with method (900), a line segment may be a line connecting two adjacent voxel centers (or other parts of two adjacent voxels). In these latter implementations, such a line segment may be used instead of an edge of a voxel, and, for example, a vertex of method (900) may be determined or selected along such a line segment of a voxel rather than an actual edge of a voxel.

[0223] The method (900) may be used in some implementations where input data is provided as a distance field and / or represents a surface described by a surface function. In some implementations, the input data may be provided as an occupancy value or a density value.

[0224] The method (900) may start at block (902). In block (902), a voxel is selected from a grid of voxels to be processed. The voxel is, for example, one of the voxels in the grid intersected by a surface in block (206). The method continues to block (904).

[0225] In block (904), the vertices of the selected voxel are selected. In some implementations, vertices on the faces (or edges) of the selected voxel are selected, where the faces (edges) are intersected by surfaces. In some implementations, method (900) may be performed after a method has been performed to generate a mesh, such as the method (400, 600, or 800) described herein or other known techniques, and approximate vertices of the mesh on the faces of the voxel determined by such prior method(s) may be selected in block (904). In such implementations, the vertices may have approximate locations determined by the prior method. In some implementations, the surface function may be converted from a 2D or 3D function to a linear function of the edge, for example, similar to what was described above in relation to block (404) of FIG. 4. The method continues to block (906).

[0226] In block (906), the curvature of the surface is determined (e.g., estimated) across selected voxels, for example, across the edges of selected voxels. In some implementations, if the surface function defining the surface is known and differentiable, the curvature can be estimated by determining the surface tangent or normal at selected vertices by a method such as finite difference. The estimated curvature of the surface provided between these vertices can be determined by comparing the characteristics of the tangents. For example, if the two tangents at the vertices have nearly the same angle, the surface between the vertices is unlikely to be significantly curved, whereas if the two tangents have significantly different angles, the surface between the two vertices is likely to be significantly curved.

[0227] In some implementations, the curvature of the surface may be determined by evaluating a surface function (if the surface function is known). For example, the surface function may be sampled or evaluated at the midpoint of the edge of the intersecting voxel faces (or the midpoint of the line connecting the selected vertices). The distance between the function result and the surface may be determined, and this distance may represent the curvature of the surface (e.g., the greater the distance from the midpoint to the surface, the greater the curvature). In other implementations, other methods may be used to locally determine the curvature of the approximated surface, for example, at the selected vertex or across the intersecting faces of other selected voxels. The method continues to block (908).

[0228] In block (908), it is determined whether the curvature determined in block (906) is greater than or equal to a threshold. For example, a curvature threshold may be selected to indicate a curvature large enough not to be approximated by a line within acceptable accuracy. In some examples, where two tangents are used to determine the curvature as described above, the curvature threshold is provided as a threshold difference between the two tangent angles, so that if the angle of the tangents is greater than the threshold angle difference, the surface curvature is greater than the curvature threshold. Similarly, the curvature threshold may be provided as a threshold for the amount or distance between the evaluated midpoint and the surface, where the midpoint is located between the selected vertices as described above. If the curvature is less than the threshold (or otherwise does not satisfy it), the method continues to block (918) described below. If the curvature is greater than the threshold (or otherwise satisfies it), the method continues to block (910).

[0229] In block (910), an additional vertex is inserted between two existing vertices within a selected voxel, thereby subdividing the line between the two existing vertices into a polyline. In some implementations, the two existing vertices may be the vertices selected in block (904). In some examples, the two existing vertices are provided on the edges of the selected voxel, and the additional vertex may be inserted at the midpoint between the two existing vertices, or at a different location relative to the two vertices (e.g., closer to one of the existing vertices than to the other). Some implementations may place the additional vertex at a location between the existing vertices based on the curvature determined in block (906), for example, if the curvature is determined to be inclined or biased toward one of the two existing vertices, the additional vertex is placed closer to the existing vertex.

[0230] In some implementations, additional vertices are inserted between two existing vertices on a line of an existing mesh (e.g., a side of a mesh polygon) that may have been generated in a previous method, such as methods (400, 600, 800), or other mesh generation techniques, or in a previous iteration of method (900). In some implementations, additional vertices may be inserted between two existing vertices of one or more polygons of a polygon template determined, for example, in block (208) of FIG. 2, where such a template may be referred to as a "mesh" for method (900). The method continues to block (912).

[0231] In block (912), the error between the additional vertex determined in block (910) and the position of the surface is determined. For example, this error can be determined by evaluating the surface function with the additional vertex position value and determining the difference between the function result and 0. In such an evaluation of the surface function, a result of 0 indicates that the additional vertex position is exactly on the surface. The method continues to block (914).

[0232] In block (914), it is determined whether the error satisfies one or more predetermined criteria. For example, if a threshold amount of the error is predetermined for use with block (914), it is then determined whether the error is smaller than the threshold (or larger than the threshold in other implementations). Other or additional criteria may also be used in various implementations. In some implementations, the number of iterations of blocks (912-916) performed may be an alternative or additional criterion for determining block (914). For example, if the number of iterations is greater than the iteration threshold (e.g., 3 iterations), then the predetermined criteria are satisfied. If the predetermined criteria are satisfied, the method continues to block (918) described below.

[0233] If a predetermined criterion is not satisfied in block (914), the subsequent method continues to block (916), and the position of an additional vertex is adjusted (e.g., moved) so as to reduce the error determined in block (912), for example, the additional vertex is moved by an amount that brings it closer to the actual surface. In some implementations, the new (moved) position of the additional vertex is determined by using a root-finding technique, such as a root-finding technique using a differentiable function, a bisection technique, etc., similar to the one described above with reference to method (400 or 600). In some implementations, the additional vertex may be moved by an amount based on the determined error or by a predetermined amount. In some implementations, the magnitude of the error may indicate how close the position of the additional vertex is to the actual position, and the additional vertex may be moved to an estimated position closer to the actual position based on the error (e.g., proportionally thereto).

[0234] The method then continues to block (912) to initiate another iteration to adjust the additional vertex, where the position moved from the previous iteration becomes the current position of the additional vertex. In the next iteration, the method determines and evaluates the error between the moved positions of the additional vertex and, if necessary, moves the additional vertex as indicated by the predetermined criterion for multiple iterations, similar to the foregoing, until the error satisfies the predetermined criterion of block (914).

[0235] In block (918), a predetermined criterion of block (914) is satisfied, and it is determined whether there is another voxel in the voxel grid to be processed by method (900). If there is another voxel to be processed, the method returns to block (902) and selects the other voxel to be processed. In some implementations, a voxel adjacent to the voxel just processed may be selected, or a different voxel in the voxel grid may be selected. In some implementations, not all voxels whose surfaces intersect are processed by method (900), for example, based on a predetermined threshold or other criteria.

[0236] In some implementations, the mesh may be further subdivided by adding one or more additional vertices to the mesh on one or more polylines that were previously subdivided by the aforementioned additional vertices. In iterations of method (900), the selected and added vertices may be limited to the dimensions of the voxel space of the associated selected voxel. For example, similar to block (906), the curvature of the surface may be determined between the original vertex of the voxel and the first additional vertex, and if this curvature is greater than a curvature threshold (or, in some implementations, greater than another threshold used for additional vertices after the first additional vertex), the mesh line between the original vertex and the first additional vertex may be further subdivided by adding a second additional vertex to that mesh line, similar to block (908). In some implementations, the position of this second additional vertex may be iteratively refined by moving it closer to the surface, for example, if the error between the second additional vertex and the surface is greater than an error threshold, similar to what was described in block (916) for the first additional vertex. In some implementations, third, fourth, and / or additional additional vertices may be similarly added to the same mesh line, and their positions may be refined repeatedly. In some cases or implementations, such second (and subsequent) additional vertices may be added to the mesh, for example, at locations within the voxel or other locations, at locations of the voxel that are not on the faces or edges of the voxel.

[0237] If there are no more voxels of the voxel grid to process as determined in block (918), the method continues to block (920) to create or modify the mesh. In some implementations, additional vertex positions are assigned to the mesh, for example, triangles or other polygons of the mesh are created or adjusted to include additional vertices added by method (900). In some implementations, additional processing of the mesh may be performed optionally, for example, using one or more techniques to further adjust mesh vertex positions, save the mesh, and display the mesh.

[0238] FIG. 9 illustrates a voxel-by-voxel determination of a mesh, but it will be understood that one or more blocks of the method (900) may be performed substantially in parallel. For example, block (902) may be performed to select multiple voxels, and blocks (904-918) may be performed substantially in parallel for each selected voxel. Parallel execution can speed up mesh determination (because multiple voxels / vertices can be computed simultaneously). Additionally, parallel execution can make better use of processor resources, for example, if the processor includes multiple processing cores (e.g., a GPU or a multi-core processor) and / or can support multi-threaded parallel execution.

[0239] A graph illustrating the addition of vertices and the subdivision of a portion of the mesh to refine the positions of the added vertices.

[0240] Depending on some implementation, FIG. 10 is an example of a graph illustrating an example of subdividing a portion of a mesh to add vertices, and FIG. 11 is an example of a graph illustrating an example of refining the location of the added vertices. In some implementations, the example of FIG. 10 is based on the method (900) of FIG. 9.

[0241] Graph (1000) illustrates a 2D example for simplification. Graph (1000) illustrates a curve (1002) representing a surface function for a position on the edge (and / or across the face) of a voxel between two vertices V0 and V1 on different (e.g., opposite) edges of the voxel, depending on the implementation. The surface function has been converted from a 2D or 3D function to a linear function of the edge, similar to what was described above for block (904 or 404). The x-axis represents the position across the edge (or face) of the voxel. The y-axis represents the surface function value at that position. Position VA is the actual intersection location between the edge of the voxel and the surface where the surface function is 0.

[0242] A line (1004) is provided between vertices V0 and V1 as an approximation of the surface path between these vertices. In some implementations, the line (1004) may be part of a mesh generated prior to the method performed in the example of FIG. 10, or may be generated as part of the method of FIG. 10.

[0243] The curvature of the surface is determined at vertices V0 and V1. For example, a tangent (1006) can be determined at vertex V0, and a tangent (1008) can be determined at vertex V1. The curvature can be determined by comparing the angles of these tangents. In this example, the difference in angle between the tangents (1006 and 1008) is greater than a critical angle, and thus indicates a large degree of curvature of the surface between vertices V0 and V1.

[0244] In response to detecting curvature above the curvature threshold, additional vertex V R1 This is added to the line (1004) connecting vertices V0 and V1. In this example, vertex V R1 This is added to the midpoint between V0 and V1. V R1 It can be added at different locations in line (1008) in other implementations.

[0245] Figure 11 shows additional vertex V R1Illuminates the graph (1000) of FIG. 10 moved to a position closer to this surface. In this example, V N1 is additional vertex V R1 It is the actual function value (y-value) of. V N1 Since it is not at the 0 (y = 0) position, it is not on the surface. V N1 is moved closer to the surface so that it is almost on the surface. In this example, a root-finding technique is used, such as the Newton-Raphson root-finding technique (where the surface function is differentiable). The root found by the root-finding technique is V N1 Based on the position where the tangent (1102) intersects the horizontal axis, vertex V N2 It is in. V N2 is V N1 See V A It is closer to the surface location.

[0246] V N2 Ga V A If it is within the critical distance, no further iterations are performed in the root finding method, and V N2 is assigned as a vertex of the mesh. This results in two mesh lines (1104 and 1106) to be used instead of line (1004), where the mesh lines (1104 and 1106) approximate the surface curve (1002) more closely than line (1004).

[0247] In some implementations, additional iterations may be performed. For example, vertices V0 and V N2 The curvature at can be evaluated, and if the curvature exceeds a curvature threshold, the mesh line (1104) can be subdivided by a second additional vertex into a polyline having two lines. The second additional vertex does not need to be on an edge or face of the voxel (e.g., it may be within the voxel). In some implementations, the second additional vertex may be moved using a technique other than a root-finding technique, for example.

[0248] Blocks of any of the methods (400, 600, 800, or 900) may be performed (or repeated) in a different order than described above, and / or one or more blocks may be omitted. These methods may be performed on a server (e.g., 102 in FIG. 12) and / or a client device (e.g., 110 or 116 in FIG. 12).

[0249] Example System Architecture

[0250] FIG. 12 illustrates an exemplary system architecture (1200) according to a partial implementation of the present disclosure. The system architecture (1200) (also referred to herein as “system”) comprises an online platform (1202), a first client device (1210) (generally referred to herein as “client device (1210 / 116”)), a network (1222), and a second client device (1216). The online platform (1202) may include, among other things, an application engine (1204), one or more applications (1205), a search engine (1206), and a data store (1208). The client device (1210) may include an application (1212). The client device (1216) may include an application (1218). Users (1214 and 1220) can interact with the online platform (1202) using their respective client devices (1210 and 1216).

[0251] A system architecture (1200) is provided for illustrative purposes. In some implementations, the system architecture (1200) may include the same, fewer, more, or different elements configured in the same or different ways as illustrated in FIG. 12.

[0252] In one embodiment, the network (1222) may include a public network (e.g., the Internet), a private network (e.g., a LAN (local area network) or a WAN (wide area network)), a wired network (e.g., an Ethernet network), a wireless network (e.g., an 802.11 network, a Wi-Fi® network or a WLAN (wireless LAN)), a cellular network (e.g., an LTE (Long Term Evolution) network), a router, a hub, a switch, a server computer, or a combination thereof.

[0253] In one implementation, the data storage (1208) may be non-transient computer-readable memory (e.g., random access memory), a cache, a drive (e.g., a hard drive), a flash drive, a database system, or other types of components or devices capable of storing data. The data storage (1208) may also include multiple storage components (e.g., multiple drives or multiple databases) that may span multiple computing devices (e.g., multiple server computers).

[0254] In some implementations, the online platform (1202) may include a server having one or more computing devices (e.g., a cloud computing system, a rack-mount server, a server computer, a cluster of physical servers, a virtual server, etc.). In some implementations, the server may be included in the online platform (1202), may be an independent system, or may be part of another system or platform.

[0255] In some implementations, the online platform (1202) may include one or more computing devices (e.g., rackmount server, router computer, server computer, personal computer, mainframe computer, laptop computer, tablet computer, desktop computer, etc.), data storage (e.g., hard disk, memory, database), network, software components and / or hardware components that can be used to perform operations on the online platform (1202) and provide access to the online platform (1202) to a user. The online platform (1202) may also include a website (e.g., one or more web pages) or application backend software that can be used to provide access to content provided by the online platform (1202) to a user. For example, a user may access the online platform (1202) using an application (1212 / 1218) on each client device (1210 / 1216).

[0256] In some embodiments, the online platform (1202) may be a type of user-generated content system that allows a user (e.g., end user or consumer) to communicate with other users through the online platform (1202) or a type of social network that provides connections between users, wherein the communication may include voice chat, video chat, or text chat. In some embodiments of the disclosure, "user" may be represented as a single individual. However, other embodiments of the disclosure include a set of users or an entity controlled by an automated source, such as "user" (e.g., user-generated).

[0257] In some implementations, the online platform (1202) may generate a mesh based on input data using one or more of the methods and features described herein. In some implementations, one or more client devices may generate a mesh based on input data using one or more of the methods and features described herein.

[0258] In some implementations, the online platform (1202) may be a virtual gaming platform. For example, the gaming platform may provide single-player or multi-player games to a community of users who can access or interact with games (e.g., user-generated games or other games) using client devices (1210 / 1216) via a network (1222). In some implementations, the games may be, for example, two-dimensional (2D) games, three-dimensional (3D) games (e.g., 3D user-generated games), virtual reality (VR) games, or augmented reality (AR) games. Objects represented in the games may include objects defined by meshes generated from data as described herein. In some implementations, users may search for games and participate in gameplay with other users in one or more games selected from the search results. In some implementations, games selected from the search results may be played in real time with other users of the game. In some implementations, gameplay may refer to interactions of one or more players using a client device (e.g., 1210 and / or 1216) within a game (e.g., 1205) or presentation of interactions on a display or other output device of the client device (1210 or 1216).

[0259] In some implementations, the online platform (1202) may be a social networking platform, a purchasing platform, a messaging platform, a creation platform, a platform providing digital content for viewing and manipulation by users (e.g., medical scans, topographic maps, etc.). Other collaboration platforms may be used in place of or in addition to the online platform (1202) with the features described herein (e.g., using 3D or 2D digital objects defined by a mesh for surfaces or other characteristics).

[0260] One or more applications (1205) are provided by an online platform. In some implementations, the application (1205) may include an electronic file that can be executed or loaded using software, firmware, or hardware configured to present the application's content (e.g., digital media items) to an entity. For example, the application (1205) may be a game that presents the application's content. In some implementations, the application (1212 / 1218) may be executed, and the application (1205) may be rendered in relation to the application engine (1204).

[0261] It can be noted that a 3D environment or 3D world uses graphics that use a three-dimensional representation of geometric data representing application content (or at least presents content to appear as 3D content, regardless of whether a 3D representation of geometric data is used). A 2D environment or 2D world uses graphics that use a two-dimensional representation of geometric data representing application content.

[0262] In some implementations, the online platform (1202) may host one or more applications (1205) and may allow a user to interact with the applications (1205) using the applications (1212 / 1218) on the client device (1210 / 1216) (e.g., searching for applications, application content, or other content). In some implementations, a user of the online platform (1202) (e.g., 1214 and / or 1220) plays, creates, searches, interacts with, or constructs applications and application content, such as games, videos, images, audio data, documents, etc., communicates with other users, creates and constructs application objects of the applications (1205) (e.g., also referred to herein as “item(s”) or “virtual item(s”)), and / or searches for objects. For example, when creating user-generated virtual game items, the user may create, among other things, a character, decorations for the character, one or more virtual environments for an interactive game, or construct a structure used in a game application (1205). In some implementations, the online platform (1202) may transmit application content to an application (e.g., 1212). In some implementations, an application object may refer to an object used, created, shared, or otherwise described in an application (1205) of the online platform (1202) or an application (1212 or 1218) of a client device (1210 / 1216). For example, a game object may include parts, models, characters, tools, weapons, clothing, buildings, vehicles, currency, flora, fauna, components of the foregoing (e.g., windows of a building), etc.

[0263] It may be noted that the online platform (1202) may host one or more media items that may include communication messages from one user to one or more other users. Media items may include, but are not limited to, digital video, digital movie, digital photo, digital music, audio content, melody, website content, social media update, e-book, e-magazine, digital newspaper, digital audiobook, e-journal, web blog, RSS (real simple syndication) feed, e-comic book, software application, etc. In some implementations, media items may be electronic files that can be executed or loaded using software, firmware, or hardware configured to provide digital media items to entities.

[0264] In some implementations, the application (1205) may be associated with a specific user or a specific group of users (e.g., a private game), or may be widely available to users of an online platform (1202) (e.g., a public game).

[0265] In some implementations, an online platform (1202) or a client device (1210 / 1216) may include an application engine (1204) or an application (1212 / 1218). The engine (1204) may include an application similar to the application (1212 / 1218). In some implementations, the engine (1204) may be used for the development or execution of the application (1205). For example, the game engine (1204) may include, among other features, a rendering engine ("renderer") for 2D, 3D, VR, or AR graphics, a physics engine, a collision detection engine (and collision response), a sound engine, a scripting function, an animation engine, an artificial intelligence engine, a networking function, a streaming function, a memory management function, a threading function, a scene graph function, or video support for cinematics. Components of the engine (1204) may generate commands (e.g., rendering commands, collision commands, physics commands, etc.) that help to compute and render the application. In some implementations, applications (1212 / 1218) of client devices (1210 / 1216) may operate independently or as a combination thereof, in cooperation with the engine (1204) of the online platform (1202).

[0266] In some implementations, the online platform (1202) and the client devices (1210 / 1216) both run engines (1204, 1212, and 1218, respectively). In various implementations, each application (1205) may have different ratios between the engine functions performed on the online platform (1202) and the engine functions performed on the client devices (1210 and 1216).

[0267] In some implementations, components of digital objects, such as body parts, may be basic geometric shapes such as blocks, cylinders, spheres, etc., or some other basic shapes such as wedges, toruses, tubes, channels, etc. In some implementations, the generator module may publish objects (e.g., game characters) for viewing or use by other users of the online platform (1202). In some implementations, creating, modifying, or customizing objects, applications (1205), or application environments may be performed by a user using a user interface (e.g., a developer interface) with or without scripting (or with or without an API (application programming interface)).

[0268] In some implementations, the online platform (1202) can store digital objects and content created by users in a data store (1208).

[0269] In some implementations, the client device(s) (1210 or 1216) may each include a computing device such as a personal computer (PC), a mobile device (e.g., a laptop, mobile phone, smartphone, tablet computer, or netbook computer), a networked television, a game console, etc. In some implementations, the client device (1210 or 1216) may also be referred to as a "user device." The number of client devices (1210 or 1216) is provided as an example, not a limitation. In some implementations, any number of client devices (1210 or 1216) may be used.

[0270] In some implementations, each client device (1210 or 1216) may each contain an instance of an application (1212 or 1218). In one implementation, the application (1212 or 1218) may allow the user to use and interact with the online platform (1202), such as searching for the application or application content, controlling objects in a virtual game hosted by the online platform (1202), or viewing or uploading content such as games, images, video items, web pages, documents, etc. In one example, the application may be a web application (e.g., an application that works with a web browser) that can access, search, present, or navigate content provided by a web server. In another example, the application may be a native application (e.g., a mobile application, an app, or a game program) that is installed and run locally on the client device (1210 or 1216) and allows the user to interact with the online platform (1202). The application may render, display, or present content (e.g., a web page, a media viewer) to the user. In an implementation, the application may also include an embedded media player (e.g., a Flash® player) embedded in the web page.

[0271] Generally, the functions described in one implementation as being performed by the online platform (1202) may also be performed by client device(s) (1210 or 1216) or a server in other implementations where appropriate. Additionally, functions assigned to a specific component may be performed by different or multiple components working together. The online platform (1202) may also be accessed as a service provided to other systems or devices through an appropriate API (application programming interface), and thus is not limited to use on a website.

[0272] Example computing device

[0273] FIG. 13 is a block diagram of an exemplary computing device (1300) that may be used to implement one or more features described herein, depending on some implementation. In one example, the device (1300) may be used to implement a computer device (e.g., 1202, 1210 and / or 1216 of FIG. 12) and to perform the implementation of the method described herein. The computing device (1300) may be any suitable computer system, server, or other electronic or hardware device. For example, the computing device (1300) may be a mainframe computer, desktop computer, workstation, portable computer, or electronic device (portable device, mobile device, mobile phone, smartphone, tablet computer, television, TV set-top box, PDA (personal digital assistant), media player, game device, wearable device, etc.). In some implementations, the device (1300) includes a processor (1302), memory (1304), an input / output (I / O) interface (1306), and an audio / video input / output device (1314) (e.g., a display screen, a touchscreen, display goggles or glasses, an audio speaker, a microphone, etc.).

[0274] The processor (1302) may be one or more processors and / or processing circuits for executing program code and controlling the basic operation of the device (1300). The “processor” includes any suitable hardware and / or software system, mechanism, or component for processing data, signals, or other information. The processor may include a general-purpose central processing unit, a multiprocessing unit, a system having dedicated circuitry or other systems for achieving functions. Processing does not need to be limited to a specific geographical location or have temporal limitations. For example, the processor may perform functions in “real-time,” “offline,” “batch mode,” etc. Parts of the processing may be performed at different times and at different locations by different (or the same) processing systems. The computer may be any processor that communicates with memory.

[0275] Memory (1304) is typically provided to the device (1300) for access by the processor (1302) and is suitable for storing instructions for execution by the processor, is located separately from the processor (1302), and / or is any suitable processor-readable storage medium, such as random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory, etc. Memory (1304) may store software that runs on the server device (1300) by the processor (1302), including an operating system (1308), a mesh generation engine application (1310), and associated data (1312). In some implementations, the mesh generation engine application (1310) may include instructions that enable the processor (1302) to perform some or all of the functions described herein, such as the methods of FIG. 2-4, 6, 8, and 9. In various implementations, some or all of the methods of FIG. 2-4, 6, 8 and 9 may be implemented in one or more devices (1300), for example, in one or more processors of each of the one or more devices (1300).

[0276] For example, memory (1304) may contain software instructions for a mesh generation engine (1310) capable of generating a mesh from input data and providing a mesh for use by a device (1300) and / or an online platform (e.g., 1202), such as storing, modifying, and / or rendering the mesh for display by a display device of an I / O device (1314). Any of the software in memory (1304) may alternatively be stored in any other suitable storage location or computer-readable medium. Additionally, memory (1304) (and / or other connected storage device(s)) may store instructions and data used in the features described herein. Memory (1304) and any other type of storage (magnetic disk, optical disk, magnetic tape, or other type of tangible media) may be considered as "storage" or "storage device."

[0277] The I / O interface (1306) may provide the ability to interface the server device (1300) with other systems and devices. For example, network communication devices, storage devices (e.g., memory and / or data storage (1208)), and input / output devices may communicate through the interface (1306). In some implementations, the I / O interface may be connected to an interface device including an input device (keyboard, pointing device, touchscreen, microphone, camera, scanner, etc.) and / or an output device (display device, speaker device, printer, motor, etc.). For example, a mesh (and / or digital objects and digital features derived therefrom) generated by the online platform (1202) may be stored in the platform (1202) and may also be transmitted over a network to one or more client devices for storage and display by the client devices.

[0278] For convenience of explanation, FIG. 13 illustrates one block for each of the processor (1302), memory (1304), I / O interface (1306), software blocks (1308 and 1310), and database (1312). These blocks may represent one or more processors or processing circuits, operating systems, memory, I / O interfaces, applications and / or software modules. In other implementations, the device (1300) may not have all of the illustrated components and / or may have other elements including other types of elements instead of or in addition to those illustrated herein. Although the online platform (1202) is described herein as performing the operation as described in some implementations, any suitable component or combination of components of the online platform (1202) or a similar system, or any suitable processor or processors associated with such a system, may perform the described operation.

[0279] User devices may also implement and / or use the features described herein. An exemplary user device may be a computer device comprising some similar components such as device (1300), e.g., processor(s) (1302), memory (1304), and I / O interface (1306). An operating system, software, and applications suitable for the client device may be provided in memory and used by the processor. The I / O interface for the client device may be connected to network communication devices as well as input and output devices, e.g., a microphone for sound capture, a camera for image or video capture, an audio speaker device for sound output, a display device for outputting images or videos, or other output devices. For example, a display device within an audio / video input / output device (1314) may be connected to (or included in) the device (1300) and may display pre-processed and post-processed images as described herein, wherein such display device may include any suitable display device, such as an LCD, LED or plasma display screen, a CRT, a television, a monitor, a touchscreen, a 3-D display screen, an AR / VR display, a projector, or other visual display device. Some implementations may provide an audio output device, such as speech output or synthesis that speaks text. For example, such a display device or output device may display objects (including one or more surfaces or other properties / features) in a virtual environment based on a mesh generated by the mesh generation engine (1310).

[0280] The methods, blocks, and / or actions described herein may be performed in a different order than shown or described, and / or, where appropriate, simultaneously (partially or completely) with other blocks or actions. Some blocks or actions may be performed on one part of the data and later, for example, again on another part of the data. Not all described blocks and actions need to be performed in various implementations. In some implementations, blocks and actions may be performed multiple times in a different order and / or at different times in the method.

[0281] In some implementations, some or all of the method may be implemented on a system such as one or more client devices. In some implementations, one or more of the methods described herein may be implemented, for example, on a server system and / or on both a server system and a client system. In some implementations, different components of one or more servers and / or clients may perform different blocks, operations, or other parts of the method.

[0282] One or more methods described herein (e.g., methods (200, 300, 400, 600, 800, and / or 900)) may be implemented by computer program instructions or code that can be executed on a computer. For example, the code may be implemented by one or more digital processors (e.g., a microprocessor or other processing circuit) and may be stored in a computer program product including a non-transient computer-readable medium (e.g., a storage medium), such as a magnetic, optical, electromagnetic, or semiconductor storage medium including semiconductor or solid-state memory, magnetic tape, removable computer diskette, random access memory (RAM), read-only memory (ROM), flash memory, rigid magnetic disk, optical disk, solid-state memory drive, etc. The program instructions may be included in and provided in an electronic signal in the form of software as a service (SaaS) delivered from, for example, a server (e.g., a distributed system and / or a cloud computing system). Alternatively, one or more methods may be implemented in hardware (such as logic gates) or a combination of hardware and software. Exemplary hardware may be a programmable processor (e.g., a field-programmable gate array (FPGA), a complex programmable logic device (CML)), a general-purpose processor, a graphics processor, an application-specific integrated circuit (ASIC), etc. One or more methods may be performed as part or a component of an application running on a system, or as an application or software running alongside other applications and an operating system.

[0283] One or more methods described herein may be executed in a standalone program that can be executed on any type of computing device, a program that runs in a web browser, or a mobile application (“app”) that runs on a mobile computing device (e.g., a mobile phone, smartphone, tablet computer, wearable device (wristwatch, armband, jewelry, hat, goggles, glasses, etc.), laptop computer, etc.). In one example, a client / server architecture may be used, for instance, where a mobile computing device (as a client device) transmits user input data to a server device and receives final output data from the server for output (e.g., for display). In another example, all computation may be performed within a mobile app (and / or other app) on a mobile computing device. In another example, computation may be partitioned between a mobile computing device and one or more server devices.

[0284] Although the description is given in relation to that specific implementation, such a specific implementation is merely illustrative and not limiting. The concepts described in the examples may be applied to other examples and implementations.

[0285] It should be noted that the functional blocks, operations, features, methods, devices, and systems described in this disclosure may be integrated or divided into different combinations of systems, devices, and functional blocks, as is known to those skilled in the art. Any suitable programming language and programming technique may be used to implement the routines of a particular implementation. Different programming techniques, such as procedural or object-oriented, may be used. Routines may be executed on a single processing unit or on multiple processors. Steps, operations, or calculations may be presented in a specific order, but the order may be changed in different specific implementations. In some implementations, multiple steps or operations described sequentially in this specification may be performed simultaneously.

Claims

Claim 1 A computer implementation method comprises: receiving input data representing a surface that distinguishes the interior and exterior of an object volume by one or more processors; determining a voxel grid containing the surface by one or more processors, wherein the voxel grid contains a plurality of voxels; identifying a specific voxel among the plurality of voxels that the surface intersects by one or more processors; and generating a mesh approximated by the surface by one or more processors, wherein the mesh comprises a plurality of polygons defined by vertices of the mesh within the specific voxel, and the step of generating the mesh comprises: determining the approximate location of a subset of vertices of the polygons of the mesh in a subset of the specific voxel; determining an approximate volume value for each voxel in the subset of the specific voxel, wherein the approximate volume value represents the approximate volume of the mesh occupying the voxel based on the approximate location of the subset of vertices; and determining an error between the approximate volume value of the specific voxel and a corresponding voxel value, wherein the corresponding voxel value is determined from the input data. A computer-implemented method comprising the step of adjusting the approximate position of at least one vertex of a subset of vertices using an iterative technique to reduce the above error. Claim 2 A computer-implemented method according to claim 1, wherein the step of adjusting the approximate position of at least one vertex includes the step of determining the error and repeating the step of adjusting until the error satisfies a predetermined criterion using the one or more processors. Claim 3 A computer-implemented method according to paragraph 2, wherein the error satisfies a predetermined criterion in response to a predetermined number of repetitions being performed or in response to the error satisfying one or more predetermined threshold values. Claim 4 A computer-implemented method according to claim 1, wherein the approximate position of a subset of vertices of the polygon is determined based on position interpolation on the edge of a subset of the specific voxels where the surface intersects the edge. Claim 5 A computer-implemented method according to claim 1, further comprising the step of mapping each of the plurality of voxels to each of the cross cases from a set of cross cases stored based on the input data by the one or more processors, wherein each mapped cross case represents a cross path of a surface through the voxels, and the step of identifying the specific voxels comprises the step of identifying the edge or other line segment of the specific voxels that the surface intersects based on the mapped cross cases. Claim 6 A computer-implemented method according to claim 1, wherein the step of determining the approximate location of a subset of the vertices of the polygons of the mesh includes the step of determining the initial approximate location of the vertices using a marching cubes technique or a surface nets technique. Claim 7 A computer-implemented method according to claim 1, wherein the iterative technique includes a successive over-relaxation technique. Claim 8 A computer-implemented method according to claim 7, wherein a subset of the specific voxels comprises a plurality of adjacent voxels of the mesh. Claim 9 A computer-implemented method according to claim 1, wherein the subset of the specific voxel includes a plurality of adjacent voxels of the voxel grid, and further comprises the step of determining the approximate location of a second subset of the vertices of the polygons of the mesh in a second subset of the adjacent voxels of the specific voxel. Claim 10 A computer-implemented method according to claim 1, wherein the step of determining an approximate volume value representing the approximate volume of a mesh occupying each voxel of a subset of the specific voxels includes the step of determining a three-dimensional integral of the mesh within the voxels. Claim 11 A computer-implemented method according to claim 1, wherein the input data includes a scalar value representing the density or occupancy of a voxel by the volume of the object. Claim 12 A computer-implemented method according to claim 1, wherein the step of generating the mesh is performed in response to the surface not being described by a known surface function. Claim 13 A computer-implemented method according to any one of claims 1 to 12, further comprising the step of generating a feature surface based on the mesh, wherein the feature surface is displayable by a display device. Claim 14 As a system, at least one processor; and a memory coupled to said at least one processor and having stored instructions, wherein when the instructions are executed by said at least one processor, said at least one processor causes said at least one processor to perform an operation, said operation being: receiving input data representing a surface that distinguishes the interior and exterior of an object volume; determining a voxel grid including said surface, said voxel grid including a plurality of voxels; and identifying a specific voxel among said plurality of voxels that the surface intersects. A system comprising: an operation to generate a mesh approximated by the surface, wherein the mesh comprises a plurality of polygons defined by vertices of the mesh within the specific voxel, and the operation to generate the mesh comprises: an operation to determine the approximate position of a subset of vertices of the polygons of the mesh in a subset of the specific voxel; an operation to determine an approximate volume value for each voxel in the subset of the specific voxel, wherein the approximate volume value represents the approximate volume of the mesh occupying the voxel based on the approximate position of the subset of vertices; an operation to determine an error between the approximate volume value of the specific voxel and a corresponding voxel value, wherein the corresponding voxel value is determined from the input data; and an operation to adjust the approximate position of at least one vertex of the subset of vertices using an iterative technique to reduce the error. Claim 15 A system according to claim 14, wherein the operation of adjusting the approximate position of at least one vertex includes the operation of determining the error and the operation of adjusting until the error satisfies a predetermined criterion. Claim 16 A system according to claim 14, wherein the approximate location of a subset of vertices of the polygon is determined based on the interpolation of locations on the edge of a subset of the specific voxels where the surface intersects the edge. Claim 17 In paragraph 14, the system wherein the iteration technique includes a continuous over-relaxation technique. Claim 18 A system according to claim 14, wherein the operation of determining an approximate volume value representing the approximate volume of a mesh occupying each voxel of a subset of the specific voxels includes the operation of determining a three-dimensional integral of the mesh within the voxels. Claim 19 A system according to claim 14, wherein the input data comprises a scalar value representing the density or occupancy of a voxel by the volume of the object. Claim 20 A system according to any one of claims 14 to 19, wherein the at least one processor performs an additional operation including generating a feature surface based on the mesh, and the feature surface is displayable by a display device.

Citation Information

Patent Citations

  • Sparse GPU voxelization for 3D surface reconstruction

    KR1020160033128A

  • Systems and methods for generating a proxy mesh for an artist-authored mesh using conformed smoothing

    US11217016B1

  • Method, system, and program product for re-meshing of a three-dimensional input model using progressive implicit approximating levels

    US20070165025A1