CN112070868B - Animation playing method based on iOS system, electronic equipment and medium - Google Patents

Animation playing method based on iOS system, electronic equipment and medium Download PDF

Info

Publication number
CN112070868B
CN112070868B CN202010932690.XA CN202010932690A CN112070868B CN 112070868 B CN112070868 B CN 112070868B CN 202010932690 A CN202010932690 A CN 202010932690A CN 112070868 B CN112070868 B CN 112070868B
Authority
CN
China
Prior art keywords
animation
data
slot
node
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010932690.XA
Other languages
Chinese (zh)
Other versions
CN112070868A (en
Inventor
汪诗雨
孙旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Tacit Understanding Ice Breaking Technology Co ltd
Original Assignee
Beijing Tacit Understanding Ice Breaking Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tacit Understanding Ice Breaking Technology Co ltd filed Critical Beijing Tacit Understanding Ice Breaking Technology Co ltd
Priority to CN202010932690.XA priority Critical patent/CN112070868B/en
Publication of CN112070868A publication Critical patent/CN112070868A/en
Application granted granted Critical
Publication of CN112070868B publication Critical patent/CN112070868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/802D [Two Dimensional] animation, e.g. using sprites

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the disclosure discloses an animation playing method, electronic equipment and medium based on an iOS system, wherein the method comprises the steps of obtaining animation list information of one or more Spine animations to be played; constructing a skeleton node set and a slot node set based on the animation list information of each Spine animation; respectively adding skeleton node data and slot node data corresponding to each Spine animation to a root node of a scene architecture of a game engine of which the iOS system is native to generate a corresponding action scene; and obtaining texture information corresponding to each animation scene, and generating each Spine animation view to be played based on each animation scene and the corresponding texture information for playing. The game engine plays the spine animation based on the native provided by the iOS system, so that the life cycle and the animation state of the animation are comprehensively controlled by the iOS system, the problem of compatibility is not required to be considered any more, and the effect of playing a plurality of animation scenes from the same screen at the same time can be realized.

Description

Animation playing method based on iOS system, electronic equipment and medium
Technical Field
The disclosure relates to the technical field of electronics, in particular to a Spine animation playing method, electronic equipment and medium based on an iOS system.
Background
The spin animation is a 2D skeletal animation, the existing iOS terminal plays the spin animation usually applied to game scenes, and an external game engine (for example, a cos engine) built in a non-iOS system is needed to be used as a renderer to play the spin animation, and no other native scenes play the spin animation. The prior technical scheme for playing Spines animation based on the iOS terminal has at least the following disadvantages:
(1) Animation parameters such as the life cycle, variable state and the like of the Spine animation are not controlled by the iOS system, but are controlled by an external game engine, the animation state is difficult to control, and the iOS native system cannot control the life cycle of the animation. In addition, the life cycle, the memory occupation and the like of the Spine animation variables cannot be optimized by utilizing functions provided by the iOS platform, so that occupied memory is overlarge, and the power consumption of equipment is overlarge.
(2) The iOS system and the external game engine need to be compatible with each other, and once the iOS system and the animation engine have the problem of compatibility, the stability of the program cannot be ensured, and great effort is required to be put into solving the problem of compatibility.
(3) In one application program, only one external game engine can be provided, other related engines cannot be accessed, and the external game engines have monopolization, so that when the spin animation is played, a plurality of external game engines cannot be started simultaneously to play, and a container for playing the animation exists in a single instance mode, and cannot be used for more single instances. Therefore, when a plurality of spine animations need to be played, only a plurality of spine animation scenes can be integrated, the spine animations are played according to the sequence of the animations, and a plurality of spine animations cannot be played in a screen at the same time.
Disclosure of Invention
The embodiment of the disclosure provides a Spine animation playing method, electronic equipment and medium based on an iOS system, which are used for solving the technical problems set forth in the background art or at least partially solving the technical problems set forth in the background art.
In a first aspect, an embodiment of the present disclosure provides a Spine animation playing method based on an iOS system, including:
Acquiring animation list information of one or more Spine animations to be played;
Constructing a skeleton node set and a slot node set based on the animation list information of each Spine animation, wherein the skeleton node set comprises one or more pieces of skeleton node data, the skeleton node data comprises animation effect information and motion logic information, the slot node set comprises one or more pieces of slot node data, and the slot node data comprises texture display information;
Respectively adding skeleton node data and slot node data corresponding to each Spine animation to a root node of a scene architecture of a game engine of which the iOS system is native to generate a corresponding action scene;
And obtaining texture information corresponding to each action scene, and generating each Spine animation view to be played based on each animation scene and the corresponding texture information for playing.
In a second aspect, embodiments of the present disclosure provide an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions configured to perform a Spine animation playing method based on the iOS system according to an embodiment of the first aspect of the present disclosure.
In a third aspect, an embodiment of the present disclosure provides a computer readable storage medium, where the computer instructions are configured to perform a Spine animation playing method based on an iOS system according to an embodiment of the first aspect of the present disclosure.
The game engine plays the spine animation based on the original provided by the iOS system, so that the management of the animation state and the variable life cycle and rendering nodes are all finished by the iOS system, and the external game engine such as a cocos is not needed to finish, so that the life cycle and the animation state of the animation are held by the iOS system, the overall control is performed, and the controllable state is achieved. In addition, the rendering technology of the original game engine provided by the iOS system platform is adopted, the problem of compatibility is not needed to be considered at all, the animation can be completely and freely used in the iOS system, finally, the animation is rendered by the original game engine, the original game engine does not exist in a single instance mode, a plurality of views for rendering the animation can be created, a plurality of nodes can be loaded in the views, and the effect of playing a plurality of animation scenes from the same screen at the same time can be achieved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing embodiments of the present application in more detail with reference to the accompanying drawings. The accompanying drawings are included to provide a further understanding of embodiments of the application and are incorporated in and constitute a part of this specification, illustrate the application and together with the embodiments of the application, and not constitute a limitation to the application.
FIG. 1 is a flowchart of a spin animation playback method based on an iOS system according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a process and an effect of performing spatial coordinate transformation on slot node data according to an embodiment of the disclosure;
fig. 3 is a schematic block diagram of an electronic device described in an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
The embodiment of the disclosure provides a Spine animation playing method based on an iOS system, as shown in fig. 1, comprising the following steps:
Step S1, obtaining animation list information of one or more Spine animations to be played;
S2, constructing a skeleton node set and a slot node set based on animation list information of each Spine animation, wherein the skeleton node set comprises one or more pieces of skeleton node data, the skeleton node data comprises animation effect information and motion logic information, the slot node set comprises one or more pieces of slot node data, and the slot node data comprises texture display information;
It should be noted that, in the existing Spine animation playing technology, the skeleton node and the slot node are combined together to be used as a whole, and the slot node is attached to the skeleton node, so that only the animation scene can be controlled as a whole, that is, only the motion information needs to be changed when the motion information is changed, and only the motion information needs to be changed simultaneously when the motion information is changed. In the method, the skeleton node and the slot node are controlled separately, so that the picture information and the action information displayed in the Dongyahu scene are controlled separately, and are not interfered with each other, for example, if one picture in the animation is to be replaced, the action information is not required to be modified, and only the corresponding picture is required to be modified.
Step S3, respectively adding the skeleton node data and the slot node data corresponding to each Spine animation to a root node of a scene architecture of a game engine of the iOS system to generate a corresponding action scene;
And S4, obtaining texture information corresponding to each action scene, and generating each Spine animation view to be played based on each animation scene and the corresponding texture information for playing.
The game engine plays the spine animation based on the original provided by the iOS system, so that the management of the animation state and the variable life cycle and rendering nodes are all finished by the iOS system, and the external game engine such as a cocos is not needed to finish, so that the life cycle and the animation state of the animation are held by the iOS system, the overall control is performed, and the controllable state is achieved. In addition, the rendering technology of the original game engine provided by the iOS system platform is adopted, the problem of compatibility is not needed to be considered at all, the animation can be completely and freely used in the iOS system, finally, the animation is rendered by the original game engine, the original game engine does not exist in a single instance mode, a plurality of views for rendering the animation can be created, a plurality of nodes can be loaded in the views, and the effect of playing a plurality of animation scenes from the same screen at the same time can be achieved.
As an example, the optimal animation presentation mode of the game engine SPRITEKIT, SPRITEKIT native to the iOS system is to preset lines (SKAction) to nodes, and perform operations of combination, serialization and the like through multiple groups of behaviors to complete the animation effect. The step S1 may include:
And S11, analyzing and acquiring animation data from a json file of the Spine animation to be played, acquiring a plurality of action data and time line information, wherein the time line information comprises time information and sequence information, and inputting the animation data into a pre-established animation list generation model to be converted into animation list information for a game engine which is native to an iOS system.
It should be noted that, in the existing Spine animation playing technology, a real-time event callback is performed through an animation state machine, and then an animation effect is directly rendered in real time according to an event type; or by providing specific timeline data of the animation, the animation parameters in the timeline manager are spliced by the user to achieve the effect. Both of these schemes are not suitable for SPRITEKIT because SPRITEKIT provides an optimal animation presentation by presetting actions on nodes, and combining, serializing, etc. the actions of multiple groups to achieve the animation effect. Thus, the method of the present disclosure further comprises step S10 of constructing the animation list generation model:
Step S101, converting each motion data into a corresponding instruction, and packaging the corresponding motion data into a corresponding motion object, wherein the motion object comprises skeleton animation data and slot animation data, the skeleton animation data comprises deformation data, rotation data, scaling data and beveling data, and the slot animation data comprises replacement data of accessory textures, display hiding data and change data of colors;
Step S102, establishing a corresponding preset behavior sequence on each node under each set of actions based on the action objects and the time line information;
Step 103, based on the preset behavior sequences corresponding to each node and the time line information, combining the behavior sequences of all nodes corresponding to each set of actions together to generate an animation object corresponding to each set of actions, and based on the time line information and all generated animation objects, generating the animation list information, wherein the animation list information generated based on the skeleton animation data is skeleton animation list information, and the animation list information generated based on the slot animation data is slot animation list information.
An animation list generation model having a three-layer structure is constructed through steps S101 to S103,
The first layer is an animation object layer: each animation object is a set of actions, such as running, jumping, hugging and the like, the layer comprises the movement behaviors of all nodes and the display conversion of various textures, each set of actions can be split into a series of behaviors of each node at a specific time, and the behaviors are sequential. However, for each node, there is no sequence relationship with each other, so the animation object layer is equivalent to performing grouping operation on the corresponding preset behavior sequences on multiple nodes, and finally the groups are combined into an animation.
The second layer is a node preset behavior sequence layer: each node preset behavior sequence is a series of behaviors of the node under a set of actions, and each node preset behavior sequence is formed by combining a plurality of sets of action objects containing time and sequence relations, so that the node preset behavior sequence is equivalent to an ordered set of action objects. It is of course also a sequential relationship where the animation is performed in parallel, for example, the hand waving action, the palm portion may require both displacement and rotation, both actions may be performed simultaneously.
The third layer is an action object layer: each action object is an abstraction of a specific action instruction, in a spin animation, the animation part mainly includes a skeleton node animation and a slot node animation,
The present disclosure thus creates two subclasses of skeletal animation data and slot animation data for action objects, model refinement. Wherein the skeleton animation data mainly comprises operations such as deformation, rotation, scaling, beveling and the like, and the slot animation mainly comprises effects such as replacement data of accessory textures, display hidden data, change data of colors and the like.
And converting the json animation data in the spine into a behavior object corresponding to SPRITEKIT as a game engine native to the iOS system through an animation list generation model, and then attaching the behavior object to the corresponding node to generate a corresponding node set.
As an example, the step S2 includes:
Step S21, configuring skeleton animation list information of each Spine animation on basic nodes (such as SKNode in SPRITEKIT) of a game engine native to an iOS system, and constructing a corresponding skeleton node set;
Wherein, the skeleton node is used for providing action information, and does not need to display textures, so that the skeleton node is directly inherited from the basic node of the game engine of the iOS system.
Step S22, configuring slot animation list information of each Spine animation on a eis system native game engine' S eis smart nodes (SKSpriteNode in SPRITEKIT, for example), and constructing the corresponding slot node set.
Wherein the corresponding effect can be directly displayed by adding texture on the eidolon node.
Because the spatial coordinate system of the data provided in the json file of the Spine animation is different from the coordinate system of the game engine scene presentation native to the iOS system, spatial coordinate scaling is required, because the view of the game engine scene native to the iOS system is scalable, scaling is required, and the direction of the animation presentation may be different from the original image, and therefore, azimuth calculation may also be required. Therefore, the step S3 specifically further includes a step S31 of performing spatial coordinate conversion, scaling and azimuth conversion on the skeleton node data and the slot node data corresponding to each Spine animation, converting the spatial coordinate conversion, scaling and azimuth conversion into coordinate system data of a scene architecture of a game engine native to the iOS system, adding the coordinate system data to a root node of the scene architecture of the game engine native to the iOS system, and combining the coordinate system data and the root node to generate a tree-shaped node structure, so as to generate a corresponding action scene.
The original slot coordinate system is different from the texture coordinate system of the scene framework of the original game engine, the origin of the slot coordinate system is the upper left corner (0, 0), the origin of the texture coordinate system is the lower left corner (0, 0), in order to ensure that the animation can be normally executed, the coordinate system between the two is required to be converted when the animation is rendered, the size of the slot is known to be constant in the two coordinate systems, and the coordinates of the slot in the slot coordinate system are known variables, so that the coordinates of the slot in the texture coordinate system only need to be calculated. Whether a slot is rotated during conversion can also be an important factor. Specifically, in step S31, the slot node data is subjected to spatial coordinate transformation, and the transformation process and effect are shown in fig. 2, and the method includes the following steps:
Step S311, converting the slot node data from the original slot coordinate system to texture coordinate system data of the scene architecture of the game engine native to the iOS system:
Step S312, the coordinates of the slot node data in the slot coordinate system are (x 0, y 0), the sizes are (W0, H0), the canvas sizes are (PW, PH) all known variables, the directions of the slot coordinate system are consistent with the directions of the texture coordinate system after the slot coordinate system rotates anticlockwise by 90 degrees, the sizes of the slot are fixed in the slot coordinate system and the texture coordinate system, the corresponding coordinates of the slot original data in the texture coordinate system are (x 1, y 1),
The actual dimension of the slot is wide w=w0/PW, and high h=h0/PH;
if the slot is rotated by an angle w, x1=y0/PH-w, y1=x0/PW-H0;
if the slot is not rotated, x1=y0/PW, y1=y0/PH-H0.
As an example, in step S4, obtaining texture information corresponding to each action scene includes:
and S41, locally rendering the current texture by using a bottom graphic engine of a game engine based on the iOS system to obtain texture information corresponding to each action scene.
It should be noted that, in the existing Spine animation playing technology, specific information of how to cut a complete texture picture is described in the texture set file, and the specific information includes data such as x-direction coordinate values, y-direction coordinate values, width (width), height (height), rotation direction (rotated), and the like. Instead of regenerating the image, SPRITEKIT of the present disclosure performs local rendering display through the underlying graphics engine. The local texture and the full texture are therefore the same object used on the data source. The texture multiplexing design greatly reduces the memory occupation, all sub textures are rendered in real time through a graphics processor (gpu) without specific binary objects, and as such, the Spine animation playing scheme of the present disclosure can reduce the memory and CPU occupation.
It should be noted that, the apparatus according to the embodiments of the present disclosure corresponds to the method according to the embodiments of the present disclosure, so technical details described in the embodiments of the method are also applicable to the apparatus, and are not described in detail herein.
The embodiment of the disclosure also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions configured to perform the spin animation playback method based on the iOS system according to the embodiments of the present disclosure.
The embodiment of the disclosure also provides a computer readable storage medium, and the computer instructions are used for executing the spin animation playing method based on the iOS system.
Fig. 3 shows a schematic diagram of an electronic device 100 suitable for use in implementing embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As illustrated in fig. 3, the electronic device 100 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 101 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 102 or a program loaded from a storage means 108 into a Random Access Memory (RAM) 103. In the RAM 103, various programs and data necessary for the operation of the electronic apparatus 100 are also stored. The processing device 101, ROM 102, and RAM 103 are connected to each other by a bus 104. An input/output (I/O) interface 105 is also connected to bus 104.
In general, the following devices may be connected to the I/O interface 105: input devices 106 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 107 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 108 including, for example, magnetic tape, hard disk, etc.; and a communication device 109. The communication means 109 may allow the electronic device 100 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 shows the electronic device 100 with various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 109, or from the storage means 108, or from the ROM 102. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 101.
It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The spin animation playing method, the electronic device and the medium based on the iOS system of the unit do not form a limitation on the unit itself in a certain situation.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (6)

1. The spin animation playing method based on the iOS system is characterized by comprising the following steps of:
Obtaining animation list information of one or more Spine animations to be played, including: analyzing and acquiring animation data from a json file of a Spine animation to be played, acquiring a plurality of action data and time line information, wherein the time line information comprises time information and sequence information, inputting the animation data into a pre-established animation list generation model, and converting the animation data into animation list information for a game engine which is native to an iOS system;
the method further comprises constructing the animation list generation model:
Converting each motion data into a corresponding instruction, and packaging the corresponding motion data into a corresponding motion object, wherein the motion object comprises skeleton animation data and slot animation data, the skeleton animation data comprises deformation data, rotation data, scaling data and beveling data, and the slot animation data comprises replacement data of accessory textures, display hiding data and change data of colors;
Establishing a corresponding preset behavior sequence on each node under each set of actions based on the action objects and the time line information;
Combining the behavior sequences of all nodes corresponding to each set of actions together based on the corresponding preset behavior sequences on each node and the time line information, generating an animation object corresponding to each set of actions, and generating the animation list information based on the time line information and all generated animation objects, wherein the animation list information generated based on the skeleton animation data is skeleton animation list information, and the animation list information generated based on the slot animation data is slot animation list information;
Constructing a skeleton node set and a slot node set based on animation list information of each Spine animation, including: configuring skeleton animation list information of each Spine animation on basic nodes of a game engine which is native to an iOS system, and constructing a corresponding skeleton node set;
Configuring slot animation list information of each Spine animation on a eios system native game engine's eidolon node, and constructing the corresponding slot node set; the skeleton node set comprises one or more pieces of skeleton node data, the skeleton node data comprise animation effect information and motion logic information, the slot node set comprises one or more pieces of slot node data, and the slot node data comprise texture display information;
Respectively adding skeleton node data and slot node data corresponding to each Spine animation to a root node of a scene architecture of a game engine native to an iOS system to generate a corresponding action scene, wherein the method comprises the following steps:
The skeleton node data and the slot node data corresponding to each Spine animation are converted into coordinate system data of a scene architecture of a game engine of an iOS system after space coordinate conversion, scaling and azimuth conversion, and then added to a root node of the scene architecture of the game engine of the iOS system for node composition, so that a corresponding action scene is generated;
And obtaining texture information corresponding to each action scene, and generating each Spine animation view to be played based on each animation scene and the corresponding texture information for playing.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The space coordinate conversion of the slot node data comprises the following steps:
Converting slot node data from an original slot coordinate system to texture coordinate system data of a scene architecture of a game engine native to the iOS system:
The coordinates of the slot node data in the slot coordinate system are (x 0, y 0), the sizes are (W0, H0), the canvas sizes are (PW, PH) all known variables, the direction of the slot coordinate system is consistent with the direction of the texture coordinate system after the slot coordinate system rotates anticlockwise by 90 degrees, the size of the slot is fixed in the slot coordinate system and the texture coordinate system, the corresponding coordinates of the slot original data in the texture coordinate system are (x 1, y 1),
The actual dimension of the slot is wide w=w0/PW, and high h=h0/PH;
if the slot is rotated by an angle w, x1=y0/PH-w, y1=x0/PW-H0;
if the slot is not rotated, x1=y0/PW, y1=y0/PH-H0.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
Obtaining texture information corresponding to each action scene comprises the following steps:
And locally rendering the current texture by using a bottom graphic engine of the game engine based on the iOS system to obtain texture information corresponding to each action scene.
4. A method according to any one of claims 1 to 3, wherein,
The game engine native to the iOS system is SPRITEKIT.
5. An electronic device, comprising:
At least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the method of any of the preceding claims 1-4.
6. A computer readable storage medium, characterized in that computer executable instructions are stored for performing the method of any of the preceding claims 1-4.
CN202010932690.XA 2020-09-08 2020-09-08 Animation playing method based on iOS system, electronic equipment and medium Active CN112070868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010932690.XA CN112070868B (en) 2020-09-08 2020-09-08 Animation playing method based on iOS system, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010932690.XA CN112070868B (en) 2020-09-08 2020-09-08 Animation playing method based on iOS system, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN112070868A CN112070868A (en) 2020-12-11
CN112070868B true CN112070868B (en) 2024-04-30

Family

ID=73664070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010932690.XA Active CN112070868B (en) 2020-09-08 2020-09-08 Animation playing method based on iOS system, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112070868B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113888679A (en) * 2021-09-09 2022-01-04 北京像素软件科技股份有限公司 Animation generation method, device, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8228336B1 (en) * 2008-01-23 2012-07-24 Lucasfilm Entertainment Company Ltd. Integrating a motion synthesis system into a video game system
KR101519775B1 (en) * 2014-01-13 2015-05-12 인천대학교 산학협력단 Method and apparatus for generating animation based on object motion
CN105630787A (en) * 2014-10-28 2016-06-01 腾讯科技(深圳)有限公司 Animation implementation method and device based on dynamic portable network graphics
CN106774820A (en) * 2016-11-08 2017-05-31 北京暴风魔镜科技有限公司 The methods, devices and systems that human body attitude is superimposed with virtual scene
CN108126343A (en) * 2017-12-20 2018-06-08 网易(杭州)网络有限公司 Sight method of adjustment, device, processor and the terminal of game role
CN111161365A (en) * 2019-12-30 2020-05-15 珠海金山网络游戏科技有限公司 Method and device for compressing skeleton animation data
CN111462287A (en) * 2020-03-31 2020-07-28 网易(杭州)网络有限公司 Data processing method and device for skeleton animation in game and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8228336B1 (en) * 2008-01-23 2012-07-24 Lucasfilm Entertainment Company Ltd. Integrating a motion synthesis system into a video game system
KR101519775B1 (en) * 2014-01-13 2015-05-12 인천대학교 산학협력단 Method and apparatus for generating animation based on object motion
CN105630787A (en) * 2014-10-28 2016-06-01 腾讯科技(深圳)有限公司 Animation implementation method and device based on dynamic portable network graphics
CN106774820A (en) * 2016-11-08 2017-05-31 北京暴风魔镜科技有限公司 The methods, devices and systems that human body attitude is superimposed with virtual scene
CN108126343A (en) * 2017-12-20 2018-06-08 网易(杭州)网络有限公司 Sight method of adjustment, device, processor and the terminal of game role
CN111161365A (en) * 2019-12-30 2020-05-15 珠海金山网络游戏科技有限公司 Method and device for compressing skeleton animation data
CN111462287A (en) * 2020-03-31 2020-07-28 网易(杭州)网络有限公司 Data processing method and device for skeleton animation in game and electronic equipment

Also Published As

Publication number Publication date
CN112070868A (en) 2020-12-11

Similar Documents

Publication Publication Date Title
CN108010112B (en) Animation processing method, device and storage medium
Parisi Programming 3D Applications with HTML5 and WebGL: 3D Animation and Visualization for Web Pages
US9240070B2 (en) Methods and systems for viewing dynamic high-resolution 3D imagery over a network
CN109887069B (en) Method for displaying 3D scene graph on screen
CN103562862B (en) Global composition system
US9672652B2 (en) Method for processing a computer-animated scene and corresponding device
CN111754614A (en) Video rendering method and device based on VR (virtual reality), electronic equipment and storage medium
US20130127849A1 (en) Common Rendering Framework and Common Event Model for Video, 2D, and 3D Content
US20220241689A1 (en) Game Character Rendering Method And Apparatus, Electronic Device, And Computer-Readable Medium
CN105321142B (en) Sampling, mistake manages and/or the context switching carried out via assembly line is calculated
CN102411791B (en) Method and equipment for changing static image into dynamic image
CN105684037A (en) Graphics processing unit
CN105190701B (en) Synthesis system based on primitive and method
US11900088B2 (en) Method for generating a binding between a C/C++ library and an interpreted language, and carrying out the method to transform a three- dimensional (3D) model
KR20100103704A (en) Multi-buffer support for off-screen surfaces in a graphics processing system
CN111798545A (en) Method and device for playing skeleton animation, electronic equipment and readable storage medium
WO2012064411A2 (en) Methods and apparatus for sub-asset modification
CN112070868B (en) Animation playing method based on iOS system, electronic equipment and medium
WO2020077912A1 (en) Image processing method, device, and hardware device
WO2024067159A1 (en) Video generation method and apparatus, electronic device, and storage medium
CN117742677A (en) XR engine low-code development platform
CN116149469A (en) AR (augmented reality) -based user behavior recording method and AR
CN105378798A (en) Anti-aliasing for geometries
Peddie et al. Ray-Tracing Hardware
CN113672280A (en) Animation playing program package compiling method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant