Three-dimensional model repairing method and apparatus

CN117689583BActive Publication Date: 2026-10-30CHONGQING PERFECT WORLD INTERACTIVE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211056770.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2026-10-30
Estimated Expiration
2042-08-31

Smart Images

  • Figure CN117689583B_ABST
    Figure CN117689583B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a three-dimensional model repairing method and device. In the embodiments of the present application, a joint normal repairing tool is provided for game resource production software, the tool can be run in the running process of the game resource production software, and an interactive interface thereof is displayed; a user can set a reference model and a model to be repaired through the interactive interface, and initiate a model repairing operation through a triggering operation; the joint normal repairing tool identifies two target boundary edges forming a joint in the model to be repaired and boundary vertices on the two target boundary edges, and identifies reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges; and normal lines of the boundary vertices on the two target boundary edges are repaired to normal lines of the corresponding reference vertices to complete the repairing of the model to be repaired. In this way, the model joint can be automatically repaired, and manual repairing is no longer needed, thereby improving the repairing efficiency and reducing the manual cost, and the repairing precision is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D modeling technology, and in particular to a 3D model repair method and device. Background Technology

[0002] In game development, many third-party software programs are used, such as Autodesk Maya, Autodesk 3ds Max, and Unity. During game development using these programs, it's often necessary to cut and then reconstruct 3D models. For example, a sphere might need to be cut into two parts, each part processed, and then the two parts reassembled to restore the sphere.

[0003] However, the reconstructed model will show obvious stitching marks, with the stitched areas referred to as seams. The normals of the seams are not smooth, resulting in an uneven model surface. To make the stitched model appear smoother, the seams need to be repaired. Currently, this is done manually by drafters, who manually repair the vertices on the seams. The entire repair process is very tedious and slow, especially as the number of vertices involved in the seams decreases. Summary of the Invention

[0004] This application provides a three-dimensional model repair method and device in several aspects, which can improve repair efficiency and accuracy, and reduce labor costs.

[0005] This application provides a three-dimensional model repair method applied to an electronic device. The electronic device has game resource creation software installed. The method includes: during the operation of the game resource creation software, running a seam normal repair tool adapted to the game resource creation software and displaying an interactive interface of the seam normal repair tool. The interactive interface includes at least model setting controls and repair controls. In response to setting operations on the model setting controls, setting a reference model and a model to be repaired, wherein the reference model is the original model or determined based on the original model, and the model to be repaired is obtained by partially cutting and reassembling the original model. A seam is formed at the splicing position; in response to the trigger operation of the repair control, the seam is identified on the model to be repaired according to the model data of the model to be repaired, and the two target boundary edges forming the seam and the boundary vertices on the two target boundary edges are obtained; according to the coordinates of the boundary vertices on the two target boundary edges, combined with the model data of the reference model, the reference vertex on the reference model corresponding to the boundary vertices on the two target boundary edges is identified; according to the normal of the reference vertex, the normal of the boundary vertex on the two target boundary edges is repaired to the normal of the corresponding reference vertex, so as to complete the repair of the model to be repaired.

[0006] Further optionally, based on the model data of the model to be repaired, seam identification is performed on the model to be repaired to obtain two target boundary edges forming the seam in the model to be repaired, including: based on the vertices and edges in the model data of the model to be repaired, boundary identification is performed on the model to be repaired to obtain multiple boundary edges in the model to be repaired and boundary vertices on each boundary edge; based on the coordinates of the boundary vertices on each boundary edge, two boundary edges whose coordinate errors of the corresponding boundary vertices are within a set coordinate error range are obtained from the multiple boundary edges as the two target boundary edges forming the seam.

[0007] Further optionally, based on the vertices and edges in the model data of the model to be repaired, boundary identification is performed on the model to be repaired to obtain multiple boundary edges and boundary vertices on each boundary edge. This includes: based on the identification information of the model to be repaired, calling a first API provided by the game resource creation software, and having the first API perform boundary identification on the model to be repaired based on the vertices and edges in the model data of the model to be repaired to obtain multiple boundary edges and boundary vertices on each boundary edge; or, based on each edge in the model data of the model to be repaired, identifying the number of faces connected to the edge; if the number of faces connected to the edge is one, then the edge is taken as a boundary edge, and the vertices on the edge are taken as boundary vertices on the boundary edge.

[0008] Further optionally, based on the coordinates of the boundary vertices on each boundary edge, two boundary edges whose coordinate errors of the corresponding boundary vertices are within a set error range are selected from the plurality of boundary edges as two target boundary edges forming the seam. This includes: based on the number of boundary vertices on each boundary edge, identifying at least one candidate boundary edge combination from the plurality of boundary edges that has the same number of vertices or whose number of vertices is within a set error range, each candidate boundary edge combination including two boundary edges; for each candidate boundary edge combination, determining whether the coordinate error of the corresponding boundary vertices on the two boundary edges is within a set coordinate error range based on the positions of the boundary vertices on the two boundary edges in the candidate boundary edge combination; if the determination result is yes, the two boundary edges in the candidate boundary edge combination are selected as two target boundary edges forming the seam.

[0009] Further optionally, based on the coordinates of the boundary vertices on the two target boundary edges and in conjunction with the model data of the reference model, identifying reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges includes: according to a set coordinate error range, treating two boundary vertices on the two target boundaries whose coordinate errors are within the set coordinate error range as the same boundary vertex and fusing them to obtain multiple target vertices and their coordinates; based on the coordinates of the multiple target vertices, identifying vertices located on the same edge and whose coordinate errors with each target vertex are within the set coordinate error range from the vertices and edges in the model data of the reference model as reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges.

[0010] Further optionally, the interactive interface further includes a coordinate threshold setting control; the method further includes: before responding to the triggering operation of the repair control, responding to the setting operation of the coordinate threshold setting control, and obtaining the coordinate error range set by the user.

[0011] Further optionally, the model setting control includes a first model setting control and a second model setting control. In response to a setting operation on the model setting control, setting a reference model and a model to be repaired includes: in response to a trigger operation on the first model setting control, selecting a model under a first access path as a reference model, displaying the identification information of the reference model on the interactive interface, and associating the first access path with a positioning control on the interactive interface for locating the reference model according to the first access path; and in response to a trigger operation on the second model setting control, selecting a model under a second access path as a model to be repaired, and displaying the identification information of the model to be repaired on the interactive interface.

[0012] Further optionally, after responding to the trigger operation of the repair control, the method further includes: rendering the reference model according to the model data of the reference model and displaying the reference model on the interactive interface; rendering the model to be repaired according to the model data of the model to be repaired and displaying the model to be repaired on the interactive interface; and dynamically displaying the repair process of the model to be repaired until the final model after repair is obtained.

[0013] Further optionally, the interactive interface further includes a coordinate space setting control; before responding to a trigger operation on the repair control, the method further includes: responding to a setting operation on the coordinate space setting control to determine a target coordinate space set by the user; the target coordinate space is any coordinate space among world space, object space, local space, and screen space; after responding to a trigger operation on the repair control, the method further includes: when the coordinate space where the model to be repaired and / or the reference model is located is different from the target coordinate space, converting the model to be repaired and / or the reference model to the target coordinate space according to the transformation relationship between coordinate spaces.

[0014] Optionally, the electronic device also has a tool rack application corresponding to the game resource creation software installed. The tool rack application integrates and manages icons of multiple extended tools required by the game resource creation software, including the seam normal repair tool. During the operation of the game resource creation software, running the seam normal repair tool adapted to the game resource creation software includes: running the tool rack application and displaying a tool panel provided by the tool rack application, the tool panel including at least the icon of the seam normal repair tool; in response to a trigger operation on the icon of the seam normal repair tool, loading the code data and runtime environment data of the seam normal repair tool from a first server into the memory of the electronic device, and running the seam normal repair tool according to the code data and runtime environment data.

[0015] This application embodiment also provides an electronic device, which is equipped with game resource creation software. The electronic device includes a memory and a processor. The processor is coupled to the memory and is used to execute a computer program stored in the memory for implementing extended tool management, so as to implement the steps in the three-dimensional model repair method.

[0016] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the three-dimensional model repair method.

