Three-dimensional animation data processing method and device and computer device
By generating a dynamic link library for 3D animation binding logic, the performance degradation of the 3D software platform caused by animation binding data synchronization was solved, achieving efficient data synchronization and performance improvement.
Patent Information
- Application Number
- CN202010145397.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-03
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2040-03-03
AI Technical Summary
In existing technologies, synchronizing animation binding data from 3D software to other 3D software platforms causes a decrease in the performance of those platforms.
By acquiring 3D animation binding logic data, parsing binding information, generating connection relationship code and node code, and converting it into a 3D animation binding logic dynamic link library, it can be provided to other 3D software platforms to improve running performance.
It improved the performance of the 3D software platform, achieved synchronization of animation binding logic data, and enhanced the user experience.
Smart Images

Figure CN111292400B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a three-dimensional animation data processing method and device, a computer readable storage medium and a computer device. BACKGROUND
[0002] A traditional animation production process is usually to produce a binding system in 3D (three dimensional) software, then an animator sets key frames for a controller to produce an animation, and finally outputs a transformation matrix of a skeleton and a weight of a Blendshape (deformation target) to a 3D game engine, so that a player can finally see the animation in the game.
[0003] However, when the animation binding data in the 3D software is synchronized to other 3D software platforms such as a 3D game engine, the running performance of the other 3D software platforms is reduced. SUMMARY
[0004] Therefore, it is necessary to provide a three-dimensional animation data processing method and device, a computer readable storage medium and a computer device to solve the technical problem that the running performance of other 3D software platforms is reduced when the animation binding data in the 3D software is synchronized to other 3D software platforms.
[0005] A three-dimensional animation data processing method comprises the following steps:
[0006] Obtaining three-dimensional animation binding logic data, parsing the three-dimensional animation binding logic data to obtain binding information;
[0007] Obtaining a code template, and generating corresponding connection relationship code according to the connection relationship information in the binding information and the code template;
[0008] Generating corresponding node code according to the node information in the binding information and the code template;
[0009] Obtaining three-dimensional animation binding logic code corresponding to the three-dimensional animation binding logic data according to the connection relationship code and the node code, and converting the three-dimensional animation binding logic code into a three-dimensional animation binding logic dynamic link library.
[0010] A three-dimensional animation data processing device comprises the following steps:
[0011] A parsing module is configured to obtain three-dimensional animation binding logic data, parse the three-dimensional animation binding logic data, and obtain binding information;
[0012] A relationship code generation module is configured to obtain a code template, and generate corresponding connection relationship code according to the connection relationship information in the binding information and the code template;
[0013] The node code generation module is configured to generate corresponding node code according to the code template and node information in the binding information.
[0014] The link library conversion module is configured to obtain three-dimensional animation binding logic code corresponding to the three-dimensional animation binding logic data according to the connection relationship code and the node code, and convert the three-dimensional animation binding logic code into a three-dimensional animation binding logic dynamic link library.
[0015] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
[0016] Obtaining three-dimensional animation binding logic data, parsing the three-dimensional animation binding logic data to obtain binding information;
[0017] Obtaining a code template, and generating corresponding connection relationship code according to the code template and connection relationship information in the binding information;
[0018] Generating corresponding node code according to the code template and node information in the binding information;
[0019] Obtaining three-dimensional animation binding logic data, parsing the three-dimensional animation binding logic data to obtain binding information;
[0020] Obtaining a code template, and generating corresponding connection relationship code according to the code template and connection relationship information in the binding information;
[0021] Generating corresponding node code according to the code template and node information in the binding information;
[0022] Obtaining three-dimensional animation binding logic data, parsing the three-dimensional animation binding logic data to obtain binding information;
[0023] Generating corresponding node code according to the code template and node information in the binding information;
[0024] Obtaining three-dimensional animation binding logic data, parsing the three-dimensional animation binding logic data to obtain binding information;
[0025] The three-dimensional animation data processing method, device, computer readable storage medium and computer equipment described above, by using the binding information obtained by parsing the three-dimensional animation binding logic data, and by using the connection relationship information and node information in the code template and the binding information to generate corresponding three-dimensional animation binding logic code, converting the three-dimensional animation binding logic code into a three-dimensional animation binding logic dynamic link library, the three-dimensional animation binding logic dynamic link library can be provided to other 3D software platforms for use, and since the other 3D software platforms use the three-dimensional animation binding logic dynamic link library to synchronize the three-dimensional animation binding logic data, the running performance of the 3D software platform is improved. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 An application environment diagram of the three-dimensional animation data processing method in an embodiment;
[0027] Figure 2 A flowchart of the three-dimensional animation data processing method in an embodiment;
[0028] Figure 3 A schematic diagram of part of the animation binding system logic in an embodiment;
[0029] Figure 4 A flowchart of generating connection relationship code in an embodiment;
[0030] Figure 5 A flowchart of generating node code in an embodiment;
[0031] Figure 6 A flowchart of compiling three-dimensional animation binding logic code in an embodiment;
[0032] Figure 7 A structural diagram of the logic tree generated in an embodiment;
[0033] Figure 8 A flowchart of generating a three-dimensional animation in an embodiment;
[0034] Figure 9 A structural block diagram of the three-dimensional animation data processing device in an embodiment;
[0035] Figure 10 A structural block diagram of the computer equipment in an embodiment. DETAILED DESCRIPTION
[0036] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0037] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.Figure 1 FIG. 1 is a diagram of an application environment of a three-dimensional animation data processing method according to an embodiment. Referring to FIG. 1, the three-dimensional animation data processing method is applied to a three-dimensional animation data processing system. The three-dimensional animation data processing system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 can be a desktop terminal or a mobile terminal, and the mobile terminal can be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 can be implemented by an independent server or a server cluster composed of multiple servers. Figure 1 The three-dimensional animation data processing method is applied to a three-dimensional animation data processing system. The three-dimensional animation data processing system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 can be a desktop terminal or a mobile terminal, and the mobile terminal can be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 can be implemented by an independent server or a server cluster composed of multiple servers.
[0038] Specifically, the terminal 110 obtains three-dimensional animation binding logic data, parses the three-dimensional animation binding logic data, and obtains binding information. The terminal 110 obtains a code template, generates corresponding connection relationship code according to the connection relationship information in the binding information and the code template, generates corresponding node code according to the node information in the binding information and the code template, and obtains three-dimensional animation binding logic code corresponding to the three-dimensional animation binding logic data according to the connection relationship code and the node code. The terminal 110 converts the three-dimensional animation binding logic code into a three-dimensional animation binding logic dynamic link library, and can upload the three-dimensional animation binding logic dynamic link library to the server, so that other 3D software platforms can download the three-dimensional animation binding logic dynamic link library from the server 120 for use.
[0039] As shown in FIG. 2, in one embodiment, a three-dimensional animation data processing method is provided. This embodiment mainly takes the method applied to the terminal 110 in the above-mentioned three-dimensional animation data processing system as an example for illustration. Referring to FIG. 2, the three-dimensional animation data processing method specifically includes the following steps. Figure 2 Figure 1 The three-dimensional animation data processing method specifically includes the following steps. Figure 2
[0040] S202, obtaining three-dimensional animation binding logic data, parsing the three-dimensional animation binding logic data, and obtaining binding information.
[0041] The three-dimensional animation binding logic data refers to data of an animation binding system obtained by an animation binder through 3D production software to implement binding of nodes with different functions. For example, an animation binder produces an animation binding system logic diagram through Maya, as shown in FIG. 3, which is a part of the logic diagram of an animation binding system in a specific embodiment. The number of nodes and connections in the animation binding system logic diagram is very large. A node obtains output results by processing received input data. For example, an AddDoubleLinear node in Maya (a three-dimensional animation software) has a function of adding two input values and outputting a result. Figure 3 Figure 3 The middle node 5 adds the input 1 and the input 2 to obtain an output. The binding information refers to specific information of the three-dimensional animation binding logic, including all node information of the binding and connection relationship information between the nodes.
[0042] Specifically, when the animator completes the animation binding system logic diagram through the 3D production software in the terminal, a three-dimensional animation binding logic data processing instruction sent by the animator is received, the completed animation binding system logic diagram is obtained according to the instruction, and the animation binding system logic diagram is parsed to obtain the binding information. For example, when the animator completes the animation binding system logic diagram in Maya, the animation binding system logic diagram can be traversed through the self-parsing interface to obtain the node information and the binding relationship information in the animation binding system logic diagram.
[0043] S204, a code template is obtained, and a corresponding connection relationship code is generated according to the connection relationship information in the binding information and the code template.
[0044] The code template is a template file for generating code and is preset. For example, it can be a template file of C++ (a computer programming language) code. The connection relationship information refers to the connection relationship between nodes. For example, the output result in the previous node is used as the input data of the next node.
[0045] Specifically, the terminal can obtain the code template from the server in advance and save the code template in the memory. When the binding information is obtained, the connection relationship code corresponding to each connection relationship is generated according to the connection relationship information in the binding information and the code template saved in the memory.
[0046] S206, a corresponding node code is generated according to the node information in the binding information and the code template.
[0047] The node information refers to specific information of the node, such as a node name, input data, and output result. The binding information can include a large amount of node information and connection relationship information between the nodes.
[0048] Specifically, the terminal generates the node code corresponding to each node according to the code template saved in the memory and the node information in the binding information.
[0049] S208, a three-dimensional animation binding logic code corresponding to the three-dimensional animation binding logic data is obtained according to the connection relationship code and the node code, and the three-dimensional animation binding logic code is converted into a three-dimensional animation binding logic dynamic link library.
[0050] The three-dimensional animation binding logic dynamic link library refers to a dynamic link library generated according to the three-dimensional animation binding logic data. The obtained dynamic link library can be a C++ dynamic link library. The dynamic link library (Dynamic Link Library or Dynamic-link Library, abbreviated as DLL) is a way to realize the concept of shared function library. The extension of these library functions is “.dll”, “.ocx” (library containing ActiveX control) or “.drv” (old system driver). Dynamic linking provides a method so that a process can call functions that do not belong to the executable code of the process, and the executable code of the function is located in a DLL file, which contains one or more functions that have been compiled, linked and stored separately from the process that uses them. Using dynamic link libraries can more easily apply updates to individual modules without affecting other parts of the program. The three-dimensional animation binding logic dynamic link library can run on a 3D software platform, including but not limited to Maya, MotionBuilder (3D character animation software) and game engines (such as Unreal Engine and Unity, etc.), and is not limited to any operating system platform, including but not limited to Windows, Mac, Linux, IOS and Android, etc.
[0051] Specifically: after obtaining the connection relationship code and the node code, the connection relationship code and the node code are taken as the three-dimensional animation binding logic code corresponding to the three-dimensional animation binding logic data, and then the three-dimensional animation binding logic code is converted into the three-dimensional animation binding logic dynamic link library through a compiler.
[0052] The three-dimensional animation data processing method, device, computer readable storage medium and computer equipment described above, by parsing the binding information obtained from the three-dimensional animation binding logic data, and generating the corresponding three-dimensional animation binding logic code through the connection relationship information and the node information in the binding information and the code template, and converting the three-dimensional animation binding logic code into the three-dimensional animation binding logic dynamic link library, the three-dimensional animation binding logic dynamic link library can be provided to other 3D software platforms for use. Since other 3D software platforms use the three-dimensional animation binding logic dynamic link library to synchronize the three-dimensional animation binding logic data, the running performance of the 3D software platform is improved. At the same time, the three-dimensional animation binding logic dynamic link library can be run in real time on other 3D software platforms, which is convenient to use.
[0053] In one embodiment, as shown in Figure 4 The step S204 of generating the corresponding connection relationship code according to the connection relationship information in the binding information and the code template includes the steps of:
[0054] S402, find the relationship code to be generated position corresponding to the connection relationship information in the code template.
[0055] Specifically, the relationship code to be generated position refers to a position in the code template where the connection relationship code needs to be generated. The relationship code to be generated position is pre-set. For example, the relationship code to be generated position can be a connection relationship identifier in the code template, and when the connection relationship identifier is found, the relationship code to be generated position is obtained.
[0056] S404, obtaining a target character corresponding to the relationship code to be generated position in the code template.
[0057] Specifically, the target character is used to indicate a position to be filled by the generated connection relationship code. The target character can use any character, such as "0", "{0}", etc. Each relationship code to be generated position has its corresponding target character, which can be after the relationship code to be generated position.
[0058] S404, obtaining a target character corresponding to the relationship code to be generated position in the code template.
[0059] Specifically, the target character is used to indicate a position to be filled by the generated connection relationship code. The target character can use any character, such as "0", "{0}", etc. Each relationship code to be generated position has its corresponding target character, which can be after the relationship code to be generated position.
[0060] In the above embodiment, by converting the upstream and downstream connection relationship in the three-dimensional animation binding logic data into the connection relationship code corresponding to the tree-shaped parent-child structure, the automatic generation of the connection relationship code is realized.
[0061] In one embodiment, as shown in Figure 5 S206, generating a corresponding node code according to the code template and the node information in the binding information, includes the steps of:
[0062] S502, finding a node code to be generated position corresponding to the node information in the code template.
[0063] Specifically, the node code to be generated position refers to a position in the code template where node code needs to be generated. Each node in the node information needs to generate corresponding node code. Each node can have the same node code to be generated position, or different node code to be generated positions.
[0064] S504, obtaining a target character corresponding to the node code to be generated position in the code template.
[0065] S506, obtaining the corresponding node code according to the node information, and replacing the target character with the node code in the code template.
[0066] Specifically, the terminal obtains the target character corresponding to the node code to be generated position in the code template. Then the corresponding node code is obtained according to the node information, which is pre-implemented according to the function of the node in the 3D production software using C++ language. Each node can be implemented by a class in C++ language. Then the node code corresponding to each node in the node information is found in the corresponding target character in the code template, and the target character is replaced with the corresponding node code, and finally the code of writing the node code corresponding to the node information into the code template is obtained.
[0067] In one specific embodiment, for example, the node of MultiplyDivide of Maya is used to multiply or divide two inputs, and the C++ implementation code of the MultiplyDivide node is preset. When the target character corresponding to the node code to be generated position of the MultiplyDivide node in the code template is found, the C++ implementation code of the MultiplyDivide node is written into the code template.
[0068] In one embodiment, a corresponding calling method can be generated according to the node code, and the target character corresponding to the node code to be generated position is replaced with the calling method code. For example, the calling method code of the C++ implementation code of the MultiplyDivide node can be generated, and the target character corresponding to the node code to be generated position is replaced with the calling method code.
[0069] In the above embodiment, by replacing the target character corresponding to the node code to be generated position in the code template with the node code corresponding to the node information, the node code corresponding to the node information is automatically generated, which is convenient for subsequent use.
[0070] In one embodiment, as shown in Figure 6 Step S208, i.e., converting the three-dimensional animation binding logic code into a three-dimensional animation binding logic dynamic link library, includes the following steps:
[0071] S602, obtaining a to-be-run operating system platform, and obtaining a corresponding target compiler according to the to-be-run operating system platform.
[0072] S604, compiling the three-dimensional animation binding logic code by using the target compiler to obtain a three-dimensional animation binding logic dynamic link library corresponding to the to-be-run operating system platform.
[0073] The to-be-run operating system platform refers to an operating system platform that needs to run the three-dimensional animation binding logic dynamic link library. For example, the operating system platform can be Windows, Mac, Linux, IOS, Android, and the like. The target compiler refers to a code compiler corresponding to the to-be-run operating system platform. For example, for the Windows platform, the code is compiled by using Visual Studio (an integrated development environment for Windows platform applications).
[0074] Specifically, the terminal obtains a to-be-run operating system platform, obtains a corresponding target compiler according to the to-be-run operating system platform, and compiles the three-dimensional animation binding logic code by using the target compiler to obtain a three-dimensional animation binding logic dynamic link library corresponding to the to-be-run operating system platform. A plurality of to-be-run operating system platforms can also be selected, and a plurality of corresponding target compilers are obtained, and the three-dimensional animation binding logic code is simultaneously compiled by using the plurality of target compilers to obtain a plurality of three-dimensional animation binding logic dynamic link libraries corresponding to the plurality of to-be-run operating system platforms. The plurality of three-dimensional animation binding logic dynamic link libraries are saved. When the operating system platform needs to use the dynamic link library, the corresponding three-dimensional animation binding logic dynamic link library can be directly obtained.
[0075] In the above embodiment, the three-dimensional animation binding logic code is compiled by using the compilers of different operating system platforms to obtain the three-dimensional animation binding logic dynamic link library, so that the three-dimensional animation binding logic dynamic link library can be used on the corresponding operating system platform, and the user experience is improved.
[0076] In one embodiment, after step S208, that is, after the three-dimensional animation binding logic code is converted into the three-dimensional animation binding logic dynamic link library, the method further includes the following step:
[0077] According to the output attribute of the three-dimensional animation binding logic dynamic link library, each binding logic tree corresponding to the three-dimensional animation binding logic dynamic link library is generated, and each binding logic tree is displayed.
[0078] The output attribute of the three-dimensional animation binding logic dynamic link library is the result of the three-dimensional animation binding logic, and the driving of the appearance of the three-dimensional animation character model is realized through the result. The output attribute includes the scaling of the skeleton, the rotation of the skeleton, the translation of the skeleton, the weight of the Blendshape, and the like. The binding logic tree is a data structure of the three-dimensional animation binding logic dynamic link library, which is composed of n (n >= 1) finite nodes to form a hierarchical collection.
[0079] Specifically, each binding logic tree corresponding to the output attribute of the three-dimensional animation binding logic dynamic link library is generated, each output attribute generates a corresponding tree structure, and each generated binding logic tree is displayed. For example, the implementation of controlling the scaling of the hand skeleton of the three-dimensional model in the three-dimensional animation binding logic dynamic link library is a binding logic tree. The implementation of controlling the opening and closing skeleton of the eyes of the three-dimensional model is a binding logic tree, and the like. As shown in Figure 7 Fig. 3 is a schematic diagram of an n-ary tree obtained by converting part of the animation binding system logic diagram in Maya into a three-dimensional animation binding logic C++ dynamic link library in a specific embodiment.
[0080] In the above embodiment, by generating each binding logic tree from the three-dimensional animation binding logic dynamic link library and displaying the binding logic tree, the user can conveniently compare the animation binding system logic diagram, and the user experience is improved.
[0081] In one embodiment, as shown in Figure 8 After step S208, after the three-dimensional animation binding logic code is converted into the three-dimensional animation binding logic dynamic link library, the method further includes the following steps:
[0082] S802, receiving a three-dimensional animation binding logic dynamic link library running instruction, calling the three-dimensional animation binding logic dynamic link library according to the three-dimensional animation binding logic dynamic link library running instruction, and obtaining three-dimensional animation input data.
[0083] The three-dimensional animation input data refers to the value of the controller that needs to be input. The controller refers to a master device that controls the start, speed regulation, braking and reverse of the motor by changing the wiring of the main circuit or control circuit and changing the resistance value in the circuit according to a predetermined order. It is composed of a program counter, an instruction register, an instruction decoder, a timing generator and an operation controller. It is the "decision-making mechanism" that issues commands, that is, it coordinates and commands the operation of the entire computer system.
[0084] Specifically, the terminal receives the running instruction of the three-dimensional animation binding logic dynamic link library, calls the three-dimensional animation binding logic dynamic link library saved in the memory according to the running quality, and can obtain the three-dimensional animation input data input by the user.
[0085] S804, obtaining three-dimensional animation output attribute values according to the three-dimensional animation input data using the three-dimensional animation binding logic dynamic link library, and generating the three-dimensional animation according to the three-dimensional animation output attribute values.
[0086] Specifically, the three-dimensional animation output attribute values refer to specific values corresponding to output attributes of the three-dimensional animation binding logic dynamic link library. The terminal generates and displays the three-dimensional animation according to the three-dimensional animation output attribute values.
[0087] In one embodiment, the C++ dynamic link library generated according to the 3D animation binding system made by Maya can be called in the 3D game engine, so that the 3D game engine runs the 3D animation binding system made by Maya in real time, thereby making the 3D game engine not dependent on Maya and improving the running performance of the 3D game engine.
[0088] In one embodiment, the C++ dynamic link library generated according to the 3D animation binding system made by Maya can be run in different 3D software such as MotionBuilder, that is, different 3D software has the same animation binding logic as Maya.
[0089] In one embodiment, the C++ dynamic link library generated by the 3D animation binding system made by Maya can be run in Maya, that is, the generated C++ dynamic link library can be used as a node in Maya, thereby making animation, and improving the running efficiency of Maya.
[0090] It should be understood that, although Figure 2 、 Figure 4 、 Figure 5 、 Figure 6 and Figure 8 the flowcharts in the respective steps are displayed in the order indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, Figure 2 、 Figure 4 、 Figure 6 、 Figure 8 and Figure 10 at least part of the steps can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with other steps or sub-steps or stages of other steps.
[0091] In one embodiment, as Figure 9As shown, a three-dimensional animation data processing apparatus 900 is provided, comprising: an analysis module 902, a relationship code generation module 904, a node code generation module 906 and a library conversion module 908, wherein:
[0092] The analysis module 902 is configured to obtain three-dimensional animation binding logic data, analyze the three-dimensional animation binding logic data, and obtain binding information.
[0093] The relationship code generation module 904 is configured to obtain a code template, and generate corresponding connection relationship code according to the connection relationship information in the binding information and the code template.
[0094] The node code generation module 906 is configured to generate corresponding node code according to the node information in the binding information and the code template.
[0095] The library conversion module 908 is configured to obtain three-dimensional animation binding logic code corresponding to the three-dimensional animation binding logic data according to the connection relationship code and the node code, and convert the three-dimensional animation binding logic code into a three-dimensional animation binding logic dynamic link library.
[0096] In one embodiment, the relationship code generation module 904 comprises:
[0097] A position searching unit is configured to search for a relationship code to be generated position corresponding to the connection relationship information in the code template.
[0098] A character obtaining unit is configured to obtain a target character corresponding to the relationship code to be generated position in the code template.
[0099] A code replacing unit is configured to obtain corresponding connection relationship code according to the connection relationship information, and replace the target character with the connection relationship code in the code template.
[0100] In one embodiment, the node code generation module 906 is further configured to search for a node code to be generated position corresponding to the node information in the code template, obtain a target character corresponding to the node code to be generated position in the code template, and replace the target character with the node code in the code template according to the node information.
[0101] In one embodiment, the library conversion module 908 is further configured to obtain a target operating system platform to be run, obtain a target compiler corresponding to the target operating system platform to be run, and compile the three-dimensional animation binding logic code through the target compiler to obtain a three-dimensional animation binding logic dynamic link library corresponding to the target operating system platform to be run.
[0102] In one embodiment, the three-dimensional animation data processing apparatus 900 further comprises:
[0103] The logic tree display module is configured to generate respective binding logic trees according to the output attributes of the three-dimensional animation binding logic dynamic link library, and display the respective binding logic trees.
[0104] In one embodiment, the three-dimensional animation data processing apparatus 900 further comprises:
[0105] The link library calling module is configured to receive a three-dimensional animation binding logic dynamic link library running instruction, call the three-dimensional animation binding logic dynamic link library according to the three-dimensional animation binding logic dynamic link library running instruction, and obtain three-dimensional animation input data.
[0106] The three-dimensional animation generation module is configured to obtain three-dimensional animation output attribute values by using the three-dimensional animation binding logic dynamic link library according to the three-dimensional animation input data, and generate a three-dimensional animation according to the three-dimensional animation output attribute values.
[0107] Figure 10 An internal structure diagram of a computer device in one embodiment is shown. The computer device can be specifically a terminal 110 in Figure 1 As shown in Figure 10 , the computer device includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and can also store a computer program, which, when executed by the processor, can enable the processor to implement a three-dimensional animation data processing method. The internal memory can also store a computer program, which, when executed by the processor, can enable the processor to execute a three-dimensional animation data processing method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0108] Those skilled in the art can understand that Figure 10 the structure shown in , only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0109] Figure 10 In one embodiment, the three-dimensional animation data processing apparatus provided by the present application can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 9The parsing module 902, the relationship code generation module 904, the node code generation module 906, and the link library conversion module 908 are shown. The computer program composed of various program modules enables the processor to perform the steps in the three-dimensional animation data processing method of various embodiments of the present application described in the specification.
[0110] For example, Figure 10 The computer device shown can perform the steps S202-S208 by executing the computer program stored in the memory. Figure 9 The parsing module 902 in the three-dimensional animation data processing apparatus shown performs step S202. The relationship code generation module 904 performs step S204. The node code generation module 906 performs step S206. The link library conversion module 908 performs step S208.
[0111] In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to enable the processor to perform the steps of the three-dimensional animation data processing method described above. Here, the steps of the three-dimensional animation data processing method can be the steps in the three-dimensional animation data processing method of various embodiments described above.
[0112] In one embodiment, a computer readable storage medium is provided, storing a computer program, the computer program being executed by the processor to enable the processor to perform the steps of the three-dimensional animation data processing method described above. Here, the steps of the three-dimensional animation data processing method can be the steps in the three-dimensional animation data processing method of various embodiments described above.
[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiment methods can be included. Any reference to memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0114] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0115] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for processing three-dimensional animation data, comprising: Obtain the 3D animation binding logic data, parse the 3D animation binding logic data, and obtain the binding information; Obtain a code template, and generate corresponding connection relationship code based on the code template and the connection relationship information in the binding information; Generate corresponding node code based on the code template and the node information in the binding information; Based on the connection relationship code and the node code, the 3D animation binding logic code corresponding to the 3D animation binding logic data is obtained. The 3D animation binding logic code is then converted into a 3D animation binding logic dynamic link library, including: obtaining target compilers corresponding to multiple operating system platforms to be run, using multiple target compilers to compile the 3D animation binding logic code simultaneously, obtaining 3D animation binding logic dynamic link libraries corresponding to the multiple operating system platforms to be run, and obtaining the corresponding 3D animation binding logic dynamic link library for use when the operating system platform needs to use the dynamic link library. The output attributes of the 3D animation binding logic dynamic link library include the results obtained from the 3D animation binding logic. The results obtained from the 3D animation binding logic are used to drive the appearance of the 3D animation character model. The output attributes include bone scaling, bone rotation, bone translation, and Blendshape weights.
2. The method according to claim 1, characterized in that, Generate corresponding connection relationship code based on the code template and the connection relationship information in the binding information, including: Find the location in the code template where the relationship code corresponding to the connection relationship information needs to be generated; Obtain the target character corresponding to the position where the relation code is to be generated from the code template; Obtain the corresponding connection relationship code based on the connection relationship information, and replace the target character with the connection relationship code in the code template.
3. The method according to claim 1, characterized in that, Generate corresponding node code based on the code template and the node information in the binding information, including: Find the location in the code template where the node code corresponding to the node information needs to be generated; Obtain the target character corresponding to the position where the node code is to be generated from the code template; Obtain the corresponding node code based on the node information, and replace the target character with the node code in the code template.
4. The method according to claim 1, characterized in that, The step of converting the 3D animation binding logic code into a 3D animation binding logic dynamic link library includes: Obtain the operating system platform to be run, and obtain the corresponding target compiler based on the operating system platform to be run; The target compiler compiles the 3D animation binding logic code to obtain the 3D animation binding logic dynamic link library corresponding to the operating system platform to be run.
5. The method according to claim 1, characterized in that, After converting the 3D animation binding logic code into a 3D animation binding logic dynamic link library, the method further includes: Generate corresponding binding logic trees based on the output attributes of the 3D animation binding logic dynamic link library, and display each binding logic tree.
6. The method according to claim 1, characterized in that, After converting the 3D animation binding logic code into a 3D animation binding logic dynamic link library, the method further includes: Receive the execution instruction of the 3D animation binding logic dynamic link library, call the 3D animation binding logic dynamic link library according to the execution instruction, and obtain the 3D animation input data; Based on the 3D animation input data, the 3D animation binding logic dynamic link library is used to obtain the 3D animation output attribute values, and the 3D animation is generated based on the 3D animation output attribute values.
7. A three-dimensional animation data processing device, characterized in that, The device includes: The parsing module is used to acquire 3D animation binding logic data, parse the 3D animation binding logic data, and obtain binding information; The relationship code generation module is used to obtain a code template and generate corresponding connection relationship code based on the code template and the connection relationship information in the binding information. A node code generation module is used to generate corresponding node code based on the code template and the node information in the binding information; The link library conversion module is used to obtain the 3D animation binding logic code corresponding to the 3D animation binding logic data based on the connection relationship code and the node code, and convert the 3D animation binding logic code into a 3D animation binding logic dynamic link library. This includes: obtaining target compilers corresponding to multiple operating system platforms to be run; simultaneously compiling the 3D animation binding logic code using multiple target compilers to obtain 3D animation binding logic dynamic link libraries corresponding to the multiple operating system platforms to be run; if an operating system platform needs to use a dynamic link library, obtaining the corresponding 3D animation binding logic dynamic link library for use; the output attributes of the 3D animation binding logic dynamic link library include the results obtained from the 3D animation binding logic; and driving the appearance of the 3D animation character model through the results obtained from the 3D animation binding logic. The output attributes include bone scaling, bone rotation, bone translation, and Blendshape weights.
8. The apparatus according to claim 7, characterized in that, The relation code generation module includes: The location lookup unit is used to find the location in the code template where the relationship code to be generated corresponds to the connection relationship information; A character acquisition unit is used to acquire the target character corresponding to the position where the relational code is to be generated in the code template; The code replacement unit is used to obtain the corresponding connection relationship code based on the connection relationship information, and replace the target character with the connection relationship code in the code template.
9. The apparatus according to claim 7, characterized in that, The node code generation module is further configured to: find the position in the code template where the node information is to be generated; and obtain the target character corresponding to the position in the code template where the node code is to be generated. Obtain the corresponding node code based on the node information, and replace the target character with the node code in the code template.
10. The apparatus according to claim 7, characterized in that, The link library conversion module is also used to obtain the operating system platform to be run, obtain the corresponding target compiler according to the operating system platform to be run, and compile the 3D animation binding logic code through the target compiler to obtain the 3D animation binding logic dynamic link library corresponding to the operating system platform to be run.
11. The apparatus according to claim 7, characterized in that, The device further includes: The logic tree display module is used to generate corresponding binding logic trees based on the output attributes of the 3D animation binding logic dynamic link library, and to display the binding logic trees.
12. The apparatus according to claim 7, characterized in that, The device further includes: The link library calling module is used to receive the execution instruction of the 3D animation binding logic dynamic link library, call the 3D animation binding logic dynamic link library according to the execution instruction, and obtain 3D animation input data; use the 3D animation binding logic dynamic link library to obtain 3D animation output attribute values according to the 3D animation input data, and generate 3D animation according to the 3D animation output attribute values.
13. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 6.
14. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 6.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Software development method and system for executing model drive structure
CN101256492A
Programming automation in a 3d graphical editor with tightly coupled logic and physical simulation
CN107077339A