Import prompting method and device of virtual model, computer device and medium

By calculating the weighted sum of the mesh triangles, materials, and node count of the virtual model, the import cost is estimated and displayed, thus solving the problem of computer device crashes or freezes caused by importing virtual models and improving the user experience.

CN115937463BActive Publication Date: 2026-11-27UBTECH ROBOTICS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211737207.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-11-27
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

Importing a virtual model without the user's knowledge of its specific content may cause the computer device software to crash or freeze, especially when the model's resource requirements exceed the device's performance limits.

Method used

By calculating the weighted sum of the number of mesh triangles, materials, and nodes in the virtual model with preset weights, the import cost is estimated, and the estimated value is displayed before import, allowing users to determine whether the device can perform the import operation normally.

Benefits of technology

It avoids computer equipment crashes or freezes caused by unknown resource requirements, improves the user experience, and allows users to decide whether to perform the import operation by indicating the import cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937463B_ABST
    Figure CN115937463B_ABST
Patent Text Reader

Abstract

The application discloses a virtual model import prompting method and device in the field of data processing, computer equipment and medium, and relates to the technical field of virtual model import prompting. The method comprises the following steps: when a first virtual model is received, the number of mesh triangles, the number of materials and the number of nodes of the first virtual model are determined; the weighted sum of the number of mesh triangles, the number of materials and the number of nodes and the corresponding preset weight is calculated to obtain the import cost estimation value of the first virtual model; and the import cost estimation value of the first virtual model is displayed in response to a virtual model import command. Based on the method, the user can be prompted by the import cost estimation value displayed by the computer equipment before the virtual model is imported, and thus knows the computer resources required for the virtual model import, so that the phenomenon that the software running on the computer equipment crashes or the computer freezes after the user blindly performs the import / open operation is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and in particular to a method, apparatus, computer device, and medium for importing virtual models. Background Technology

[0002] In the process of modeling virtual scenes, it is often necessary to import virtual models, such as opening virtual models shared by others on the local machine.

[0003] However, if the user is unaware of the specific content of the virtual model shared by others, the software may crash or even freeze because the virtual model contains too much content and requires a lot of resources to import. This may be caused by the user's poor performance or inability to meet the required resources. Summary of the Invention

[0004] In view of this, the present invention provides a method, apparatus, computer device and medium for prompting the import of virtual models, in order to improve the current situation where software crashes or freezes may occur when a user controls a computer device to import a virtual model without knowing the specific content of the virtual model shared by others.

[0005] In a first aspect, embodiments of the present invention provide a method for importing a virtual model, applied to a computer device, the method comprising:

[0006] When the first virtual model is received, the number of mesh triangles, the number of materials, and the number of nodes of the first virtual model are determined. The first virtual model is composed of a corresponding tree structure, and the tree structure includes multiple nodes.

[0007] The weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their respective preset weights is calculated to obtain the import cost estimate of the first virtual model.

[0008] In response to the virtual model import command, the estimated import cost of the first virtual model is displayed.

[0009] Optionally, in one feasible embodiment of the present invention, when the first virtual model is received, determining the number of mesh triangles, the number of materials, and the number of nodes of the first virtual model includes:

[0010] Upon receiving the first virtual model, determine the tree structure corresponding to the first virtual model;

[0011] Determine the number of mesh triangles and the amount of material for each node in the tree structure;

[0012] The number of mesh triangles in each node is summed to obtain the number of mesh triangles in the first virtual model;

[0013] The number of materials for each node is summed to obtain the number of materials for the first virtual model.

[0014] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0015] Determine the import cost estimate for the imported second virtual model;

[0016] In response to the editing operation corresponding to the second virtual model, the editing target and editing method corresponding to the editing operation are determined, wherein the editing target includes one or more of mesh triangles, materials and nodes, and the editing method includes adding or deleting.

[0017] Based on the editing target, the editing method, and the preset weight corresponding to the editing target, the import cost change value is obtained;

[0018] The import cost estimate of the second virtual model is updated using the import cost change value.

[0019] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0020] Based on the preset performance estimates of different types of devices and the import cost estimate of the first virtual model, the compatible device type of the first virtual model is determined;

[0021] Determine the matching result between the device type of the first virtual model and the device type of the computer device;

[0022] The step of displaying the import cost estimate of the first virtual model in response to the virtual model import command includes:

[0023] In response to the virtual model import command, the matching results and the import cost estimate of the first virtual model are displayed.

[0024] Optionally, in one feasible embodiment of the present invention, it further includes:

[0025] Displays the performance estimate of the computer device.

[0026] Optionally, in one feasible embodiment of the present invention, the quantity of materials includes a quantity of transparent materials and a quantity of opaque materials;

[0027] The step of calculating the weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their respective preset weights to obtain the import cost estimate of the first virtual model includes:

[0028] The import cost estimate of the first virtual model is obtained by calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, and the number of nodes with their respective preset weights.

[0029] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0030] Determine the number of animations for the first virtual model;

[0031] The step of calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, and the number of nodes with their respective preset weights to obtain the import cost estimate of the first virtual model includes:

[0032] The import cost estimate of the first virtual model is obtained by calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, the number of nodes, and the number of animations, respectively, with their corresponding preset weights.

[0033] Secondly, embodiments of the present invention provide an import prompting device for a virtual model, comprising:

[0034] The determination module is used to determine the number of mesh triangles, the number of materials, and the number of nodes of the first virtual model when the first virtual model is received, wherein the first virtual model is composed based on a corresponding tree structure, and the tree structure includes multiple nodes;

[0035] The calculation module is used to calculate the weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their respective preset weights, so as to obtain the import cost estimate of the first virtual model.

[0036] The response module is used to display the import cost estimate of the first virtual model in response to the virtual model import command.

[0037] Thirdly, embodiments of the present invention provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the computer program executes the virtual model import prompting method as described in the first aspect when running on the processor.

[0038] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when run on a processor, executes the virtual model import prompting method as described in the first aspect.

[0039] In the virtual model import prompting method provided by this invention, when the computer device receives the first virtual model, it first determines the content that the first virtual model needs to render / load during import, namely the number of mesh triangles, the number of materials, and the number of nodes in the first virtual model. Next, it calculates the weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their corresponding preset weights to obtain an estimated import cost value for the first virtual model, thereby estimating the resources required to import the first virtual model. Finally, when the user needs to view the virtual model and triggers the virtual model import command, the estimated import cost value of the first virtual model is displayed. Based on this, this invention, by performing import cost estimation when acquiring the virtual model, allows the user to be prompted by the estimated import cost value displayed by the computer device before the virtual model is imported, thus knowing the computer resources required for importing the virtual model. Therefore, the user can independently determine whether the computer device can normally execute the virtual model import operation. This also avoids the phenomenon of software crashes or computer freezes caused by the user blindly performing import / open operations due to a lack of knowledge of the computer resources required for virtual model import, thereby improving the user experience. Attached Figure Description

[0040] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope of protection of the present invention. In the various drawings, similar components are numbered similarly.

[0041] Figure 1 A flowchart illustrating the first virtual model import prompt method provided in an embodiment of the present invention is shown;

[0042] Figure 2 A flowchart illustrating the second virtual model import prompt method provided in an embodiment of the present invention is shown;

[0043] Figure 3 A flowchart illustrating the third virtual model import prompt method provided in an embodiment of the present invention is shown.

[0044] Figure 4 A schematic diagram of the structure of the virtual model import prompt device provided in an embodiment of the present invention is shown. Detailed Implementation

[0045] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0046] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0047] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of the invention, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0048] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0049] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.

[0050] Example 1

[0051] Reference Figure 1 This diagram illustrates a flowchart of a first method for importing virtual models according to an embodiment of the present invention. The method is applied to a computer device and includes:

[0052] Step S110: When the first virtual model is received, determine the number of mesh triangles, the number of materials, and the number of nodes of the first virtual model, wherein the first virtual model is composed of a corresponding tree structure, and the tree structure includes multiple nodes.

