Development method for 3D special effect by combining spine animation file into unity tool and storage medium

By mounting Spine 2D skeleton animation files and 3D particle special effects files on the art development end, and synchronously controlling the animation time nodes in the visual environment, the problem of the inability to synchronize 3D particle special effects and 2D skeleton animation in the visual environment in the existing technology is solved, and resource reuse and reduction of package size are achieved.

CN119810271APending Publication Date: 2025-04-11FUZHOU SANYI CHUANGXIANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411817562.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing technology cannot synchronize 3D particle effects and 2D skeleton animations in a visual environment, resulting in the client needing to develop additional code for debugging, increasing the development and testing time and the repetition of art resources.

Method used

By mounting the Spine 2D skeleton animation file in a subset relationship under the total special effect prefabricated file, at the same level as the 3D particle special effect file, and in a visual development environment, by controlling the occurrence time node of the 3D particle special effect, the occurrence time node of the Spine 2D skeleton animation file is directly synchronized.

Benefits of technology

It realizes the direct synchronization of 3D particle effects and 2D skeleton animation in a visual environment, without the need for additional code development and debugging of clients, reduces development and testing time, and reduces the repetition and package size of art resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810271A_ABST
    Figure CN119810271A_ABST
Patent Text Reader

Abstract

The invention relates to a development method for combining a spin animation file into a unity tool 3D special effect and a storage medium, a spin 2D skeletal animation file is mounted under a total special effect preform file in a subset relationship, and the spin 2D skeletal animation file and a 3D particle special effect file are located at the same level; the spine2D skeletal animation file is associated with the 3D particle effect file; at an art development end, in a visual development environment, the appearance time node of the spine 2D skeletal animation file is directly and synchronously controlled by controlling the appearance time node of the 3D particle effect, so that the spine 2D skeletal animation is combined into the 3D particle effect. Compared with the prior art, the method has the advantages that a client does not need to perform extra code development and debugging, subsequent testing and configuration are facilitated, what you see is what you get is directly achieved, 2D actions used in the special effect can be directly merged into original role action resources (only one action file is added, and image resources are not additionally added), resource reuse can be achieved, and the method is easy to implement. And the resource size is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a development method and storage medium for combining a spine animation file with a unity tool 3D special effect. Background Art

[0002] Spine is a software specially used for 2D skeletal animation production. The animation produced by it is called Spine animation. Its core principle is based on the skeletal system. It regards the various parts of a character or object as a structure connected by bones, just like the human skeleton, which controls the shape and movement of the object.

[0003] Unity is a powerful cross-platform game development engine. It provides a complete development environment for creating a variety of interactive content such as 2D and 3D games, simulations, virtual reality (VR) and augmented reality (AR) experiences. Unity has an intuitive visual editor that allows developers to build game worlds by simply dragging and dropping objects, writing scripts, and adjusting parameters.

[0004] In order to solve the problem of 3D particle effects and 2D skeletal animation being out of sync, the traditional way is to import 2D skeletal animation into Unity and develop it in combination with 3D particle effects. At this time, the program needs a lot of time to debug the synchronization issues between them to match the rhythm of the action and the effects.

[0005] This leads to the following disadvantages:

[0006] 1. It is impossible to synchronize in a visual environment, and a lot of development and testing time is required to debug synchronization issues;

[0007] Second, it will increase the duplication of the project's art resources and increase the size of the package;

[0008] 3. The 2D animation time nodes in each skill special effect are different. The client needs to develop code in the form of a configuration table to achieve the synchronization of special effects and 2D animation. This increases the workload of subsequent planning configuration parameters.

[0009] In the process of implementing the present invention, the inventors found that the prior art has the following problems:

[0010] In the prior art, synchronization cannot be performed in a visual environment, and the client needs to develop code and perform additional code development and debugging. Summary of the invention

[0011] In view of the above problems, the present application provides a development method and storage medium for integrating spine animation files into unity tool 3D special effects, which is used to solve the technical problems that synchronization cannot be performed in a visual environment, the client needs to develop code, and perform additional code development and debugging.