[0017] This application embodiment also provides a three-dimensional model repair device, which includes: an interface display module, a model setting module, a seam recognition module, a vertex recognition module, and a normal repair module; wherein, the interface display module is used to: run a seam and normal repair tool adapted to the game resource creation software during the operation of the game resource creation software, and display the interactive interface of the seam and normal repair tool, the interactive interface including at least model setting controls and repair controls; the model setting module is used to: in response to the setting operation of the model setting controls, set a reference model and a model to be repaired, wherein the reference model is the original model or determined based on the original model, and the model to be repaired is obtained by re-splicing the original model after partial cutting. A seam is formed at the splicing position; the seam recognition module is used to: respond to the trigger operation of the repair control, and perform seam recognition on the model to be repaired according to the model data of the model to be repaired, to obtain the two target boundary edges that form the seam and the boundary vertices on the two target boundary edges in the model to be repaired; the vertex recognition module is used to: identify the reference vertex on the reference model corresponding to the boundary vertex on the two target boundary edges according to the coordinates of the boundary vertices on the two target boundary edges and the model data of the reference model; the normal repair module is used to: repair the normal of the boundary vertex on the two target boundary edges to the normal of the corresponding reference vertex according to the normal of the reference vertex, so as to complete the repair of the model to be repaired.

[0018] This application provides a 3D model repair method and device, which includes a seam normal repair tool for game resource creation software. This tool runs during the game resource creation software's operation and displays its interactive interface. Users can respond to setting operations through this interface, setting a reference model and the model to be repaired. They can also initiate a model repair operation by responding to trigger operations. The seam normal repair tool identifies seams based on the model data of the model to be repaired, obtaining the two target boundary edges forming the seam and the boundary vertices on these two target boundary edges. Based on the coordinates of the boundary vertices, combined with the model data of the reference model, and identifying the reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges, the tool repairs the normals of the boundary vertices on the two target boundary edges to the normals of the corresponding reference vertices, thus completing the repair of the model to be repaired. This method automatically repairs model seams, eliminating reliance on manual repair, thereby improving repair efficiency, reducing labor costs, and also improving repair accuracy. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 A flowchart illustrating a three-dimensional model repair method provided for an exemplary embodiment of this application;

[0021] Figure 2 A schematic diagram of an interactive interface provided for an exemplary embodiment of this application;

[0022] Figure 3 A schematic diagram of the model to be repaired provided for an exemplary embodiment of this application;

[0023] Figure 4 A schematic diagram illustrating the recognition effect of a reference vertex provided in an exemplary embodiment of this application;

[0024] Figure 5 A schematic diagram illustrating the repair of a model to be repaired, provided as an exemplary embodiment of this application;

[0025] Figure 6 Another schematic diagram of an interactive interface provided for an exemplary embodiment of this application;

[0026] Figure 7 A schematic diagram of a tool panel provided for an exemplary embodiment of this application;

[0027] Figure 8 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application;

[0028] Figure 9 This is a schematic diagram of the structure of a three-dimensional repair device provided for an exemplary embodiment of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] In existing technologies, the vertices on the seam are usually repaired manually by drafters. The entire repair process is very tedious and slow, especially since the more vertices involved in the seam, the lower the repair efficiency.

[0031] In view of the technical problems existing in the prior art, in some embodiments of this application, a seam normal repair tool is provided for game resource creation software to automatically repair the three-dimensional models involved in the operation of the game resource creation software, eliminating the need for manual repair, thereby improving repair efficiency and repair accuracy.

[0032] The technical solutions provided by the various embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0033] Figure 1 A flowchart illustrating a three-dimensional model repair method provided for an exemplary embodiment of this application is shown below. Figure 1 As shown, the method includes:

[0034] Step 11: During the operation of the game resource creation software, run the seam normal repair tool that is compatible with the game resource creation software, and display the interactive interface of the seam normal repair tool. The interactive interface includes at least model setting controls and repair controls.

[0035] Step 12: In response to the setting operation of the model setting control, set the reference model and the model to be repaired. The reference model is the original model or determined based on the original model. The model to be repaired is obtained by re-splicing the original model after partial cutting, and a seam is formed at the splicing position.

[0036] Step 13: Respond to the trigger operation of the repair control, and perform seam identification on the model to be repaired based on the model data of the model to be repaired, to obtain the two target boundary edges that form the seam in the model to be repaired and the boundary vertices on the two target boundary edges.

[0037] Step 14: Based on the coordinates of the boundary vertices on the two target boundary edges, and combined with the model data of the reference model, identify the reference vertices on the reference model that correspond to the boundary vertices on the two target boundary edges.

[0038] Step 15: Based on the normal of the reference vertex, restore the normals of the boundary vertices on the two target boundary edges to the normals of the corresponding reference vertex to complete the repair of the model to be repaired.

[0039] The 3D model repair method of this embodiment can be executed by an electronic device, which may include a computer, tablet computer, or mobile phone, etc., and this embodiment is not limited thereto. One or more game asset creation software programs may be installed on the electronic device, and users can use the game asset creation software for game development and / or applications. For example, developers can use game asset creation software to create 3D models, repair 3D models, etc. Game asset creation software includes, but is not limited to: Autodesk Maya (a 3D animation software), 3D Studio Max (a 3D animation rendering and production software), Unreal Engine (a game engine), and Unity (a real-time 3D interactive content creation and operation platform), etc.

[0040] During the operation of game resource creation software, there may be a need to repair 3D models. In this embodiment, 3D model repair refers to repairing the normals of seams in a 3D model to make the repaired model smoother, with seams becoming less noticeable or even disappearing. A seam is a seam formed when a 3D model is divided into at least two parts, and then these parts are reassembled, leaving a seam mark at the seam. Before reassembling the divided parts, any one or more parts can be processed as needed; there are no limitations on this.

[0041] To improve the efficiency and accuracy of 3D model repair and reduce labor costs, this embodiment provides a seam normal repair tool. During the operation of game resource creation software, users can easily and conveniently use this tool to repair the 3D models required by the software. In this embodiment, to make it more convenient for users to use the seam normal repair tool for 3D model repair, it is implemented as a plugin, functional module, or SDK within the game resource creation software, and runs concurrently with the software. This eliminates the need for users to independently launch the tool, and especially eliminates the need to switch between the game resource creation software and the tool. In other words, in this embodiment, each game resource creation software can correspond to one seam normal repair tool; for example, Autodesk Maya can correspond to seam normal repair tool T1, 3D StudioMax can correspond to seam normal repair tool T2, and so on.

[0042] Based on the above, electronic devices can simultaneously run a seam normal repair tool compatible with the game resource creation software while the software is running, and display the tool's interactive interface. For example, seam normal repair tool T1 can be run and its interactive interface displayed while Autodesk Maya is running; seam normal repair tool T2 can be run and its interactive interface displayed while 3D Studio Max is running. The seam normal repair tool can provide an interactive interface to the user, such as... Figure 2 As shown, the interactive interface includes at least model settings controls and repair controls. Through this interface and its related controls, users can more easily use the seam normal repair tool.

[0043] Users can configure the model settings controls on the interactive interface. The electronic device can respond to these settings by using the seam normal repair tool to set the reference model and the model to be repaired. Both the reference model and the model to be repaired are three-dimensional models composed of points, lines, and faces. Lines can also be referred to as edges in the model. Each of the reference model and the model to be repaired may have corresponding model data. This model data describes the shape of the model and includes the positional information of vertices, edges, and faces, as well as model texture data. In this embodiment, the shape of the faces that make up the model is not limited; for example, they can be triangular or quadrilateral faces. An edge is composed of multiple vertices, and a face is composed of multiple vertices, including multiple lines.

[0044] The reference model serves as a guide for the repair process of the model to be repaired, representing the desired outcome. The reference model is either the original model or a model determined based on the original. The original model is the initial model of the model to be repaired before it is locally cut. A reference model determined based on the original model can be a model redrawn from the original model with the same size and shape; it can also be a copy of the original model; or it can be a model obtained by appropriately modifying the original model, such as adjusting the normals of the vertices to create a more suitable model. It should be noted that users can flexibly customize the original model, and these appropriately modified models better meet the user's repair needs.

[0045] The model to be repaired is obtained by partially cutting and reassembling the original model, forming seams at the splicing points. There can be one or more seams. Each seam can be a closed seam, meaning it connects end-to-end on the model to be repaired; this is formed by reassembling two independent model parts resulting from fully cutting the original model. Alternatively, each seam can be a non-closed seam, meaning it doesn't connect end-to-end on the model to be repaired; this is formed by splicing two non-independent model parts resulting from insufficient cutting of the original model. Two non-independent model parts refer to two model parts that have both separated and connected sections. For example... Figure 3 As shown, Figure 3 The seam between the two dashed lines shown on the sphere divides the model to be repaired into part A and part B. Boundary edge L1 is the boundary edge of part A, and boundary edge L2 is the boundary edge of part B. It should be noted that there may be multiple other boundary edges between part A and part B. Figure 3 It is not shown in the text.

[0046] After setting the reference model and the model to be repaired through the model settings control, the user can trigger the repair control on the interactive interface to enable the electronic device to run the seam normal repair tool to repair the model to be repaired with reference to the reference model. In the model to be repaired, the edges are divided into boundary edges and non-boundary edges. A boundary edge is a boundary that forms a boundary with other cutting surfaces, and from the perspective of this edge, it connects to one facet. A non-boundary edge is an edge located on a non-boundary cutting surface, and from the perspective of this edge, it connects to two facets.

[0047] Furthermore, among the multiple boundary edges existing in the model to be repaired, there can be two boundary edges that can form a seam. For ease of description, the boundary edges that can form a seam will be referred to as target boundary edges below. Accordingly, the electronic device can respond to the user's trigger operation and, based on the model data of the model to be repaired, perform seam identification on the model to be repaired to obtain the two target boundary edges that form each seam in the model to be repaired, as well as the boundary vertices on the two target boundary edges.

[0048] After the electronic device performs the aforementioned seam identification, it can identify the reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges based on the coordinates of the boundary vertices obtained from the two target boundary edges, combined with the model data of the reference model. For example... Figure 4As shown, during reference vertex identification, given the model data of the reference model (i.e., the vertices and edges of the reference model), the electronic device can traverse the coordinates of each point on the reference model and determine whether the coordinates of each traversed point match the coordinates of the boundary vertices on the two target boundary edges. The successfully matched points are then used as reference vertices to identify the reference vertices on the reference model that correspond to the coordinates of the boundary vertices on the two target boundary edges. The reference vertices are as follows: Figure 4 As shown in the dashed box.

[0049] After the electronic device identifies the reference vertex on the reference model that corresponds to the boundary vertices on the two target boundary edges, it can repair the normals of the boundary vertices on the two target boundary edges to the normals of the corresponding reference vertex based on the normals of the reference vertex, thus completing the repair of the model to be repaired. Here, the normal of each vertex refers to the straight line passing through that vertex and always perpendicular to the plane containing that vertex. For example... Figure 5 As shown, the normals of the reference vertices on the reference model can be directly used as the normals of the boundary vertices on the two target boundary edges in the model to be repaired, so as to restore the model to be repaired to the same seamless effect as the reference model, thereby completing the repair of the model to be repaired. It should be noted that... Figure 5 The dashed lines in the lower left corner of the model are for illustrative purposes only. The repaired model will be seamless, as shown in the actual image. Figure 5 The model is shown in the lower right corner. In this embodiment, instead of simply averaging the normals of the boundary vertices on the target boundary edges of the model to be repaired for seam repair, the normals of the corresponding reference vertices in the reference model are snapped to the boundary vertices on each target boundary edge forming the seam on the model to be repaired. Furthermore, the normals of the reference vertices are simultaneously snapped to the corresponding boundary vertices on the two target boundary edges, which improves the accuracy of seam normal repair and results in better model repair.

[0050] In this embodiment, a seam normal repair tool is provided for game resource creation software. This tool runs during the software's operation and displays its interactive interface. Users can respond to settings through this interface, configuring a reference model and the model to be repaired. They can also initiate a model repair operation by responding to trigger actions. The seam normal repair tool identifies seams based on the model data of the model to be repaired, obtaining the two target boundary edges forming the seam and the boundary vertices on those edges. Based on the coordinates of these boundary vertices, combined with the model data of the reference model, and identifying the reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges, the tool repairs the normals of the boundary vertices on the two target boundary edges to the normals of the corresponding reference vertices, thus completing the repair of the model to be repaired. This method automatically repairs model seams, eliminating the need for manual repair, thereby improving repair efficiency, reducing labor costs, and enhancing repair accuracy.

[0051] It should be noted that the model to be repaired is formed by cutting and reassembling the original model. The model to be repaired has at least two cut surfaces, and multiple boundary edges can exist on these at least two cut surfaces. Therefore, the electronic device needs to identify two target boundary edges from these boundary edges that can form each seam. In other words, each seam corresponds to two target boundary edges.

[0052] Based on this, in some optional embodiments, the "identifying seams in the model to be repaired based on the model data of the model to be repaired, and obtaining the two target boundary edges that form the seams in the model to be repaired" in the aforementioned embodiments can be implemented based on the following steps:

[0053] Step 131: Based on the vertices and edges in the model data of the model to be repaired, perform boundary identification on the model to be repaired to obtain multiple boundary edges and boundary vertices on each boundary edge. Specifically, the electronic device can sequentially traverse the multiple edges in the model data of the model to be repaired to select edges located on the boundaries as boundary edges, and determine the vertices located on the boundary edges based on the multiple vertices in the model data of the model to be repaired, thereby obtaining multiple boundary edges and boundary vertices on each boundary edge in the model to be repaired.

[0054] The electronic device can perform boundary identification of the model to be repaired based on the vertices and edges in the model data of the model to be repaired, using either method:

[0055] Method 1: Based on the identification information of the model to be repaired, the first API (Application Program Interface) provided by the game resource creation software is invoked. The identification information is used to identify and distinguish the model, and may include the model's name or number, etc. The game resource creation software can provide multiple model APIs; the first model API is the one with boundary recognition functionality. This first model API integrates recognition rules for boundary recognition of the model to be repaired, and boundary recognition can be performed accordingly. Based on this, the electronic device can invoke the first API from among the multiple model APIs according to the identification information of the model to be repaired. Then, the first API can perform boundary recognition on the model to be repaired based on the vertices and edges in the model data, obtaining and returning multiple boundary edges and the boundary vertices on each boundary edge of the model to be repaired.

[0056] Method 2: Based on each edge in the model data of the model to be repaired, identify the number of faces connected to the edge. If only one face is connected to an edge, the edge is considered a boundary edge, and the vertices on the edge are considered boundary vertices on the boundary edge. The electronic device can iterate through each edge in the model data of the model to be repaired, sequentially determining the number of faces connected to each edge. When only one face is connected to an edge, it indicates that the edge is on the boundary of the model; therefore, this edge can be directly considered a boundary edge, and the vertices on the edge are considered boundary vertices on the boundary edge.

[0057] Based on methods one and two above, and using the vertices and edges in the model data of the model to be repaired, boundary identification is performed on the model to be repaired. After obtaining multiple boundary edges and the boundary vertices on each boundary edge, the following step 132 can be executed to further determine the two target boundary edges that form the seam from the multiple boundary edges:

[0058] Step 132: Based on the coordinates of the boundary vertices on each boundary edge, select two boundary edges from multiple boundary edges whose coordinate errors of the corresponding boundary vertices are within the set coordinate error range, and use them as the two target boundary edges to form the seam.

[0059] The interactive interface also includes a coordinate threshold setting control, allowing users to set the coordinate error range. Users can configure the coordinate threshold setting control on the interactive interface before triggering the repair control to customize the coordinate error range and adjust the accuracy of the model repair. Figure 6An exemplary coordinate threshold setting control on an interactive interface is shown. Users can use this control to set an upper limit for the coordinate error range, such as 0.05, 0.06, etc., and a lower limit, which is a default value, such as 0 or 0.01. The coordinate error range can be formed by the default lower limit and the user-set upper limit. Of course, users can also set the upper and lower limits of the coordinate error range using this control; for example, the coordinate error range could be 0-0.05 or 0.1-0.2, etc., and this embodiment does not impose any limitations. Accordingly, before responding to the trigger operation on the repair control, the electronic device can respond to the user's setting operation on the coordinate threshold setting control and obtain the user-set coordinate error range.

[0060] For example, if the set coordinate error range is 0-0.05, the coordinates of the boundary vertices of boundary edge L10 are (0, 0, 0), (0, 0.01, 0)..., the coordinates of the boundary vertices of boundary edge L11 are (0, 0, 0.04), (0, 0, 0.05)..., the coordinates of the boundary vertices of boundary edge L12 are (0, 0, 0.03), (0, 0, 0.06)..., and the coordinates of the boundary vertices of boundary edge L13 are (0, 0, 0.12), (0, 0, 0.010). Then, these boundary edges are combined in pairs, and the boundary vertices of the two boundary edges in each combination are matched sequentially. Then, the coordinate error of the corresponding boundary vertices on the two boundaries is calculated. From each combination, two boundary edges whose coordinate errors of the corresponding boundary vertices are within the set coordinate error range are selected, such as boundary edge L11 and boundary edge L12, as the two target boundary edges forming the seam. The number of boundary vertices corresponding to two boundary edges is usually multiple. The coordinate error of the corresponding boundary vertices on the two boundary edges can be the maximum coordinate error, minimum coordinate error, or average coordinate error among the coordinate errors of the corresponding boundary vertices.

[0061] It should be noted that if the boundary vertices on the model to be repaired are incorrect due to human error or other factors, the electronic device cannot treat the two incorrect boundary vertices as the same point. Users can correct this error through custom settings, allowing the electronic device to treat the two incorrect boundary vertices as the same point. For example, boundary vertex A and boundary vertex B should be considered the same point, but due to some factor, their coordinates are different, with boundary vertex A at (0, 0, 0) and boundary vertex B at (0.001, 0, 0). If the threshold is 0, then for the electronic device, boundary vertex A and boundary vertex B are two different points. If the user customizes the coordinate error range to 0.01 or 0.05, the electronic device can treat boundary vertex A and boundary vertex B as a point with the same coordinates.

[0062] Based on steps 131-132 above, users can adjust the accuracy of model repair, so that the recognition results obtained by the electronic device for identifying the seams of the model to be repaired are closer to the user's actual repair needs.

[0063] Optionally, in step 132 above, the electronic device obtains two boundary edges whose coordinate errors of the corresponding boundary vertices are within a set coordinate error range from multiple boundary edges based on the coordinates of the boundary vertices on each boundary edge, and uses these two boundary edges as the two target boundary edges for forming the seam. This can be achieved based on the following steps S1-S2:

[0064] Step S1: Based on the number of boundary vertices on each boundary edge, identify at least one candidate boundary edge combination with the same number of vertices from multiple boundary edges. Each candidate boundary edge combination includes two boundary edges. When two boundary edges have the same number of vertices, it indicates that the existence of these two boundary edges may jointly form a seam in the model to be repaired. Therefore, any two boundary edges with the same number of vertices can be considered as a candidate boundary edge combination.

[0065] Alternatively, the electronic device can identify at least one candidate boundary edge combination from multiple boundary edges whose vertex count falls within a set error range, based on the number of boundary vertices on each boundary edge. The user can set the error range according to personalized design requirements; a larger error range results in more candidate boundary edge combinations being selected. The error range can be 0-1, 1-2, or 1-3, etc., and this embodiment does not impose any limitations.

[0066] Step S2: For each candidate boundary edge combination, based on the positions of the boundary vertices on the two boundary edges in the candidate boundary edge combination, determine whether the coordinate error of the corresponding boundary vertices on the two boundary edges is within the set coordinate error range. The coordinate error range can be set by the user according to actual design requirements, and can be 0.01, 0.05, or 0.1, etc., which is not limited in this embodiment. If the coordinate error of the corresponding boundary vertices on the two boundary edges is within the set coordinate error range, then the two boundary edges in the candidate boundary edge combination can be used as the two target boundary edges forming the seam. Similarly, the coordinate error of the corresponding boundary vertices on the two boundary edges can use the maximum coordinate error, minimum coordinate error, or average coordinate error, which is not limited.

[0067] In some optional embodiments, the electronic device identifies the reference vertex on the reference model corresponding to the boundary vertices on the two target boundary edges based on the coordinates of the boundary vertices on the two target boundary edges and in combination with the model data of the reference model. This can be achieved by the following steps:

[0068] Step 141: Based on the set coordinate error range, two boundary vertices on the two target boundaries whose coordinate errors are within the set coordinate error range are considered as the same boundary vertex and fused together to obtain multiple target vertices and their coordinates. The set coordinate error range can be 0.05, 0.06, or 0.1, etc., and this embodiment does not impose any restrictions. The fact that the coordinate errors of two boundary vertices on the two target boundaries are within the set coordinate error range means that these two boundary vertices were originally a single point before the model to be repaired was locally cut. Therefore, two boundary vertices on the two target boundaries whose coordinate errors are within the set coordinate error range can be considered as the same boundary vertex and fused together. The fusion of these two boundary vertices refers to the process of merging two boundary vertices into one boundary vertex, i.e., the target vertex, and determining the coordinates of this target vertex. When merging two boundary vertices into one target vertex, one boundary vertex can be offset towards the position of the other boundary vertex, or both boundary vertices can be offset simultaneously. In other words, the coordinates of two or any one of the two boundary vertices can be corrected to make the two boundary vertices have the same coordinates. The coordinates of the target vertex can be determined by, for example, calculating the average of the coordinates of the two boundary vertices, or directly using either of the two boundary vertices as the coordinates of the target vertex. By fusing the coordinate errors of any two boundary vertices on the two target boundaries within a set range using the above methods, multiple target vertices and their coordinates can be obtained.

[0069] Step 142: Based on the coordinates of multiple target vertices, identify the vertices located on the same edge in the model data of the reference model that have coordinate errors with each target vertex within a set range of coordinate errors as reference vertices corresponding to the boundary vertices on the two target boundary edges in the reference model.

[0070] In step 142, the electronic device can identify the reference vertex on the reference model corresponding to the boundary vertices on the two target boundary edges through either method three or method four:

[0071] Method 3: Based on the model data of the reference model and the model data of the model to be repaired, the reference model and the model to be repaired are aligned. Then, the electronic device can identify, based on the coordinates of multiple target vertices, the vertices located on the same edge and whose coordinate errors with each target vertex are within the set coordinate error range as reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges.

[0072] Method 4: Based on the coordinates of multiple target vertices, specific regions are delineated on both the reference model and the model to be repaired. These specific regions are enclosed by the target vertices. The electronic device then performs local model alignment on each of these specific regions on both models. Furthermore, on the aligned reference model, the electronic device identifies vertices located on the same edge whose coordinate errors with each target vertex are within a set range, as reference vertices corresponding to the boundary vertices on the two target boundary edges, based on the coordinates of the multiple target vertices.

[0073] Through steps 141-142 above, the electronic device can accurately identify the reference vertices on the reference model that correspond to the boundary vertices on the two target boundary edges.

[0074] After determining the reference vertex, based on the correspondence between the target vertex and the reference vertex, as well as the fusion relationship between the target vertex and the two boundary vertices, for each target vertex, the normals of the two boundary vertices that have a fusion relationship with the target vertex can be used to repair them to the normals of the reference vertex corresponding to the target vertex. This ultimately achieves the repair of the vertex normals on the double boundary edges that form the seam, thus completing the seam repair.

[0075] In some alternative embodiments, such as Figure 6 As shown, the model setting controls may include: a first model setting control and a second model setting control. The terms "first" and "second" are used to distinguish between the two controls only and do not specify the order in which they are triggered. Users can select a desired reference model by triggering the first model setting control, and the electronic device can generate an access path corresponding to that reference model based on the user's selection. Similarly, users can select a model to be repaired by triggering the second model setting control, and the electronic device can generate an access path corresponding to that model based on the user's selection. For ease of description, the path generated based on the user-selected reference model will be referred to as the first access path, and the path generated based on the user-selected model to be repaired will be referred to as the second access path.

[0076] Accordingly, the electronic device can respond to user triggering operations on the first model setting control and the second model setting control, and set the reference model and the model to be repaired in the following manner:

[0077] The reference model is set up as follows: In response to a trigger operation on the first model setting control, the model under the first access path is selected as the reference model, and its identification information is displayed on the interactive interface. Furthermore, the electronic device can establish an association between the first access path and the positioning control on the interactive interface, thus associating the first access path with the positioning control. The user can trigger this positioning control, and the electronic device can respond to the trigger operation, quickly locating the reference model based on the established association relationship and the first access path.

[0078] Setting up the model to be repaired: In response to the trigger operation of the second model setting control, select the model under the second access path as the model to be repaired, and display the identification information of the model to be repaired on the interactive interface.

[0079] In this embodiment, the user can first trigger the first model setting control, and then trigger the second model setting control. Correspondingly, the electronic device can first respond to the setting operation of the first model setting control, and then respond to the setting operation of the second model setting control. Alternatively, the user can first trigger the second model setting control, and then trigger the first model setting control. Correspondingly, the electronic device can first respond to the setting operation of the second model setting control, and then respond to the setting operation of the first model setting control. This embodiment does not impose any limitations.

[0080] It should be noted that, in the aforementioned embodiments, in response to the setting operation of the model setting control, the set reference model and the model to be repaired may be located in the same coordinate space or in different coordinate spaces. However, the reference model and the model to be repaired used in the model repair process must be located in the same coordinate space. Therefore, the electronic device can unify the coordinate space of the model in the following ways.

[0081] like Figure 6 As shown, the interactive interface of the seam normal repair tool may include a coordinate space setting control. This coordinate space setting control allows users to set the coordinate space of each model during the model repair process and to unify the coordinate spaces of each model according to the set coordinate space.

[0082] Before responding to a trigger operation on the repair control, the electronic device can respond to a setting operation on the coordinate space setting control to determine the target coordinate space set by the user. The target coordinate space can be any of the following: world space, object space, local space, or screen space. World space is the coordinate system of the entire scene, with its origin at the center point of the scene. The coordinate axes of world space can be displayed in a grid within the axis view window. Object space is a coordinate system derived from a specific viewpoint, which can be located anywhere on or around the model. Its origin can be at a pivot point, and its coordinate axes can rotate with the model. Local space is a coordinate system similar to object space, which can be obtained by performing appropriate transformations and mappings based on object space.

[0083] After responding to the trigger operation of the repair control, the electronic device can determine whether the coordinate space of the model to be repaired and the reference model is the same as the set target coordinate space.

[0084] When the coordinate space of the reference model is the same as the target coordinate space, but the coordinate space of the model to be repaired is different from the target coordinate space, the model to be repaired can be transformed into the target coordinate space according to the transformation relationship between coordinate spaces.

[0085] When the coordinate space of the reference model is different from the target coordinate space, and the coordinate space of the model to be repaired is the same as the target coordinate space, the reference model can be transformed into the target coordinate space according to the transformation relationship between coordinate spaces.

[0086] When the coordinate spaces of the reference model and the model to be repaired are different from the target coordinate space, the model to be repaired and the reference model can be transformed into the target coordinate space according to the transformation relationship between coordinate spaces.

[0087] The transformation relationship between the coordinate space of the model to be repaired and the target coordinate space is established based on the coordinates of the same point in the coordinate space of the model to be repaired and the coordinates in the target coordinate space. For example, point A in the model to be repaired has a coordinate (usually 0, 0, 0) in the coordinate space of the model to be repaired, and at the same time, point A also has a coordinate (x, y, z) in the target coordinate space. The transformation relationship between the two coordinate spaces can be established based on these two coordinates.

[0088] In this way, electronic devices can unify the coordinate space before repairing the model to be repaired, so that the model to be repaired can be repaired in the same coordinate space based on the reference model.

[0089] In some alternative embodiments, after responding to a trigger operation on the repair control, the electronic device can also render a reference model based on the model data of the reference model and display the reference model on the interactive interface; and render the model to be repaired based on the model data of the model to be repaired and display the model to be repaired on the interactive interface. The model data includes rendering data corresponding to the model, and the electronic device can perform corresponding rendering on the model based on the rendering data. For example, the model to be repaired and / or the reference model can be directly displayed in the model display area of ​​the interactive interface. Alternatively, the model to be repaired and / or the reference model can be displayed in a floating window or overlay on the interactive interface.

[0090] After displaying the reference model and the model to be repaired, the repair process of the model to be repaired can be dynamically shown until the final model after repair is obtained. In addition, when the reference model and the model to be repaired are displayed simultaneously, after the repair of the model to be repaired is completed, users can compare the two models to view or understand the repair effect of the model to be repaired.

[0091] Optionally, such as Figure 6 As shown, the interactive interface may also include a progress bar, which displays the repair progress. The electronic device can update the progress bar synchronously according to the repair progress. After the repair is completed, the electronic device can display a repair completion reminder message on the interactive interface. The reminder message is used to notify the user that the current model seam repair process has been completed.

[0092] This approach enhances the visualization of the repair process, allowing users to more intuitively perceive and control the entire process.

[0093] In some optional embodiments, to facilitate the maintenance and management of the seam normal repair tool, a tool rack application can be used to centrally manage the seam normal repair tool and other extended tools required by the game asset creation software. Based on this, the electronic device can also have a tool rack application corresponding to the game asset creation software installed. This tool rack application integrates and manages the icons of multiple extended tools required by the game asset creation software, including the seam normal repair tool.

[0094] Based on this, electronic devices can run a seam normal repair tool compatible with the game resource creation software during the game resource creation software operation by following these steps:

[0095] Step 111: During the operation of the game resource creation software, run the tool rack application and display the tool panel provided by the tool rack application. The tool panel should include at least the icon of the seam normal repair tool.

[0096] Step 112: In response to the trigger operation of the icon of the seam normal repair tool, load the code data and runtime environment data of the seam normal repair tool from the first server into the memory of the electronic device, and run the seam normal repair tool according to the code data and runtime environment data of the seam normal repair tool.

[0097] In this embodiment, a tool rack application corresponding to the game asset creation software can be installed on the electronic device. This tool rack application integrates and manages icons for at least one extended tool required by the game asset creation software. These extended tools provide extended functionality to the game asset creation software. When a user uses these extended tools, these extended functions assist the user in game development and application. For example, when a user repairs a model to be repaired using Autodesk Maya, the tool rack application integrating and managing at least one extended tool required by the game asset creation software includes at least a seam normal repair tool. This extended tool may also include: a seam recognition plugin, a seam parameter modification plugin, a repair parameter setting plugin, and a normal repair plugin, etc. The extended tools listed here are merely examples, and the range of extended tools is not limited to these.

[0098] In this embodiment, the tool rack application and the game resource creation software have a corresponding relationship. Each tool rack application provides extended tool services for its corresponding game resource creation software. Therefore, in order to conveniently provide extended tool services for the corresponding game resource creation software, the tool rack application in this embodiment can be run synchronously during the operation of the corresponding game resource creation software. Based on this, after installing the tool rack application, it can be run while the game resource creation software is running.

[0099] In addition, in this embodiment, in order to make the tool rack application lightweight, easy to install and use, and to minimize the resource consumption of electronic devices, the tool rack application in this embodiment is mainly responsible for managing and providing icons of the extended tools that can be used by the corresponding game resource creation software. The code data and runtime environment data of the seam repair tool are deployed on the server.

[0100] Furthermore, to conveniently provide extended tool services for the corresponding game resource creation software, the tool rack application will visually display the icon of at least one extended tool usable in the game resource creation software during operation. To achieve this visual display, the tool rack application provides a tool panel, which displays the icons of at least one extended tool. Therefore, during the operation of the tool rack application, the tool panel provided by the tool rack application will be displayed, containing the icon of at least one extended tool, and this tool panel will at least include the icon of the seam normal repair tool. For example... Figure 7 As shown, the tool panel displays icons for extension tools T1-T6, where extension tool T1 is the seam normal repair tool. The number of extension tools and their icons are for illustrative purposes only and are not limited to this example. Figure 7 As shown, the number of extension tools and their icons will vary depending on the game resource creation software.

