Model detection method, device, terminal device and storage medium

By performing constraint detection and error message generation on virtual object models in game applications, the problem of low model acquisition efficiency is solved, and efficient modification and efficiency improvement of model production is achieved.

CN114816156BActive Publication Date: 2024-12-03NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210517915.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2024-12-03
Estimated Expiration
2042-05-12

AI Technical Summary

Technical Problem

When running the model in a game application, it is found that there are problems with the model, resulting in reduced model acquisition efficiency.

Method used

In the process of drawing a virtual object model, preset constraints are used to detect the model, and error prompt information is generated to indicate drawing errors, including normal flip, overlap, detection of the same plane and collider constraints.

Benefits of technology

Timely discover errors in the virtual object model, facilitate timely modification, improve the efficiency of model production, reduce the communication costs between artists and programmers, and improve work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816156B_ABST
    Figure CN114816156B_ABST
Patent Text Reader

Abstract

The present invention provides a model detection method, device, terminal equipment and storage medium, which relate to the field of data processing technology. The method includes: in the process of drawing a virtual object model, at least one preset constraint condition is used to detect the virtual object model to obtain a detection result; if the indication information indicates that the virtual object model has a drawing error, an error prompt information is generated according to the detection result, and the error prompt information is used to indicate the drawing error existing in the virtual object model. In the process of drawing the virtual object model, the virtual object model is detected using a constraint condition. When the indication information of the detection result indicates that the virtual object model has a drawing error, an error prompt information is generated according to the detection result to prompt the drawing error existing in the virtual object model, so as to realize timely discovery of the errors existing in the virtual object model when drawing the virtual object model, facilitate timely modification of the virtual object model, and improve the production efficiency of the virtual object model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a model detection method, device, terminal equipment and storage medium. Background Art

[0002] With the development of science and technology, there are more and more various applications. In some applications, models are needed for implementation so that the model can be displayed to the user when the application is running and the model can be controlled based on the user's operation. The development of such applications has also become a research hotspot.

[0003] In the related art, artists create models in a model creation application, and then submit the models. The R&D personnel then run the models in the application. If there are any problems with the model during the operation, the problems are fed back to the artists for modification.

[0004] However, in the related art, when running the model in the game application, problems with the model are discovered and then modified, which reduces the efficiency of model acquisition. Summary of the invention

[0005] The purpose of the present invention is to provide a model detection method, apparatus, terminal device and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the problem in the related art that when running a model in a game application, problems with the model are discovered and then modified, which reduces the efficiency of model acquisition.

[0006] To achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0007] In a first aspect, an embodiment of the present invention provides a model detection method, the method comprising:

[0008] In the process of drawing the virtual object model, the virtual object model is detected using at least one preset constraint condition to obtain a detection result, wherein the detection result includes: indication information for indicating whether there is a drawing error in the virtual object model;

[0009] If the indication information indicates that there is a drawing error in the virtual object model, error prompt information is generated according to the detection result, where the error prompt information is used to indicate the drawing error in the virtual object model.

[0010] Optionally, in the process of drawing the virtual object model, the virtual object model is detected using at least one preset constraint condition, and before obtaining the detection result, the method further includes:

[0011] In response to a first selection operation of an input constraint control, a constraint condition corresponding to a target constraint control selected by the first selection operation is determined to be the at least one constraint condition.

[0012] Optionally, if the indication information indicates that there is a drawing error in the virtual object model, the detection result further includes: drawing error data; and the generating of error prompt information according to the detection result includes:

[0013] The error prompt information is generated according to the drawing error data.

[0014] Optionally, the method further includes:

[0015] If the indication information indicates that there is a drawing error in the virtual object model, an error mark is displayed on the virtual object model, where the error mark is used to indicate a position where the drawing error exists in the virtual object model and a type of the drawing error.

[0016] Optionally, the method further includes:

[0017] In response to a second selection operation of the input error display control, determining a target error display control selected by the second selection operation;

[0018] The step of displaying an error mark on the virtual object model comprises:

[0019] An error mark is displayed on the virtual object model according to the error display type corresponding to the target error display control.

[0020] Optionally, the at least one constraint condition includes: a normal flip constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0021] Using the normal flip constraint condition, according to the vertex drawing order of each triangle in the virtual object model, determine the normal direction of each triangle;

[0022] If the normal directions of the triangles are inconsistent, the indication information indicates that the virtual object model has a problem of collision body penetration or display error.

[0023] Optionally, the at least one constraint condition includes: an overlapping constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0024] Using the overlap constraint condition, traverse two triangles in the virtual object model in sequence to determine whether any two sides of the two triangles intersect;

[0025] If there is an intersection, the indication information indicates that there is an overlapping problem with the virtual object models;

[0026] If there is no intersection, determining whether one of the two triangles is in the other triangle;

[0027] If so, the indication information indicates that there is an overlapping problem with the virtual object models.

[0028] Optionally, the at least one constraint condition includes: a same plane constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0029] Using the same plane constraint condition, determining triangles corresponding to each plane in the virtual object model;

[0030] Determine whether the dot product of the normals of the triangles in the same target plane is a preset threshold;

[0031] If it is not the preset threshold, the indication information indicates that the triangles in the target plane in the virtual object model are not in the same plane.

[0032] Optionally, the at least one constraint condition includes: a virtual object model and a collision body constraint condition; and the step of using the preset at least one constraint condition to detect the virtual object model to obtain a detection result includes:

