CN110853122B - Animation generation method, device and storage medium - Google Patents

Animation generation method, device and storage medium Download PDF

Info

Publication number
CN110853122B
CN110853122B CN201911080756.0A CN201911080756A CN110853122B CN 110853122 B CN110853122 B CN 110853122B CN 201911080756 A CN201911080756 A CN 201911080756A CN 110853122 B CN110853122 B CN 110853122B
Authority
CN
China
Prior art keywords
picture
animation
snowplow
pictures
area
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
CN201911080756.0A
Other languages
Chinese (zh)
Other versions
CN110853122A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201911080756.0A priority Critical patent/CN110853122B/en
Publication of CN110853122A publication Critical patent/CN110853122A/en
Application granted granted Critical
Publication of CN110853122B publication Critical patent/CN110853122B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs

Abstract

The animation generation method, device and storage medium provided in this embodiment include: the method comprises the steps of obtaining a snowplow map corresponding to a target folder, wherein the snowplow map is obtained by combining pictures in the target folder, obtaining animation picture information of each picture in the snowplow map, wherein the animation picture information comprises the size of the picture and the position of the picture in the snowplow map, and generating an animation corresponding to the snowplow map according to the animation picture information and a configuration file, wherein the configuration file comprises attribute parameters of objects in the picture. In the animation generation method provided by the application, the automation degree of animation generation is improved, and the animation generation efficiency is also improved.

Description