[0101] For ease of distinction and description, in this embodiment, the server responsible for storing the code data and runtime environment data corresponding to the seam repair tool is referred to as the first server. The first server can be a conventional physical server, a server cluster, or a cloud server, and its implementation is not limited. The first server stores the code data and runtime environment data of the seam repair tool. The code data can be the program source code data of the seam repair tool, or executable code data obtained by compiling the program source code data, or both types of data; this is not limited. If it is program source code data, the electronic device can compile the program source code data to obtain executable code data before executing it. The runtime environment data for each extension tool is a description of the runtime environment required for the extension tool to run, used by the electronic device to configure the runtime environment required for the extension tool to run locally.

[0102] Based on the above, and building upon the tool panel provided by the tool rack application, the electronic device can load the code data and runtime environment data of the seam repair tool from the first server into the electronic device's memory in response to a trigger operation on the icon of the extended tool. In this embodiment, the method of triggering the icon of the first seam repair tool is not limited; for example, various operation methods such as clicking, double-clicking, long-pressing, or touch are all applicable to this embodiment.

[0103] Optionally, when the electronic device loads the code data and runtime environment data of the seam repair tool from the first server, it may send a data acquisition request to the first server. This data acquisition request includes identification information of the seam repair tool. This identification information is used to uniquely identify the seam repair tool and may include, for example, a name or internal ID. After the electronic device sends the data acquisition request to the first server, the first server retrieves the latest runtime environment data and code data of the seam repair tool based on the identification information included in the request and returns it to the electronic device. The electronic device may receive and load the latest runtime environment data and code data of the seam repair tool returned by the first server based on the identification information into its memory.

[0104] It should be noted that because the code data and runtime environment data of the seam repair tool are deployed on the first server, the developers of the seam repair tool can flexibly and at any time update it. For example, they can modify the code data of the seam repair tool, or modify the seam repair tool itself, and upload the latest code data or runtime environment data to the first server. There is no need to update each electronic device using the game resource creation software individually. In addition, for electronic devices, there is no need to actively pay attention to the update process of the seam repair tool, nor is it necessary to download the relevant code and update it manually. They only need to directly request the code data and runtime environment data of the seam repair tool from the first server when the user triggers the use of the seam repair tool. During this process, the first server will proactively provide the electronic device with the latest code data and runtime environment data of the seam repair tool, greatly simplifying the update and maintenance process of the seam repair tool.

[0105] After obtaining the code data and runtime environment data of the seam repair tool, the electronic device can locally configure the runtime environment of the seam repair tool based on the runtime environment data of the seam repair tool. Then, the electronic device can run the code data of the seam repair tool in the runtime environment to provide the game asset creation software with the extended functions of the seam repair tool.

[0106] In this embodiment, a tool rack application is provided to integrate and manage icons of multiple extended tools required by game resource creation software. Combined with a server-centralized management of the code data and runtime environment data of each extended tool, this facilitates unified updates and upgrades of the seam repair tool by tool developers. These operations are seamless for users, simplifying the management of extended tools. For users, a single click is all it takes to install the tool rack application. They can then select the extended tool using its icon, and the application will automatically load the code data and runtime environment data of the seam repair tool from the server into local memory and run it. This frees users from the complex and tedious tasks of installing and upgrading extended tools, making it simple and easy to use. Furthermore, the tool rack application's centralized management of extended tool icons, while the server maintains the code data and runtime environment data, enables a lightweight tool rack application, significantly reducing its memory footprint and lowering resource consumption on electronic devices.

[0107] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application. This electronic device is applicable to the three-dimensional model repair method provided in the foregoing embodiments, such as... Figure 8 As shown, the electronic device includes a memory 801, a processor 802, and a communication component 803. Game resource creation software is installed on the electronic device.

[0108] Memory 801 is used to store computer programs and can be configured to store various other data to support operation on the terminal device. Examples of this data include instructions for any application or method used to operate on the terminal device, contact data, phone book data, messages, pictures, videos, etc.

[0109] Processor 802, coupled to memory 801, is used to execute computer programs in memory 801 for: running a seam normal repair tool adapted to the game resource creation software during its operation, and displaying an interactive interface for the seam normal repair tool, the interactive interface including at least model setting controls and repair controls; and, in response to setting operations on the model setting controls, setting a reference model and a model to be repaired, the reference model being the original model or determined based on the original model, the model to be repaired being obtained by partially cutting and reassembling the original model, forming a seam normal at the splicing position. The system responds to a trigger operation on the repair control, identifies seams in the model to be repaired based on the model data, and obtains the two target boundary edges forming the seam and the boundary vertices on the two target boundary edges. Based on the coordinates of the boundary vertices on the two target boundary edges and the model data of the reference model, it identifies the reference vertex on the reference model that corresponds to the boundary vertices on the two target boundary edges. Based on the normal of the reference vertex, it repairs the normal of the boundary vertices on the two target boundary edges to the normal of the corresponding reference vertex, thereby completing the repair of the model to be repaired.

[0110] Further optionally, when the processor 802 performs seam identification on the model to be repaired based on the model data of the model to be repaired to obtain two target boundary edges forming the seam in the model to be repaired, it is specifically used to: perform boundary identification on the model to be repaired based on the vertices and edges in the model data of the model to be repaired to obtain multiple boundary edges in the model to be repaired and boundary vertices on each boundary edge; and, based on the coordinates of the boundary vertices on each boundary edge, obtain two boundary edges from the multiple boundary edges whose coordinate errors of the corresponding boundary vertices are within a set coordinate error range as the two target boundary edges forming the seam.

[0111] Further optionally, when the processor 802 performs boundary identification on the model to be repaired based on the vertices and edges in the model data of the model to be repaired to obtain multiple boundary edges and boundary vertices on each boundary edge, it specifically performs the following: based on the identification information of the model to be repaired, it calls the first API provided by the game resource creation software, and the first API performs boundary identification on the model to be repaired based on the vertices and edges in the model data of the model to be repaired to obtain multiple boundary edges and boundary vertices on each boundary edge; or, based on each edge in the model data of the model to be repaired, it identifies the number of faces connected to the edge, and if the number of faces connected to the edge is one, then the edge is taken as a boundary edge, and the vertex on the edge is taken as the boundary vertex on the boundary edge.

[0112] Optionally, when the processor 802 selects two boundary edges whose coordinate errors of corresponding boundary vertices are within a set error range from the plurality of boundary edges based on the coordinates of the boundary vertices on each boundary edge, as the two target boundary edges forming the seam, the processor 802 specifically performs the following: based on the number of boundary vertices on each boundary edge, it identifies at least one candidate boundary edge combination from the plurality of boundary edges that has the same number of vertices or whose number of vertices is within a set error range, each candidate boundary edge combination including two boundary edges; for each candidate boundary edge combination, based on the positions of the boundary vertices on the two boundary edges in the candidate boundary edge combination, it determines whether the coordinate error of the corresponding boundary vertices on the two boundary edges is within a set coordinate error range; if the determination result is yes, it selects the two boundary edges in the candidate boundary edge combination as the two target boundary edges forming the seam.

[0113] Further optionally, when the processor 802 identifies the reference vertex on the reference model corresponding to the boundary vertices on the two target boundary edges based on the coordinates of the boundary vertices on the two target boundary edges and in combination with the model data of the reference model, it specifically performs the following: according to a set coordinate error range, it treats two boundary vertices on the two target boundaries whose coordinate errors are within the set coordinate error range as the same boundary vertex and merges them to obtain multiple target vertices and their coordinates; according to the coordinates of the multiple target vertices, among the vertices and edges in the model data of the reference model, it identifies the vertex located on the same edge and whose coordinate error with each target vertex is within the set coordinate error range as the reference vertex on the reference model corresponding to the boundary vertices on the two target boundary edges.

[0114] Further optionally, the interactive interface also includes a coordinate threshold setting control; the processor 802 is further configured to: before responding to the triggering operation of the repair control, respond to the setting operation of the coordinate threshold setting control, and obtain the coordinate error range set by the user.

[0115] Further optionally, the model setting control includes a first model setting control and a second model setting control. When the processor 802 sets a reference model and a model to be repaired in response to a setting operation on the model setting control, it is specifically configured to: in response to a trigger operation on the first model setting control, select a model under a first access path as a reference model, display the identification information of the reference model on the interactive interface, and associate the first access path with a positioning control on the interactive interface for locating the reference model according to the first access path; in response to a trigger operation on the second model setting control, select a model under a second access path as a model to be repaired, and display the identification information of the model to be repaired on the interactive interface.