[0033] Using the virtual object model and the collision body constraint condition, determine a first bounding box area of ​​a rendering model of the virtual object model and a second bounding box area of ​​a collision body model of the virtual object model;

[0034] Determine whether the ratio of the area of ​​the first bounding box to the area of ​​the second bounding box is within a preset range;

[0035] If not, the indication information indicates that there is an error in the size of the rendering model and the collision body model.

[0036] In a second aspect, an embodiment of the present invention further provides a model detection device, the device comprising:

[0037] A detection module, used to detect the virtual object model using at least one preset constraint condition during the process of drawing the virtual object model, and obtain a detection result, wherein the detection result includes: indication information for indicating whether there is a drawing error in the virtual object model;

[0038] A generating module is used to generate error prompt information according to the detection result if the indication information indicates that the virtual object model has a drawing error, wherein the error prompt information is used to indicate the drawing error of the virtual object model.

[0039] Optionally, the device further comprises:

[0040] The first determination module is used to respond to a first selection operation of an input constraint control and determine that a constraint condition corresponding to a target constraint control selected by the first selection operation is the at least one constraint condition.

[0041] Optionally, the generating module is further configured to generate the error prompt information according to the drawing error data.

[0042] Optionally, the device further comprises:

[0043] The display module is configured to display an error mark on the virtual object model if the indication information indicates that the virtual object model has a drawing error, wherein the error mark is used to indicate a location where the drawing error exists in the virtual object model and a type of the drawing error.

[0044] Optionally, the device further comprises:

[0045] A second determining module, configured to respond to a second selection operation of the input error display control and determine a target error display control selected by the second selection operation;

[0046] The display module is further used to display an error mark on the virtual object model according to the error display type corresponding to the target error display control.

[0047] Optionally, the at least one constraint condition includes: a normal flip constraint condition; the detection module is also used to adopt the normal flip constraint condition to determine the normal direction of each triangle in the virtual object model according to the vertex drawing order of each triangle in the virtual object model; if the normal directions of the triangles are inconsistent, the indication information indicates that the virtual object model has a problem of collision body penetration or display error.

[0048] Optionally, the at least one constraint condition includes: an overlapping constraint condition; the detection module is further used to adopt the overlapping constraint condition to sequentially traverse two triangles in the virtual object model to determine whether any two sides of the two triangles intersect; if there is an intersection, the indication information indicates that there is an overlapping problem in the virtual object model; if there is no intersection, determine whether one of the two triangles is in the other triangle;

[0049] If so, the indication information indicates that there is an overlapping problem with the virtual object models.

[0050] Optionally, the at least one constraint condition includes: a same plane constraint condition; the detection module is also used to use the same plane constraint condition to determine the triangles corresponding to each plane in the virtual object model; determine whether the dot product of the normals of the triangles in the same target plane is a preset threshold; if it is not the preset threshold, the indication information indicates that the triangles in the target plane in the virtual object model are not in the same plane.

[0051] Optionally, the at least one constraint condition includes: a virtual object model and a collision body constraint condition; the detection module is further used to use the virtual object model and the collision body constraint conditions to determine a first bounding box area of ​​a rendering model of the virtual object model and a second bounding box area of ​​a collision body model of the virtual object model; determine whether a ratio of the first bounding box area to the second bounding box area is within a preset range; if not, the indication information indicates that there is an error in the sizes of the rendering model and the collision body model.

[0052] In a third aspect, an embodiment of the present invention further provides a terminal device, comprising: a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the method described in any one of the first aspects is implemented.

[0053] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is read and executed, the method described in any one of the first aspects above is implemented.

[0054] The beneficial effect of the present invention is as follows: an embodiment of the present invention provides a model detection method, comprising: in the process of drawing a virtual object model, using at least one preset constraint condition to detect the virtual object model, and obtaining a detection result, the detection result comprising: indication information for indicating whether the virtual object model has a drawing error; if the indication information indicates that the virtual object model has a drawing error, then generating error prompt information according to the detection result, the error prompt information is used to indicate the drawing error existing in the virtual object model. In the process of drawing the virtual object model, the virtual object model is detected using a constraint condition, and when the indication information of the detection result indicates that the virtual object model has a drawing error, then generating error prompt information according to the detection result to prompt the drawing error existing in the virtual object model, so that in the process of drawing the virtual object model, the error existing in the virtual object model can be discovered in time, which is convenient for timely modification of the virtual object model, and the production efficiency of the virtual object model is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0056] Figure 1 A schematic diagram of a flow chart of a model detection method provided by an embodiment of the present invention;

[0057] Figure 2 A schematic diagram of a graphical user interface provided by an embodiment of the present invention;

[0058] Figure 3 A schematic diagram of a flow chart of a model detection method provided by an embodiment of the present invention;

[0059] Figure 4 A schematic diagram of a flow chart of a model detection method provided by an embodiment of the present invention;

[0060] Figure 5 A schematic diagram of a flow chart of a model detection method provided by an embodiment of the present invention;

[0061] Figure 6 A schematic diagram of a flow chart of a model detection method provided by an embodiment of the present invention;

[0062] Figure 7 A schematic diagram of a flow chart of a model detection method provided by an embodiment of the present invention;

[0063] Figure 8 A schematic diagram of the structure of a model detection device provided by an embodiment of the present invention;

[0064] Fig. 9 A schematic diagram of the structure of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0066] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0067] In the description of the present application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the application is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application.

[0068] In addition, the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0069] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.

[0070] The following is an explanation of the terms involved in the embodiments of the present application.

[0071] 3ds Max: A professional 3D (three dimensional) computer graphics program used to create 3D animations, models, etc.