Animation generation method, device and storage medium
Technical Field
The present disclosure relates to the field of game development technologies, and in particular, to an animation generating method, an animation generating device, and a storage medium.
Background
With the vigorous development of the game industry, the development of animation in the game becomes particularly important, and various animation effects enable game scenes to be more lifelike and alive, and enhance the attraction of the game to users.
In the related art, two methods for producing an animation are provided, one is to produce an animation by importing a series of pictures with the same specification and combining the pictures manually by an animation designer, and the other is to select a plurality of pictures and produce the animation by adopting specific software.
However, the animation generation process needs to be manually participated, and when one picture is modified, the process needs to be manually re-executed once, so that the user experience is poor.
Disclosure of Invention
The application provides an animation generation method, an animation generation device and a storage medium, which are used for solving the problem that the animation generation needs to be manually participated.
In a first aspect, the present application provides an animation generation method, including:
s11, acquiring a snowplow corresponding to a target folder, wherein the snowplow is obtained by combining pictures in the target folder;
s12, obtaining animation picture information of each picture in the snowplow, wherein the animation picture information comprises the size of the picture and the position of the picture in the snowplow;
s13, generating an animation corresponding to the snowplow according to the animation picture information and a configuration file, wherein the configuration file comprises attribute parameters of objects in the picture.
Optionally, the configuration file is a code file, and generating, according to the animation picture information and the configuration file, an animation corresponding to the snowplow map includes:
acquiring the identification of the picture;
acquiring a field with the same field name as the identifier from the code file;
and assigning the animation picture information to the field, and generating the animation corresponding to the snowplow according to the code file.
Optionally, the obtaining the snowplow map corresponding to the target folder includes:
combining the pictures in the target folder according to preset combining modes to obtain combined pictures corresponding to each combining mode;
for each merging mode, calculating to obtain the area of a merged picture corresponding to the merging mode, wherein the area of the merged picture is determined by the maximum length and the maximum width of the merged picture;
and acquiring the snowplow corresponding to the target folder according to the combined picture with the minimum area.
Optionally, the assigning the animation picture information to the field, and generating the animation corresponding to the snowplow according to the code file includes:
performing format conversion on the animation picture information to obtain animation picture information after format conversion;
and assigning the animation picture information after format conversion to the field, and generating the animation corresponding to the snowplow according to the code file.
Optionally, after generating the animation corresponding to the snowplow according to the animation picture information and the configuration file, the method further includes:
monitoring whether added pictures or deleted pictures exist in the target folder;
if yes, go to steps S11 to S13.
Optionally, before the obtaining the snowplow corresponding to the target folder, the method further includes:
acquiring a plurality of original pictures;
classifying the plurality of original pictures to obtain at least one resource folder, wherein the pictures in each resource folder contain objects of the same class;
and acquiring the target folder according to at least one picture in each resource folder.
Optionally, the attribute parameters include an orientation and a position of a bone of the object.
In a second aspect, the present application provides an animation generation device, including:
the acquisition module is used for acquiring a snowplow image corresponding to a target folder, wherein the snowplow image is obtained by combining the images in the target folder;
acquiring animation picture information of each picture in the snowplow, wherein the animation picture information comprises the size of the picture and the position of the picture in the snowplow;
and the processing module is used for generating the animation corresponding to the snowplow according to the animation picture information and the configuration file, wherein the configuration file comprises attribute parameters of the object in the picture.
In a third aspect, the present application provides an animation generating device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the method of the first aspect when executing the program.
In a fourth aspect, the present application provides a storage medium having stored therein instructions which, when executed on a computer, cause the computer to perform the method of the first aspect.
The animation generation method, device and storage medium provided in this embodiment include: the method comprises the steps of obtaining a snowplow map corresponding to a target folder, wherein the snowplow map is obtained by combining pictures in the target folder, obtaining animation picture information of each picture in the snowplow map, wherein the animation picture information comprises the size of the picture and the position of the picture in the snowplow map, and generating an animation corresponding to the snowplow map according to the animation picture information and a configuration file, wherein the configuration file comprises attribute parameters of objects in the picture. In the animation generation method provided by the application, the automation degree of animation generation is improved, and the animation generation efficiency is also improved.
Drawings
FIG. 1 is a schematic diagram of a manual merge animation provided in an embodiment of the present application;
FIG. 2 is a flowchart of an embodiment one of an animation generation method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a resource folder according to an embodiment of the present disclosure;
fig. 4a is a schematic diagram of a first snowflake provided in an embodiment of the present application;
fig. 4b is a schematic diagram of a second snowflake provided in an embodiment of the present application;
FIG. 5 is a flowchart of a second embodiment of an animation generation method according to an embodiment of the present application;
fig. 6a is a schematic diagram of a third snowflake provided in an embodiment of the present application;
fig. 6b is a schematic diagram of a snowflake fourth provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an embodiment one of an animation generating device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a second embodiment of an animation generating device according to the embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
At present, in the game development process, two methods for producing an animation are provided, one method is to introduce a series of pictures with the same specification, and combine the pictures manually by an animation designer, and fig. 1 is a schematic diagram of the manual combined animation provided in the embodiment of the application, as shown in fig. 1, including eight pictures, where the eight pictures have the same specification, that is, the sizes of the pictures are the same, each picture represents a decomposition action of running, and a running animation is produced by combining the eight pictures manually.
And the other is to select a plurality of pictures to generate an animation by adopting specific software, select a picture 1 and a picture 2 to generate a snowplow by adopting specific software, acquire the animation picture information of the picture 1 and the picture 2, convert the two animation picture information into a JSON document, and then load the JSON document into a webpage code, thereby realizing the production of the animation. In this process, the specifications of the pictures may be different or the same.
However, the animation generation process needs to be manually participated, and when one picture is modified, the process needs to be manually re-executed once, so that the user experience is poor.
The following describes the technical scheme shown in the present application in detail by improving specific embodiments. It should be noted that the following embodiments may be combined with each other, and for the same or similar content, the description will not be repeated in different embodiments.
The execution subject of the embodiment of the present application may be an animation generation device, which may be provided in a terminal device or a server. Alternatively, the animation generation means may be implemented by software, or the animation generation means may be implemented by a combination of software and hardware.
Fig. 2 is a flowchart of an embodiment one of an animation generation method provided in an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
s11, acquiring a snowplow map corresponding to the target folder, wherein the snowplow map is obtained by combining pictures in the target folder.
In order to provide better user experience, web games often need to load animations, and since each time an animation is loaded, a connection needs to be established, so that the web access waiting time becomes longer as the number of the animations to be loaded is continuously increased, based on the connection, a plurality of pictures are combined into a snowplow map, and the animations are generated according to the snowplow map, so that only one connection needs to be established, and the access pressure is reduced.
The pictures in the target folder may be pre-selected, and exemplary, the pictures in the target folder include a blue mouse picture, a red mouse picture, and a score picture, and then the pictures in the target folder are combined to obtain the snowplow.
The target folder can be obtained through the following possible implementation modes:
optionally, before step S11, the method further includes:
s111, acquiring a plurality of original pictures.
S112, classifying the plurality of original pictures to obtain at least one resource folder, wherein the pictures in each resource folder contain objects of the same class.
The plurality of original pictures may be downloaded from a network or determined according to an access frequency of a user, and the embodiment does not limit a source of the original pictures. And classifying the plurality of original pictures to obtain at least one resource folder, wherein the pictures in each resource folder contain objects of the same class.
For example, fig. 3 is a schematic diagram of a resource folder provided in an embodiment of the present application, and referring to fig. 3, the original picture includes a picture of a normal state of a blue mouse, a picture of a knocked state of a blue mouse, a picture of crying action decomposition 2 of a blue mouse, a picture of crying action decomposition 1 of a blue mouse, a picture of a normal state of a red mouse, a picture of a knocked state of a red mouse, a picture of crying action decomposition 2 of a red mouse, a picture of crying action decomposition 1 of a red mouse, a picture of a score, a picture of a hammer, and a picture of a score background.
It should be noted that, the format of the original picture may be a portable network graphic (Portable Network Graphics, png) format, or may be other picture formats, which is not limited in this embodiment.
Of course, fig. 3 is merely an exemplary illustration of an original picture, and in practical applications, the original picture includes, but is not limited to, the above examples.
For the example of fig. 3, the objects of the pictures are blue mice, red mice, score, hammer, score background, and then three resource folders are obtained after classifying the multiple original pictures, wherein the objects of the pictures in each resource folder are in the same category, namely, the picture of the blue mice in the normal state, the picture of the blue mice in the knocked state, the picture of the blue mice crying action 2, and the picture of the crying action decomposition 1 of the blue mice belong to the blue mice resource folder; the picture of the normal state of the red mice, the picture of the knocked state of the red mice, the picture of crying action 2 of the red mice and the picture of crying action decomposition 1 of the red mice belong to the red mice resource folder; the score picture, the hammer picture and the score background picture belong to a static picture folder.
S113, acquiring a target folder according to at least one picture in each resource folder.
Taking fig. 3 as an example, a picture of crying action 2 of a blue mouse is obtained from the blue mouse resource folder, a picture of a normal state of the red mouse is obtained from the red mouse resource folder, a score picture is obtained from the static picture folder, and a hammer picture is obtained from the still picture folder, and the target folder is obtained according to the pictures.
And then, merging the pictures in the target folder to obtain a snowplow picture, and optionally merging the pictures according to a preset merging mode. On the basis of the embodiment of fig. 3, two kinds of snowflake diagrams are obtained by taking two preset merging modes as an example, fig. 4a is a schematic diagram of a first snowflake diagram provided by the embodiment of the present application, fig. 4b is a schematic diagram of a second snowflake diagram provided by the embodiment of the present application, referring to fig. 4a, in the merging mode of fig. 4a, a picture of a blue mouse crying action 2, a picture of a red mouse normal state, a picture of a score, and a picture of a hammer are sequentially and transversely merged, referring to fig. 4b, a picture of a blue mouse crying action 2 and a picture of a red mouse normal state are transversely merged, the score is positioned in the middle of the lower part of the merged pictures, and the picture of the hammer is positioned in the middle of the upper part of the merged pictures. Optionally, in multiple merging modes, the merged picture with the smallest area is a snowplow corresponding to the target folder, and the area of the merged picture is determined by the maximum length and the maximum width of the merged picture.
Of course, the present embodiment does not limit the merging manner of the snowplow images, and only needs to merge the images to obtain the snowplow images.
S12, obtaining the animation picture information of each picture in the snowplow.
The animation picture information comprises the size of the picture and the position of the picture in the snowplow map, and after the snowplow map corresponding to the target folder is obtained, the animation picture information of each picture in the snowplow map is obtained.
The position of the picture in the snowplow may be the vertex coordinate or the center point coordinate of the picture in the snowplow, which is not limited in this embodiment.
S13, generating the animation corresponding to the snowplow according to the animation picture information and the configuration file.
The configuration file includes attribute parameters of the objects in the picture, and the configuration file may be a code file.
Optionally, the attribute parameters include orientation and position of the bone of the object.
And loading the animation picture information of each picture in the snowplow into the configuration file, and generating the animation corresponding to the snowplow to realize real-time preview of the animation. The animation picture information of the picture in the configuration file and the attribute information of the object in the picture are corresponding.
After the configuration file is loaded, the configuration of the appointed picture can be written by the programming code, the obtained configuration value is used as one dynamic parameter of an application program interface (Application Programming Interface, API), other dynamic parameters can be simultaneously transmitted, and the animation can be generated after the API is called, wherein the dynamic parameters can be the frequency of executing a certain action, the duration of executing a certain action and the like of an object in the appointed picture. Wherein, the attribute parameter is a fixed parameter, and the dynamic parameter is an unfixed parameter.
For example, after the moving picture information of the picture 1 is loaded into the configuration file, the object in the picture 1 is the person 1, and the attribute parameters of the person 1 in the picture 1 include the orientation (including left, right, upward) and the position (the position coordinates of each body part, for example, the position coordinates of the arm are inclined at 45 degrees upward or 30 degrees downward) of the person 1, and then the corresponding API may be also called to obtain the dynamic parameters of the person 1, for example: a time period to the left, a time period when the arm is tilted up 45 degrees, etc. Specifically, the present embodiment is not limited to this, and is determined according to actual requirements.
Optionally, the animation corresponding to the snowflake map may be generated according to the animation picture information and the configuration file through the following possible implementation manners:
s131, acquiring the identification of the picture.
S132, acquiring fields with the same field names and identifiers from the code file.
And S133, assigning the animation picture information to the field, and generating an animation corresponding to the snowplow according to the code file.
The identifier of the picture in the snowplow may be the file name of the picture, such as "blue mouse normal status" and "red mouse knocked status" in fig. 4.
After the file name of the picture is obtained, the file name is used as an index to search a field with the field name being the same as the file name in the code file, then the animation picture information of the picture is assigned to the field, and the code file is loaded, so that the animation corresponding to the snowplow can be generated. The animation picture information of the picture in the code file corresponds to the attribute parameters of the object in the picture.
Optionally, step S133 specifically includes:
and carrying out format conversion on the animation picture information to obtain the animation picture information after format conversion.
And assigning the animation picture information after format conversion to the field, and generating an animation corresponding to the snowplow according to the code file.
Illustratively, the moving picture information in the present embodiment includes a size of a picture and a position of the picture in the snowplow map, and the size of the picture may be expressed as width: 42. height:20, the position of the picture in the snowplow map may be denoted (x, y) as (0, 10), and since some gaming applications cannot recognize this information, the size of the picture may be denoted as w: 42. h is 20, and the position can be unchanged.
Of course, the above is merely an exemplary illustration, and the format conversion may be performed on the moving picture information according to the game engine, and the present embodiment is not limited to the above-described format. And then assigning the animation picture information after format conversion to the field, and loading a code file to generate an animation corresponding to the snowplow.
Optionally, after step S13, it is also possible to perform:
and monitoring whether added pictures or deleted pictures exist in the target folder.
If yes, go to steps S11 to S13.
Specifically, after the snowplow corresponding to the target folder is generated, whether an added picture or a deleted picture exists in the folder or not can be monitored, wherein the added picture and the deleted picture are determined in response to user operation, that is, the user adds the picture to the target folder or deletes the target folder according to actual requirements.
If there are additional pictures or deleted pictures, steps S11 to S13 are performed, so that a snowplow map corresponding to the target folder is automatically generated, and an animation corresponding to the snowplow map is generated.
The animation generation method provided by the embodiment comprises the following steps: the method comprises the steps of obtaining a snowplow map corresponding to a target folder, wherein the snowplow map is obtained by combining pictures in the target folder, obtaining animation picture information of each picture in the snowplow map, wherein the animation picture information comprises the size of the picture and the position of the picture in the snowplow map, and generating an animation corresponding to the snowplow map according to the animation picture information and a configuration file, wherein the configuration file comprises attribute parameters of objects in the picture. In the animation generation method provided by the application, the automation degree of animation generation is improved, and the animation generation efficiency is also improved.
Based on the foregoing embodiments, the snowplow map corresponding to the target folder may be obtained through the following possible implementation manner, and fig. 5 is a flowchart of a second embodiment of the animation generation method provided in the embodiment of the present application, as shown in fig. 5, where step S11 specifically includes the following steps:
s21, combining the pictures in the target folder according to a plurality of preset combining modes, and obtaining combined pictures corresponding to each combining mode.
The preset multiple merging modes are preset multiple merging modes, including but not limited to transverse merging, longitudinal merging and merging modes in fig. 4a and 4 b. And merging each picture in the target folder according to a plurality of preset merging modes to obtain merged pictures corresponding to each merging mode.
S22, calculating the area of the combined picture corresponding to each combining mode.
The combined picture comprises each picture and a blank area in the target file, the blank area represents an area without the picture, and the blank area in the snowplow can be set for being compatible with fine errors of rendering animation of part of the browser. When the snowplow is loaded, a blank area needs to be loaded.
The area of the merged picture is determined by the maximum length and the maximum width of the merged picture, and the area of the merged picture may be equal to the maximum length multiplied by the maximum width.
In an exemplary embodiment, the object folder includes three 30×30 pictures and one 100×100 picture, fig. 6a is a schematic diagram of a snowflake diagram three provided in the embodiment of the present application, fig. 6b is a schematic diagram of a snowflake diagram four provided in the embodiment of the present application, in a merging manner shown in fig. 6a, the four pictures are sequentially merged in a lateral direction, in a merging manner shown in fig. 6b, the three 30×30 pictures are longitudinally merged, and one 100×100 picture is laterally merged with the three 30×30 pictures, in fig. 6a, a maximum length is 190, a maximum width is 100, an area is 190×100, in fig. 6b, a maximum length is 130, a maximum width is 100, an area is 130×100, and as can be seen from fig. 6a and 6b, an area 30×10 of a blank area in fig. 6b is smaller than an area 90×70 of a blank area in fig. 6 a.
S23, acquiring a snowplow corresponding to the target folder according to the combined picture with the minimum area.
And acquiring a combined picture with the smallest area in a plurality of preset combining modes, and taking the combined picture with the smallest area as a snowplow corresponding to the target folder.
Taking the manner shown in fig. 6a and 6b as an example, according to the merging manner shown in fig. 6b, various pictures in the target folder are merged to obtain a snowplow corresponding to the target folder.
Therefore, the area of the blank area of the combined picture with the smallest area is also smallest, and when the snowplow is loaded, the system memory can be saved.
Optionally, when previewing the animation, the picture may be modified according to requirements, for example: adding or deleting pictures, and then executing the steps S11-S13 to generate new animation so as to preview in real time.
The animation generation method provided by the embodiment comprises the following steps: according to a preset merging mode, merging the pictures in the target folder to obtain merged pictures corresponding to each merging mode, calculating to obtain the area of the merged pictures corresponding to the merging mode according to each merging mode, determining the area of the merged pictures by the maximum length and the maximum width of the merged pictures, and obtaining the snowplow corresponding to the target folder according to the merged picture with the minimum area. In this way, the reserved area of the snowplow is the smallest, and the system memory is saved during loading.
Fig. 7 is a schematic structural diagram of an embodiment one of an animation generating device provided in an embodiment of the present application, where the animation generating device may be integrated in a terminal device or a server, and as shown in fig. 7, the animation generating device may include:
the obtaining module 71 is configured to obtain a snowplow image corresponding to a target folder, where the snowplow image is obtained by combining pictures in the target folder;
s12, obtaining animation picture information of each picture in the snowplow, wherein the animation picture information comprises the size of the picture and the position of the picture in the snowplow;
and the processing module 72 is configured to generate an animation corresponding to the snowplow according to the animation picture information and a configuration file, where the configuration file includes attribute parameters of the object in the picture.
Optionally, the processing module 72 is specifically configured to:
acquiring the identification of the picture;
acquiring a field with the same field name as the identifier from the code file;
and assigning the animation picture information to the field, and generating an animation corresponding to the snowflake according to the code file, wherein the configuration file is a code file.
Optionally, the acquiring module 71 is specifically configured to:
the obtaining the snowplow corresponding to the target folder includes:
combining the pictures in the target folder according to preset combining modes to obtain combined pictures corresponding to each combining mode;
for each merging mode, calculating to obtain the area of a merged picture corresponding to the merging mode, wherein the area of the merged picture is determined by the maximum length and the maximum width of the merged picture;
and acquiring the snowplow corresponding to the target folder according to the combined picture with the minimum area.
Optionally, the acquiring module 71 is specifically configured to:
the assignment of the animation picture information to the field and the generation of the animation corresponding to the snowflake according to the code file comprise the following steps:
performing format conversion on the animation picture information to obtain animation picture information after format conversion;
and assigning the animation picture information after format conversion to the field, and generating the animation corresponding to the snowplow according to the code file.
Optionally, after generating the animation corresponding to the snowplow according to the animation picture information and the configuration file, the method further includes:
monitoring whether added pictures or deleted pictures exist in the target folder;
if yes, go to steps S11 to S13.
Optionally, the obtaining module 71 is further configured to:
acquiring a plurality of original pictures;
classifying the plurality of original pictures to obtain at least one resource folder, wherein the pictures in each resource folder contain objects of the same class;
and acquiring the target folder according to at least one picture in each resource folder.
Optionally, the attribute parameters include an orientation and a position of a bone of the object.
The device provided in the embodiment of the present application may be used to perform the method in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 8 is a schematic structural diagram of a second embodiment of an animation generating device according to an embodiment of the present application, and as shown in fig. 8, the animation generating device includes a processor 82;
a memory 81 for storing a computer program of the processor;
wherein the processor 82 is configured to implement an animation generation method by executing the computer program.
The embodiment of the application also provides a storage medium, wherein the storage medium stores instructions. The execution, when executed on a computer, causes the computer to perform the animation generation method described above.
It will be appreciated that the various numerical numbers referred to in the embodiments of the present application are merely for ease of description and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiments of the present application, the sequence number of each process described above does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (8)