[0053] That is, after receiving the virtual model / virtual scene model, the computer device in this embodiment of the invention will confirm the mesh triangles, materials and tree structure in the virtual model, thereby obtaining the number of mesh triangles, materials and nodes of the virtual model.

[0054] It should be understood that during the import of a virtual model, computer equipment needs to call up corresponding computer resources to load and / or render the various mesh triangles, materials, and nodes of the virtual model. In other words, the larger the number of mesh triangles, materials, and nodes, the more resources the computer equipment needs to call up to import the virtual model, and the higher the performance requirements of the computer equipment.

[0055] It should also be understood that the virtual model in the embodiments of the present invention refers to a set of meshes composed of triangles, and the triangles include position, texture coordinates and other attributes.

[0056] Furthermore, in the process of virtual model shading / rendering, that is, in the process of surface mapping of virtual models, the images used are called materials.

[0057] Furthermore, a virtual model is actually a tree diagram / tree structure that is connected by multiple nodes. Each node in the tree structure corresponds to its unique art resources (including materials), behavioral logic and related data. Any node can be regarded as part of the virtual model.

[0058] Furthermore, it is conceivable that the first virtual model in the embodiments of the present invention refers to a virtual model that has been received by the user's computer device, but the computer device has not yet performed an open / import operation.

[0059] Step S120: Calculate the weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their respective preset weights to obtain the import cost estimate of the first virtual model.

[0060] It is understandable that computer devices require different resources when loading / rendering different component data. For example, materials require more computer resources than mesh triangles.

[0061] Therefore, in this embodiment of the invention, corresponding weights are preset for the number of mesh triangles, the number of materials, and the number of nodes. Then, the computer device estimates the resources required for importing the virtual model, i.e., the import cost estimate, based on the weighted sum of the number of mesh triangles, the number of materials, and the number of nodes and their corresponding preset weights.

[0062] As an example, in one feasible embodiment of the present invention, the calculation method for the import cost estimate is shown in the following formula:

[0063] Cost=w1*MaterialCount+w2*subMeshCount+w3*triangleCount

[0064] In the formula, Cost represents the estimated import cost, MaterialCount represents the number of materials, subMeshCount represents the number of nodes, triangleCount represents the number of mesh triangles, and w1, w2, and w3 represent the preset weights corresponding to the number of materials, the number of nodes, and the number of mesh triangles, respectively.

[0065] It is understood that the values ​​of w1, w2 and w3 can be set according to the actual situation. For example, in one feasible method provided by the embodiment of the present invention, the values ​​of w1, w2 and w3 are 250, 10 and 0.005 respectively.

[0066] It is also understandable that materials can be divided into transparent materials and opaque materials. Transparent materials include glass images or other images with transparent properties, while opaque materials include various dark and opaque images. It is easy to understand that opaque materials require more resources to load / render than transparent materials. Therefore, to ensure that the import cost estimate more accurately describes the resources required by the virtual model during import, in one feasible embodiment of this invention, the number of materials includes both transparent and opaque materials.

[0067] Therefore, in this feasible method, step S120 specifically includes:

[0068] The import cost estimate of the first virtual model is obtained by calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, and the number of nodes with their respective preset weights.

[0069] Under this feasible approach, the aforementioned import cost estimate can be expressed as:

[0070] Cost=MCost+w2*subMeshCount+w3*triangleCount

[0071] MCost=w 11 *opaqueMaterialCount+w 12 *transparentMaterialCount

[0072] In the formula, opaqueMaterialCount represents the number of opaque materials, and w 11 This indicates the preset weight corresponding to the number of opaque materials, while transparentMaterialCount indicates the number of transparent materials. 12 This indicates the preset weight corresponding to the number of transparent materials.

[0073] It is not difficult to understand that w 11 and w 12 The values ​​of w can be set according to the actual situation. For example, in one feasible method provided by the embodiment of the present invention, w 11 and w 12 The values ​​are 200 and 300 respectively.

[0074] Furthermore, it is understandable that virtual models typically possess dynamic characteristics, which require animation to achieve. In other words, the process of loading a virtual model includes the loading of animation. Therefore, to further ensure that the aforementioned import cost estimate accurately describes the resources required for loading the virtual model, in one feasible embodiment of the present invention, the method further includes:

[0075] Determine the number of animations for the first virtual model;

[0076] Furthermore, the step of calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, and the number of nodes with their corresponding preset weights to obtain the import cost estimate of the first virtual model, specifically includes the following in this feasible method:

[0077] The import cost estimate of the first virtual model is obtained by calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, the number of nodes, and the number of animations, respectively, with their corresponding preset weights.

[0078] That is, in this embodiment of the invention, the number of animations in the virtual model is also used to calculate its corresponding import cost estimate, thereby further ensuring the validity of the import cost estimate. It is not difficult to imagine that the formula for calculating the import cost estimate under this feasible method can be expressed as:

[0079] Cost=MCost+w2*subMeshCount+w3*triangleCount+w4*animationCount

[0080] In the formula, animationCount represents the number of animations, and w4 represents the preset weight corresponding to the number of animations.

[0081] It is understood that, similar to w1 to w3 mentioned above, the value of w4 can also be set according to the actual situation. For example, in one feasible method provided in the embodiment of the present invention, the value of w4 is 100.

[0082] Step S130: In response to the virtual model import command, display the import cost estimate of the first virtual model.

[0083] In other words, after the computer device calculates the estimated import cost of each virtual model, if it receives a virtual model import command triggered by the user's desire to open / import a virtual model, the computer device will display the estimated import cost of the virtual model to inform the user of the resource consumption required to open / import this virtual model. This allows the user to determine whether the computer device can complete the import of the virtual model normally based on the displayed estimated import cost.

[0084] Understandably, since importing virtual models takes time, users can choose to end or continue the import process once they have determined whether their computer can run the virtual model properly.

[0085] Optionally, in one feasible embodiment of the present invention, when the computer device receives the virtual model import command, it does not immediately begin the virtual model import operation; instead, while displaying the import cost estimate, the computer device simultaneously displays two virtual buttons, "OK" and "Cancel". Then, after viewing the import cost estimate displayed by the computer device, if the user clicks "OK", the computer device will execute the import normally; if the user clicks "Cancel", the computer device will cancel the import of the virtual model.

[0086] Based on this, the embodiments of the present invention estimate the import cost when the virtual model is acquired, so that before the virtual model is imported, the user can be prompted by the estimated import cost value displayed by the computer device, and thus know the computer resources required to import the virtual model. Therefore, the user can judge whether the computer device can normally perform the import operation of the virtual model. Thus, it avoids the phenomenon that the software running on the computer device will crash or the computer will freeze after the user blindly performs the import / open operation because he / she does not know the computer resources required to import the virtual model, thereby improving the user experience.

[0087] Optionally, in one feasible embodiment of the present invention, please refer to the following: Figure 2 The diagram illustrates a second feasible method provided by an embodiment of the present invention. In this feasible method, step S110 specifically includes:

[0088] S111, when the first virtual model is received, the tree structure corresponding to the first virtual model is determined;

[0089] S112, determine each node in the tree structure and the number of mesh triangles and material of each node in the tree structure;

[0090] S113, sum the number of mesh triangles of each node to obtain the number of mesh triangles of the first virtual model;

[0091] S114, the material quantity of each node is summed to obtain the material quantity of the first virtual model.

[0092] In other words, in this feasible manner, the computer device in this embodiment of the invention will parse and determine the tree structure corresponding to the virtual model, and then traverse the resource usage of each node in the tree structure, that is, determine the number of mesh triangles and the amount of material used by each sub-model of the virtual model.

[0093] Furthermore, after the computer equipment determines the number of mesh triangles and materials used in each sub-model, the number of mesh triangles and materials of each sub-model / node are accumulated to obtain the number of mesh triangles and materials of the entire virtual model. That is, the total number of mesh triangles of each node is calculated to obtain the number of mesh triangles of the virtual model, and then the total number of materials of each node is calculated to obtain the number of materials of the virtual model.

[0094] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0095] Determine the import cost estimate for the imported second virtual model;

[0096] In response to the editing operation corresponding to the second virtual model, the editing target and editing method corresponding to the editing operation are determined, wherein the editing target includes one or more of mesh triangles, materials and nodes, and the editing method includes adding or deleting.

[0097] Based on the editing target, the editing method, and the preset weight corresponding to the editing target, the import cost change value is obtained;

[0098] The import cost estimate of the second virtual model is updated using the import cost change value.

[0099] In other words, after the user is aware of the estimated import cost of the virtual model and controls the computer device to perform the import operation of the virtual model normally, this embodiment of the invention will update the estimated import cost of the virtual model based on the user's editing operations on the imported virtual model. Specifically, when the user adds or deletes one or more of the mesh triangles, materials, and nodes, the computer device calculates the corresponding import cost change value based on the added or deleted content.

[0100] As an example, when a user controls a computer device to import a virtual model, and then deletes the material of a mesh triangle surface within that virtual model, the computer device determines that the user has deleted a material from the virtual model. Therefore, the calculation process for the import cost change at the current moment is as follows:

[0101] changeCost=changeMaterialCount*w1=-1*w1

[0102] In the formula, changeCost represents the import cost change value, changeMaterialCount represents the number of edit targets, and w1 represents the preset weight corresponding to the number of materials.

[0103] Therefore, after the user completes the editing operation, the import cost estimate will be updated to the sum of the import cost change and the import cost estimate before the editing operation.

[0104] Furthermore, it is easy to understand that in this feasible approach, the computer equipment needs to continuously monitor changes in the virtual model in order to update the import cost estimate in real time.

[0105] Optionally, in one feasible embodiment of the present invention, please refer to the following: Figure 3 The diagram illustrates a flowchart of a third virtual model import prompting method provided by an embodiment of the present invention. This feasible method further includes:

[0106] S140, based on the preset performance estimates of different types of devices and the import cost estimate of each virtual model, determine the compatible device type for each virtual model;

[0107] S150, determine the matching result between the device type of the first virtual model and the device type of the computer device.

[0108] Therefore, step S130 above includes:

[0109] S131, in response to the virtual model import command, the matching result and the import cost estimate of the first virtual model are displayed.

[0110] That is, the computer device in this embodiment of the invention also pre-stores performance estimates for various types of devices. These performance estimates can be understood as the maximum number of resource calls for the corresponding type of device, or as the performance of the corresponding type of device. In one feasible approach, the types of devices stored in the computer device include: low-end / mid-range machines, mid-to-high-end machines, and flagship machines. Specifically, the performance estimate for low-end / mid-range machines is 100,000, the performance estimate for mid-to-high-end machines is 200,000, and the performance estimate for flagship machines is above 200,000.

[0111] Understandably, the higher the performance estimate, the more content the computer device can open / import into the virtual model, and the better it can satisfy the import of virtual models with higher import cost estimates.

[0112] Furthermore, in this embodiment of the invention, the computer device will also determine the type of computer device that can import the first virtual model normally and / or smoothly, i.e., the compatible device type, based on the pre-stored performance estimates of various types of devices and the import cost estimate of the obtained virtual model (i.e., the first virtual model).

[0113] Furthermore, after the computer device determines the compatible device type of the first virtual model, it will determine whether it is also a compatible device type, and thus obtain the corresponding matching result. Understandably, if the computer device is a compatible device type, it can import the first virtual model normally and / or smoothly; however, if the computer device is not a compatible device type, it will have difficulty importing or will be unable to import the first virtual model.

[0114] Therefore, in addition to displaying the estimated import cost, this embodiment of the invention will also simultaneously display the matching result of the computer device and the first virtual model's compatible device type, so that the user can clearly know whether the computer device can successfully import the first virtual model.

[0115] Optionally, to enable users to more clearly determine the performance of computer devices, in one feasible embodiment of the present invention, the method further includes:

[0116] Displays the performance estimate of the computer device.

[0117] In other words, under this feasible method, the computer device in this embodiment of the invention will simultaneously display the performance estimate of the computer device, the performance estimate of the first virtual model, and the aforementioned matching result. This allows the user to clearly understand the performance of the computer device and the performance of the computer device required to import the first virtual model, and to determine whether the computer device can successfully import the first virtual model.

[0118] Furthermore, in one feasible embodiment of the present invention, the computer device is also configured to respond to a user-triggered device type lookup command to display performance estimates for each type of device. This allows the user to understand the performance of different types of devices and thus determine the virtual models that can be imported for each type of device.

[0119] Example 2

[0120] Corresponding to the virtual model import prompting method provided in Embodiment 1 of the present invention, Embodiment 2 of the present invention also provides a virtual model import prompting device, referring to... Figure 4 The diagram illustrates the structure of an import prompting device for virtual models provided in an embodiment of the present invention. The virtual model import prompting device 200 provided in this embodiment of the present invention is applied to a computer device, and the device includes:

[0121] The determining module 210 is used to determine the number of mesh triangles, the number of materials, and the number of nodes of the first virtual model when the first virtual model is received, wherein the first virtual model is composed based on a corresponding tree structure, and the tree structure includes multiple nodes;

[0122] The calculation module 220 is used to calculate the weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their respective preset weights, so as to obtain the import cost estimate of the first virtual model.

[0123] The response module 230 is used to display the import cost estimate of the first virtual model in response to the virtual model import command.

[0124] Optionally, in one feasible embodiment of the present invention, the determining module includes:

[0125] The structure determination submodule is used to determine the tree structure corresponding to the first virtual model when the first virtual model is received;

[0126] The quantity determination submodule is used to determine the number of mesh triangles and the amount of material for each node in the tree structure.

[0127] The first accumulation calculation submodule is used to accumulate the number of mesh triangles of each node to obtain the number of mesh triangles of the first virtual model;

[0128] The second accumulation calculation submodule is used to accumulate the material quantity of each node to obtain the material quantity of the first virtual model.

[0129] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0130] The estimation value determination module is used to determine the import cost estimate of the imported second virtual model;

[0131] An editing response module is used to respond to an editing operation corresponding to the second virtual model, and determine the editing target and editing method corresponding to the editing operation, wherein the editing target includes one or more of mesh triangles, materials and nodes, and the editing method includes adding or deleting.

[0132] The variable value calculation module is used to obtain the import cost variable value based on the editing target, the editing method, and the preset weight corresponding to the editing target;

[0133] An update module is used to update the import cost estimate of the second virtual model using the import cost change value.

[0134] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0135] The adaptation determination module is used to determine the compatible device type of the first virtual model based on the preset performance estimates of different types of devices and the import cost estimate of the first virtual model.

[0136] The first display module is used to determine the matching result between the device type of the first virtual model and the device type of the computer device;

[0137] The response module is also used to display the matching result and the estimated import cost of the first virtual model in response to the virtual model import command.

[0138] Optionally, in one feasible embodiment of the present invention, it further includes:

[0139] The second display module is used to display the performance estimate of the computer device.

[0140] Optionally, in one feasible embodiment of the present invention, the quantity of materials includes a quantity of transparent materials and a quantity of opaque materials;

[0141] The calculation module is also used to calculate the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, and the number of nodes with their respective preset weights, to obtain the import cost estimate of the first virtual model.

[0142] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0143] Animation Quantity Determination Module, used to determine the number of animations for the first virtual model.

[0144] Furthermore, the calculation module is also used to calculate the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, the number of nodes, and the number of animations with their respective preset weights, so as to obtain the import cost estimate of the first virtual model.

[0145] The virtual model import prompting device 200 provided in this application embodiment can implement each process of the virtual model import prompting method corresponding to Embodiment 1, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0146] This invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the computer program executes the virtual model import prompting method as described in Embodiment 1 when it runs on the processor.