[0072] Bug: Program vulnerability.

[0073] UI: user interface.

[0074] C++SDK: C++ (a programming language) software development kit (SDK, Software Development Kit), used to customize and extend specified applications.

[0075] 2UV: The second set of texture coordinates for the 3D model.

[0076] With the development of science and technology, there are more and more various applications. In some applications, models are needed for implementation so that the model can be displayed to the user when the application is running and the model can be controlled based on the user's operation. The development of such applications has also become a research hotspot.

[0077] In the related art, artists create models in model creation applications, then submit the models, and then developers run the models in the applications. If problems occur in the models during operation, feedback is given to the artists for modification. However, in the related art, when running the models in the game applications, problems with the models are discovered and then modified, which reduces the efficiency of model acquisition.

[0078] In response to the technical problems existing in the related technology, an embodiment of the present application provides a model detection method. In the process of drawing a virtual object model, the virtual object model is detected using constraint conditions. When the indication information of the detection result indicates that the virtual object model has a drawing error, error prompt information is generated according to the detection result to prompt the drawing error existing in the virtual object model. This can achieve timely discovery of errors existing in the virtual object model during the process of drawing the virtual object model, facilitate timely modification of the virtual object model, and improve the production efficiency of the virtual object model.

[0079] The model detection method provided in the embodiment of the present application can be executed by a terminal device. In practical applications, the terminal device can be any one of the following: a desktop computer, a laptop computer, a tablet computer, a smart phone, etc.

[0080] The model detection method provided in the embodiment of the present application is explained below with the terminal as the execution subject.

[0081] Figure 1 A flow chart of a model detection method provided by an embodiment of the present invention is as follows: Figure 1 As shown, the method may include:

[0082] S101. In the process of drawing a virtual object model, at least one preset constraint condition is used to detect the virtual object model to obtain a detection result.

[0083] The detection result includes: indication information for indicating whether there is a drawing error in the virtual object model.

[0084] In some embodiments, the terminal can draw a virtual object model in response to an input drawing operation; at least one constraint condition can be stored in the terminal, each constraint condition can be used to detect a corresponding type of drawing error, and the terminal uses at least one preset constraint condition to detect the virtual object model to obtain a detection result.

[0085] In practical applications, the drawn virtual object model can be applied in a game application. For example, the virtual object model can be a virtual object in a game application; optionally, the virtual object can be a virtual character, a virtual building, a virtual item, a virtual weapon, etc., which is not specifically limited in the embodiments of the present application. Of course, the virtual object model can also be a type of application, and the specific form of the virtual object model can be drawn according to the actual needs of the application.

[0086] In addition, if the indication information of the detection result indicates that no drawing error occurs in the virtual object model.

[0087] It should be noted that the terminal can modify the virtual object model in response to the input modification operation, so as to realize timely checking and modification of the virtual object model during the process of drawing the virtual object model.

[0088] S102: If the indication information indicates that there is a drawing error in the virtual object model, generate error prompt information according to the detection result.

[0089] The error prompt information may be used to indicate a drawing error existing in the virtual object model.

[0090] In an embodiment of the present application, the error prompt information generated according to the detection result can be used to prompt the artist that an error occurred during the process of drawing the virtual object model, and can also prompt the specific location of the error and the specific type of the error.

[0091] In addition, the terminal may present a graphical user interface. During the process of drawing the virtual object model, the graphical user interface may include the virtual object model being drawn. After the error prompt information is generated, the graphical user interface may also display the error prompt information.

[0092] It should be noted that the terminal may display the error prompt information in the error prompt area in the graphical user interface, may display the error prompt information in the form of a pop-up window, or may display the error prompt information in other ways, and the embodiments of the present application do not impose specific restrictions on this.

[0093] In practical applications, batch detection processing of multiple virtual object models can be supported, and the error detection efficiency for multiple virtual object models can be improved.

[0094] In summary, an embodiment of the present invention provides a model detection method, including: in the process of drawing a virtual object model, using at least one preset constraint condition to detect the virtual object model to obtain a detection result, the detection result including: indication information for indicating whether the virtual object model has a drawing error; if the indication information indicates that the virtual object model has a drawing error, then generating error prompt information according to the detection result, the error prompt information is used to indicate the drawing error existing in the virtual object model. In the process of drawing the virtual object model, the virtual object model is detected using a constraint condition, and when the indication information of the detection result indicates that the virtual object model has a drawing error, error prompt information is generated according to the detection result to prompt the drawing error existing in the virtual object model, so that in the process of drawing the virtual object model, the error existing in the virtual object model can be discovered in time, which is convenient for timely modification of the virtual object model, and the production efficiency of the virtual object model is improved.

[0095] It should be noted that the extensible constraint library of the terminal may store constraint codes corresponding to various constraint conditions. If there are multiple constraint conditions, the constraint codes corresponding to the various constraint conditions may be executed in sequence according to a preset order.

[0096] In the process of drawing the virtual object model in S101, the virtual object model is detected using at least one preset constraint condition. Before obtaining the detection result, the method may further include:

[0097] In response to a first selection operation of an input constraint control, a constraint condition corresponding to a target constraint control selected by the first selection operation is determined to be at least one constraint condition.

[0098] Among them, a plurality of constraint controls may be displayed on the graphical user interface of the terminal, and constraint conditions corresponding to each constraint control may also be stored in the terminal.