1. An animation generation method, comprising:
s11, acquiring a snowplow corresponding to a target folder, wherein the snowplow is obtained by combining pictures in the target folder;
s12, obtaining animation picture information of each picture in the snowplow, wherein the animation picture information comprises the size of the picture and the position of the picture in the snowplow;
s13, generating an animation corresponding to the snowflake figure according to the animation picture information and a configuration file, wherein the configuration file comprises attribute parameters of objects in the picture;
the obtaining the snowplow corresponding to the target folder includes:
combining the pictures in the target folder according to preset combining modes to obtain combined pictures corresponding to each combining mode;
calculating the area of a merged picture corresponding to each merging mode, wherein the area of the merged picture is determined by the maximum length and the maximum width of the merged picture, the area of the merged picture comprises the area of each picture in the target file and the area of a blank area, and the blank area is an area without pictures;
acquiring a snowplow corresponding to the target folder according to the combined picture with the smallest area of the reserved area;
after generating the animation corresponding to the snowplow according to the animation picture information and the configuration file, the method further comprises the following steps:
monitoring whether added pictures or deleted pictures exist in the target folder;
if yes, go to steps S11 to S13.
2. The method according to claim 1, wherein the configuration file is a code file, and the generating the animation corresponding to the snowplow according to the animation picture information and the configuration file includes:
acquiring the identification of the picture;
acquiring a field with the same field name as the identifier from the code file;
and assigning the animation picture information to the field, and generating the animation corresponding to the snowplow according to the code file.
3. The method according to claim 2, wherein assigning the animation picture information to the field and generating the animation corresponding to the snowplow according to the code file comprises:
performing format conversion on the animation picture information to obtain animation picture information after format conversion;
and assigning the animation picture information after format conversion to the field, and generating the animation corresponding to the snowplow according to the code file.
4. The method of claim 1, further comprising, before the obtaining the snowplow corresponding to the target folder:
acquiring a plurality of original pictures;
classifying the plurality of original pictures to obtain at least one resource folder, wherein the pictures in each resource folder contain objects of the same class;
and acquiring the target folder according to at least one picture in each resource folder.
5. The method of claim 1, wherein the attribute parameters include an orientation and a position of a bone of the subject.
6. An animation generation device, comprising:
the acquisition module is used for S11, acquiring a snowplow image corresponding to a target folder, wherein the snowplow image is obtained by combining the pictures in the target folder;
s12, obtaining animation picture information of each picture in the snowplow, wherein the animation picture information comprises the size of the picture and the position of the picture in the snowplow;
the processing module is used for generating an animation corresponding to the snowplow according to the animation picture information and a configuration file, wherein the configuration file comprises attribute parameters of an object in the picture;
the acquisition module is specifically configured to combine the pictures in the target folder according to a preset combining mode, and acquire a combined picture corresponding to each combining mode;
calculating the area of a merged picture corresponding to each merging mode, wherein the area of the merged picture is determined by the maximum length and the maximum width of the merged picture, the area of the merged picture comprises the area of each picture in the target file and the area of a blank area, and the blank area is an area without pictures;
acquiring a snowplow corresponding to the target folder according to the combined picture with the smallest area of the reserved area;
after the animation corresponding to the snowflake figure is generated according to the animation picture information and the configuration file, the processing module is further used for monitoring whether added pictures or deleted pictures exist in the target folder;
if yes, go to steps S11 to S13.
7. An animation generating device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of the preceding claims 1-5 when executing the program.
8. A storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of any of claims 1-5.
CN201911080756.0A 2019-11-07 2019-11-07 Animation generation method, device and storage medium Active CN110853122B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911080756.0A CN110853122B (en) 2019-11-07 2019-11-07 Animation generation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911080756.0A CN110853122B (en) 2019-11-07 2019-11-07 Animation generation method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110853122A CN110853122A (en) 2020-02-28
CN110853122B true CN110853122B (en) 2024-02-06