[0012] To achieve the above objectives, in a first aspect, the present application provides a development method for integrating a spine animation file into a unity tool 3D special effects, the development method comprising the following steps:

[0013] Create the spine prefab of the character model, construct 2D action instructions, and construct the spine 2D skeleton animation file according to the 2D action instructions;

[0014] Create a general special effect prefab, construct a 3D particle special effect instruction, and construct a 3D particle special effect file according to the 3D particle special effect instruction;

[0015] On the art development side, mount the 3D particle special effect file under the general special effect prefab file as a subset;

[0016] Mount the spine 2D skeleton animation file under the main special effect prefab file as a subset. The spine2D skeleton animation file and the 3D particle special effect file are at the same level.

[0017] Associate the spine 2D skeleton animation file with the 3D particle effect file;

[0018] On the art development side, in a visual development environment, by controlling the appearance time nodes of 3D particle effects, the appearance time nodes of the spine 2D skeleton animation files can be directly and synchronously controlled, so that the spine 2D skeleton animation can be integrated into the 3D particle effects.

[0019] As an implementation mode of the present invention, in constructing a spine 2D skeleton animation file;

[0020] According to the 2D actions appearing in the 3D particle effects, construct 2D action instructions, construct spine2D skeleton animation files according to the 2D action instructions, and directly incorporate the spine 2D skeleton animation files into the action resources of the character model.

[0021] As an embodiment of the present invention, the development method further comprises the following steps:

[0022] Determine whether to run the 2D action command. If so, run the 2D action alone.

[0023] Determine whether to run the 3D particle effect. If so, copy a spine 2D skeleton animation file corresponding to the 3D particle effect, and then call and play the 2D action in it.

[0024] As an implementation mode of the present invention, it is determined whether two files with the same name appear in the subset of the total special effect prefab. If two files with the same name appear, one of the files is deleted.

[0025] As an implementation mode of the present invention, it is determined whether two identical spine prefabs appear in a subset of the total special effect prefabs. If two identical spine prefabs appear, one of the spine prefabs is deleted.

[0026] As an implementation manner of the present invention, the 2D action instructions include attack, idling, running and skills.

[0027] As an implementation mode of the present invention, in the instruction of constructing 3D particle special effects, the 2D actions appearing in sequence in the 3D particle special effects are analyzed, and the spine 2D skeleton animation is constructed according to the 2D actions appearing in sequence;

[0028] When the 3D particle effects appear, the spine 2D skeleton animations that synchronously control the 2D actions in the 3D particle effects appear in sequence according to the time nodes.

[0029] Different from the existing technology, the above technical solution directly mounts the 2D skeleton animation file (SpineGameObject (skill_20022) as a subset relationship under the general special effect prefab (skill_2002202) on the art development side, and is at the same level as the 3D particle special effect (gd). In this way, the artist can directly synchronize the spine 2D animation node by controlling the birth time point of the 3D particle special effect in a visual development environment, without the need for additional code development and debugging on the client side, which facilitates subsequent testing and configuration, and directly achieves what you see is what you get. In order to reduce the duplication of art resources and reduce memory, the 2D action (skill_anim) used in the special effect can be directly incorporated into the original character action resource (only an action file is added, and no additional image resources are added), which can realize resource reuse and reduce resource size.

[0030] To achieve the above objectives, in a second aspect, the inventor provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method steps as described in any one of the above are implemented.

[0031] To achieve the above object, in a third aspect, the inventor provides an electronic device, including a processor and a storage medium, wherein the storage medium is the storage medium as described above;

[0032] The processor is used to execute the computer program stored in the storage medium to implement any of the method steps described above.

[0033] Different from the existing technology, the art of the technical solution of this application can directly synchronize the appearance time node of the spine 2D animation by controlling the appearance time node of the 3D particle special effects in a visual development environment. There is no need for additional code development and debugging on the client side, which facilitates subsequent testing and configuration and directly achieves what you see is what you get.

[0034] The above-mentioned records related to the invention content are only an overview of the technical solution of the present application. In order to enable ordinary technicians in the field to more clearly understand the technical solution of the present application, and then implement it according to the text of the specification and the contents recorded in the drawings, and to make the above-mentioned purpose and other purposes, features and advantages of the present application easier to understand, the following is an explanation in combination with the specific implementation mode and drawings of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The drawings are only used to illustrate the principles, implementation methods, applications, characteristics and effects of the specific embodiments of the present application and other related contents, and shall not be considered as limitations of the present application.

[0036] In the drawings of the specification:

[0037] Figure 1 A flowchart of a method for developing 3D special effects by integrating a spine animation file into a unity tool according to an embodiment of the present application;

[0038] Figure 2 This is a schematic diagram of mounting a 2D skeletal animation file on a general special effect prefab according to an embodiment of the present application;

[0039] Figure 3 This is a schematic diagram of an action animation of a spine animation file according to an embodiment of the present application;

[0040] Figure 4 A schematic diagram of a module of an electronic device according to an embodiment of the present application.

[0041] The reference numerals in the above drawings are described as follows:

[0042] 10. Electronic equipment,

[0043] 101. Processor,

[0044] 102. Storage medium. DETAILED DESCRIPTION

[0045] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0046] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.

[0047] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.

[0048] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.

[0049] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.

[0050] Without further limitations, in this application, the words "include", "comprises", "has" or other similar open-ended expressions used in sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.

[0051] Similar to the understanding in the Examination Guidelines, in this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.

[0052] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.

[0053] The processor described in the embodiments of the present application can be implemented by hardware, firmware, software or a combination thereof, and can use a circuit, a single or multiple application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable Gate Array, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, at least one of a microprocessor, and also includes other physical, biological or chemical structures that can achieve similar or equivalent functions to the processors listed above, such as biological neurons, quantum computing units, DNA computing units, etc., so that the processor can execute some or all of the steps in the computer program or method involved in the various embodiments of the present application, or any combination of the steps mentioned therein.

[0054] The computer program involved in the embodiment can be stored in a computer device readable storage medium, which includes but is not limited to a disk, a tape, a magnetic card, a floppy disk, a flash memory, an optical disk, an optical card, a read-only memory (ROM), a random access memory (RAM), an erasable programmable ROM (EPROM) and an electrically erasable programmable ROM (EEPROM), etc., and also includes other biological, physical or chemical structures that can achieve the same or equivalent functions as the storage media listed above, such as DNA, RNA, protein and other units with information storage capabilities. In a specific embodiment, the storage medium involved can be one of the above-mentioned media types, or a combination of the above-mentioned media types. In different embodiments, the computer program involved in the embodiment can be stored in a single medium in a centralized manner, or it can be stored in multiple media in a distributed manner. The memory containing the computer device readable storage medium can be a non-volatile memory or a random access memory. These computer device readable storage media can be built into the device, or they can be connected to the device involved in the embodiment as an external device or a part of an external device. In some embodiments, a memory with a computer device readable storage medium is deployed locally; in other embodiments, a solution of deploying the memory away from the processor may also be adopted, such as a network attached memory accessed via an RF circuit or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, a local area network (LAN), a wide area network (WLAN), a storage area network (SAN), etc., or a suitable combination thereof, as long as the computer device can access the memory. In addition, the computer program involved in the embodiment may be stored in plaintext / ciphertext form, or may be designed as training data, which may be integrated and reorganized through model training and implicitly stored in the parameter state of a deep neural network or other machine learning model.

[0055] According to some embodiments of the present application, please refer to Figures 1 to 4 This embodiment relates to a development method for combining a spine animation file with a unity tool 3D special effect, and the development method includes the following steps:

[0056] Create the spine prefab of the character model, construct 2D action instructions, and construct the spine 2D skeleton animation file according to the 2D action instructions;

[0057] Create a general special effect prefab, construct a 3D particle special effect instruction, and construct a 3D particle special effect file according to the 3D particle special effect instruction;

[0058] On the art development side, mount the 3D particle special effect file under the general special effect prefab file as a subset;