[0099] In some embodiments, in response to inputting a first selection operation for at least one target constraint control among multiple constraint controls, at least one target constraint control selected by the first selection operation is determined; then a target constraint condition corresponding to the at least one target constraint control is determined, and the target constraint condition is used as at least one constraint condition.

[0100] Figure 2 A display schematic diagram of a graphical user interface provided by an embodiment of the present invention, such as Figure 2 As shown, each constraint control may have a corresponding selection box, and the first selection operation may act on the selection box of the target constraint control to select the target constraint control.

[0101] like Figure 2As shown, constraint prompt information can be displayed on the constraint control. For example, the constraint prompt information corresponding to the normal flip constraint condition may be the reversed normal; the constraint prompt information corresponding to the overlapping constraint condition may be the overlapping surface of the model; the constraint prompt information corresponding to the same plane constraint condition may be the surface of non-same plane; the constraint prompt information corresponding to the virtual object model and collision body constraint conditions may be the size of the original model and the collision body.

[0102] In some embodiments, Figure 2 As shown, the graphical user interface can also contain UV channel number controls, face number check controls, waste point deletion controls, material controls, 2U inversion controls, non-quadruple face and smooth group controls, broken and leaked face controls, threshold controls, deletion of unused material controls, LOD3, 4 smooth group controls, model face number controls at each level, and 2UV range controls, so as to draw and check virtual object models.

[0103] Optionally, if the indication information indicates that there is a drawing error in the virtual object model, the detection result also includes: drawing error data; the process of generating error prompt information according to the detection result in the above S102 may include: generating error prompt information according to the drawing error data.

[0104] Among them, the terminal can extract drawing error data from the detection results, and then generate error prompt information based on the drawing error data, and can call the interface for displaying points / lines / surfaces to display the error prompt information, and then the artist can be informed of the error prompt information.

[0105] In an embodiment of the present application, a virtual object model may be drawn in a 3ds Max application and the virtual object model may be detected, and the above-mentioned point / line / surface interface may be a point / line / surface interface in 3ds Max.

[0106] Optionally, the method may further include: if the indication information indicates that there is a drawing error in the virtual object model, displaying an error mark on the virtual object model.

[0107] The error mark may be used to indicate the location of a drawing error in the virtual object model and the type of the drawing error.

[0108] In some embodiments, the virtual object model can be displayed on a graphical user interface. If the indication information indicates that there is a drawing error in the virtual object model, an error mark is displayed on the virtual object model to more intuitively indicate the error location and error type, so that artists can quickly learn about the problems in the virtual object model.

[0109] Optional, Figure 3A flow chart of a model detection method provided by an embodiment of the present invention is as follows: Figure 3 As shown, the method may also include:

[0110] S301, in response to a second selection operation of an input error display control, determining a target error display control selected by the second selection operation.

[0111] In some implementations, a plurality of error display controls are displayed in a graphical user interface presented by the terminal, and in response to a second selection operation input to the error display control, a target error display control selected by the second selection operation is determined from among the plurality of error display controls.

[0112] The process of displaying an error mark on the virtual object model in S102 may include:

[0113] S302: Display an error mark on the virtual object model according to the error display type corresponding to the target error display control.

[0114] Each error display control has a corresponding error display type.

[0115] In the embodiment of the present application, the terminal can display an error mark corresponding to the error display type of the target error display control on the virtual object model according to the error data in the detection result. It can realize flexible and intuitive display of error marks on the virtual object model, so that artists can quickly learn about drawing errors for specific error display types.

[0116] In the embodiments of the present application, Figure 2 As shown, additional practical tools are integrated into the graphical user interface, and the controls corresponding to the practical tools can be: LOD check tool controls, reset transformation and collapse controls, and FBX export tool controls.

[0117] In the embodiment of the present application, the logic of the UI interface and the inspection method can be separated. The UI interface only calls the corresponding constraint or specification inspection interface and does not implement the logic. Different detection contents are split into multiple interfaces, and different combinations of inspection schemes can be selected as needed and called through a unified module. For some inspections that are difficult to review through text content, a function to display the error location is provided. For high-overhead inspection methods, C++SDK is used to assist in development.

[0118] For example, the implementation code of the check method can be as follows:

[0119] +check function 1()

[0120] +check function 2()

[0121] +check function 3()

[0122] +check function 4()

[0123] …

[0124] +check function n()

[0125] +button function 1()

[0126] +button function 2()

[0127] +button function 3()

[0128] Correspondingly, the implementation code of the UI interface can be as follows:

[0129] +check:Button

[0130] +button 1:Button

[0131] +button 2:Button

[0132] …

[0133] +button n:Button

[0134] +function 1:checkbox

[0135] +function 2:checkbox

[0136] +function 3:checkbox

[0137] …

[0138] +function 4:checkbox

[0139] +on_check_presson()

[0140] +on button presson()

[0141] Optionally, the at least one constraint condition includes: a normal flip constraint condition. Figure 4 A flow chart of a model detection method provided by an embodiment of the present invention is as follows: Figure 4 As shown, the process of detecting the virtual object model using at least one preset constraint condition in the above S101 to obtain the detection result may include:

[0142] S401 , using a normal flip constraint condition, and according to the vertex drawing order of each triangle in the virtual object model, determining the normal direction of each triangle.

[0143] Among them, if the vertex drawing order of each triangle is counterclockwise or clockwise, it means that the normals of each triangle are facing the same direction.

[0144] In some embodiments, the terminal can adopt a normal flip constraint condition, calculate the cross product result of two adjacent edges of each triangle according to the order in which the vertices of the triangle are drawn, and determine the normal direction of each triangle according to the cross product result; if the two triangles are triangles with common sides, the terminal can determine the drawing order of the common sides according to the order in which the vertices of each triangle are drawn, and then determine the normal direction of each triangle.