Family

ID=69598620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911080756.0A Active CN110853122B (en) 2019-11-07 2019-11-07 Animation generation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110853122B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112770185B (en) * 2020-12-25 2023-01-20 北京达佳互联信息技术有限公司 Method and device for processing Sprite map, electronic equipment and storage medium
CN113495726A (en) * 2021-06-25 2021-10-12 上海万物新生环保科技集团有限公司 Method and equipment for generating snow Bill chart and style code thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392474A (en) * 2014-06-30 2015-03-04 贵阳朗玛信息技术股份有限公司 Method and device for generating and displaying animation
CN105844683A (en) * 2016-03-23 2016-08-10 深圳市富途网络科技有限公司 Pixel difference frame-by-frame animation realization method based on Canvas and WebWorker
CN107357934A (en) * 2017-08-10 2017-11-17 北京本邦科技股份有限公司 A kind of frame animation processing system and frame animation processing method based on Web
CN110209393A (en) * 2019-04-24 2019-09-06 深圳点猫科技有限公司 A kind of programming implementation method and device for head portrait replacement in gameization education

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392474A (en) * 2014-06-30 2015-03-04 贵阳朗玛信息技术股份有限公司 Method and device for generating and displaying animation
CN105844683A (en) * 2016-03-23 2016-08-10 深圳市富途网络科技有限公司 Pixel difference frame-by-frame animation realization method based on Canvas and WebWorker
CN107357934A (en) * 2017-08-10 2017-11-17 北京本邦科技股份有限公司 A kind of frame animation processing system and frame animation processing method based on Web
CN110209393A (en) * 2019-04-24 2019-09-06 深圳点猫科技有限公司 A kind of programming implementation method and device for head portrait replacement in gameization education

Also Published As

Publication number Publication date
CN110853122A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
US8743126B2 (en) Systems and methods for portable animation rigs
US9424617B2 (en) Graphics command generation device and graphics command generation method
CN110853122B (en) Animation generation method, device and storage medium
CN108287708B (en) Data processing method and device, server and computer readable storage medium
US9280449B2 (en) HIT testing of visual objects
CN110990516A (en) Map data processing method and device and server
JP2019032820A (en) Data set for learning functions with image as input
CN109324864B (en) Method and device for acquiring man-machine interaction operation information
CN108536467B (en) Code positioning processing method and device, terminal equipment and storage medium
US6756979B2 (en) Image processing method, image processing apparatus, computer program, and semiconductor device
US9529572B1 (en) Composable application session parameters
EP3050605B1 (en) A method for event detection in real-time graphic applications
KR101670958B1 (en) Data processing method and apparatus in heterogeneous multi-core environment
JP2017532662A (en) Systems, methods, and computer program products for automatically optimizing 3D texture models for network transfer and real-time rendering
CN111240736B (en) Model configuration method, device, equipment and storage medium
CN112807695A (en) Game scene generation method and device, readable storage medium and electronic equipment
CN110334027B (en) Game picture testing method and device
US11900514B2 (en) Digital content editing using a procedural model
JP2001184500A (en) Geometry pipeline for computer graphics
CN112691382B (en) Resource processing method, device and computer readable storage medium
CN111383312B (en) Large-scale knowledge graph visualization method based on particle system
CN114443306A (en) Resource processing method and device, electronic equipment and computer readable storage medium
CN112540820A (en) User interface updating method and device and electronic equipment
KR102087842B1 (en) System for a run-time field item changing using a real-time scanning
CN111562982B (en) Method and device for processing request data, computer readable storage medium and electronic equipment

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