[0059] Mount the spine 2D skeleton animation file under the main special effect prefab file as a subset. The spine2D skeleton animation file and the 3D particle special effect file are at the same level.

[0060] Associate the spine 2D skeleton animation file with the 3D particle effect file;

[0061] On the art development side, in a visual development environment, by controlling the appearance time nodes of 3D particle effects, the appearance time nodes of the spine 2D skeleton animation files can be directly and synchronously controlled, so that the spine 2D skeleton animation can be integrated into the 3D particle effects.

[0062] According to some embodiments of the present application, optionally, in constructing a spine 2D skeleton animation file;

[0063] According to the 2D actions appearing in the 3D particle effects, construct 2D action instructions, construct spine2D skeleton animation files according to the 2D action instructions, and directly incorporate the spine 2D skeleton animation files into the action resources of the character model.

[0064] In this way, it is convenient to create spine 2D skeleton animation files according to the actions that appear in the 3D particle special effects, and then incorporate the spine 2D skeleton animation files into the action resources of the character model, so that they can be easily called when the 3D particle special effects appear.

[0065] According to some embodiments of the present application, optionally, the development method further includes the following steps:

[0066] Determine whether to run the 2D action command. If so, run the 2D action alone.

[0067] Determine whether to run the 3D particle effect. If so, copy a spine 2D skeleton animation file corresponding to the 3D particle effect, and then call and play the 2D action in it.

[0068] like Figure 3 As shown, in order to reduce the duplication of art resources and reduce memory, the 2D actions (skill_anim) used in special effects can be directly incorporated into the original character action resources (only an action file is added, and no additional image resources are added), which can realize resource reuse and reduce resource size.

[0069] Spine character animation is independent! It does not contain special effect files. When the special effect needs to be run, it will clone a corresponding spine animation file and then call the skill_anim action in it.

[0070] According to some embodiments of the present application, optionally, it is determined whether two files with the same name appear in the subset of the total special effect prefab, and if two files with the same name appear, one of the files is deleted.

[0071] According to some embodiments of the present application, optionally, it is determined whether two identical spine prefabs appear in a subset of the total special effect prefabs. If two identical spine prefabs appear, one of the spine prefabs is deleted.

[0072] In order to solve the shader conflict problem in the model, the artist mounts the 2D skeletal animation file as a subset under the main special effect prefab. It cannot be dragged in directly. In this way, the system will create a new spine prefab by itself. When the code is running, it will conflict with the shader in the original character model, resulting in abnormal special effect coloring.

[0073] The solution is to drag the spine prefab of the original character model into the total special effects prefab, and the problem will be solved!

[0074] If there is an abnormal special effects coloring problem, you need to delete a shader file and solve the border problem of the character through automatic inspection and automatic deletion.

[0075] According to some embodiments of the present application, optionally, the 2D action instructions include attacking, idling, running, and skills.

[0076] According to some embodiments of the present application, optionally, in the instruction to construct a 3D particle special effect, 2D actions that appear sequentially in the 3D particle special effect are analyzed, and spine 2D skeleton animation is constructed according to the 2D actions that appear sequentially;

[0077] When the 3D particle effects appear, the spine 2D skeleton animations that synchronously control the 2D actions in the 3D particle effects appear in sequence according to the time nodes.

[0078] In this way, if there are multiple 2D actions in the 3D particle special effect instruction, the spine2D skeleton animation that controls the 2D actions will appear in sequence according to the time point.

[0079] In this embodiment, the problem of 3D particle special effects and 2D skeletal animation being out of synchronization can be solved, reducing development and testing time; it is not necessary to add additional skill configuration tables to reduce the amount of parameter configuration required by planning; the same image resources can be reused, and images will not be packaged repeatedly during packaging, reducing the package size.

[0080] Different from the existing technology, the above technical solution directly mounts the 2D skeleton animation file (SpineGameObject (skill_20022) as a subset under the general special effect prefab (skill_2002202) at the same level as the 3D particle special effect (gd) on the art development side. Figure 2 As shown, in this way, artists can directly synchronize the spine 2D animation nodes by controlling the birth time of 3D particle effects in a visual development environment, without the need for additional code development and debugging on the client side, which is convenient for subsequent testing and configuration, and directly achieves WYSIWYG. In order to reduce the duplication of art resources and reduce memory, the 2D actions (skill_anim) used in the special effects can be directly incorporated into the original character action resources (only an action file is added, and no additional image resources are added), which can achieve resource reuse and reduce resource size.

[0081] In a second aspect, the present invention further provides a storage medium storing a computer program, which implements the method steps of the first aspect of the present invention when executed by a processor.

[0082] In the third aspect, see Figure 2 The present invention also provides an electronic device 10, including a processor 101 and a storage medium 102, wherein the storage medium 102 is the storage medium of the second aspect; the processor 101 is used to execute the computer program stored in the storage medium 102 to implement the method steps of the first aspect.

[0083] Different from the existing technology, the art of the technical solution of this application can directly synchronize the appearance time node of the spine 2D animation by controlling the appearance time node of the 3D particle special effects in a visual development environment. There is no need for additional code development and debugging on the client side, which facilitates subsequent testing and configuration and directly achieves what you see is what you get.

[0084] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.

Claims

1. A development method for combining spine animation files with unity tool 3D special effects, characterized in that: The development method comprises the following steps: Create the spine prefab of the character model, construct 2D action instructions, and construct the spine 2D skeleton animation file according to the 2D action instructions; Create a general special effect prefab, construct a 3D particle special effect instruction, and construct a 3D particle special effect file according to the 3D particle special effect instruction; On the art development side, mount the 3D particle special effect file under the general special effect prefab file as a subset; Mount the spine 2D skeleton animation file under the main special effect prefab file as a subset. The spine 2D skeleton animation file and the 3D particle special effect file are at the same level. Associate the spine 2D skeleton animation file with the 3D particle effect file; On the art development side, in a visual development environment, by controlling the appearance time nodes of 3D particle effects, the appearance time nodes of the spine 2D skeleton animation files can be directly and synchronously controlled, so that the spine 2D skeleton animation can be integrated into the 3D particle effects.

2. The development method of combining spine animation files into unity tool 3D special effects according to claim 1, characterized in that: In building the spine 2D skeletal animation file; According to the 2D actions appearing in the 3D particle effects, construct 2D action instructions, build spine 2D skeleton animation files according to the 2D action instructions, and directly incorporate the spine 2D skeleton animation files into the action resources of the character model.

3. The development method of combining spine animation files into unity tool 3D special effects according to claim 2, characterized in that: The development method further comprises the following steps: Determine whether to run the 2D action command. If so, run the 2D action alone. Determine whether to run the 3D particle effect. If so, copy a spine 2D skeleton animation file corresponding to the 3D particle effect, and then call and play the 2D action in it.

4. The development method of combining spine animation files into unity tool 3D special effects according to claim 3, characterized in that: Determine whether there are two files with the same name under the subset of the total special effect prefab. If there are two files with the same name, delete one of them.

5. The development method of combining spine animation files into unity tool 3D special effects according to claim 4, characterized in that: Determine whether there are two identical spine prefabs in the subset of the total special effect prefab. If two identical spine prefabs appear, delete one of the spine prefabs.

6. The development method of combining spine animation files into unity tool 3D special effects according to claim 1, characterized in that: The 2D action instructions include attack, idling, running and skills.

7. The method for developing 3D special effects by integrating spine animation files into unity tools according to any one of claims 1 to 6, characterized in that: In the command to build 3D particle effects, analyze the 2D actions that appear in the 3D particle effects, and build the spine 2D skeleton animation based on the 2D actions that appear in sequence; When the 3D particle effects appear, the spine 2D skeleton animations that synchronously control the 2D actions in the 3D particle effects appear in sequence according to the time nodes.

8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method steps according to any one of claims 1 to 7 are implemented.

9. An electronic device, characterized in that: comprising a processor and a storage medium, wherein the storage medium is the storage medium according to claim 8; The processor is used to execute the computer program stored in the storage medium to implement the method steps according to any one of claims 1 to 7.