Art resource processing methods and devices, electronic devices, and storage media
By automating mesh model classification and export methods, the problem of low efficiency in exporting art resources in DCC software is solved, achieving efficient and accurate mesh model rendering and space management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, art resources need to be manually categorized and organized when exported from DCC software, resulting in a large workload, low efficiency, and a high risk of errors. In particular, different types of mesh models are difficult to render realistically in the engine.
By acquiring vertex data from the mesh model, the mesh groups are automatically divided based on vertex feature information and exported in the corresponding format, such as alembic or fbx format, thus achieving automatic classification and export and reducing manual intervention.
It improves the efficiency of exporting art assets, reduces the chance of errors, and enables the correct rendering of different types of mesh models in the engine, while controlling the project's space usage.
Smart Images

Figure CN114218157B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to an art resource processing method and device, an electronic device, and a storage medium. BACKGROUND
[0002] A work involving a virtual scene (such as a game) can be divided into two parts: resources and an engine. The resources include art resources and sound resources, etc. The engine is a set of codes (instructions) designed for a machine running a work involving a virtual scene, which can be recognized by the machine, and which realizes the sequential calling of related resources according to the requirements of the work design.
[0003] The art resources are generally made by using DCC (Digital Content Creation) software, and then the completed art resources are exported from the DCC software and imported into the engine to complete the assembly of the art resources, until the final rendering of the picture.
[0004] The art resources made by the DCC software generally include many different mesh types, such as a mountain in a static state, a character body similar to human skeleton movement, hair on the character body, flowing water, and flowing cloth on the character body, etc. For these different types of meshes, when exported by the DCC software, the staff needs to manually classify and arrange according to different mesh types, and then export them respectively, which has the problems of large workload, low efficiency, high error rate, etc. SUMMARY
[0005] In view of the above problems, the present application is proposed to provide an art resource processing method and device, an electronic device, and a storage medium, which overcome the above problems or at least partially solve the above problems, comprising:
[0006] An art resource processing method, the method comprising:
[0007] Obtaining mesh resources, the mesh resources comprising a plurality of mesh models;
[0008] Determining a plurality of mesh groups corresponding to each of the mesh models based on vertex data of each of the mesh models;
[0009] Dividing each of the mesh models into a corresponding mesh group according to the determined mesh groups;
[0010] Exporting the mesh models in each of the mesh groups according to an export format required by the corresponding mesh group.
[0011] Optionally, the method further comprises:
[0012] Import the export file corresponding to the mesh model into an engine, and render the art resources corresponding to the export file by the engine.
[0013] Optionally, the determination of the mesh groups corresponding to the mesh models respectively based on the vertex data of each mesh model comprises:
[0014] For each mesh model, the vertex data of the mesh model is obtained by traversing the vertices of the mesh model.
[0015] The mesh group corresponding to the mesh model is determined according to the vertex data of the mesh model and the classification rules of the mesh groups.
[0016] Optionally, the vertex data of the mesh model comprises feature information of each vertex of the mesh model, and the determination of the mesh group corresponding to the mesh model according to the vertex data of the mesh model and the classification rules of the mesh groups comprises:
[0017] When any vertex of the mesh model has animation data, the vertex with the animation data is not driven by a skin bone, and the distance between the vertex with the animation data and its adjacent vertex changes, it is determined that the mesh model corresponds to a first mesh group.
[0018] Otherwise, it is determined that the mesh model corresponds to a second mesh group.
[0019] Optionally, the exporting of the mesh models in each mesh group in a format required by the corresponding mesh group comprises:
[0020] The mesh models in the first mesh group are exported into an alembic format file.
[0021] The mesh models in the second mesh group are exported into an fbx format file.
[0022] Optionally, the exporting of the mesh models in the first mesh group into an alembic format file further comprises:
[0023] The material information corresponding to the mesh models in the first mesh group is obtained.
[0024] The material information is associated with the alembic format file of the corresponding mesh model.
[0025] Optionally, the importing of the export file corresponding to the mesh model into an engine further comprises:
[0026] When the alembic format file is imported into the engine, the engine searches for target material information corresponding to the material information associated with the alembic format file, so that the engine renders the mesh model corresponding to the alembic format file according to the target material information.
[0027] An art resource processing device, the device comprising:
[0028] A mesh model acquisition module is used to acquire mesh resources, which include multiple mesh models.
[0029] The mesh group determination module is used to determine the mesh group corresponding to each of the multiple mesh models based on the vertex data of each mesh model.
[0030] The mesh model classification module is used to classify each mesh model into a corresponding mesh group based on the determined mesh group;
[0031] The mesh model export module is used to export the mesh models in each mesh group according to the export format required by the corresponding mesh group.
[0032] Optionally, the device further includes:
[0033] The art resource rendering module is used to import the exported file corresponding to the mesh model into the engine, and the engine renders the art resources corresponding to the exported file.
[0034] Optionally, the grid group determination module includes:
[0035] The vertex traversal module is used to traverse the vertices of the mesh model for each mesh model and obtain the vertex data of the mesh model;
[0036] The vertex data-based mesh group determination module is used to determine the mesh group corresponding to the mesh model based on the vertex data of the mesh model and the classification rules of each mesh group.
[0037] Optionally, the vertex data of the mesh model includes the feature information of each vertex of the mesh model. The module for determining the mesh group based on the vertex data is specifically used to determine that the mesh model corresponds to the first mesh group when any vertex of the mesh model has animation data, and the vertex with animation data is not driven by the skinned skeleton, and the distance between the vertex with animation data and its adjacent vertices changes; otherwise, it determines that the mesh model corresponds to the second mesh group.
[0038] Optionally, the mesh model export module includes:
[0039] The first export module is used to export the mesh model in the first mesh group into an alembic format file;
[0040] The second export module is used to export the mesh model in the second mesh group as an fbx format file.
[0041] Optionally, the first export module further includes:
[0042] The material information acquisition module is used to acquire the material information corresponding to the mesh model in the first mesh group;
[0043] The material information association module is used to associate the material information with the alembic format file exported from the corresponding mesh model.
[0044] Optionally, the art resource rendering module further includes:
[0045] The material lookup module is used to search for target material information corresponding to the material information associated with the alembic format file within the engine after the alembic format file is imported into the engine, so that the engine can render the mesh model corresponding to the alembic format file according to the target material information.
[0046] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the art resource processing method as described above.
[0047] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the art resource processing method described above.
[0048] This application has the following advantages:
[0049] In the embodiments of this application, by acquiring mesh resources created by DCC software, the mesh resources include multiple mesh models; based on the vertex data of each mesh model, the mesh groups corresponding to each of the multiple mesh models are determined; according to the determined mesh groups, each mesh model is divided into the corresponding mesh group; the mesh models in each mesh group are exported according to the export format required by the corresponding mesh group; thereby realizing the automatic classification of mesh models of art resources, and exporting different types of mesh models according to their respective format requirements, which can improve the efficiency of DCC software in exporting art resources, and at the same time reduce the probability of errors. Attached Figure Description
[0050] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a flowchart illustrating the steps of an art resource processing method according to an embodiment of this application;
[0052] Figure 2 This is a flowchart illustrating the steps of determining the mesh group corresponding to the mesh model in an art resource processing method according to an embodiment of this application.
[0053] Figure 3 This is a flowchart illustrating the steps of another art resource processing method according to an embodiment of this application;
[0054] Figure 4 This is a schematic diagram illustrating an application scenario of an art resource processing method according to an embodiment of this application;
[0055] Figure 5 This is a structural block diagram of an art resource processing device according to an embodiment of this application;
[0056] Figure 6 This is a block diagram showing the result of another art resource processing device according to an embodiment of this application. Detailed Implementation
[0057] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0058] Art assets created with DCC software typically contain many different types of meshes, such as static mountains, character bodies in motion resembling human skeletons, character hair, flowing water, and flowing cloth on characters. When exporting these different types of meshes from DCC, if all are exported in FBX format, special effects meshes like character hair, flowing water, and flowing cloth are difficult to apply in the engine, resulting in an inability to render realistic art effects. If all are exported in Alembic format, although it can be used in current mainstream engines, the large file size of Alembic files significantly increases the overall project's space requirements and operational efficiency if used on a large scale.
[0059] Therefore, in related technologies, when exporting from DCC software, staff need to manually categorize and organize the meshes according to different mesh types before exporting them separately. For example, meshes of static mountains or human skeleton-like character bodies are exported in FBX format; meshes of special effects such as hair on a character, flowing water, or flowing cloth on a character are exported in ALEMBIC format.
[0060] Because there are many types of DCC software, such as Maya, 3ds Max, and iClone, which are commonly used, and each type typically has different design patterns, and because products involving virtual scenes, such as games, now contain an increasingly large number of art assets, manually selecting and organizing them by staff is labor-intensive, inefficient, and prone to errors.
[0061] In view of this, embodiments of this application provide a method for processing art resources to overcome the deficiencies of the prior art.
[0062] Reference Figure 1 The diagram illustrates a flowchart of a method for processing art resources according to an embodiment of this application. This method can run on a terminal device or server to automatically classify and export art resources created by DCC software.
[0063] In this embodiment of the application, the art resource processing method may include the following steps:
[0064] Step 101: Obtain mesh resources, which include multiple mesh models.
[0065] In this embodiment, art resources may include mesh models, textures, animations, etc. The aforementioned mesh resources may refer to a collection of all mesh models for the same product. A mesh model is composed of numerous vertices of a virtual object, forming a three-dimensional model of the virtual object through these vertices.
[0066] Step 102: Based on the vertex data of each of the mesh models, determine the mesh groups corresponding to each of the multiple mesh models.
[0067] In this embodiment, each vertex of the mesh model stores related data, such as one or more of the following: vertex coordinates, vertex color, normal, tangent, and animation. The vertex data of the mesh model can refer to the collection of data for all vertices that make up the mesh model. A mesh group can be considered a collection used to store mesh models with the same characteristics. Based on the vertex data of each mesh model, the characteristics of each mesh model can be determined, and thus the mesh group corresponding to each mesh model can be determined.
[0068] Step 103: Based on the determined grid groups, divide each of the grid models into the corresponding grid groups.
[0069] After determining the mesh group corresponding to the mesh model, the mesh model is assigned to the corresponding mesh group.
[0070] Step 104: Export the mesh models in each mesh group according to the export format required by the corresponding mesh group.
[0071] Once a mesh model is divided into corresponding mesh groups, it can be exported based on the export format required by the mesh group, so that mesh models with the same characteristics can be exported in the same export format.
[0072] This application embodiment acquires mesh resources created by DCC software, which include multiple mesh models; based on the vertex data of each mesh model, it determines the mesh groups corresponding to each of the multiple mesh models; according to the determined mesh groups, it divides each mesh model into the corresponding mesh group; and it exports the mesh models in each mesh group according to the export format required by the corresponding mesh group. This achieves automatic classification of mesh models of art resources and exports different types of mesh models according to their respective format requirements, which can improve the efficiency of DCC software in exporting art resources and reduce the probability of errors.
[0073] The art resource processing method in this exemplary embodiment will be further described below.
[0074] In step 101, a mesh resource is obtained, which includes multiple mesh models.
[0075] In this embodiment, when a terminal device runs DCC software, the art resource processing method provided in this embodiment can run on the terminal device to obtain mesh resources from the art resources created by the DCC software on the terminal device according to the user-specified requirements. Alternatively, the art resource processing method provided in this embodiment can also run on a server, and through communication between the server and the terminal device, obtain mesh resources from the art resources created by the DCC software on the terminal device according to the user-specified requirements. It should be noted that this embodiment does not limit the type of DCC software. For example, when the terminal device runs multiple DCC software programs, it can obtain mesh resources from the art resources created by one or more DCC software programs on the terminal device according to the user-specified requirements, reducing unnecessary learning and use of different software and the cost of trial and error correction.
[0076] For example, DCC software can create art assets for multiple products, and each product's art assets can further include art assets for multiple virtual objects. The art asset processing method provided in this application embodiment can receive one or more products selected by a user, and then obtain the mesh resources in the art assets related to the user-selected product in the DCC software. Optionally, the art asset processing method provided in this application embodiment can also receive at least one virtual character from one of the products selected by a user, and then obtain the mesh resources in the art assets related to the virtual character of the user-selected product in the DCC software.
[0077] Mesh resources include multiple mesh models. For example, when a product involves virtual objects such as a static mountain, a character's body moving like a human skeleton, hair on the character's body, flowing water, or fabric floating on the character's body, the mesh resources corresponding to the product may include a static mountain mesh model, a character's body mesh model moving like a human skeleton, a hair mesh model, a flowing water mesh model, and a fabric mesh model floating on the character's body.
[0078] In step 102, based on the vertex data of each of the mesh models, a mesh group corresponding to each of the multiple mesh models is determined.
[0079] After acquiring the mesh resources, the vertex data of each mesh model in the mesh resources can be obtained. Based on the information recorded in the vertex data, the mesh group corresponding to each mesh model can be determined.
[0080] In an optional embodiment of this application, determining the mesh group corresponding to each of the multiple mesh models based on the vertex data of each mesh model includes:
[0081] For each mesh model, traverse the vertices of the mesh model and obtain the vertex data of the mesh model;
[0082] Based on the vertex data of the mesh model and the classification rules of each mesh group, the mesh group corresponding to the mesh model is determined.
[0083] In this embodiment, multiple mesh groups can be predetermined, and classification rules for each mesh group can be determined. After acquiring the mesh resources, for each mesh model, all vertices of the mesh model can be traversed to obtain the data of each vertex of the mesh model, thus obtaining the vertex data of the mesh model. Based on the information recorded in the vertex data and the classification rules of each mesh group, when the vertex data of the mesh model matches the classification rules of any mesh group, it can be determined that the mesh model corresponds to the corresponding mesh group.
[0084] For example, two mesh groups can be pre-defined, namely a first mesh group and a second mesh group, which are used to store mesh models of different types. For example, the first mesh group can be used to store mesh models corresponding to art assets that have dynamic effects and / or morphing animation effects that do not include skeletal animation, such as mesh models corresponding to art assets that have breaking dynamic effects or liquid flowing dynamic effects; the second mesh group can be used to store mesh models corresponding to other art assets besides those that have dynamic effects and morphing animation effects that do not include skeletal animation.
[0085] The process of determining the mesh group corresponding to the mesh model based on the vertex data of the mesh model and the classification rules of each mesh group can specifically include:
[0086] When any vertex of the mesh model has animation data, and the vertex with animation data is not driven by the skinned skeleton, and the distance between the vertex with animation data and its adjacent vertices changes, the mesh model is determined to correspond to the first mesh group.
[0087] Otherwise, determine that the mesh model corresponds to the second mesh group.
[0088] In this embodiment, the information of each vertex of the mesh model can be obtained through the vertex data of the mesh model. Then, based on the vertex information, it can be determined whether there are vertices with animation data in the mesh model. If there are vertices with animation data, it is necessary to further determine whether the vertex with animation data is driven by the skinned skeleton. If the vertex with animation data is not driven by the skinned skeleton, it is necessary to further determine whether there is a change in the distance between the vertex with animation data and its adjacent vertices. If there is a change, it is determined that the mesh model corresponds to the first mesh group.
[0089] The classification rule for the first mesh group is that a mesh model is identified as belonging to the first mesh group when at least one vertex in the mesh model simultaneously satisfies three conditions: it has animation data, it is not driven by the skinned skeleton, and the distance between it and its adjacent vertices changes. It should be noted that the order of the above three conditions is not limited to the order shown in the example above. For example, it is also possible to first determine whether the vertices in the mesh model are driven by the skinned skeleton; for vertices not driven by the skinned skeleton, it is then determined whether they have animation data; and for vertices identified as having animation data, it is then determined whether the distance between them and their adjacent vertices changes.
[0090] For each grid model, if it does not meet the classification rules of the first grid group, then the grid model is determined to correspond to the second grid group.
[0091] likeFigure 2 As shown, the process of determining the mesh group corresponding to the mesh model can specifically include the following steps:
[0092] Step 201: Obtain the vertex data of the mesh model;
[0093] Step 202: Determine whether there is animation data in the vertex data; if yes, proceed to step 203; if no, proceed directly to step 208.
[0094] Step 203: Obtain the vertices containing animation data;
[0095] Step 204: Determine whether the vertices with animation data are driven by the skinned skeleton; if yes, proceed to step 208; if no, proceed directly to step 205.
[0096] Step 205: Obtain vertices that are not driven by the skinned skeleton;
[0097] Step 206: Determine whether the distance between a vertex not driven by the skinned skeleton and its adjacent vertices has changed; if yes, proceed to step 207; if no, proceed to step 208.
[0098] Step 207: Determine the first mesh group corresponding to the mesh model;
[0099] Step 208: Determine the second mesh group corresponding to the mesh model.
[0100] Generally, vertex animation data is based on keyframes on the timeline. By analyzing whether there are keyframes on the timeline, it can be determined whether each vertex has animation data. For example, if there are no keyframes on the timeline, it can be determined that none of the vertices of the mesh model have animation data.
[0101] Based on keyframes along the timeline, it's also possible to determine whether the distance between any vertex and its adjacent vertices has changed. For example, for two adjacent vertices, the position of each vertex in each keyframe can be obtained based on the keyframes along the timeline. Then, it can be analyzed whether the relative position of these two adjacent vertices has changed in each keyframe. If the relative position has not changed, it means that the distance between the two adjacent vertices has not changed.
[0102] When vertex animation is driven by a skinned skeleton, when a user creates the mesh model corresponding to that vertex in DCC software, a skeleton is created within the mesh model. Then, a skinning operation is used to attach the mesh model to the skeleton, thus achieving the purpose of using the skeleton to drive the mesh model's movement. Therefore, by analyzing whether a vertex contains skinning data, it can be determined whether that vertex is driven by a skinned skeleton. For example, if a vertex's data contains skinning data, it can be determined that the vertex is driven by a skinned skeleton.
[0103] In step 103, each of the mesh models is assigned to a corresponding mesh group according to the determined mesh group.
[0104] After determining the mesh group corresponding to the mesh model, the mesh model is assigned to the corresponding mesh group.
[0105] For example, multiple empty mesh groups can be predefined to store categorized mesh models. Once the mesh group corresponding to a mesh model is determined, the mesh model is added to the corresponding mesh group.
[0106] In step 104, the mesh models in each mesh group are exported according to the export format required by the corresponding mesh group.
[0107] Once a mesh model is divided into its corresponding mesh group, it can be exported according to the export format required by that mesh group. Optionally, after all mesh models to be exported have been divided into their corresponding mesh groups, the mesh models within the same mesh group can be exported uniformly according to the export format required by that mesh group, thus ensuring that mesh models with the same characteristics are exported in the same format. Alternatively, the export can be performed in real-time according to the export format required by the corresponding mesh group when the mesh model is determined.
[0108] For example, the first mesh group can be an alembic mesh group; the second mesh group can be an fbx mesh group. The mesh models in the first mesh group will be uniformly exported as alembic format files; the mesh models in the second mesh group will be uniformly exported as fbx format files.
[0109] Furthermore, in an optional embodiment of this application, the process of uniformly exporting the network models in the first mesh group into an alembic format file further includes:
[0110] Obtain the material information corresponding to the mesh model in the first mesh group;
[0111] The material information is associated with the alembic format file exported from its corresponding mesh model.
[0112] Because alembic format files cannot automatically associate with the material textures used in DCC software, in related technologies, when exporting art resources using alembic format, staff need to manually find and specify the material textures corresponding to each mesh model. The whole process is labor-intensive, inefficient, and prone to errors due to staff negligence.
[0113] In this embodiment, while exporting the mesh model in the first mesh group into an alembic format file, the material information corresponding to the mesh model can also be obtained, and the material information can be associated with the exported file of the mesh model, thereby realizing the automatic association between the alembic format file and its corresponding material texture; avoiding the problems of manual association in related technologies.
[0114] For example, for each mesh model in the first mesh group, its corresponding art asset can be determined. The material information belonging to the same art asset as the mesh model is recorded in a text file, and this text file is associated with the corresponding alembic format file exported from the mesh model. The material information can specifically include the material name, textures bound to the material, etc. It is understood that when the art asset is subsequently imported into the engine for rendering, the alembic file, along with the associated text file, needs to be imported into the engine.
[0115] Furthermore, in an optional embodiment of this application, after exporting the mesh models in each mesh group according to the export format required by the corresponding mesh group, the process may further include:
[0116] Record and display the export information for each mesh model.
[0117] The exported information may include one or more of the following: the name of the mesh model, the mesh group type corresponding to the mesh model, the number of vertices of the mesh model, the export status (normal or abnormal), and error information.
[0118] In this embodiment, after the user-specified art resources are exported in the corresponding format, the export information can be recorded and displayed as required to facilitate staff troubleshooting and correction. For example, after the art resources are exported, a record table containing the export information can be directly displayed on the screen of the corresponding terminal device; alternatively, in response to the user's opening operation of the record table, the export information recorded in the record table can be displayed; the export information can also be sent to a pre-defined recipient and displayed on the recipient's corresponding device; and so on.
[0119] Optionally, when the export status in the exported information is abnormal, an early warning can be issued to remind relevant personnel to review and compare the information.
[0120] The warning notification methods can include sound warnings, pop-up warnings, etc. For example, when an abnormality occurs in the export status in the export information, a warning sound can be triggered by the speaker of the terminal device exporting the art resources; a warning pop-up can also be displayed on the screen of the terminal device exporting the art resources, and so on.
[0121] This application embodiment acquires mesh resources created by DCC software, which include multiple mesh models; based on the vertex data of each mesh model, it determines the corresponding mesh groups for each of the multiple mesh models; according to the determined mesh groups, it divides each mesh model into the corresponding mesh group; and it exports the mesh models in each mesh group according to the export format required by the corresponding mesh group. This achieves automatic classification of mesh models of art resources and exports different types of mesh models according to their respective format requirements, which can improve the efficiency of DCC software in exporting art resources, reduce the probability of errors, and better control the occupation of project space.
[0122] Reference Figure 3 The diagram illustrates a flowchart of a method for processing art resources according to another embodiment of this application. This method can run on a terminal device or server to automatically classify and export art resources created by DCC software, and automatically import the exported files into the engine.
[0123] In this embodiment of the application, the art resource processing method may include the following steps:
[0124] Step 301: Obtain mesh resources, which include multiple mesh models;
[0125] Step 302: Based on the vertex data of each of the mesh models, determine the mesh groups corresponding to each of the multiple mesh models;
[0126] Step 303: According to the determined mesh group, divide each mesh model into the corresponding mesh group;
[0127] Step 304: Export the mesh models in each mesh group according to the export format required by the corresponding mesh group.
[0128] Step 305: Import the exported file corresponding to the mesh model into the engine, and the engine renders the art resources corresponding to the exported file.
[0129] For details on steps 301-304, please refer to the description of steps 101-104 above, which will not be repeated here.
[0130] In step 305, the exported file corresponding to the mesh model is imported into the engine, and the engine renders the art resources corresponding to the exported file.
[0131] In this embodiment of the application, after exporting the art resources created by DCC software, the exported file can be imported into the engine, and the engine can render the art resources corresponding to the exported file.
[0132] For example, when a terminal device simultaneously runs DCC software and engine software (also referred to as the engine in this application) for assembling and rendering art resources created by the DCC software, the art resource processing method provided in this application embodiment can run on the terminal device. It obtains mesh resources from the art resources created by the DCC software according to user-specified requirements, divides each mesh model in the mesh resources into corresponding mesh groups, and exports the mesh models in the same mesh group according to the same export format to obtain corresponding export files. Then, the export files are imported into the engine software so that the engine software can assemble and render the art resources. This can save significant manpower and time costs, reduce errors, and significantly improve development efficiency.
[0133] Of course, the art resource processing method provided in this application embodiment can also run on a server. Through communication between the server and the terminal device, the mesh resources in the art resources created by the DCC software of the terminal device can be obtained according to the user-specified requirements.
[0134] In another example, when one terminal device runs DCC software and another terminal device runs engine software for assembling and rendering art assets created by the DCC software running on the aforementioned terminal device, the art asset processing method provided in this application embodiment can run on a server. The server is communicatively connected to both the terminal device running DCC software and the terminal device running engine software, so as to import the art assets created by the DCC software of one terminal device into the engine software of the other terminal device.
[0135] When an Alembic file is imported into the engine, it can search for the corresponding target material information within the engine based on the material information associated with the Alembic file. This means the target material information is provided by the engine. The engine then renders the mesh model corresponding to the Alembic file based on the specified target material information. Essentially, when an Alembic file is imported, its internal interface can be called to find and specify the material texture corresponding to the mesh model based on the associated material information, and then render the mesh model according to the specified material texture. If the material information associated with the Alembic file cannot be found within the engine, corresponding prompts can be provided, such as a pop-up window, to inform the user that the relevant material texture is missing from the engine, allowing relevant personnel to create the necessary material texture within the engine and ensuring that the art assets can be rendered correctly.
[0136] To enable those skilled in the art to better understand this solution, an example will be used below for explanation and illustration.
[0137] Figure 4 This is a schematic diagram illustrating an application scenario of an art resource processing method according to an embodiment of this application; as shown below. Figure 4 As shown, the art assets created by DCC software correspond to a virtual character. The virtual character includes a hair mesh model for forming the hair, a body mesh model for forming the body, and a clothing mesh model for forming the clothes.
[0138] By running the art resource processing method provided in this application embodiment, the mesh resources of the virtual character can be obtained, including the hair mesh model, the body mesh model, and the clothing mesh model.
[0139] By analyzing the vertex data of each mesh model, it can be determined that the body mesh model uses skeletal animation, meaning that the vertices of the body mesh model are driven by the skinning skeleton. Therefore, the body mesh model can be assigned to the second mesh group, namely the fbx mesh group. The hair and clothing mesh models, on the other hand, use non-skeletal animation, and the distance between adjacent vertices changes significantly during movement. This means that the vertices of the hair and clothing mesh models have animation data that is not driven by the skinning skeleton, and the distance between the vertices of the hair and clothing mesh models and their adjacent vertices changes. Therefore, the hair and clothing mesh models are assigned to the first mesh group, namely the alembic mesh group.
[0140] After determining the mesh groups corresponding to all mesh models, convert the mesh models in the FBX mesh group to FBX format files for export, and convert the mesh models in the Alembic mesh group to Alembic format files for export. Furthermore, when exporting the mesh models in the Alembic mesh group, it is necessary to obtain the corresponding material information of the mesh model and record the material information in a text file associated with the corresponding mesh model.
[0141] After exporting the mesh model, you can also record the relevant export information in the background and display it as needed.
[0142] Finally, the exported files corresponding to the art assets exported from the DCC software are imported into the engine software. For FBX format art asset files, the engine software can render them directly; however, for Alembic format art asset files, the engine needs to find and assign the corresponding materials to the Alembic format mesh model based on the material information associated with the file, and then render the Alembic format mesh model based on the found and assigned material information.
[0143] This application embodiment acquires mesh resources created by DCC software, which include multiple mesh models. Based on the vertex data of each mesh model, it determines the corresponding mesh groups for each mesh model. According to the determined mesh groups, each mesh model is assigned to its corresponding mesh group. The mesh models in each mesh group are exported according to the export format required by the corresponding mesh group. Furthermore, the exported files corresponding to the mesh models can be imported into the engine, which renders the corresponding art resources. This achieves automatic classification of mesh models in art resources and exports different types of mesh models according to their respective format requirements, improving the efficiency of DCC software in exporting art resources, reducing the probability of errors, and better controlling project space usage. Moreover, it can automatically import the exported files into the engine, where the engine automatically finds and assigns the corresponding material textures to the mesh models, avoiding the low efficiency and high error rate problems caused by manual searching and assignment in related technologies.
[0144] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0145] Reference Figure 5 This diagram illustrates a structural block diagram of an embodiment of an art resource processing device according to this application. This device is used to automatically classify and export art resources created using DCC software. Corresponding to the method embodiment described above, it may specifically include the following modules:
[0146] Mesh model acquisition module 501 is used to acquire mesh resources, the mesh resources including multiple mesh models;
[0147] The mesh group determination module 502 is used to determine the mesh group corresponding to each of the multiple mesh models based on the vertex data of each mesh model.
[0148] The mesh model classification module 503 is used to classify each mesh model into a corresponding mesh group according to the determined mesh group;
[0149] The mesh model export module 504 is used to export the mesh models in each of the mesh groups according to the export format required by the corresponding mesh group.
[0150] In an optional embodiment of this application, the mesh group determination module 502 includes:
[0151] The vertex traversal module is used to traverse the vertices of the mesh model for each mesh model and obtain the vertex data of the mesh model;
[0152] The vertex data-based mesh group determination module is used to determine the mesh group corresponding to the mesh model based on the vertex data of the mesh model and the classification rules of each mesh group.
[0153] In an optional embodiment of this application, the vertex data of the mesh model includes the feature information of each vertex of the mesh model. The module for determining the mesh group based on the vertex data is specifically used to determine that the mesh model corresponds to the first mesh group when any vertex of the mesh model has animation data, and the vertex with animation data is not driven by the skinned skeleton, and the distance between the vertex with animation data and its adjacent vertices changes; otherwise, the mesh model corresponds to the second mesh group.
[0154] In an optional embodiment of this application, the mesh model export module 504 includes:
[0155] The first export module is used to export the mesh model in the first mesh group into an alembic format file;
[0156] The second export module is used to export the mesh model in the second mesh group as an fbx format file.
[0157] In an optional embodiment of this application, the first export module further includes:
[0158] The material information acquisition module is used to acquire the material information corresponding to the mesh model in the first mesh group;
[0159] The material information association module is used to associate the material information with the alembic format file exported from the corresponding mesh model.
[0160] This application embodiment acquires mesh resources created by DCC software, which include multiple mesh models; based on the vertex data of each mesh model, it determines the mesh groups corresponding to each of the multiple mesh models; according to the determined mesh groups, it divides each mesh model into the corresponding mesh group; and it exports the mesh models in each mesh group according to the export format required by the corresponding mesh group. This achieves automatic classification of mesh models of art resources and exports different types of mesh models according to their respective format requirements, which can improve the efficiency of DCC software in exporting art resources and reduce the probability of errors.
[0161] Reference Figure 6 This diagram illustrates a structural block diagram of another embodiment of an art resource processing device according to this application. This device is used to automatically classify and export art resources created by DCC software, and simultaneously import the exported files into the engine. Corresponding to the method embodiment described above, it may specifically include the following modules:
[0162] Mesh model acquisition module 601 is used to acquire mesh resources, the mesh resources including multiple mesh models;
[0163] Mesh group determination module 602 is used to determine the mesh group corresponding to each of the multiple mesh models based on the vertex data of each mesh model;
[0164] The mesh model classification module 603 is used to classify each mesh model into a corresponding mesh group according to the determined mesh group;
[0165] The mesh model export module 604 is used to export the mesh models in each mesh group according to the export format required by the corresponding mesh group.
[0166] The art resource rendering module 605 is used to import the exported file corresponding to the mesh model into the engine, and the engine renders the art resources corresponding to the exported file.
[0167] In an optional embodiment of this application, the mesh group determination module 602 includes:
[0168] The vertex traversal module is used to traverse the vertices of the mesh model for each mesh model and obtain the vertex data of the mesh model;
[0169] The vertex data-based mesh group determination module is used to determine the mesh group corresponding to the mesh model based on the vertex data of the mesh model and the classification rules of each mesh group.
[0170] In an optional embodiment of this application, the vertex data of the mesh model includes the feature information of each vertex of the mesh model. The module for determining the mesh group based on the vertex data is specifically used to determine that the mesh model corresponds to the first mesh group when any vertex of the mesh model has animation data, and the vertex with animation data is not driven by the skinned skeleton, and the distance between the vertex with animation data and its adjacent vertices changes; otherwise, the mesh model corresponds to the second mesh group.
[0171] In an optional embodiment of this application, the mesh model export module 604 includes:
[0172] The first export module is used to export the mesh model in the first mesh group into an alembic format file;
[0173] The second export module is used to export the mesh model in the second mesh group as an fbx format file.
[0174] In an optional embodiment of this application, the first export module further includes:
[0175] The material information acquisition module is used to acquire the material information corresponding to the mesh model in the first mesh group;
[0176] The material information association module is used to associate the material information with the alembic format file exported from the corresponding mesh model.
[0177] In an optional embodiment of this application, the art resource rendering module 605 further includes:
[0178] The material lookup module is used to search for target material information corresponding to the material information associated with the alembic format file within the engine after the alembic format file is imported into the engine, so that the engine can render the mesh model corresponding to the alembic format file according to the target material information.
[0179] This application embodiment acquires mesh resources created by DCC software, which include multiple mesh models. Based on the vertex data of each mesh model, it determines the corresponding mesh groups for each mesh model. According to the determined mesh groups, each mesh model is assigned to its corresponding mesh group. The mesh models in each mesh group are exported according to the export format required by the corresponding mesh group. Furthermore, the exported files corresponding to the mesh models can be imported into the engine, which renders the corresponding art resources. This achieves automatic classification of mesh models in art resources and exports different types of mesh models according to their respective format requirements, improving the efficiency of DCC software in exporting art resources, reducing the probability of errors, and better controlling project space usage. Moreover, it can automatically import the exported files into the engine, where the engine automatically finds and assigns the corresponding material textures to the mesh models, avoiding the low efficiency and high error rate problems caused by manual searching and assignment in related technologies.
[0180] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0181] This application also discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the steps of the art resource processing method described above.
[0182] This application also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the art resource processing method described above.
[0183] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0184] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0186] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0188] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0189] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0190] The above provides a detailed description of the art resource processing method, apparatus, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. An artistic resource processing method characterized by comprising: The method comprises: acquiring mesh resources, the mesh resources comprising a plurality of mesh models; determining, based on vertex data of each mesh model, a mesh group corresponding to each mesh model; the mesh group is a set for storing mesh models with the same characteristics; dividing each mesh model into a corresponding mesh group according to the determined mesh group; exporting the mesh models in each mesh group in an export format required by the corresponding mesh group.
2. The method of claim 1, wherein, The method further comprises: importing the export file corresponding to the mesh model into an engine, and rendering the art resources corresponding to the export file by the engine.
3. The method of claim 2, wherein, The method further comprises: traversing the vertices of each mesh model to acquire vertex data of the mesh model; determining the mesh group corresponding to the mesh model according to the vertex data of the mesh model and classification rules of each mesh group.
4. The method of claim 3, wherein, The vertex data of the mesh model comprises characteristic information of each vertex of the mesh model, and the mesh group corresponding to the mesh model is determined according to the vertex data of the mesh model and the classification rules of each mesh group. When any vertex of the mesh model has animation data, and the vertex with the animation data is not driven by a skin bone, and the distance between the vertex with the animation data and its adjacent vertex changes, the mesh model is determined to correspond to a first mesh group. Otherwise, the mesh model is determined to correspond to a second mesh group.
5. The method of claim 4, wherein, The method further comprises: exporting the mesh models in the first mesh group into an alembic format file; exporting the mesh models in the second mesh group into an fbx format file.
6. The method of claim 5, wherein, The method further comprises: acquiring material information corresponding to the mesh models in the first mesh group; associating the material information with the alembic format file exported by the mesh model.
7. The method of claim 6, wherein, The method further comprises: after the alembic format file is imported into the engine, searching for target material information corresponding to the material information associated with the alembic format file in the engine, so that the engine renders the mesh model corresponding to the alembic format file according to the target material information.
8. An artistic resource processing apparatus characterized by comprising: The apparatus comprises: a mesh model acquisition module configured to acquire mesh resources, the mesh resources comprising a plurality of mesh models; a mesh group determination module configured to determine, based on vertex data of each mesh model, a mesh group corresponding to each mesh model; the mesh group is a set for storing mesh models with the same characteristics; a mesh model classification module configured to divide each mesh model into a corresponding mesh group according to the determined mesh group; and a mesh model classification module configured to divide each mesh model into a corresponding mesh group according to the determined mesh group. A mesh model exporting module is configured to export the mesh models in each of the mesh groups according to an exporting format required by the corresponding mesh group.
9. An electronic device, comprising: A computer program product comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the art resource processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer readable storage medium, and when executed by the processor, implements the steps of the art resource processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Game resource checking method and system, storage medium and computing equipment
CN111563031A
Game role rendering method and device, electronic equipment and computer readable medium
CN112237739A