WO2023061364A1 - 建立模型的方法和相关装置 - Google Patents
建立模型的方法和相关装置 Download PDFInfo
- Publication number
- WO2023061364A1 WO2023061364A1 PCT/CN2022/124626 CN2022124626W WO2023061364A1 WO 2023061364 A1 WO2023061364 A1 WO 2023061364A1 CN 2022124626 W CN2022124626 W CN 2022124626W WO 2023061364 A1 WO2023061364 A1 WO 2023061364A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- vertices
- coordinates
- vertex
- model
- candidate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three-dimensional [3D] modelling for computer graphics
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
- G06T17/205—Re-meshing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three-dimensional [3D] modelling for computer graphics
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2210/00—Indexing scheme for image generation or computer graphics
- G06T2210/12—Bounding box
Definitions
- the embodiments of the present application relate to the field of computer graphics, and more specifically, to a method and a related device for establishing a model.
- Rendering refers to the process of generating images from models with software.
- a model is a strictly defined description of a three-dimensional object in a language or data structure, including information such as geometry, viewpoint, texture, lighting, and shadows.
- the image is a digital image or a bitmap image.
- the rendering process is the process of adding bitmap textures or procedural textures, lighting, bump texture mapping, and positions relative to other objects on the basis of the model, and the result is the complete image that consumers or observers can see.
- the model of the three-dimensional object is not fully used to render the image for the consumer or viewer.
- the model used to generate the image is also applied, it will increase the burden on the hardware. Therefore, how to simplify the model of 3D objects to adapt to different application scenarios is an urgent problem to be solved.
- the embodiment of the present application provides a method and related device for establishing a model, which can establish a proxy model used to replace the original model to facilitate subsequent applications.
- the embodiment of the present application provides a method for establishing a model, including: obtaining N coordinates, the N coordinates are the projection coordinates of the N vertices of the original model projected on the target plane, and N is greater than or equal to 3 Positive integer; according to the N coordinates, determine M vertices from the N vertices, where M is a positive integer greater than or equal to 3 and less than or equal to N; according to the projected coordinates of the M vertices and the height of the original model Information, build a proxy model corresponding to the original model.
- a proxy model of the original model can be established by using the above technical solution. Compared with the original model, the proxy model retains the detailed information of the original model, but includes fewer vertices, so the structure is simpler. In this way, in some scenes that do not need to use the model to render images (such as collision detection, occlusion removal, shadow drawing), the proxy model with a simpler structure can be used to replace the original model. In this way, the calculation amount can be reduced, the application operation efficiency can be improved, and the user experience can be improved.
- the acquisition of N coordinates includes: determining a plurality of candidate vertices according to the projection coordinates of the vertex projections included in the original model in the target plane, wherein , the projection coordinates of each candidate vertex projected in the target plane in the plurality of candidate vertices are located in a reference area, and the reference area is an area in which a preset ratio of vertices in the original model is projected in the target plane; from the The N vertices are determined among the plurality of candidate vertices; and the projection coordinates of the N vertices projected on the target plane are determined.
- the vertices outside the reference area are usually the protruding parts of the object. Deleting these vertices has little effect on the function of the proxy model, but a proxy model with a simpler structure can be obtained.
- a protrusion of building A obscures building B.
- building B will be judged to be occluded by building A.
- the model of building B will not be rendered.
- the proxy model in the above technical solution deletes the vertices of the protruding part of the original model. In this way, when the proxy model is used for occlusion culling, the building B will be judged as not being occluded. Therefore, the model of building department B is rendered, so that the above-mentioned problem can be avoided.
- the determining the N vertices from the plurality of candidate vertices includes: projecting each candidate vertex on the target plane according to the plurality of candidate vertices The projection coordinates in , determine N groups of candidate vertices, wherein each group of candidate vertices in the N groups of candidate vertices includes at least one vertex, and any two candidate vertices belonging to the same group have the same projection coordinates in the target plane, any Two candidate vertices belonging to different groups have different projection coordinates in the target plane; the N vertices are determined, and the N vertices respectively belong to the N groups of candidate vertices.
- the above technical solution only retains one of the vertices, which can further reduce the number of vertices included in the proxy model.
- the N vertices are respectively the vertices with the largest coordinate value in a reference direction among the N groups of candidate vertices, and the reference direction is a direction perpendicular to the target plane ;
- the height information of the original model is the coordinate values of the M vertices in the reference direction.
- the height information of the original model is the height information of a bounding box, and all vertices of the original model are located in the bounding box.
- determining M vertices from the N vertices according to the N coordinates includes: traversing the N vertices according to the N coordinates, and The abnormal vertices among the N vertices are deleted to obtain the M vertices, wherein the angle between the first reference line and the second reference line is greater than the preset angle, and the first reference line is the abnormal vertices and the second reference line.
- a connection line between adjacent points, the second reference line is the connection line between the abnormal vertex and the second adjacent point, the first adjacent point and the second adjacent point are among the N vertices The two vertices on both sides of the abnormal vertex and adjacent to the abnormal vertex.
- Utilizing the above technical solution can further reduce the number of vertices included in the proxy model.
- the number of abnormal vertices to be removed and the similarity between the proxy model and the original model can be controlled. For example, the smaller the preset angle, the more abnormal vertices need to be deleted, and the corresponding reduction in the number of vertices included in the proxy model, but the smaller the similarity between the proxy model and the original model; the larger the preset angle, the more vertices need to be deleted.
- the number of vertices included in the proxy model is less, but the similarity between the proxy model and the original model is greater.
- the purpose of generating a proxy model is to replace the original model with a complex structure, and the closer the structure of the proxy model is to the original model, the worse the effect of saving hardware resources; on the contrary, if the structure of the proxy model is simpler than the original model, then The better the decompression effect for hardware resources.
- the structural gap between the proxy model and the original model is too large, the details of the original model cannot be preserved, which is not conducive to subsequent applications. Therefore, by choosing an appropriate preset angle, the details of the original model can be preserved, and hardware resources can also be saved.
- establishing a proxy model corresponding to the original model according to the projection coordinates of the M vertices and the height information of the original model includes: according to the projection of the M vertices coordinates and the height information of the original model, determine the coordinates of the M top vertices located on the top surface of the proxy model and the coordinates of the M bottom vertices located on the bottom surface of the proxy model; according to the coordinates of the M top vertices and the M The coordinates of the bottom surface vertices determine the vertex index, and the vertex index is used to record the connection sequence of each vertex in the proxy model.
- the proxy model includes the coordinates of the M top surface vertices, the coordinates of the M bottom surface vertices and the vertex index.
- the vertex index may include a top index, a bottom index, and a side index.
- the top face index is used to record the connection order of vertices on the top face
- the bottom face index is used to record the connection order of vertices on the bottom face
- the side index is used to record the connection order of vertices on the side faces.
- the top surface index can be determined according to the coordinates of the M top surface vertices; the bottom surface index can be determined according to the coordinates of the M bottom surface vertices, and the side index can be determined according to the coordinates of the M top surface vertices and the M bottom surface vertices.
- the coordinates are determined.
- an embodiment of the present application provides a computer device, where the computer device includes a unit for implementing the first aspect or any possible implementation manner of the first aspect.
- an embodiment of the present application provides a computer device, the computer device includes a processor, the processor is used to be coupled with a memory, read and execute instructions and/or program codes in the memory, so as to implement the first aspect or Any possible implementation of the first aspect.
- an embodiment of the present application provides a chip system, the chip system includes a logic circuit, the logic circuit is used to couple with an input/output interface, and transmit data through the input/output interface to perform the first aspect or the first Any possible implementation of the aspect.
- the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program codes, and when the computer storage medium is run on a computer, the computer executes the first aspect or the first aspect. any possible implementation of .
- an embodiment of the present application provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a computer, the computer is made to execute any of the first aspect or the first aspect.
- a computer program product comprising: computer program code, when the computer program code is run on a computer, the computer is made to execute any of the first aspect or the first aspect.
- Figure 2 is a schematic diagram of occlusion culling.
- Fig. 3 is a schematic flow chart of a method for establishing a model according to an embodiment of the present application.
- Fig. 4 is a schematic diagram of the vertex projection of the original model on the target plane.
- Figure 5 Schematic diagram of the process of removing outlier vertices.
- Fig. 6 is a schematic diagram of an agent model.
- Fig. 7 is a schematic flowchart of an application scenario in which the method for building a model provided by the embodiment of the present application is applied.
- Fig. 8 is a proxy model corresponding to the original model shown in Fig. 1 generated according to the method shown in Fig. 3 .
- Fig. 9 is a schematic diagram of a computer device provided according to an embodiment of the present application.
- Bounding box is an algorithm for solving the optimal enclosing space of discrete point sets. The basic idea is to approximately replace complex geometric objects with slightly larger and simpler geometric objects (called bounding boxes). Common bounding box algorithms include Axis Aligned Bounding Box (AABB), Bounding Sphere, Oriented Bounding Box (OBB), etc.
- AABB Axis Aligned Bounding Box
- BOB Oriented Bounding Box
- a grid is a splicing of a series of triangular patches, including vertex coordinate data, index coordinate data, normal data, and texture coordinates (also called UV coordinates).
- the vertex coordinate data stores the coordinates of all the spatial points required by the model, which are generally three-dimensional; then an index is generated for each spatial point, and every 3 indexes form a group of index coordinates, which is equivalent to selecting a certain 3 spatial points
- the index coordinate data describes the composition of all triangle patches in the model
- the normal data specifies the normal direction of each vertex
- the UV coordinate specifies where the texture is "pasted" to the grid.
- the model referred to in this article refers to a three-dimensional model.
- the 3D model can be applied to scenarios such as animations and games.
- the model can be divided into two parts: grid and texture.
- the grid is composed of a series of triangular patches, which is equivalent to the "skeleton" of the model.
- the texture includes the texture image and light map that comes with the model, which is equivalent to the "skin" of the model. .
- Shaders are small programs that run on the GPU. These applets run for a specific part of the graphics rendering pipeline. In a basic sense, a shader is just a program that converts input into output. Different shaders are used in different processing parts of the rendering pipeline.
- Occlusion culling refers to the removal of objects in the scene that are occluded by occluders. In this way, when rendering the scene, only models of objects that can be seen by the observer can be rendered. This reduces the amount of data transferred from the central processing unit (CPU) to the graphics processing unit (GPU), and also reduces the amount of computation in the vertex shader and fragment shader stages, ultimately reducing The number of visible objects, so as to achieve the purpose of optimizing performance and reducing GPU load.
- CPU central processing unit
- GPU graphics processing unit
- Figure 2 is a schematic diagram of occlusion culling.
- five buildings are included in the viewing frustum of the camera 201 , which are building 211 , building 212 , building 213 , building 214 and building 215 . If the observer is located where the camera 201 is located, the observer cannot see the occluded building 215 and building 213 . Therefore, when rendering the scene as shown in FIG. 2 , only the buildings that can be seen by the observer, that is, the building 211 , the building 212 and the building 214 may be rendered.
- Collision detection refers to judging whether objects intersect (or include, coincide), calculate focus, predict intersection time, etc.
- characters can move smoothly in the scene. When encountering steps within a certain height, they can automatically go up, while steps that are too high will block people; when encountering slopes with small slopes, they can go up. , if the slope is too large, people will be blocked.
- the collider can be used to define the shape of the colliding object, which is convenient for collision detection.
- Common colliders include box colliders, spherical colliders, capsule colliders, conforming colliders, grid colliders, static colliders, etc.
- Shadow of the object In order to better simulate the realistic scene, when rendering the scene, the shadow of the object will be drawn. Object shadows can be achieved using shadow volumes. Volume shadow is a technology based on geometry. It needs the outline of the object under the light of a certain direction to generate a closed volume, and then the shadow part of the object in the scene can be determined by the projection of light.
- the object's model is used for auxiliary purposes, not for rendering. Therefore, in these applications, it may not be necessary to use a model for generating images for viewing by an observer.
- the model used to generate the image viewed by the co-observer is called the original model, and the model that plays an auxiliary role in applications such as occlusion culling, collision detection, or shadow generation is called the proxy model.
- the present application provides a method for establishing a model, which can generate a corresponding proxy model according to the original model of the object. Compared with the original model, the structure of the proxy model is simpler, but the detailed information of the original model can still be preserved.
- the embodiment of the present application will be introduced with reference to FIG. 1 and FIG. 3 .
- Fig. 3 is a schematic flow chart of a method for establishing a model according to an embodiment of the present application.
- the method shown in FIG. 3 may be implemented by computer equipment or components (such as chips, circuits, etc.) in the computer equipment.
- the computer equipment referred to in the embodiment of the present application may be a desktop computer, a notebook computer, a tablet computer, a server, a mobile phone, a game machine (such as a game station (play station, PS), a Nintendo switch (Nintendo switch, NS), etc.) and other equipment.
- a game machine such as a game station (play station, PS), a Nintendo switch (Nintendo switch, NS), etc.
- the original model in FIG. 3 is the model of the building as shown in FIG. 1 .
- the target plane can be any plane. But for the convenience of calculation, the target plane can usually be set as the bottom surface or the top surface of the object.
- the projection coordinates of vertices on the target plane have the following three acquisition methods:
- Scheme 1 determine the projected coordinates of each vertex on the target plane.
- the projection coordinates determined in step 301 may be the projection coordinates of all vertices in the original model on the target plane. Assuming that the original model is used to render the building as shown in Figure 1, in this case, it is necessary to obtain the projection coordinates of 18709 vertices projected on the target plane.
- Some vertices in the original model have the same coordinates on the target plane, but different coordinates in the direction perpendicular to the target plane.
- the target plane is the bottom surface of a building
- the coordinates of some vertices on the xy plane are the same, but the coordinates in the direction of the z axis are different.
- vertices can be grouped according to their coordinates, each group of vertices including one or more vertices. If a group of vertices includes multiple vertices, then any two vertices in the group of vertices have the same coordinates on the xy plane, but different coordinates in the direction of the z axis.
- any two vertices belonging to different groups have different coordinates on the xy plane. In this way, only the projection coordinates of one vertex in each group of vertices on the target plane can be determined.
- 18709 vertices can be divided into 2655 groups of vertices. In the case of scheme 2, only 2655 projection coordinates need to be determined. In this way, the computational resources required for subsequent steps can be greatly simplified.
- a reference area is determined according to the projection coordinates of all vertices of the original model on the target plane, and the projection coordinates of 95% of the vertices of the original model on the target plane are all within this reference area.
- the projected coordinates of the vertices in the reference area can be obtained in the same way as the above scheme 1 to obtain the projected coordinates of each vertex; or like the above scheme 2, a group of vertices with the same projected coordinates can only retain the projected coordinates of one vertex.
- the preset ratio can also be other values, for example, it can generally be set to be greater than or equal to 90% and less than or equal to 98%.
- Vertices located outside the reference area are usually protruding parts of the object, and deleting these vertices has little effect on the function of the proxy model.
- N is a positive integer greater than or equal to 3.
- M is a positive integer greater than or equal to 3 and less than or equal to N.
- the M vertices can be achieved through the following steps:
- Step 1 determine the target vertex and two vertices adjacent to the target vertex (may be referred to as the first adjacent point and the second adjacent point respectively), and the target vertex can be any vertex in the N vertices;
- Step 2 determine the first reference line and the second reference line, wherein the first reference line is the connecting line between the first adjacent point and the target vertex, and the second reference line is the target vertex and the second adjacent point the connection between
- Step 3 determine whether the angle between the first reference line and the second reference line is greater than the preset angle, if the angle of the angle is greater than the preset angle, then the target vertex can be considered as an abnormal vertex, and can be Delete the abnormal vertex; if the included angle is less than or equal to the preset angle, then the target vertex can be retained;
- Step 4 determine an adjacent point (for example, the first adjacent point) of the target vertex as a new target vertex, and then repeat steps 1 to 3 until all N vertices are traversed.
- the target vertices that are finally retained are the M vertices.
- the preset angle can be set to be greater than 90 degrees, and generally can be set to be greater than or equal to 140 degrees and less than or equal to 150 degrees.
- FIG. 4 is a schematic diagram of the vertex projection of the original model on the target plane. Take the six vertices in the upper left corner as an example to introduce how to delete abnormal vertices.
- FIG. 5 is a schematic diagram of the process of deleting abnormal vertices among the six vertices in the upper left corner shown in FIG. 4 . Assume the preset angle is 145 degrees.
- the six vertices can be referred to as D1, D2, D3, D4, D5, and D6, respectively.
- Use L12 to represent the connection between D1 and D2 use L61 to represent the connection between D6 and D1
- use L23 to represent the connection between D2 and D3, and so on.
- D1 is the target vertex
- D2 and D6 respectively.
- the included angle between L61 and L12 is less than 145 degrees. In this case, D1 can be retained.
- the order of the vertices can be determined by the gift-wrapping algorithm or other algorithms for solving convex hull problems. For example, in some embodiments, assuming that a ray starting from D1 scans counterclockwise from the direction of 12 o'clock, the first vertex that overlaps with the ray during the scanning process is the vertex D2 adjacent to D1; continue scanning, the second The point overlapping with the ray is the vertex D3 adjacent to D2, and so on until the order of all vertices is determined.
- D2 As the target vertex, and the two vertices adjacent to D2 are D1 and D3 respectively.
- the angle of the included angle between L13 and L34 is determined and compared with the preset angle. Obviously, the included angle between L13 and L34 is less than 145 degrees. In this case, D3 can be retained.
- D5 As the target vertex, and the two vertices adjacent to D5 are D4 and D6 respectively.
- the height information of the original model is the height information perpendicular to the target plane.
- Altitude information may include a maximum altitude and a minimum altitude.
- the height information of the original model may be the height value of the bounding box of the original model.
- a bounding box can be created first, and all vertices of the original model can be traversed, and the bounding box can be appropriately scaled so that the bounding box contains the original model all vertices.
- the height information of the bounding box may be recorded.
- the height information of the bounding box can be used as the height information of the original model.
- the maximum height of the bounding box is the maximum height of the original model
- the minimum height of the bounding box is the minimum height of the original model.
- the maximum height of the height information of the original model may be the height values of the M vertices.
- step 301 in scheme 2 and scheme 3, only the projection coordinates of one vertex on the target plane are reserved for each group of vertices.
- the height value of the vertex with the highest height value in each group of vertices can also be determined and saved.
- each of the N vertices obtained through step 301 has a corresponding height value.
- the M vertices in step 302 are selected from the N vertices, each of the M vertices also has a corresponding height value.
- the minimum height in the height information of the original model can be regarded as 0.
- the three-dimensional coordinate data of each of the M vertices can be determined.
- the three-dimensional coordinates of the M vertices located on the top surface of the proxy model can be determined.
- the projection coordinates of the three-dimensional coordinates of the M vertices located on the top surface of the proxy model are respectively the projection coordinates of the M vertices, and the height value of the three-dimensional coordinates of the M vertices is the maximum height in the height information.
- the three-dimensional coordinates of the M vertices located on the bottom surface of the proxy model can be determined.
- the projection coordinates of the three-dimensional coordinates of the M vertices located on the bottom surface of the proxy model are respectively the projection coordinates of the M vertices, and the height value of the three-dimensional coordinates of the M vertices is the minimum height in the height information.
- the vertex index is used to record the connection order of each vertex.
- Vertex indices may include top indices, base indices, and side indices.
- the top face index is used to record the connection order of vertices on the top face
- the bottom face index is used to record the connection order of vertices on the bottom face
- the side index is used to record the connection order of vertices on the side faces.
- a proxy model corresponding to the original model can be constructed according to the coordinates of the vertices, the top surface index, the bottom surface index and the side surface index.
- D1, D2, D3 and D4 in (a) in Figure 6 are the four vertices on the top surface determined according to the projection coordinates and height information, and D5, D6, D7 and D8 are based on the projection coordinates and the four vertices on the bottom surface determined by the height information.
- (c) in Fig. 6 is a schematic diagram of a wrong connection on the side.
- the top face index can be determined by the gift-wrapping algorithm or other algorithms for solving convex hull problems. Taking the four vertices of the top surface as an example, assuming that a ray starting from D1 scans counterclockwise from the direction of 12 o'clock, the first vertex overlapping with this ray during the scanning process is the vertex D2 adjacent to D1; continue scanning, the first The two points overlapping with the ray are the vertex D3 adjacent to D2, and continue scanning to obtain the next vertex D4. In this way, the connection sequence from D1 to D4 is determined, that is, the top surface index.
- the method of determining the bottom surface index is the same as that of the top surface index, and for the sake of brevity, details will not be repeated here.
- the three-dimensional coordinates of vertices with the same projected coordinates on the top and bottom surfaces differ only in the height coordinates. Therefore, the two vertices are related.
- the next vertex can be found along the simplified direction of one of the vertices (for example, it can be the downward direction of the vertex). Construct the first triangle first.
- the second triangular face is constructed with the upper and lower vertices (one of which is the vertex found in the previous simplification direction) and the hypotenuse of the first triangular face. This forms a side surface with two triangular faces. This way you get the correct plane.
- the triangle facet vertex indices constitute the last facet index (order of facet vertices).
- the projection coordinates of the vertex D1 and the vertex D5 are the same, therefore, the vertex D1 and the vertex D5 are a pair of associated vertices.
- the simplified direction of vertex D5 is the direction from D5 to D6. Therefore, it can be determined that the next vertex is vertex D6.
- a triangular surface composed of vertices D1, D5 and D6 (hereinafter referred to as triangular surface 1) can be determined.
- the vertex D6 and the vertex D2 are a pair of associated vertices (that is, the projection coordinates of the vertex D6 and the vertex D2 are the same).
- triangular face 2 Another triangular face (hereinafter referred to as triangular face 2 ) can be formed by using the vertices D6 and D2 and the hypotenuses (ie, the sides from D1 to D6 ) in the triangular face 1 . In this way, the order of vertices D1, D2, D5 and D6 is determined. Similarly, the order of the remaining vertices on the sides can be determined to get the side indices.
- the proxy model can also be scaled according to specific applications. For example, in order to facilitate collision detection and reduce the occurrence of false judgments in collision detection, the proxy model can be enlarged appropriately. As another example, in occlusion culling, the proxy model can be appropriately reduced, which can reduce the occurrence of judging the model that needs to be rendered as the model that does not need to be rendered.
- the proxy model can also be superimposed with the corresponding original model. In this way, the scale, height, etc. of the proxy model can be adjusted according to the overlay result.
- Fig. 7 is a schematic flowchart of an application scenario in which the method for building a model provided by the embodiment of the present application is applied.
- step 705 may be performed; if the expectation is met, step 706 may be performed.
- Adjust data such as the size or height of the proxy model. After adjusting the size or height of the proxy model, it is possible to continue to judge whether the preview result of the proxy model meets expectations, and if it still does not meet expectations, it can continue to adjust the proxy model until it meets expectations.
- some thresholds used in the process of generating the proxy model may also be adjusted to regenerate the proxy model.
- the preset ratio used in step 301 for determining which vertices to acquire can be adjusted.
- the preset angle used for judging the abnormal vertex in step 302 may be adjusted.
- Fig. 8 is a proxy model corresponding to the original model shown in Fig. 1 generated according to the method shown in Fig. 3 .
- the proxy model shown in Figure 8 has only 96 vertices and 60 triangles. Compared with the number of vertices and triangles of the original model, the proxy model reduces the number of vertices and triangles by about 99.5%. It can be seen that the proxy model obtained by using the technical solution provided by this application greatly reduces the number of vertices and triangular faces, but the fit between the proxy model and the original model is quite high. In this way, using the proxy model provided by the technical solution of the present application can reduce the calculation amount of applications such as occlusion removal and collision detection, improve application operation efficiency, and improve user experience.
- Fig. 9 is a schematic diagram of a computer device provided according to an embodiment of the present application.
- the computer device 900 shown in FIG. 9 includes an acquisition unit 901, a processing unit 902 and a modeling unit 903.
- An acquisition unit 901 configured to acquire N coordinates, the N coordinates are projection coordinates of N vertices of the original model projected on the target plane, and N is a positive integer greater than or equal to 3;
- a processing unit 902 configured to determine M vertices from the N vertices according to the N coordinates, where M is a positive integer greater than or equal to 3 and less than or equal to N;
- the modeling unit 903 is configured to establish a substitute model corresponding to the original model according to the projection coordinates of the M vertices and the height information of the original model.
- FIG. 9 is only an example rather than a limitation, and the above-mentioned computer device including an acquisition unit, a processing unit and a modeling unit may not depend on the structure shown in FIG. 9 .
- the chip When the computer device 900 is a chip, the chip includes a sending unit and a processing unit.
- the sending unit may be an input-output circuit or a communication interface;
- the processing unit is a processor or a microprocessor or an integrated circuit integrated on the chip.
- the embodiment of the present application also provides a computer device, including a processor and a memory.
- the processor is used to be coupled with the memory, read and execute instructions and/or program codes in the memory, so as to execute the steps in the above method embodiments.
- the above processor may be a chip.
- the processor may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated circuit (ASIC), or a system chip (system on chip, SoC). It can be a central processor unit (CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), or a microcontroller (micro controller unit) , MCU), can also be a programmable controller (programmable logic device, PLD), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or other integrated chips.
- programmable controller programmable logic device, PLD
- each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
- the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
- the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
- the processor in the embodiment of the present application may be an integrated circuit chip, which has a signal processing capability.
- each step of the above-mentioned method embodiments may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
- a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
- the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
- the memory in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
- the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electronically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
- Volatile memory can be random access memory (RAM), which acts as external cache memory.
- RAM random access memory
- SRAM static random access memory
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory
- SDRAM double data rate synchronous dynamic random access memory
- ESDRAM enhanced synchronous dynamic random access memory
- SLDRAM direct memory bus random access memory
- direct rambus RAM direct rambus RAM
- the present application also provides a computer program product, the computer program product including: computer program code, when the computer program code is run on the computer, the computer is made to execute each of the above-mentioned embodiments. step.
- the present application also provides a computer-readable medium, the computer-readable medium stores program codes, and when the program codes are run on a computer, the computer is made to execute each of the above-mentioned embodiments. step.
- the disclosed systems, devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
Description
Claims (17)
- 一种建立模型方法,其特征在于,包括:获取N个坐标,所述N个坐标分别为原始模型的N个顶点投影在目标平面上的投影坐标,N为大于或等于3的正整数;根据所述N个坐标,从所述N个顶点中确定M个顶点,其中M为大于或等于3且小于或等于N的正整数;根据所述M个顶点的投影坐标和所述原始模型的高度信息,建立对应于所述原始模型的代理模型。
- 根据权利要求1所述的方法,其特征在于,所述获取N个坐标,包括:根据所述原始模型包括的顶点投影在所述目标平面中的投影坐标,确定多个候选顶点,其中,所述多个候选顶点中的每个候选顶点投影在所述目标平面中的投影坐标位于参考区域内,所述参考区域为所述原始模型中预设比例的顶点投影在所述目标平面中的区域;从所述多个候选顶点中确定所述N个顶点;确定所述N个顶点投影在所述目标平面上的投影坐标。
- 根据权利要求1所述的方法,其特征在于,所述从所述多个候选顶点中确定所述N个顶点,包括:根据所述多个候选顶点中每个候选顶点投影在所述目标平面中的投影坐标,确定N组候选顶点,其中所述N组候选顶点中的每组候选顶点包括至少一个顶点,且任意两个属于同一组的候选顶点投影在所述目标平面中的投影坐标相同,任意两个属于不同组的候选顶点投影在所述目标平面中的投影坐标不同;确定所述N个顶点,所述N个顶点分别属于所述N组候选顶点。
- 根据权利要求3所述的方法,其特征在于,所述N个顶点分别为所述N组候选顶点中参考方向的坐标值最大的顶点,所述参考方向为与所述目标平面垂直的方向;所述原始模型的高度信息为所述M个顶点在所述参考方向的坐标值。
- 根据权利要求1或2所述的方法,其特征在于,所述原始模型的高度信息为包围盒的高度信息,所述原始模型的全部顶点位于所述包围盒中。
- 根据权利要求1至5中任一项所述的方法,其特征在于,根据所述N个坐标,从所述N个顶点中确定M个顶点,包括:根据所述N个坐标,遍历所述N个顶点,将所述N个顶点中的异常顶点删除,得到所述M个顶点,其中,第一参考线与第二参考线之间的夹角的角度大于预设角度,所述第一参考线为所述异常顶点与第一相邻点之间的连线,所述第二参考线为所述异常顶点与第二相邻点之间的连线,所述第一相邻点和所述第二相邻点为所述N个顶点中位于所述异常顶点两侧且与所述异常顶点相邻的两个顶点。
- 根据权利要求1至6中任一项所述的方法,其特征在于,所述根据所述M个顶点的投影坐标和所述原始模型的高度信息,建立对应于所述原始模型的代理模型,包括:根据所述M个顶点的投影坐标和所述原始模型的高度信息,确定位于所述代理模型 顶面的M个顶面顶点的坐标和位于所述代理模型底面的M个底面顶点的坐标;根据所述M个顶面顶点的坐标和所述M个底面顶点的坐标,确定顶点索引,所述顶点索引用于记录所述代理模型中的各个顶点的连接顺序,所述代理模型包括所述M个顶面顶点的坐标、所述M个底面顶点的坐标和所述顶点索引。
- 一种计算机设备,其特征在于,包括:获取单元,用于获取N个坐标,所述N个坐标分别为原始模型的N个顶点投影在目标平面上的投影坐标,N为大于或等于3的正整数;处理单元,用于根据所述N个坐标,从所述N个顶点中确定M个顶点,其中M为大于或等于3且小于或等于N的正整数;建模单元,用于根据所述M个顶点的投影坐标和所述原始模型的高度信息,建立对应于所述原始模型的替代模型。
- 根据权利要求8所述的计算机设备,其特征在于,所述获取单元,具体用于根据所述原始模型包括的顶点投影在所述目标平面中的投影坐标,确定多个候选顶点,从所述多个候选顶点中确定所述N个顶点,确定所述N个顶点投影在所述目标平面上的投影坐标,其中,所述多个候选顶点中的每个候选顶点投影在所述目标平面中的投影坐标位于参考区域内,所述参考区域为所述原始模型中预设比例的顶点投影在所述目标平面中的区域。
- 根据权利要求8所述的计算机设备,其特征在于,所述获取单元,具体用于根据所述多个候选顶点中每个候选顶点投影在所述目标平面中的投影坐标,确定N组候选顶点,其中所述N组候选顶点中的每组候选顶点包括至少一个顶点,且任意两个属于同一组的候选顶点投影在所述目标平面中的投影坐标相同,任意两个属于不同组的候选顶点投影在所述目标平面中的投影坐标不同;确定所述N个顶点,所述N个顶点分别属于所述N组候选顶点。
- 根据权利要求10所述的计算机设备,其特征在于,所述N个顶点分别为所述N组候选顶点中参考方向的坐标值最大的顶点,所述参考方向为与所述目标平面垂直的方向;所述原始模型的高度信息为所述M个顶点在所述参考方向的坐标值。
- 根据权利要求8或9所述的计算机设备,其特征在于,所述原始模型的高度信息为包围盒的高度信息,所述原始模型的全部顶点位于所述包围盒中。
- 根据权利要求8至12中任一项所述的计算机设备,其特征在于,所述处理单元,具体用于根据所述N个坐标,遍历所述N个顶点,将所述N个顶点中的异常顶点删除,得到所述M个顶点,其中,第一参考线与第二参考线之间的夹角的角度大于预设角度,所述第一参考线为所述异常顶点与第一相邻点之间的连线,所述第二参考线为所述异常顶点与第二相邻点之间的连线,所述第一相邻点和所述第二相邻点为所述N个顶点中位于所述异常顶点两侧且与所述异常顶点相邻的两个顶点。
- 根据权利要求8至13中任一项所述的计算机设备,其特征在于,所述处理单元,具体用于根据所述M个顶点的投影坐标和所述原始模型的高度信息,确定位于所述代理模型顶面的M个顶面顶点的坐标和位于所述代理模型底面的M个底面顶点的坐标;根据所述M个顶面顶点的坐标和所述M个底面顶点的坐标,确定顶点索引,所述顶 点索引用于记录所述代理模型中的各个顶点的连接顺序,所述代理模型包括所述M个顶面顶点的坐标、所述M个底面顶点的坐标和所述顶点索引。
- 一种计算机设备,其特征在于,包括:处理器,所述处理器用于与存储器耦合,读取并执行所述存储器中的指令和/或程序代码,以执行如权利要求1-7中任一项所述的方法。
- 一种芯片系统,其特征在于,包括:逻辑电路,所述逻辑电路用于与输入/输出接口耦合,通过所述输入/输出接口传输数据,以执行如权利要求1-7中任一项所述的方法。
- 一种计算机可读介质,其特征在于,所述计算机可读介质存储有程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行如权利要求1-7中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22880301.1A EP4394714A4 (en) | 2021-10-15 | 2022-10-11 | MODEL MAKING METHOD AND ASSOCIATED DEVICE |
| US18/700,902 US20240412457A1 (en) | 2021-10-15 | 2022-10-11 | Model establishment method and related apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111205441.1A CN115984506A (zh) | 2021-10-15 | 2021-10-15 | 建立模型的方法和相关装置 |
| CN202111205441.1 | 2021-10-15 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023061364A1 true WO2023061364A1 (zh) | 2023-04-20 |
Family
ID=85962814
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/124626 Ceased WO2023061364A1 (zh) | 2021-10-15 | 2022-10-11 | 建立模型的方法和相关装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20240412457A1 (zh) |
| EP (1) | EP4394714A4 (zh) |
| CN (1) | CN115984506A (zh) |
| WO (1) | WO2023061364A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116152389A (zh) * | 2023-04-24 | 2023-05-23 | 深圳大学 | 一种用于纹理贴图的视角选择和纹理对齐方法及相关设备 |
| CN116543105A (zh) * | 2023-05-04 | 2023-08-04 | 阿里巴巴达摩院(杭州)科技有限公司 | 三维物体的处理方法、系统、电子设备及存储介质 |
| CN117313221A (zh) * | 2023-11-28 | 2023-12-29 | 北京理工大学 | 一种用于目标易损性的建筑目标建模方法 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118096949A (zh) * | 2024-02-23 | 2024-05-28 | 网易(杭州)网络有限公司 | 碎片碰撞动画的生成方法及装置、存储介质、电子设备 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160005222A1 (en) * | 2013-03-12 | 2016-01-07 | Mitsubishi Electric Corporation | Three-dimensional information processing device |
| CN108460826A (zh) * | 2017-12-28 | 2018-08-28 | 深圳市创梦天地科技股份有限公司 | 一种3d模型的处理方法及终端 |
| CN110349267A (zh) * | 2019-06-06 | 2019-10-18 | 阿里巴巴集团控股有限公司 | 三维热度模型的构建方法以及装置 |
| CN111223177A (zh) * | 2019-12-18 | 2020-06-02 | 北京城市网邻信息技术有限公司 | 三维空间的三维模型的构建方法和装置、存储介质 |
| CN111768488A (zh) * | 2020-07-07 | 2020-10-13 | 网易(杭州)网络有限公司 | 一种虚拟角色脸部模型的处理方法和装置 |
| CN112785690A (zh) * | 2021-01-28 | 2021-05-11 | 北京爱奇艺科技有限公司 | 一种三维模型构建方法、装置、系统及存储介质 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103345771B (zh) * | 2013-06-28 | 2016-08-10 | 中国科学技术大学 | 一种基于建模的图像高效渲染方法 |
| JP2016099841A (ja) * | 2014-11-21 | 2016-05-30 | 大日本印刷株式会社 | 立体物造形用データ削減装置 |
| EP3035291B1 (en) * | 2014-12-19 | 2017-11-15 | Donya Labs AB | Rendering based generation of occlusion culling models |
| CN110310354B (zh) * | 2019-07-04 | 2023-03-24 | 珠海金山数字网络科技有限公司 | 一种三维场景中的顶点识别方法及装置 |
-
2021
- 2021-10-15 CN CN202111205441.1A patent/CN115984506A/zh active Pending
-
2022
- 2022-10-11 US US18/700,902 patent/US20240412457A1/en active Pending
- 2022-10-11 WO PCT/CN2022/124626 patent/WO2023061364A1/zh not_active Ceased
- 2022-10-11 EP EP22880301.1A patent/EP4394714A4/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160005222A1 (en) * | 2013-03-12 | 2016-01-07 | Mitsubishi Electric Corporation | Three-dimensional information processing device |
| CN108460826A (zh) * | 2017-12-28 | 2018-08-28 | 深圳市创梦天地科技股份有限公司 | 一种3d模型的处理方法及终端 |
| CN110349267A (zh) * | 2019-06-06 | 2019-10-18 | 阿里巴巴集团控股有限公司 | 三维热度模型的构建方法以及装置 |
| CN111223177A (zh) * | 2019-12-18 | 2020-06-02 | 北京城市网邻信息技术有限公司 | 三维空间的三维模型的构建方法和装置、存储介质 |
| CN111768488A (zh) * | 2020-07-07 | 2020-10-13 | 网易(杭州)网络有限公司 | 一种虚拟角色脸部模型的处理方法和装置 |
| CN112785690A (zh) * | 2021-01-28 | 2021-05-11 | 北京爱奇艺科技有限公司 | 一种三维模型构建方法、装置、系统及存储介质 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116152389A (zh) * | 2023-04-24 | 2023-05-23 | 深圳大学 | 一种用于纹理贴图的视角选择和纹理对齐方法及相关设备 |
| CN116543105A (zh) * | 2023-05-04 | 2023-08-04 | 阿里巴巴达摩院(杭州)科技有限公司 | 三维物体的处理方法、系统、电子设备及存储介质 |
| CN117313221A (zh) * | 2023-11-28 | 2023-12-29 | 北京理工大学 | 一种用于目标易损性的建筑目标建模方法 |
| CN117313221B (zh) * | 2023-11-28 | 2024-02-13 | 北京理工大学 | 一种用于目标易损性的建筑目标建模方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4394714A1 (en) | 2024-07-03 |
| EP4394714A4 (en) | 2024-12-25 |
| US20240412457A1 (en) | 2024-12-12 |
| CN115984506A (zh) | 2023-04-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023061364A1 (zh) | 建立模型的方法和相关装置 | |
| KR102713170B1 (ko) | 실시간 깊이 맵을 사용한 지오메트리 인식 증강 현실 효과 | |
| US9508191B2 (en) | Optimal point density using camera proximity for point-based global illumination | |
| US12602858B2 (en) | Rendering method and apparatus, and device | |
| CN114241151B (zh) | 三维模型简化方法、装置、计算机设备和计算机存储介质 | |
| US11100707B2 (en) | Computer graphics method for terrain rendering | |
| CN111788608A (zh) | 用于建模光反射的混合射线跟踪方法 | |
| CN101840566A (zh) | 一种基于gpu并行计算的实时阴影生成方法及系统 | |
| US20240203030A1 (en) | 3d model rendering method and apparatus, electronic device, and storage medium | |
| CN109979013A (zh) | 三维人脸贴图方法及终端设备 | |
| CN116934938A (zh) | 三维模型纹理处理方法、设备和存储介质 | |
| CN118537468A (zh) | 一种光场图像的多层级并行渲染方法和系统 | |
| JP3350473B2 (ja) | オクルージョンカリングを行う3次元グラフィックス描画装置および方法 | |
| US20240378793A1 (en) | Image rendering method and related device | |
| US20230245364A1 (en) | Method for Processing Video, Electronic Device, and Storage Medium | |
| US20230410426A1 (en) | Volume intersection using rotated bounding volumes | |
| US11830140B2 (en) | Methods and systems for 3D modeling of an object by merging voxelized representations of the object | |
| CN115965735B (zh) | 纹理贴图的生成方法和装置 | |
| WO2025055518A1 (zh) | 虚拟画面的生成方法、装置、电子设备、计算机可读存储介质及计算机程序产品 | |
| Takai et al. | Harmonised texture mapping | |
| CN115761123A (zh) | 三维模型处理方法、装置、电子设备以及存储介质 | |
| CN109685882B (zh) | 在渲染中将光场作为更好的背景 | |
| CN115690365A (zh) | 用于管理三维模型的方法、装置、设备和介质 | |
| TWI887893B (zh) | 產生內容時減少計算負荷的方法及主機 | |
| JP3711273B2 (ja) | オクルージョンカリングを行う3次元グラフィックス描画装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22880301 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2022880301 Country of ref document: EP |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18700902 Country of ref document: US |
|
| ENP | Entry into the national phase |
Ref document number: 2022880301 Country of ref document: EP Effective date: 20240328 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