[0147] This invention also provides a computer-readable storage medium storing a computer program, which, when run on a processor, executes the virtual model import prompting method as described in Embodiment 1.

[0148] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0149] In addition, the functional modules or units in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0150] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0151] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for prompting the import of a virtual model, characterized in that, Applied to a computer device, the method includes: When the first virtual model is received, the number of mesh triangles, the number of materials, and the number of nodes of the first virtual model are determined. The first virtual model is composed of a corresponding tree structure, and the tree structure includes multiple nodes. The weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their respective preset weights is calculated to obtain the import cost estimate of the first virtual model. Based on the preset performance estimates of different types of devices and the import cost estimate of the first virtual model, the compatible device type of the first virtual model is determined; wherein, the performance estimate is the maximum number of resource calls for the corresponding type of device; Determine the matching result between the device type of the first virtual model and the device type of the computer device; In response to the virtual model import command, the matching results and the import cost estimate of the first virtual model are displayed.

2. The method for importing virtual models according to claim 1, characterized in that, When the first virtual model is received, determining the number of mesh triangles, the number of materials, and the number of nodes in the first virtual model includes: Upon receiving the first virtual model, determine the tree structure corresponding to the first virtual model; Determine the number of nodes in the tree structure and the number of mesh triangles and materials for each node in the tree structure; The number of mesh triangles in each node is summed to obtain the number of mesh triangles in the first virtual model; The number of materials in each node is summed to obtain the number of materials in the first virtual model.

3. The method for importing virtual models according to claim 1, characterized in that, Also includes: Determine the import cost estimate for the imported second virtual model; In response to the editing operation corresponding to the second virtual model, the editing target and editing method corresponding to the editing operation are determined, wherein the editing target includes one or more of mesh triangles, materials and nodes, and the editing method includes adding or deleting. Based on the editing target, the editing method, and the preset weight corresponding to the editing target, the import cost change value is obtained; The import cost estimate of the second virtual model is updated using the import cost change value.

4. The method for importing virtual models according to claim 1, characterized in that, Also includes; Displays the performance estimate of the computer device.

5. The method for importing virtual models according to claim 1, characterized in that, The quantity of materials includes the quantity of transparent materials and the quantity of opaque materials; The step of calculating the weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their respective preset weights to obtain the import cost estimate of the first virtual model includes: The import cost estimate of the first virtual model is obtained by calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, and the number of nodes with their respective preset weights.

6. The virtual model import prompt method according to claim 5, characterized in that, Also includes: Determine the number of animations for the first virtual model; The step of calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, and the number of nodes with their respective preset weights to obtain the import cost estimate of the first virtual model includes: The import cost estimate of the first virtual model is obtained by calculating the weighted sum of the number of mesh triangles, the number of transparent materials, the number of opaque materials, the number of nodes, and the number of animations, respectively, with their corresponding preset weights.

7. An import prompt device for a virtual model, characterized in that, include: The determination module is used to determine the number of mesh triangles, the number of materials, and the number of nodes of the first virtual model when the first virtual model is received, wherein the first virtual model is composed based on a corresponding tree structure, and the tree structure includes multiple nodes; The calculation module is used to calculate the weighted sum of the number of mesh triangles, the number of materials, and the number of nodes with their respective preset weights, so as to obtain the import cost estimate of the first virtual model. The determination module is used to determine the compatible device type of the first virtual model based on the preset performance estimates of different types of devices and the import cost estimate of the first virtual model; wherein the performance estimate is the maximum number of resource calls for the corresponding type of device; and to determine the matching result between the compatible device type of the first virtual model and the device type of the computer device. A response module is used to display the matching result and the estimated import cost of the first virtual model in response to a virtual model import command.

8. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when run on the processor, executes the virtual model import prompting method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed on a processor, performs the virtual model import prompting method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • 3D model loading method, server, storage medium and processor

    CN111210505A

  • Model data processing method, apparatus and device, and readable storage medium

    CN112419463A