Alembic file optimization method, device, equipment and storage medium

By processing Alembic files in 3D animation software, deleting abnormal features and determining quilt information, the problem of slow loading and stuck when Alembic files are imported into UE is solved, achieving more efficient file optimization and loading.

CN118314251BActive Publication Date: 2025-01-24GUANGZHOU LANHAO ADVERTISING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410530576.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2025-01-24
Estimated Expiration
2044-04-29

AI Technical Summary

Technical Problem

Due to inadequate export optimization of Alembic files, problems such as exceptional surfaces and separate points will occur when importing UEs, resulting in extremely slow loading, and even causing UE software to be stuck, seriously reducing work efficiency.

Method used

Open the original Alembic file through 3D animation software, read the feature information and path attributes, delete abnormal features, determine the quilt information, and export the optimized Alembic file.

Benefits of technology

It reduces the lag when Unreal Engine opens the target Alembic file, reduces the lag time, improves work efficiency, and makes it easier for Unreal Engine to identify quilt information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118314251B_ABST
    Figure CN118314251B_ABST
Patent Text Reader

Abstract

The present application proposes an Alembic file optimization method, device, equipment and storage medium. The original Alembic file is opened by three-dimensional animation software, feature information and path attributes of the feature information in the original Alembic file are read, and the original Alembic file is opened by three-dimensional animation software with a stronger import optimization function than the game engine, so as to reduce the probability of occurrence of jamming, delete abnormal features in the feature information, obtain target features, determine face group information according to the path attributes of the target features, optimize the original Alembic file, and export the optimized target Alembic file according to the target features and face group information, so as to reduce the occurrence of jamming when the Unreal Engine opens the target Alembic file or reduce the jamming time, so as to facilitate the Unreal Engine to recognize the face group information and add materials.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an Alembic file optimization method, device, equipment and storage medium. Background Art

[0002] With the development of the Internet, CG technologies related to 3D rendering and animation have made great progress and are widely used in publicity and production in different industries. Among them, ABC files (Alembic files) are an open file format for 3D rendering and animation. Nowadays, Alembic is directly imported into UE (Unreal Engine). Since Unreal Engine is a game engine, some Alembic files are not optimized properly due to C4D (CINEMA 4D) export. For example, abnormal features such as abnormal faces and separate points will be imported into UE and load very slowly. Importing Alembic files directly into UE will cause UE software to freeze or require waiting for UE to be in an unresponsive interface for more than an hour, which seriously reduces work efficiency. Summary of the invention

[0003] The embodiments of the present application provide an Alembic file optimization method, apparatus, device, and storage medium to solve at least one problem existing in the related art. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for optimizing an Alembic file, including:

[0005] Open the original Alembic file by using 3D animation software, and read the feature information and path attributes of the feature information in the original Alembic file;

[0006] Deleting abnormal features in the feature information to obtain target features;

[0007] Determining face group information according to the path attribute of the target feature;

[0008] A target Alembic file is exported according to the target features and the face group information.

[0009] In one implementation, deleting abnormal features in the feature information to obtain target features includes:

[0010] Deleting the abnormal surface with an area of ​​0 in the feature information;

[0011] The abnormal points other than the surface points and the end points of the lines in the feature information are deleted to obtain the target features.

[0012] In one implementation, determining face group information according to the path attribute of the target feature includes:

[0013] Performing segmentation processing on the path attribute of the target feature to obtain a segmentation processing result;

[0014] The segmentation processing result is named to obtain face group information.

[0015] In one implementation, the segmenting process of the path attribute of the target feature to obtain the segmentation process result includes:

[0016] Delete the original separators between each sub-path attribute in the path attribute of the target feature;

[0017] Each sub-path attribute is segmented by a preset separator, and an array is obtained as the segmentation result.

[0018] In one implementation, the step of performing naming processing on the segmentation processing result to obtain face group information includes:

[0019] The last character string in the array is determined as the name of the face group to obtain face group information.

[0020] In one embodiment, the step of opening the original Alembic file by using the 3D animation software and reading the feature information and the path attribute of the feature information in the original Alembic file comprises:

[0021] Open the original Alembic file with Houdini 3D animation software;

[0022] The feature information in the original Alembic file and the path attribute of the feature information represented in the form of a string are read.

[0023] In one embodiment, the method comprises:

[0024] In response to a start-up instruction of a digital asset of Houdini 3D animation software, the step of deleting abnormal features in the feature information to obtain target features is performed.

[0025] In a second aspect, an embodiment of the present application provides an Alembic file optimization device, including:

[0026] A reading module, used to open the original Alembic file through the 3D animation software, and read the feature information and the path attribute of the feature information in the original Alembic file;

[0027] A deletion module is used to delete abnormal features in the feature information to obtain target features;

[0028] A determination module, used for determining face group information according to the path attribute of the target feature;

[0029] The export module is used to export the target Alembic file according to the target features and the face group information.

[0030] In one embodiment, the reading module is further used for:

[0031] In response to a start-up instruction of a digital asset of Houdini 3D animation software, the step of deleting abnormal features in the feature information to obtain target features is performed.

[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement a method in any one of the above-mentioned embodiments.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, the method in any one of the above-mentioned embodiments is implemented.

[0034] The beneficial effects of the above technical solution include at least:

[0035] Open the original Alembic file with 3D animation software, read the feature information and path attributes of the feature information in the original Alembic file, use 3D animation software with stronger import optimization function than the game engine to open the original Alembic file, reduce the probability of freezing, delete the abnormal features in the feature information, obtain the target feature, determine the face group information according to the path attribute of the target feature, optimize the original Alembic file, export the optimized target Alembic file according to the target feature and face group information, reduce the freezing of the target Alembic file when the Unreal Engine opens the file or reduce the freezing time, and make it easier for the Unreal Engine to recognize the face group information and add materials.

[0036] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present application will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0038] Figure 1 This is a schematic diagram of the steps of the Alembic file optimization method according to an embodiment of the present application;

[0039] Figure 2 A schematic diagram of feature information of an embodiment of the present application;

[0040] Figure 3 A schematic diagram of path attributes according to an embodiment of the present application;

[0041] Figure 4 A schematic diagram of a segmentation processing result according to an embodiment of the present application;

[0042] Figure 5 A schematic diagram of an Alembic file optimization device according to an embodiment of the present application;

[0043] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0045] In the related art, if there are abnormal features such as abnormal surfaces of size 0 and individual points, the loading of the file into UE will be very slow. Importing the Alembic file directly into UE will cause the UE software to freeze or require waiting for more than an hour for the UE to be in an unresponsive interface, which seriously reduces work efficiency.

[0046] Reference Figure 1 , a flowchart of an Alembic file optimization method according to an embodiment of the present application is shown. The Alembic file optimization method may at least include steps S100-S400:

[0047] S100, opening the original Alembic file through 3D animation software, and reading feature information and path attributes of the feature information in the original Alembic file.

[0048] S200, deleting abnormal features in the feature information to obtain target features.

[0049] S300: Determine face group information according to the path attribute of the target feature.

[0050] S400, exporting a target Alembic file according to target features and face group information.

[0051] The Alembic file optimization method of the embodiment of the present application can be executed by an electronic control unit, a controller, a processor, etc. of a terminal such as a computer, a mobile phone, a tablet, a vehicle-mounted terminal, etc., or it can be executed by a cloud server, for example, by a computer, specifically by a 3D animation software in the computer.

[0052] The technical solution of the embodiment of the present application is to open the original Alembic file through 3D animation software, read the feature information and the path attribute of the feature information in the original Alembic file, use the 3D animation software with stronger import optimization function than the game engine to open the original Alembic file, reduce the probability of freezing, delete the abnormal features in the feature information, obtain the target feature, determine the face group information according to the path attribute of the target feature, optimize the original Alembic file, export the optimized target Alembic file according to the target feature and the face group information, reduce the freezing of the target Alembic file when the Unreal Engine opens the file or reduce the freezing time, and facilitate the Unreal Engine to recognize the face group information and add materials.

[0053] In one embodiment, step S100 includes steps S110-S120:

[0054] S110. Open the original Alembic file with Houdini 3D animation software.

[0055] S120 , reading feature information in the original Alembic file and path attributes of the feature information represented in the form of a string.

[0056] It should be noted that the embodiment of the present application takes Houdini 3D animation software (hereinafter referred to as Houdini) as an example, and other 3D animation software may be used in other embodiments. Specifically, by using Houdini to open the original Alembic file, since Houdini has stronger import optimization performance and is more in place than the Unreal Engine, which is a game engine, it will not freeze or can greatly reduce the freezing time. Then, after opening the original Alembic file, Houdini reads the feature information in the original Alembic file and the path attributes of the feature information represented in the form of a string.