[0145] It should be noted that in the process of making virtual object models, there may be points that are very close to each other. Such points may split two adjacent triangles into two non-adjacent triangles, causing the detection of these two triangles to be skipped during detection, resulting in errors in the results. Therefore, such vertices need to be combined into one vertex at the beginning to ensure the accuracy of the results.

[0146] S402: If the normal directions of the triangles are inconsistent, the indication information indicates that the virtual object model has a problem of collision body penetration or display error.

[0147] In the embodiment of the present application, if the normals of the triangles are not in the same direction, the problem of through-the-mold will occur. When the normals of some triangles are facing outward, they can be correctly blocked, but when the normals of some triangles are facing inward, they cannot be correctly blocked, resulting in through-the-mold situation. Moreover, the normal direction of the triangle is related to the lighting. The triangles with the correct normal direction can be illuminated normally, while the triangles with incorrect normal directions cannot be illuminated by the light, resulting in display errors and through-the-mold situation.

[0148] Optionally, at least one constraint condition includes: an overlapping constraint condition. Figure 5 A flow chart of a model detection method provided by an embodiment of the present invention is as follows: Figure 5 As shown, the process of detecting the virtual object model using at least one preset constraint condition in the above S101 to obtain the detection result may include:

[0149] S501 , using the overlapping constraint condition, traverse two triangles in the virtual object model in sequence to determine whether any two sides of the two triangles intersect.

[0150] S502: If there is an intersection, the indication information indicates that there is an overlap problem in the virtual object models.

[0151] S503: If there is no intersection, determine whether one of the two triangles is in the other triangle.

[0152] S504: If yes, the indication information indicates that there is an overlapping problem in the virtual object models.

[0153] It should be noted that, in the process from S501 to S504, it is possible to detect whether the triangles of the 2UV module of the virtual object model overlap. If there is overlap, an error will occur that two triangles display the same content.

[0154] It should be noted that the time complexity of the algorithm of the above-mentioned process from S501 to S504 is O(n^2), and the implementation process of the algorithm is also implemented in C++.

[0155] Optionally, the at least one constraint condition includes: a same plane constraint condition; Figure 6 A flow chart of a model detection method provided by an embodiment of the present invention is as follows: Figure 6 As shown, the process of detecting the virtual object model using at least one preset constraint condition in the above S101 to obtain the detection result may include:

[0156] S601: Using the same plane constraint condition, determine the triangles corresponding to each plane in the virtual object model.

[0157] S602: Determine whether the dot product of the normals of triangles in the same target plane is a preset threshold.

[0158] S603: If it is not the preset threshold, the indication information indicates that the triangles in the target plane in the virtual object model are not in the same plane.

[0159] In actual applications, models are constructed in 3DS MAX more often using polygonal modes. Therefore, during the production process, some misoperations of polygons may cause the split triangles to be not in the same plane. Therefore, it is necessary to separately detect whether the triangles of each plane are in the same plane. When the triangles of each plane are not in the same plane, there is a probability of model penetration.

[0160] In some embodiments, the terminal calculates the normal data of each triangle in the same target plane, normalizes the normal data to obtain the normalized normal data, calculates the dot product of the normalized normal data of the triangles in the same target plane, and determines whether the dot product is a preset threshold. If it is not the preset threshold, the indication information indicates that the triangles in the target plane in the virtual object model are not in the same plane.

[0161] Optionally, the preset threshold may be 0 or 0.1.

[0162] Optionally, the at least one constraint condition includes: a virtual object model and a collision body constraint condition; Figure 7 A flow chart of a model detection method provided by an embodiment of the present invention is as follows: Figure 7 As shown, the process of detecting the virtual object model using at least one preset constraint condition in the above S101 to obtain the detection result may include:

[0163] S701: Using the virtual object model and the collision body constraint condition, determine a first bounding box area of ​​the rendering model of the virtual object model and a second bounding box area of ​​the collision body model of the virtual object model.

[0164] S702: Determine whether the ratio of the area of ​​the first bounding box to the area of ​​the second bounding box is within a preset range.

[0165] S703: If not, the indication information indicates that there is an error between the sizes of the rendering model and the collision body model.

[0166] Among them, the virtual object model can be divided into a rendering model and a collision model. The number of faces of the collision model will be much smaller than that of the rendering model. The collision model is an invisible object in the game, but it will block and restrict the movement of the virtual character. Therefore, it is necessary to ensure that the size and shape of the two are roughly the same.

[0167] In some embodiments, the terminal can calculate the first bounding box area and the second bounding box area for the three views, that is, calculate the first bounding box area and the second bounding box area for the front view, the top view and the side view, respectively, and calculate the first ratio of the first bounding box area and the second bounding box area of ​​the front view, the second ratio of the first bounding box area and the second bounding box area of ​​the top view, and the third ratio of the first bounding box area and the second bounding box area of ​​the side view; if the first ratio, the second ratio, and the third ratio are all within a preset range, the indication information indicates that there is no error in the size of the rendering model and the collision body model; if any of the first ratio, the second ratio, and the third ratio is not within the preset range, the indication information indicates that there is an error in the size of the rendering model and the collision body model.

[0168] In summary, an embodiment of the present invention provides a model detection method, including: in the process of drawing a virtual object model, using at least one preset constraint condition to detect the virtual object model to obtain a detection result, the detection result including: indication information for indicating whether the virtual object model has a drawing error; if the indication information indicates that the virtual object model has a drawing error, then generating error prompt information according to the detection result, the error prompt information is used to indicate the drawing error existing in the virtual object model. In the process of drawing the virtual object model, the virtual object model is detected using a constraint condition, and when the indication information of the detection result indicates that the virtual object model has a drawing error, error prompt information is generated according to the detection result to prompt the drawing error existing in the virtual object model, so that in the process of drawing the virtual object model, the error existing in the virtual object model can be discovered in time, which is convenient for timely modification of the virtual object model, and the production efficiency of the virtual object model is improved.

[0169] Moreover, it reduces the communication costs between artists and programmers and improves their work efficiency. Moreover, the inspection can be extended and has the characteristics of low coupling, and can also perform automatic repair functions for some drawing errors.

[0170] The following describes the model detection device, terminal equipment, storage medium, etc. used to execute the model detection method provided by this application. Its specific implementation process and technical effects can be found in the relevant content of the above method, which will not be repeated below.

[0171] Figure 8 A schematic diagram of a model detection device provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, the device may include:

[0172] The detection module 801 is used to detect the virtual object model using at least one preset constraint condition during the process of drawing the virtual object model to obtain a detection result, wherein the detection result includes: indication information indicating whether there is a drawing error in the virtual object model;

[0173] The generating module 802 is configured to generate error prompt information according to the detection result if the indication information indicates that the virtual object model has a drawing error, wherein the error prompt information is used to indicate the drawing error of the virtual object model.

[0174] Optionally, the device further comprises:

[0175] The first determination module is used to respond to a first selection operation of an input constraint control and determine that a constraint condition corresponding to a target constraint control selected by the first selection operation is the at least one constraint condition.

[0176] Optionally, the generating module 802 is further configured to generate the error prompt information according to the drawing error data.

[0177] The display module is configured to display an error mark on the virtual object model if the indication information indicates that the virtual object model has a drawing error, wherein the error mark is used to indicate a location where the drawing error exists in the virtual object model and a type of the drawing error.

[0178] Optionally, the device further comprises:

[0179] A second determining module, configured to respond to a second selection operation of the input error display control and determine a target error display control selected by the second selection operation;

[0180] The display module is further used to display an error mark on the virtual object model according to the error display type corresponding to the target error display control.

[0181] Optionally, the at least one constraint condition includes: a normal flip constraint condition; the detection module 801 is also used to adopt the normal flip constraint condition to determine the normal direction of each triangle in the virtual object model according to the vertex drawing order of each triangle; if the normal directions of the triangles are inconsistent, the indication information indicates that the virtual object model has a problem of collision body penetration or display error.

[0182] Optionally, the at least one constraint condition includes: an overlapping constraint condition; the detection module 801 is further used to adopt the overlapping constraint condition to sequentially traverse two triangles in the virtual object model to determine whether any two sides of the two triangles intersect; if there is an intersection, the indication information indicates that there is an overlapping problem in the virtual object model; if there is no intersection, determine whether one of the two triangles is in the other triangle;

[0183] If so, the indication information indicates that there is an overlapping problem with the virtual object models.

[0184] Optionally, the at least one constraint condition includes: a same plane constraint condition; the detection module 801 is also used to use the same plane constraint condition to determine the triangles corresponding to each plane in the virtual object model; determine whether the dot product of the normals of the triangles in the same target plane is a preset threshold; if it is not the preset threshold, the indication information indicates that the triangles in the target plane in the virtual object model are not in the same plane.

[0185] Optionally, the at least one constraint condition includes: a virtual object model and a collision body constraint condition; the detection module 801 is also used to use the virtual object model and the collision body constraint conditions to determine a first bounding box area of ​​a rendering model of the virtual object model and a second bounding box area of ​​a collision body model of the virtual object model; determine whether a ratio of the first bounding box area to the second bounding box area is within a preset range; if not, the indication information indicates that there is an error in the sizes of the rendering model and the collision body model.

[0186] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0187] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0188] Fig. 9 A schematic diagram of the structure of a terminal device provided in an embodiment of the present invention is shown in FIG. Fig. 9 As shown, the terminal device may include: a processor 901 and a memory 902 .

[0189] The memory 902 is used to store programs, and the processor 901 calls the programs stored in the memory 902 to execute the above method embodiment.

[0190] For example, the method may include:

[0191] In the process of drawing the virtual object model, the virtual object model is detected using at least one preset constraint condition to obtain a detection result, wherein the detection result includes: indication information for indicating whether there is a drawing error in the virtual object model;

[0192] If the indication information indicates that there is a drawing error in the virtual object model, error prompt information is generated according to the detection result, where the error prompt information is used to indicate the drawing error in the virtual object model.

[0193] Optionally, in the process of drawing the virtual object model, the virtual object model is detected using at least one preset constraint condition, and before obtaining the detection result, the method further includes:

[0194] In response to a first selection operation of an input constraint control, a constraint condition corresponding to a target constraint control selected by the first selection operation is determined to be the at least one constraint condition.

[0195] Optionally, if the indication information indicates that there is a drawing error in the virtual object model, the detection result further includes: drawing error data; and the generating of error prompt information according to the detection result includes:

[0196] The error prompt information is generated according to the drawing error data.

[0197] Optionally, the method further includes:

[0198] If the indication information indicates that there is a drawing error in the virtual object model, an error mark is displayed on the virtual object model, where the error mark is used to indicate a position where the drawing error exists in the virtual object model and a type of the drawing error.