[0116] Further optionally, after responding to the trigger operation of the repair control, the processor 802 is further configured to: render the reference model according to the model data of the reference model and display the reference model on the interactive interface; render the model to be repaired according to the model data of the model to be repaired and display the model to be repaired on the interactive interface; and dynamically display the repair process of the model to be repaired until the final model after repair is obtained.

[0117] Further optionally, the interactive interface further includes: a coordinate space setting control; before responding to the trigger operation of the repair control, the processor 802 is further configured to: respond to the setting operation of the coordinate space setting control and determine the target coordinate space set by the user; the target coordinate space is any coordinate space among world space, object space, local space, and screen space; after responding to the trigger operation of the repair control, the processor 802 is further configured to: when the coordinate space where the model to be repaired and / or the reference model is located is different from the target coordinate space, convert the model to be repaired and / or the reference model to the target coordinate space according to the transformation relationship between coordinate spaces.

[0118] Optionally, the electronic device also has a tool rack application corresponding to the game resource creation software installed. The tool rack application integrates and manages icons of multiple extended tools required by the game resource creation software, including the seam normal repair tool. When the processor 802 runs the seam normal repair tool adapted to the game resource creation software during the operation of the game resource creation software, it is specifically configured to: run the tool rack application and display a tool panel provided by the tool rack application during the operation of the game resource creation software, the tool panel including at least the icon of the seam normal repair tool; in response to a trigger operation on the icon of the seam normal repair tool, load the code data and runtime environment data of the seam normal repair tool from the first server into the memory of the electronic device, and run the seam normal repair tool according to the code data and runtime environment data of the seam normal repair tool.

[0119] Furthermore, such as Figure 8 As shown, the electronic device also includes other components such as a power supply component 804 and a display component 805. Figure 8 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 8 The components shown.

[0120] In this embodiment, a seam normal repair tool can be run and its interactive interface can be displayed. It responds to setting operations, setting a reference model and a model to be repaired; and responds to trigger operations, performing seam identification based on the model data of the model to be repaired, obtaining the two target boundary edges forming the seam in the model to be repaired, as well as the boundary vertices on the two target boundary edges. Based on the coordinates of the boundary vertices and combined with the model data of the reference model, reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges are identified; and the normals of the boundary vertices on the two target boundary edges are repaired to the normals of the corresponding reference vertices based on the normals of the reference vertices, thus completing the repair of the model to be repaired. In this way, model seams can be automatically repaired, eliminating the need for manual repair, thereby improving repair efficiency and reducing labor costs.

[0121] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be performed by an electronic device in the above method embodiments.

[0122] The above Figure 8 The memory 801 in the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0123] The above Figure 8 The communication component 803 is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, or 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component may be implemented based on Near Field Communication (NFC), Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wideband (UWB), Bluetooth (BT), and other technologies.

[0124] The above Figure 8 The power supply component 804 provides power to various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.

[0125] The above Figure 8The display component 805 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation.

[0126] Figure 9 This is a schematic diagram of the structure of a three-dimensional model repair device provided in an exemplary embodiment of this application. This device is applicable to the three-dimensional model repair method provided in the foregoing embodiments, such as... Figure 9 As shown, the device includes: an interface display module 901, a model setting module 902, a seam recognition module 903, a vertex recognition module 904, and a normal repair module 905. The interface display module 901 is used to: run a seam and normal repair tool adapted to the game resource creation software during its operation, and display the interactive interface of the seam and normal repair tool, the interactive interface including at least model setting controls and repair controls; the model setting module 902 is used to: in response to setting operations on the model setting controls, set a reference model and a model to be repaired, the reference model being the original model or determined based on the original model, the model to be repaired being obtained by partially cutting and reassembling the original model, forming seams at the splicing points; the seam recognition module 903 is used to: in response to... The trigger operation involves identifying seams in the model to be repaired based on its model data, thereby obtaining the two target boundary edges that form the seams and the boundary vertices on those two target boundary edges. The vertex identification module 904 is used to identify reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges based on the coordinates of the boundary vertices on the two target boundary edges and the model data of the reference model. The normal repair module 905 is used to repair the normals of the boundary vertices on the two target boundary edges to the normals of the corresponding reference vertices based on the normals of the reference vertices, thereby completing the repair of the model to be repaired.

[0127] Further optionally, when the seam recognition module 903 performs seam recognition on the model to be repaired based on the model data of the model to be repaired to obtain two target boundary edges forming the seam in the model to be repaired, it is specifically used to: perform boundary recognition on the model to be repaired based on the vertices and edges in the model data of the model to be repaired to obtain multiple boundary edges in the model to be repaired and boundary vertices on each boundary edge; and, based on the coordinates of the boundary vertices on each boundary edge, obtain two boundary edges from the multiple boundary edges whose coordinate errors of the corresponding boundary vertices are within a set coordinate error range as the two target boundary edges forming the seam.

[0128] Further optionally, when the seam recognition module 903 performs boundary recognition on the model to be repaired based on the vertices and edges in the model data of the model to be repaired to obtain multiple boundary edges and boundary vertices on each boundary edge, it is specifically used to: call the first API provided by the game resource creation software based on the identification information of the model to be repaired, and have the first API perform boundary recognition on the model to be repaired based on the vertices and edges in the model data of the model to be repaired to obtain multiple boundary edges and boundary vertices on each boundary edge; or, based on each edge in the model data of the model to be repaired, identify the number of faces connected to the edge, and if the number of faces connected to the edge is one, then the edge is taken as a boundary edge, and the vertex on the edge is taken as the boundary vertex on the boundary edge.

[0129] Further optionally, when the seam recognition module 903 obtains two boundary edges whose coordinate errors of corresponding boundary vertices are within a set error range from the plurality of boundary edges based on the coordinates of the boundary vertices on each boundary edge, it is specifically used to: identify at least one candidate boundary edge combination from the plurality of boundary edges with the same number of vertices or whose number of vertices is within a set error range, based on the number of boundary vertices on each boundary edge, each candidate boundary edge combination including two boundary edges; for each candidate boundary edge combination, determine whether the coordinate error of the corresponding boundary vertices on the two boundary edges is within a set coordinate error range based on the positions of the boundary vertices on the two boundary edges in the candidate boundary edge combination; if the determination result is yes, use the two boundary edges in the candidate boundary edge combination as the two target boundary edges forming the seam.

[0130] Optionally, when the vertex recognition module 904 identifies the reference vertex on the reference model corresponding to the boundary vertices on the two target boundary edges based on the coordinates of the boundary vertices on the two target boundary edges and in combination with the model data of the reference model, it is specifically used to: treat two boundary vertices on the two target boundaries whose coordinate errors are within the set coordinate error range as the same boundary vertex and fuse them to obtain multiple target vertices and their coordinates; and, based on the coordinates of the multiple target vertices, identify vertices located on the same edge and whose coordinate errors with each target vertex are within the set coordinate error range from the vertices and edges in the model data of the reference model as reference vertices corresponding to the boundary vertices on the two target boundary edges in the reference model.

[0131] Further optionally, the interactive interface also includes a coordinate threshold setting control; the model setting module 902 is further configured to: before responding to the triggering operation of the repair control, respond to the setting operation of the coordinate threshold setting control, and obtain the coordinate error range set by the user.

[0132] Further optionally, the model setting control includes a first model setting control and a second model setting control. When the model setting module 902 sets a reference model and a model to be repaired in response to a setting operation on the model setting control, it is specifically used to: in response to a trigger operation on the first model setting control, select a model under a first access path as a reference model, display the identification information of the reference model on the interactive interface, and associate the first access path with a positioning control on the interactive interface for locating the reference model according to the first access path; in response to a trigger operation on the second model setting control, select a model under a second access path as a model to be repaired, and display the identification information of the model to be repaired on the interactive interface.

[0133] Further optionally, after responding to the trigger operation of the repair control, the seam recognition module 903 is further configured to: render the reference model according to the model data of the reference model and display the reference model on the interactive interface; render the model to be repaired according to the model data of the model to be repaired and display the model to be repaired on the interactive interface; and dynamically display the repair process of the model to be repaired until the final model after repair is obtained.

[0134] Further optionally, the interactive interface further includes: a coordinate space setting control; before responding to the trigger operation of the repair control, the model setting module 902 is also used to: respond to the setting operation of the coordinate space setting control and determine the target coordinate space set by the user; the target coordinate space is any coordinate space among world space, object space, local space, and screen space; after responding to the trigger operation of the repair control, the method further includes: when the coordinate space where the model to be repaired and / or the reference model is located is different from the target coordinate space, converting the model to be repaired and / or the reference model to the target coordinate space according to the transformation relationship between coordinate spaces.

[0135] Optionally, the electronic device also has a tool rack application corresponding to the game resource creation software installed. The tool rack application integrates and manages icons of multiple extended tools required by the game resource creation software, including the seam normal repair tool. When the interface display module 901 runs the seam normal repair tool adapted to the game resource creation software during the operation of the game resource creation software, it is specifically used to: run the tool rack application and display the tool panel provided by the tool rack application during the operation of the game resource creation software, the tool panel including at least the icon of the seam normal repair tool; in response to the triggering operation of the icon of the seam normal repair tool, load the code data and runtime environment data of the seam normal repair tool from the first server into the memory of the electronic device, and run the seam normal repair tool according to the code data and runtime environment data of the seam normal repair tool.

[0136] In this embodiment, a seam normal repair tool is provided for game resource creation software. This tool runs during the software's operation and displays its interactive interface. Users can set a reference model and the model to be repaired through this interface and initiate a model repair operation by triggering a specific action. The tool identifies the two target boundary edges forming the seam in the model to be repaired, as well as the boundary vertices on those edges, and identifies the reference vertices on the reference model corresponding to these boundary vertices. It then repairs the normals of the boundary vertices on the two target boundary edges to the normals of their corresponding reference vertices, thus completing the repair of the model. This method automatically repairs model seams, eliminating the need for manual repair, thereby improving repair efficiency, reducing labor costs, and enhancing repair accuracy.

[0137] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0138] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0139] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0140] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0142] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0143] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0144] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0145] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for repairing a three-dimensional model, characterized in that, The method is applied to an electronic device, the electronic device having game resource creation software installed, and the method includes: During the operation of the game resource creation software, a seam normal repair tool adapted to the game resource creation software is run, and the interactive interface of the seam normal repair tool is displayed. The interactive interface includes at least model setting controls and repair controls. In response to the setting operation of the model setting control, a reference model and a model to be repaired are set. The reference model is the original model or is determined based on the original model. The model to be repaired is obtained by partially cutting and re-splicing the original model, and a seam is formed at the splicing position. In response to the trigger operation of the repair control, based on the vertices and edges in the model data of the model to be repaired, the boundary identification of the model to be repaired is performed to obtain multiple boundary edges in the model to be repaired and the boundary vertices on each boundary edge; the boundary edge is an edge that connects only one face. Based on the coordinates of the boundary vertices on each boundary edge, two boundary edges whose coordinate errors of the corresponding boundary vertices are within the set coordinate error range are selected from the multiple boundary edges and used as the two target boundary edges to form the joint. Based on the coordinates of the boundary vertices on the two target boundary edges, and combined with the model data of the reference model, identify the reference vertices on the reference model that correspond to the boundary vertices on the two target boundary edges; Based on the normal of the reference vertex, the normals of the boundary vertices on the two target boundary edges are restored to the normals of the corresponding reference vertex, thereby completing the repair of the model to be repaired.

2. The method according to claim 1, characterized in that, Based on the vertices and edges in the model data of the model to be repaired, boundary identification is performed on the model to be repaired to obtain multiple boundary edges and boundary vertices on each boundary edge, including: Based on the identification information of the model to be repaired, the first API provided by the game resource creation software is called. The first API performs boundary identification on the model to be repaired based on the vertices and edges in the model data of the model to be repaired, and obtains multiple boundary edges and boundary vertices on each boundary edge in the model to be repaired. or Based on each edge in the model data of the model to be repaired, identify the number of faces connected to the edge. If the number of faces connected to the edge is one, then the edge is taken as a boundary edge, and the vertices on the edge are taken as boundary vertices on the boundary edge.

3. The method according to claim 1, characterized in that, Based on the coordinates of the boundary vertices on each boundary edge, two boundary edges whose coordinate errors of the corresponding boundary vertices are within a set error range are selected from the plurality of boundary edges as the two target boundary edges forming the joint, including: Based on the number of boundary vertices on each boundary edge, at least one candidate boundary edge combination is identified from the plurality of boundary edges that has the same number of vertices or whose number of vertices is within a set error range. Each candidate boundary edge combination includes two boundary edges. For each candidate boundary edge combination, based on the positions of the boundary vertices on the two boundary edges in the candidate boundary edge combination, determine whether the coordinate error of the corresponding boundary vertices on the two boundary edges is within the set coordinate error range. If the determination result is yes, the two boundary edges in the candidate boundary edge combination are taken as the two target boundary edges to form the seam.

4. The method according to claim 1, characterized in that, Based on the coordinates of the boundary vertices on the two target boundary edges, and in conjunction with the model data of the reference model, identify the reference vertices on the reference model that correspond to the boundary vertices on the two target boundary edges, including: Based on the set coordinate error range, two boundary vertices on the two target boundaries whose coordinate errors are within the set coordinate error range are regarded as the same boundary vertex and fused to obtain multiple target vertices and their coordinates; Based on the coordinates of the plurality of target vertices, among the vertices and edges in the model data of the reference model, the vertices located on the same edge and whose coordinate errors with each target vertex are within a set coordinate error range are identified as reference vertices on the reference model corresponding to the boundary vertices on the two target boundary edges.

5. The method according to claim 3 or 4, characterized in that, The interactive interface also includes: a coordinate threshold setting control; the method also includes: Before responding to the trigger operation of the repair control, respond to the setting operation of the coordinate threshold setting control to obtain the coordinate error range set by the user.

6. The method according to any one of claims 1-4, characterized in that, The model setting control includes a first model setting control and a second model setting control. In response to a setting operation on the model setting control, a reference model and a model to be repaired are set, including: In response to the trigger operation of the first model setting control, the model under the first access path is selected as the reference model, and the identification information of the reference model is displayed on the interactive interface. The first access path is associated with the positioning control on the interactive interface so as to locate the reference model according to the first access path. In response to the trigger operation of the second model setting control, the model under the second access path is selected as the model to be repaired, and the identification information of the model to be repaired is displayed on the interactive interface.

7. The method according to any one of claims 1-4, characterized in that, The interactive interface also includes: a coordinate space setting control; Before responding to a trigger operation on the repair control, the method further includes: responding to a setting operation on the coordinate space setting control, and determining a target coordinate space set by the user; the target coordinate space is any coordinate space among world space, object space, local space, and screen space; After responding to the trigger operation of the repair control, the method further includes: when the coordinate space where the model to be repaired and / or the reference model is located is different from the target coordinate space, transforming the model to be repaired and / or the reference model into the target coordinate space according to the transformation relationship between coordinate spaces.

8. The method according to any one of claims 1-4, characterized in that, The electronic device is also equipped with a tool rack application corresponding to the game resource creation software. The tool rack application integrates and manages the icons of multiple extended tools required by the game resource creation software, including the seam normal repair tool. During the operation of the game resource creation software, a seam normal repair tool adapted to the game resource creation software is run, including: During the operation of the game resource creation software, the tool rack application is run and the tool panel provided by the tool rack application is displayed. The tool panel includes at least an icon for the seam normal repair tool. In response to a trigger operation on the icon of the seam normal repair tool, the code data and runtime environment data of the seam normal repair tool are loaded from the first server into the memory of the electronic device, and the seam normal repair tool is run according to the code data and runtime environment data of the seam normal repair tool.

9. An electronic device, characterized in that, The electronic device is equipped with game resource creation software, and the electronic device includes a memory and a processor; The processor is coupled to the memory for executing a computer program stored in the memory for implementing extended tool management, in order to implement the steps of the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Image rendering method and device, electronic equipment and storage medium

    CN111932664A