[0057] It should be noted that feature information includes but is not limited to points and surfaces, such as Figure 2As shown below, the coordinate information of the x, y, and z axes of the points and surfaces is shown below. Figure 2 In the figure, we can see that many repeated points and surfaces converge together. The path attribute of the feature information refers to the path attribute corresponding to the points and surfaces respectively. The path attribute is similar to the hierarchy of a folder, but it is expressed in the form of a string, such as Figure 3 As shown, for example, one of the path attributes is [Null_2,Null_3,"Long Grass_19",Polygon_7, Polygon_7Shape ].

[0058] In one implementation, step S200 includes steps S210-S220:

[0059] S210, deleting abnormal surfaces with an area of ​​0 in the feature information.

[0060] Optionally, Houdini is used to search for faces in the feature information and to delete abnormal faces with an area of ​​0.

[0061] S220, deleting abnormal points other than the points on the surface and the endpoints of the lines in the feature information to obtain the target feature.

[0062] It should be noted that in some operations, such as deleting a face, if the points of the face are not selected for deletion, points will be left behind, resulting in abnormal points in the saved original Alembic file, which are unnecessary points. In the embodiment of the present application, Houdini deletes the points of the face in the feature information (for example, not the points in each face) and the abnormal points other than the endpoints of the line. After the above two types of deletion, the remaining content is the required target feature.

[0063] In one implementation, step S300 includes steps S310-S320:

[0064] S310: Segment the path attributes of the target feature to obtain a segmentation result.

[0065] In the embodiment of the present application, Houdini loops through different path attributes generated hierarchically in the original Alembic file, extracts the path attributes of each target feature separately, and then performs segmentation processing on the path attributes of the target feature to obtain the segmentation processing result. Specifically, the following steps S3101-S3102 may be included:

[0066] S3101. Delete the original separators between each sub-path attribute in the path attribute of the target feature.

[0067] S3102. Each sub-path attribute is segmented by a preset separator to obtain an array as a segmentation processing result.

[0068] It should be noted that the preset delimiter is illustrated by taking “ / ” as an example and does not constitute a limitation. Taking the path attribute of the target feature as [Null_2, Null_3,"Long Grass_19",Polygon_7, Polygon_7Shape] as an example, the original separator "," between the sub-path attributes is deleted, and in some embodiments, the beginning symbol and the ending symbol in the path attribute are also deleted to obtain: Null_2 Null_3 "Long Grass_19" Polygon_7 Polygon_7Shape. Then, each sub-path attribute is segmented by the preset delimiter, and the beginning is also segmented by the preset delimiter to obtain an array as the segmentation processing result / Null_2 / Null_3 / "Long Grass_19" / Polygon_7 / Polygon_7Shape. The segmentation processing result in array form is as follows. Figure 4 shown.

[0069] S320, performing naming processing on the segmentation processing result to obtain face group information.

[0070] Specifically, the last character string of the segmentation processing result of the array is determined as the name of the face group, so as to obtain the face group information of each target feature.

[0071] In one implementation, in step S400, after determining the target features and face group information, the file is saved, and then the optimized final target Alembic file is exported.

[0072] In one implementation, the Alembic file optimization method of the embodiment of the present application may further include step S500:

[0073] S500, in response to a start-up instruction of a digital asset of Houdini 3D animation software, executing a step of deleting abnormal features in feature information to obtain target features.

[0074] In the embodiment of the present application, in order to maximize efficiency and facilitate use, programming can be performed in advance, and the programmed code can be encapsulated as HDA, that is, the digital asset of Houdini 3D animation software. Then, the user can enter the startup instruction of the digital asset in Houdini or automatically trigger the startup instruction of the digital asset after reading the original Alembic file, so that Houdini executes the code and executes the step of deleting the abnormal features in the feature information to obtain the target feature, that is, executing step S200, and then executing steps S300 and S400 in sequence, and finally exporting the target Alembic file, without the need for manual deletion and naming every time, which is more convenient. In addition, due to the face group information, after opening the target Alembic file, the UE can identify the correct face group and then apply the material.

[0075] The method of the embodiment of the present application solves the problem that the original Alembic file is imported into UE, causing UE to freeze and taking too long. The target Alembic file finally generated after optimization takes less than one minute to open using UE, greatly improving work efficiency.

[0076] Reference Figure 5 , shows a structural block diagram of an Alembic file optimization device according to an embodiment of the present application, the device may include:

[0077] A reading module is used to open the original Alembic file through the 3D animation software, and read the feature information and path attributes of the feature information in the original Alembic file;

[0078] A deletion module is used to delete abnormal features in feature information to obtain target features;

[0079] A determination module, used for determining face group information according to the path attribute of the target feature;

[0080] The export module is used to export the target Alembic file based on the target features and face group information.

[0081] In one embodiment, the reading module is further used for:

[0082] In response to a start-up instruction of a digital asset of Houdini 3D animation software, a step of deleting abnormal features in feature information to obtain target features is executed.

[0083] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and will not be repeated here.

[0084] Reference Figure 6, shows a structural block diagram of an electronic device according to an embodiment of the present application, the electronic device includes: a memory 310 and a processor 320, the memory 310 stores instructions that can be run on the processor 320, and the processor 320 loads and executes the instructions to implement the Alembic file optimization method in the above embodiment. The number of the memory 310 and the processor 320 can be one or more.

[0085] In one embodiment, the electronic device further includes a communication interface 330 for communicating with external devices and performing data exchange transmission. If the memory 310, the processor 320 and the communication interface 330 are implemented independently, the memory 310, the processor 320 and the communication interface 330 can be interconnected through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0086] Optionally, in a specific implementation, if the memory 310, the processor 320 and the communication interface 330 are integrated on a chip, the memory 310, the processor 320 and the communication interface 330 can communicate with each other through an internal interface.

[0087] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the Alembic file optimization method provided in the above embodiment.

[0088] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.

[0089] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0090] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0091] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0092] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0093] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the described specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0094] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0095] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0096] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0097] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0098] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.

[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An Alembic file optimization method, characterized in that: include: Open the original Alembic file by using 3D animation software, and read the feature information and path attributes of the feature information in the original Alembic file; Deleting the abnormal features in the feature information to obtain the target features, specifically including: deleting the abnormal surface with an area of ​​0 in the feature information, deleting the abnormal points other than the points of the surface and the endpoints of the line in the feature information to obtain the target features; Determining face group information according to the path attribute of the target feature, specifically comprising: performing segmentation processing on the path attribute of the target feature to obtain a segmentation processing result, performing naming processing on the segmentation processing result to obtain face group information; A target Alembic file is exported according to the target features and the face group information.

2. The Alembic file optimization method according to claim 1, characterized in that: The segmentation process is performed on the path attribute of the target feature to obtain the segmentation process result, which includes: Delete the original separators between each sub-path attribute in the path attribute of the target feature; Each sub-path attribute is segmented by a preset separator, and an array is obtained as the segmentation result.

3. The Alembic file optimization method according to claim 2, characterized in that: The segmentation processing result is named to obtain face group information including: The last character string in the array is determined as the name of the face group to obtain face group information.

4. The Alembic file optimization method according to claim 1, characterized in that: The method of opening the original Alembic file by using the 3D animation software and reading the feature information in the original Alembic file and the path attribute of the feature information comprises: Open the original Alembic file with Houdini 3D animation software; The feature information in the original Alembic file and the path attribute of the feature information represented in the form of a string are read.

5. The Alembic file optimization method according to claim 4, characterized in that: The method comprises: In response to a start-up instruction of a digital asset of Houdini 3D animation software, the step of deleting abnormal features in the feature information to obtain target features is performed.

6. An Alembic file optimization device, characterized in that: include: A reading module, used to open the original Alembic file through the 3D animation software, and read the feature information and the path attribute of the feature information in the original Alembic file; A deletion module is used to delete the abnormal features in the feature information to obtain the target features, specifically including: deleting the abnormal surface with an area of ​​0 in the feature information, and deleting the abnormal points other than the points of the surface and the endpoints of the line in the feature information to obtain the target features; A determination module is used to determine face group information according to the path attribute of the target feature, specifically comprising: performing segmentation processing on the path attribute of the target feature to obtain a segmentation processing result, and performing naming processing on the segmentation processing result to obtain face group information; The export module is used to export the target Alembic file according to the target features and the face group information.

7. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Virtual hair treatment method and device, electronic equipment and storage medium

    CN116503544A