[0199] Optionally, the method further includes:

[0200] In response to a second selection operation of the input error display control, determining a target error display control selected by the second selection operation;

[0201] The step of displaying an error mark on the virtual object model comprises:

[0202] An error mark is displayed on the virtual object model according to the error display type corresponding to the target error display control.

[0203] Optionally, the at least one constraint condition includes: a normal flip constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0204] Using the normal flip constraint condition, according to the vertex drawing order of each triangle in the virtual object model, determine the normal direction of each triangle;

[0205] If the normal directions of the triangles are inconsistent, the indication information indicates that the virtual object model has a problem of collision body penetration or display error.

[0206] Optionally, the at least one constraint condition includes: an overlapping constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0207] Using the overlap constraint condition, traverse two triangles in the virtual object model in sequence to determine whether any two sides of the two triangles intersect;

[0208] If there is an intersection, the indication information indicates that there is an overlapping problem with the virtual object models;

[0209] If there is no intersection, determining whether one of the two triangles is in the other triangle;

[0210] If so, the indication information indicates that there is an overlapping problem with the virtual object models.

[0211] Optionally, the at least one constraint condition includes: a same plane constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0212] Using the same plane constraint condition, determining triangles corresponding to each plane in the virtual object model;

[0213] Determine whether the dot product of the normals of the triangles in the same target plane is a preset threshold;

[0214] If it is not the preset threshold, the indication information indicates that the triangles in the target plane in the virtual object model are not in the same plane.

[0215] Optionally, the at least one constraint condition includes: a virtual object model and a collision body constraint condition; and the step of using the preset at least one constraint condition to detect the virtual object model to obtain a detection result includes:

[0216] Using the virtual object model and the collision body constraint condition, determine a first bounding box area of ​​a rendering model of the virtual object model and a second bounding box area of ​​a collision body model of the virtual object model;

[0217] Determine whether the ratio of the area of ​​the first bounding box to the area of ​​the second bounding box is within a preset range;

[0218] If not, the indication information indicates that there is an error in the size of the rendering model and the collision body model.

[0219] To sum up, in the process of drawing a virtual object model, constraint conditions are used to detect the virtual object model. When the indication information of the detection result indicates that the virtual object model has a drawing error, an error prompt information is generated according to the detection result to prompt the drawing error of the virtual object model. This can achieve timely discovery of errors in the virtual object model during the process of drawing the virtual object model, facilitate timely modification of the virtual object model, and improve the production efficiency of the virtual object model.

[0220] Optionally, the present invention also provides a program product, such as a computer-readable storage medium, comprising a program, which is used to execute the above method embodiment when executed by a processor.

[0221] For example, the method may include:

[0222] In the process of drawing the virtual object model, the virtual object model is detected using at least one preset constraint condition to obtain a detection result, wherein the detection result includes: indication information for indicating whether there is a drawing error in the virtual object model;

[0223] If the indication information indicates that there is a drawing error in the virtual object model, error prompt information is generated according to the detection result, where the error prompt information is used to indicate the drawing error in the virtual object model.

[0224] Optionally, in the process of drawing the virtual object model, the virtual object model is detected using at least one preset constraint condition, and before obtaining the detection result, the method further includes:

[0225] In response to a first selection operation of an input constraint control, a constraint condition corresponding to a target constraint control selected by the first selection operation is determined to be the at least one constraint condition.

[0226] Optionally, if the indication information indicates that there is a drawing error in the virtual object model, the detection result further includes: drawing error data; and the generating of error prompt information according to the detection result includes:

[0227] The error prompt information is generated according to the drawing error data.

[0228] Optionally, the method further includes:

[0229] If the indication information indicates that there is a drawing error in the virtual object model, an error mark is displayed on the virtual object model, where the error mark is used to indicate a position where the drawing error exists in the virtual object model and a type of the drawing error.

[0230] Optionally, the method further includes:

[0231] In response to a second selection operation of the input error display control, determining a target error display control selected by the second selection operation;

[0232] The step of displaying an error mark on the virtual object model comprises:

[0233] An error mark is displayed on the virtual object model according to the error display type corresponding to the target error display control.

[0234] Optionally, the at least one constraint condition includes: a normal flip constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0235] Using the normal flip constraint condition, according to the vertex drawing order of each triangle in the virtual object model, determine the normal direction of each triangle;

[0236] If the normal directions of the triangles are inconsistent, the indication information indicates that the virtual object model has a problem of collision body penetration or display error.

[0237] Optionally, the at least one constraint condition includes: an overlapping constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0238] Using the overlap constraint condition, traverse two triangles in the virtual object model in sequence to determine whether any two sides of the two triangles intersect;

[0239] If there is an intersection, the indication information indicates that there is an overlapping problem with the virtual object models;

[0240] If there is no intersection, determining whether one of the two triangles is in the other triangle;

[0241] If so, the indication information indicates that there is an overlapping problem with the virtual object models.

[0242] Optionally, the at least one constraint condition includes: a same plane constraint condition; and the detecting the virtual object model using the at least one preset constraint condition to obtain a detection result includes:

[0243] Using the same plane constraint condition, determining triangles corresponding to each plane in the virtual object model;

[0244] Determine whether the dot product of the normals of the triangles in the same target plane is a preset threshold;

[0245] If it is not the preset threshold, the indication information indicates that the triangles in the target plane in the virtual object model are not in the same plane.

[0246] Optionally, the at least one constraint condition includes: a virtual object model and a collision body constraint condition; and the step of using the preset at least one constraint condition to detect the virtual object model to obtain a detection result includes:

[0247] Using the virtual object model and the collision body constraint condition, determine a first bounding box area of ​​a rendering model of the virtual object model and a second bounding box area of ​​a collision body model of the virtual object model;

[0248] Determine whether the ratio of the area of ​​the first bounding box to the area of ​​the second bounding box is within a preset range;

[0249] If not, the indication information indicates that there is an error in the size of the rendering model and the collision body model.

[0250] To sum up, in the process of drawing a virtual object model, constraint conditions are used to detect the virtual object model. When the indication information of the detection result indicates that the virtual object model has a drawing error, an error prompt information is generated according to the detection result to prompt the drawing error of the virtual object model. This can achieve timely discovery of errors in the virtual object model during the process of drawing the virtual object model, facilitate timely modification of the virtual object model, and improve the production efficiency of the virtual object model.

[0251] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0252] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0253] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0254] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0255] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A model detection method, characterized in that: The method comprises: In the process of drawing the virtual object model, the virtual object model is detected using at least one preset constraint condition to obtain a detection result, wherein the detection result includes: indication information for indicating whether there is a drawing error in the virtual object model; If the indication information indicates that the virtual object model has a drawing error, generating error prompt information according to the detection result, wherein the error prompt information is used to indicate the drawing error of the virtual object model; The at least one constraint condition includes at least one of the following: a normal flip constraint condition, an overlap constraint condition, a same plane constraint condition, a virtual object model, and a collision body constraint condition; The at least one constraint condition includes: the normal flip constraint condition; the using of the preset at least one constraint condition to detect the virtual object model to obtain the detection result includes: Using the normal flip constraint condition, according to the vertex drawing order of each triangle in the virtual object model, determine the normal direction of each triangle; If the normal directions of the triangles are inconsistent, the indication information indicates that the virtual object model has a problem of collision body penetration or display error.

2. The method according to claim 1, characterized in that In the process of drawing the virtual object model, the virtual object model is detected using at least one preset constraint condition, and before obtaining the detection result, the method further includes: In response to a first selection operation of an input constraint control, a constraint condition corresponding to a target constraint control selected by the first selection operation is determined to be the at least one constraint condition.

3. The method according to claim 1, characterized in that If the indication information indicates that there is a drawing error in the virtual object model, the detection result further includes: drawing error data; and the generating of error prompt information according to the detection result includes: The error prompt information is generated according to the drawing error data.

4. The method according to claim 1, characterized in that The method further comprises: If the indication information indicates that there is a drawing error in the virtual object model, an error mark is displayed on the virtual object model, where the error mark is used to indicate a position where the drawing error exists in the virtual object model and a type of the drawing error.

5. The method according to claim 4, characterized in that The method further comprises: In response to a second selection operation of the input error display control, determining a target error display control selected by the second selection operation; The step of displaying an error mark on the virtual object model comprises: An error mark is displayed on the virtual object model according to the error display type corresponding to the target error display control.

6. The method according to claim 1, characterized in that The at least one constraint condition includes: the overlapping constraint condition; the using of the preset at least one constraint condition to detect the virtual object model to obtain the detection result includes: Using the overlap constraint condition, traverse two triangles in the virtual object model in sequence to determine whether any two sides of the two triangles intersect; If there is an intersection, the indication information indicates that there is an overlapping problem with the virtual object models; If there is no intersection, determining whether one of the two triangles is in the other triangle; If so, the indication information indicates that there is an overlapping problem with the virtual object models.

7. The method according to claim 1, characterized in that The at least one constraint condition includes: the same plane constraint condition; the detecting of the virtual object model using the at least one preset constraint condition to obtain the detection result includes: Using the same plane constraint condition, determining triangles corresponding to each plane in the virtual object model; Determine whether the dot product of the normals of the triangles in the same target plane is a preset threshold; If it is not the preset threshold, the indication information indicates that the triangles in the target plane in the virtual object model are not in the same plane.

8. The method according to claim 1, characterized in that The at least one constraint condition includes: the virtual object model and the collision body constraint condition; the using of the preset at least one constraint condition to detect the virtual object model to obtain the detection result includes: Using the virtual object model and the collision body constraint condition, determine a first bounding box area of ​​a rendering model of the virtual object model and a second bounding box area of ​​a collision body model of the virtual object model; Determine whether the ratio of the area of ​​the first bounding box to the area of ​​the second bounding box is within a preset range; If not, the indication information indicates that there is an error in the size of the rendering model and the collision body model.

9. A model detection device, characterized in that: The device comprises: A detection module, used to detect the virtual object model using at least one preset constraint condition during the process of drawing the virtual object model, and obtain a detection result, wherein the detection result includes: indication information for indicating whether there is a drawing error in the virtual object model; a generating module, configured to generate error prompt information according to the detection result if the indication information indicates that the virtual object model has a drawing error, wherein the error prompt information is used to indicate the drawing error of the virtual object model; The at least one constraint condition includes at least one of the following: a normal flip constraint condition, an overlap constraint condition, a same plane constraint condition, a virtual object model, and a collision body constraint condition; The at least one constraint condition includes: the normal flip constraint condition; the detection module is also used to use the normal flip constraint condition to determine the normal direction of each triangle in the virtual object model according to the vertex drawing order of each triangle; if the normal directions of the triangles are inconsistent, the indication information indicates that the virtual object model has a problem of collision body penetration or display error.

10. A terminal device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the method described in any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is read and executed, the method described in any one of claims 1 to 8 is implemented.