A method for producing two-dimensional dynamic images
The two-dimensional dynamic image production method using a natural motion pattern library and adversarial network models efficiently generates high-quality images by simulating realistic movements, addressing inefficiencies and aesthetic limitations of traditional methods.
Patent Information
- Application Number
- CN202410136427.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-01-31
AI Technical Summary
Traditional methods for producing two-dimensional dynamic images are time-consuming and labor-intensive, requiring significant manpower and capital investment, and existing animation software struggles with complex movements, leading to inefficient and less aesthetically pleasing results.
A two-dimensional dynamic image production method utilizing a natural motion pattern library, which includes pre-storing parameter information, and utilizes an adversarial network model to generate and process images using a first and second adversarial network model to produce images, and involves a pre-processing step to determine and simulate realistic and natural object movements, and includes pre-processing steps to determine and simulate realistic and natural object movements, and involves a pre-processing step to determine and simulate realistic and natural object movements.
The method significantly enhances production efficiency and quality by simulating realistic and natural object shape and spatial movements, reducing time and resource consumption.
Smart Images

Figure CN118015163B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of two-dimensional dynamic images, and in particular to a method for producing two-dimensional dynamic images. Background Art
[0002] Two-dimensional dynamic images are images that quickly switch between a series of static images to create dynamic effects. Two-dimensional dynamic image technology can be widely used in various fields such as film and television production, game development, and advertising design.
[0003] In the production process of two-dimensional dynamic images, the traditional process requires the original artist to first draw the original drawings of the movement of people or objects at different time points on the drawing paper one by one; then clean up the lines based on these original drawings, fill in the ignored details, and draw the in-between time points between adjacent time points based on the original drawings; then color all the original drawings and in-between drawings; finally, play the colored original drawings and in-between drawings in sequence according to the timeline to form a dynamic visual effect. This process is time-consuming and requires a lot of manpower and capital investment, which limits the production capacity and finished product effect of two-dimensional dynamic images.
[0004] Existing animation software (such as Flash and CACAni) uses vector lines to derive the lines or graphics of intermediate animations. However, this kind of vector line can quickly obtain the blank middle part and the moving trajectory when processing clear lines or graphics, but it still requires a lot of manual fine-tuning when dealing with complex problems such as the non-existence of the front and back graphic lines and the change in the number of lines drawn. For example, when a character turns around significantly, it is necessary to manually handle the appearance and disappearance of limbs; during the movement of objects, it is necessary to handle splitting and merging, which greatly reduces the efficiency of using automated software and makes the entire production process more complicated and uncontrollable. In addition, the finished products produced by these software do not have obvious quality improvement, and they are not even as beautiful as pure hand-painted ones. Therefore, these software are mainly used to handle small-scale personal productions or simple juvenile animations; for various types of animation, they still rely mainly on a large number of manpower to complete a series of processes such as line drawing, intermediate animation and coloring. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a two-dimensional dynamic image production method.
[0006] The technical problem solved by the present invention can be achieved by adopting the following technical solutions:
[0007] A two-dimensional dynamic image production method, pre-establishing a natural motion pattern library, the natural motion pattern library pre-stores parameter information of objects of different categories, the parameter information including first-category information for representing all body posture parameters of each object at a fixed moment and second-category information for representing all body dynamic parameters of each object at all given moments in the process of completing a predetermined action;
[0008] The two-dimensional dynamic image production method comprises:
[0009] Step S1, obtaining a first original picture and a second original picture, wherein the first original picture and the second original picture both contain the same target object, and determining an object behavior of the target object between the first original picture and the second original picture;
[0010] Step S2, inputting the first original picture and the second original picture into a pre-built first adversarial network model respectively, wherein the first adversarial network model is used to output a first posture parameter of the target object in the first original picture at a fixed time and a second posture parameter of the target object in the second original picture at a fixed time according to the first type of information in the natural motion pattern library;
[0011] Step S3, inputting the first body posture parameter, the second body posture parameter and the object behavior into a pre-constructed second adversarial network model, wherein the second adversarial network model is used to output all target body dynamic parameters of the target object at all given moments in the process of completing the object behavior according to the second type of information in the natural motion pattern library;
[0012] Step S4, substituting all the target body dynamic parameters output by the second adversarial network model into a preset modeling model to obtain a target object model.
[0013] Preferably, the method further comprises: pre-establishing a body posture parameter library, wherein the body posture parameter library pre-stores all callable body posture parameters of the objects of different categories without overall spatial motion;
[0014] Each of the objects includes a plurality of blocks;
[0015] The steps of establishing the natural motion pattern library include:
[0016] Step A1, capturing motion data of each of the subjects in the body parameter library when performing a series of body parameters to complete a predetermined action;
[0017] Step A2, using the correlation ratio of the moving distance of all the blocks of the object in the motion data to the actual measurement information of the block characteristics as the predetermined action to generate a series of dynamic parameters;
[0018] Step A3, defining the predetermined action, packaging the action definition, the body posture parameters and the dynamic parameters in chronological order to form body dynamic parameters of each object and including them in the natural movement pattern library.
[0019] Preferably, step A3 also includes: assigning exaggerated variables to the body parameters and / or the dynamic parameters corresponding to the action definition, and packaging the exaggerated variables with the action definition, the body parameters and the dynamic parameters in chronological order to form body dynamic parameters of each object and including them in the natural motion pattern library.
[0020] Preferably, each of the blocks has a corresponding block code;
[0021] The step of establishing the body parameter library comprises:
[0022] Step B1, for each of the objects, determining the connection relationship between all the blocks in the object;
[0023] Step B2, determining a movable spatial range of each of the body blocks when it is fixed with one of the adjacent body blocks, the movable spatial range comprising a plurality of body block regions, each of the body block regions having a corresponding region code;
[0024] Step B3, determining the movement information of each body block relative to a preset standard posture when the body block is located in each body block area, and summarizing the body block code, the area code, and the movement information and including them in the body posture parameter library.
[0025] Preferably, after step S3 and before step S4, the method further includes:
[0026] Repeating steps S2-S3 for multiple times, outputting an output result each time after executing steps S2-S3, and each output result includes all target body dynamic parameters of the target object at all given moments in the process of completing the object behavior;
[0027] The dynamic parameter range of the target body at each given moment is determined based on the multiple output results, and a set of target body dynamic parameters is selected and output from the dynamic parameter range of the target body at all given moments as all the target body dynamic parameters output by the second adversarial network model.
[0028] Preferably, the step S4 further comprises: adding texture and / or coloring to the target object model.
[0029] Preferably, the step S4 further comprises:
[0030] The target object model is used to perform motion simulation, and screenshots are taken during the simulation process, and the screenshots are output as the first original picture, the second original picture, and an intermediate picture between the first original picture and the second original picture.
[0031] Preferably, the step S4 further includes:
[0032] The two intermediate pictures are used as the first original picture and the second original picture respectively, and the process returns to step S2.
[0033] Preferably, the first adversarial network model includes a first generative model and a first discriminative model;
[0034] Then in the step S2, the first generation model is used to generate a plurality of first candidate items according to the input first original picture or the second original picture, each of the first candidate items includes the body parameters of the target object at a fixed time;
[0035] The first discriminant model is connected to the first generative model, and is used to sequentially judge the plurality of first candidate items output by the first generative model using the first type of information in the natural motion pattern library as a real sample and the shape feature information expressed by the first original painting or the second original painting as a condition to obtain a first judgment result; and
[0036] The first evaluation result is input into the first discrimination model again to determine whether the first candidate item in the first evaluation result is the real sample, and the first candidate item in the first evaluation result is output after being determined to be the real sample.
[0037] Preferably, the second adversarial network model includes a second generative model and a second discriminative model;
[0038] Then in the step S3, the second generation model is used to generate a plurality of second alternative items according to the input first posture parameter, the second posture parameter and the object behavior, each of the second alternative items includes all target body dynamic parameters of the target object at all given moments in the process of completing the object behavior;
[0039] The second discriminant model is connected to the second generative model, and is used to sequentially judge the plurality of second alternative items output by the second generative model using the second type of information in the natural motion pattern library as a real sample and the output of the first adversarial network model as a condition to obtain a second judgment result; and
[0040] The second evaluation result is input into the second discrimination model again to determine whether the second candidate item in the second evaluation result is the real sample, and the second candidate item in the second evaluation result is output after it is determined to be the real sample.
[0041] The advantages or beneficial effects of the technical solution of the present invention are:
[0042] By adopting artificial intelligence technology, the present invention can generate two-dimensional dynamic images more efficiently, and can also simulate more realistic and natural object shape changes and spatial movements, greatly improving the production capacity and finished product effects of two-dimensional dynamic images, and reducing the limitations of time consumption and manpower and capital investment. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of a process of producing a two-dimensional dynamic image in a preferred embodiment of the present invention;
[0044] Figure 2 It is a flow chart of the steps of establishing a body parameter library in a preferred embodiment of the present invention;
[0045] Figure 3 A schematic flow chart of the steps of establishing a natural motion pattern library in a preferred embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the implementation principle of the two-dimensional dynamic image production method in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0049] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0050] See also Figure 1In a preferred embodiment of the present invention, based on the above problems existing in the prior art, a two-dimensional dynamic image production method is provided, wherein a natural motion pattern library is pre-established, and the natural motion pattern library pre-stores parameter information of objects of different categories, wherein the parameter information includes first-category information for representing all body posture parameters of each object at a fixed moment and second-category information for representing all body dynamic parameters of each object at all given moments in the process of completing a predetermined action;
[0051] The two-dimensional dynamic image production method includes:
[0052] Step S1, obtaining a first original picture and a second original picture, wherein both the first original picture and the second original picture contain the same target object, and determining an object behavior of the target object between the first original picture and the second original picture;
[0053] Step S2, inputting the first original picture and the second original picture into a pre-built first adversarial network model respectively, the first adversarial network model is used to output a first posture parameter of the target object in the first original picture at a fixed time and a second posture parameter of the target object in the second original picture at a fixed time according to the first type of information in the natural motion pattern library;
[0054] Step S3, inputting the first body posture parameter, the second body posture parameter and the object behavior into a pre-built second adversarial network model, the second adversarial network model is used to output all target body dynamic parameters of the target object at all given moments in the process of completing the object behavior according to the second type of information in the natural motion pattern library;
[0055] Step S4, substituting all target body dynamic parameters output by the second adversarial network model into a preset modeling model to obtain a target object model.
[0056] Specifically, before making a two-dimensional dynamic image, first, the parameter information of objects of different categories is collected, including the first type of information and the second type of information, and a natural motion pattern library is pre-established based on these parameter information. Among them, the object may include but is not limited to people, objects, etc. The first type of information is used to represent all body parameters of each object at a fixed time. Body parameters refer to parameters that describe static features such as posture, form and position of the object at a fixed time, and may include but are not limited to information such as the position coordinates, rotation angle, size, shape, etc. of the object. Through body parameters, the static state of the object at a certain moment can be accurately represented. The second type of information is used to represent all body dynamic parameters of each object at all given moments in the process of completing a predetermined action. Body dynamic parameters refer to parameters that describe dynamic features such as posture, form and position of the object in the process of completing a predetermined action. Through body dynamic parameters, the dynamic state of the object at different moments can be accurately represented. By comprehensively using parameter information such as body parameters and body dynamic parameters, the movement and change of the object in the two-dimensional dynamic image can be fully described, and the movement trajectory and change process of the object can be accurately simulated and presented.
[0057] In the process of producing two-dimensional dynamic images, first of all, obtain the original paintings drawn by the original artist. The original painting refers to the first stage in the production process of two-dimensional dynamic images, and it is also the most basic stage. In the original painting stage, the original artist will create sketches of key frames and important actions based on the character setting drawings, storyboard design drafts (layout) and storyboards. However, these sketches are usually rough, using simple lines and curves to outline the outline and main features of the target object, but they can express the character's movements. The original painting plays a vital role in the production of two-dimensional dynamic images, providing a foundation for subsequent production, including the drawing of the middle painting, color filling, background design, etc.
[0058] In this embodiment, no more than one object is drawn in each original painting. By setting layers for the original painting, each object can be easily edited and adjusted without affecting other objects; at the same time, using layers can easily combine, separate and rearrange different objects to achieve more complex painting effects.
[0059] After obtaining the original painting, the object behavior of the target object between the two original paintings can be determined. Object behavior refers to the change in the action or state of the target object between the two original paintings. By observing and analyzing the object behavior, we can better understand the changes and developments of the target object between the two original paintings, and thus infer the dynamics and intentions of the target object. Object behavior may include but is not limited to several aspects: movement, deformation, action, etc. Movement refers to the change in the position of the target object between the two original paintings, such as the target object is moving, walking, flying or changing position. Deformation refers to the change in the shape, size or appearance of the target object, such as the target object undergoing a change, transformation, transformation or morphological change. Action refers to the target object performing a certain specific action or behavior, such as the target object attacking, jumping, running, flying or other specific actions.
[0060] Object behavior can be identified from the storyboard, storyboard design and two original drawings; or it can be determined based on the annotations on the storyboard (primary) and storyboard design (secondary). Storyboards and storyboard designs are important files in the animation production process. They show the layout and action instructions for each shot. Annotations are added to the storyboards and storyboard designs to explain the object's behavior and action details.
[0061] Next, for each original picture, the original picture is input into the first adversarial network model, and the first adversarial network model uses the first type of information in the natural motion pattern library to output the body posture parameters of the target object in the original picture at a fixed time. Preferably, two original pictures are respectively input into the first adversarial network model to obtain the first body posture parameter and the second body posture parameter.
[0062] Then, the first posture parameter, the second posture parameter and the object behavior are input into the second adversarial network model. The second adversarial network model uses the second type of information in the natural motion pattern library to output the target body dynamic parameters; the target body dynamic parameters refer to the set of all body dynamic parameters of the target object at all given moments in the process of completing the object behavior, and the set includes the posture parameters and dynamic parameters at each given moment.
[0063] Substitute all the target body dynamic parameters output by the second adversarial network model into the preset modeling model. The modeling model can be an accurate model for objects of different categories, such as swingable human structure modeling. The modeling model contains various blocks of the target object and can be dynamically changed. By extracting the target body dynamic parameters output by the second adversarial network model and substituting these parameters into the modeling model, that is, applying the target body dynamic parameters to the corresponding blocks of the modeling model so that it meets the requirements of the modeling model, the generated target object model can be used to produce a two-dimensional dynamic image, for example, the target object model can be presented through rendering, animation and other technologies.
[0064] By adopting artificial intelligence technology, the above solution can generate two-dimensional dynamic images more efficiently, and can also simulate more realistic and natural changes in object shape and spatial movement, greatly improving the production capacity and finished product effects of two-dimensional dynamic images, and reducing the limitations of time consumption and manpower and capital investment.
[0065] As a preferred embodiment, the method further includes: pre-establishing a posture parameter library, wherein the posture parameter library pre-stores all callable posture parameters of objects of different categories without overall spatial motion;
[0066] Each object includes a plurality of blocks, each block having a corresponding block code;
[0067] As a preferred embodiment, wherein Figure 2 As shown, the steps of establishing the posture parameter library include:
[0068] Step B1, for each object, determining the connection relationship between all blocks in the object;
[0069] Step B2, determining the movable spatial range of each block when it is fixed with one of the adjacent connected blocks, the movable spatial range including a plurality of block regions, each block region having a corresponding region code;
[0070] Step B3, determining the movement information of each body block relative to a preset standard posture when it is located in each body block area, and summarizing the body block code, area code, and movement information and including them in a posture parameter library.
[0071] Specifically, in the present embodiment, each object is composed of different blocks, each block is numbered, and the connection relationship between the blocks is clarified, and the connection relationship can be a relationship of upper and lower connection, left and right connection, and front and back connection. Taking the human body as an example, the human body can be divided into body blocks such as the head, trunk and limbs. The head includes parts such as the skull, face and neck, the trunk includes parts such as the chest and abdomen, and the limbs include parts such as the upper limbs and lower limbs. In the human body, the head is connected with the neck, the neck is connected with the trunk, and the trunk is connected with the limbs. In addition, there is also a connection relationship between the limbs of the human body. For example, the upper limbs include parts such as the shoulders, arms, forearms and hands, and the lower limbs include parts such as the hips, thighs, calves and feet; in the upper limbs, the shoulders are connected with the arms, the arms are connected with the forearms, and the forearms are connected with the hands; in the lower limbs, the hips are connected with the thighs, the thighs are connected with the calves, and the calves are connected with the feet.
[0072] Then, the movable space range of each body block when it is fixed with the body block with which it is connected at one end is precisely divided, and the number of each area is marked. For example, taking the arm as an example, the movable space range of the arm is roughly a hemisphere around the shoulder. This hemisphere is divided into several arm areas from the center, and the range of the arm area can be further narrowed by using medical anatomical knowledge. In this way, the movable space range of all body blocks of each object and the area codes of all body block areas within the movable space range of each body block can be determined.
[0073] Finally, the movement of each body block in different body block areas within the movable space relative to the given standard posture is compared, and the movement information is matched with the number, which is summarized as a set of all the posture parameters that can be called for the object without overall spatial movement. The standard posture can be the standard standing posture of the object. For example, if the object performs the action of raising the arm sideways, the movement can be the position of the arm relative to the standard standing posture, and it is turned 90 degrees upward in the side direction of the object.
[0074] By collecting all the body parameter sets of all categories of objects, the above-mentioned body parameter library can be established. The library is formed by formulating the prescribed expression method of the body parameters of the objects, and can be used as the basic movable data of the reserve objects.
[0075] like Figure 3 As shown, the steps for establishing the natural motion pattern library include:
[0076] Step A1, capturing motion data of each subject in the body parameter library when performing a series of body parameters to complete a predetermined action;
[0077] Step A2, using the correlation ratio of the moving distance of all blocks of the object in the motion data and the actual measurement information of the block characteristics as a predetermined action to generate a series of dynamic parameters;
[0078] Step A3, defining the predetermined action, packaging the action definition, body posture parameters and dynamic parameters in chronological order to form body dynamic parameters of each object and including them in the natural movement pattern library.
[0079] Specifically, after formulating the prescribed expression of the object's body parameters, the motion data of the object in the body parameter library is captured, and the full dynamic (body + dynamic) motion data of the object when executing a series of body parameters in three-dimensional space to complete a predetermined action can be observed and captured by motion capture technology or game modeling simulation technology;
[0080] Then, the correlation ratio between the movement distance captured when the object completes a predetermined action (i.e., a series of changes in body parameters) and the actual measurement information of the body block characteristics is used as a series of dynamic parameters generated by the predetermined action. The actual measurement information of the body block characteristics is recorded as the body block involved in the action and the body block shape feature information that can be actually measured. As an example, assuming that the leg takes a step forward of 30 centimeters as the movement distance of the body block, during the action, considering that at the same lifting angle, the longer the leg, the larger the step. The embodiment of the present invention uses the correlation ratio of the movement distance and the body characteristics as a dynamic parameter to extract the unchanging motion logic, thereby eliminating the influence of variable factors.
[0081] Next, a verbal definition is made for the current scheduled action. For example, walking can be defined as random, purposeless, unmarked, slow walking, fast running, etc., and the posture parameters and dynamic parameters involved in the above action definition are sequenced by time and packaged to form the body dynamic parameters of each object. The natural motion pattern library contains all the body dynamic parameters of all objects when performing different scheduled actions.
[0082] As a preferred embodiment, step A3 also includes: assigning exaggerated variables to the posture parameters and / or dynamic parameters corresponding to the action definition, and packaging the exaggerated variables with the action definition, posture parameters and dynamic parameters in chronological order to form body dynamic parameters of each object and including them in the natural motion pattern library.
[0083] Specifically, in this embodiment, for each predetermined action, while being verbally defined, an exaggeration variable can also be assigned. The exaggeration variable can be constant, or it can be accelerated or otherwise changed. For example, when the exaggeration variable is constant, the corresponding preset action can be directly completed according to the body parameters and dynamic parameters involved in the above action definition. When the exaggeration variable is accelerated, the body parameters and dynamic parameters need to be adjusted according to the degree of acceleration, thereby changing the speed of the action. The exaggeration variable can also be a change in size, such as increasing or decreasing. Depending on the exaggeration variable, the exaggeration effect of the action can be achieved by adjusting the body parameters and dynamic parameters.
[0084] The embodiment of the present invention uses a generative adversarial network (GAN) model to generate the body dynamic parameters required by the sample according to corresponding needs, and repeatedly uses the body posture parameters in the body posture parameter library to repeatedly accurately determine the natural movement pattern of the object so that it conforms to the spatial position and body shape characteristics to be expressed.
[0085] The GAN model iteratively trains a generative model (Generators, G for short) and a discriminator model (Discriminators, D for short), and then lets the discriminator model D try to determine whether the generated samples output by the generative model G are real samples. The generative model G and the discriminator model D are adjusted and upgraded based on the judgment results until the generated samples output by the generative model G can completely deceive the discriminator model D.
[0086] In the embodiment of the present invention, the first adversarial network model can adopt a Sequence Adversarial Network (SeqGAN) model, and the second adversarial network model can also adopt a Sequence Adversarial Network model. In a single operation, the Sequence Adversarial Network model can call the Generative Model G and the Discriminative Model D multiple times. Figure 4 As shown in the figure, the state State represents the generated token, and the action action represents the next token to be generated. The state behavior value is estimated by Monte Carlo search, and the policy gradient is used for gradient training. The discriminant model D is a CNN convolutional neural network used to evaluate the generated sequence to guide the learning of the generative model. Taking the generation of human body blocks as an example, Figure 4 Each red circle in represents an operation to generate a block, and State represents the generated block string. Figure 4 When generating the next block Next action, the generation model G is first called to generate multiple options, and then the discriminant model D is used to score each option (reward), select the best policy (Policy) based on the score, and adjust the policy model (Policy Gradient).
[0087] In the embodiment of the present invention, the first adversarial network model and the second adversarial network model can be set separately or stacked to form a stacked adversarial network model (referred to as stacked GAN). Stacked GAN can use multiple GANs placed in succession, each of which can solve a simplified problem module, avoiding the possibility that a single GAN may not be able to effectively handle certain tasks, thereby enhancing the performance of the entire model.
[0088] The first adversarial network model is used as the first layer (stage 1) of the stacked GAN, and the first layer is local adversarial. As a preferred embodiment, the first adversarial network model includes a first generative model and a first discriminative model;
[0089] Then in step S2, the first generation model is used to generate a plurality of first candidate items according to the input first original picture or second original picture, each of which includes the body parameters of the target object at a fixed time;
[0090] The first discriminant model is connected to the first generative model, and is used to sequentially judge the plurality of first candidate items output by the first generative model using the first type of information in the natural motion pattern library as a real sample and the shape feature information expressed by the first original picture or the second original picture as a condition to obtain a first judgment result; and
[0091] The first evaluation result is input into the first discrimination model again to determine whether the first candidate item in the first evaluation result is a true sample, and the first candidate item in the first evaluation result is output after it is determined to be a true sample.
[0092] Specifically, the first adversarial network model uses all the body parameters of the object at a fixed moment captured in the natural motion pattern library as real samples. At the same time, the body feature information expressed in the original painting is input into the discriminant model D as a condition. The discriminant model D judges the alternative results of multiple blocks generated by the generation model G in turn and selects all the body parameters of the optimal complete block string. Finally, the discriminant model D determines whether the complete block string is a real sample, and continuously conducts confrontation, adjustment and upgrading until the generated complete block string is difficult to distinguish between true and false and is output.
[0093] The second adversarial network model is used as the second layer (stage 2) of the stacked GAN, and the second layer is global adversarial. As a preferred embodiment, the second adversarial network model includes a second generative model and a second discriminative model;
[0094] Then in step S3, the second generation model is used to generate a plurality of second alternative items according to the input first posture parameter, second posture parameter and object behavior, each second alternative item includes all target body dynamic parameters of the target object at all given moments in the process of completing the object behavior;
[0095] The second discriminant model is connected to the second generative model, and is used to sequentially judge the plurality of second alternatives output by the second generative model using the second type of information in the natural motion pattern library as a real sample and the output of the first adversarial network model as a condition, to obtain a second judgment result; and
[0096] The second evaluation result is input into the second discrimination model again to determine whether the second candidate item in the second evaluation result is a real sample, and the second candidate item in the second evaluation result is output after it is determined to be a real sample.
[0097] Specifically, the second adversarial network model selects the posture and dynamic parameters corresponding to the corresponding predetermined action as the input of the generation model G according to the object behavior to generate multiple second alternatives. All posture parameters and dynamic parameters at all given moments in the process of executing the complete predetermined action in the natural motion pattern library are used as real samples; at the same time, all posture parameters of the complete body block string of the object in the output alternative of the first adversarial network model are input as conditions into the discriminant model D, and the discriminant model D judges the multiple second alternatives generated by the generation model G in turn, and each alternative contains all posture parameters and dynamic parameters at all given moments of the intermediate transition from the first posture parameter to the second posture parameter during the execution of the given object behavior. The discriminant model D determines the optimal posture parameters and dynamic parameters at all given moments on the object's motion trajectory.
[0098] Finally, the optimal posture parameters and dynamic parameters are input into the discriminant model D again to determine whether these parameters are real samples. Through continuous confrontation, adjustment and upgrading, until the generated results are difficult to distinguish from the real samples, all body dynamic parameters that conform to natural physical movements will be obtained. The two-layer adversarial network model is stacked to enhance its processing capabilities.
[0099] The physical feature information expressed in the above original painting can be identified from the original painting, or can be obtained according to the character setting diagram or other specific instructions of the two-dimensional dynamic image, or can also be obtained by manually inputting precise values or introducing exaggerated variables.
[0100] The parameter information corresponding to the object category in the natural motion pattern library is used as the real sample in the discriminant model D. The object category can be determined according to the instructions of the character setting diagram, and the object category and body feature information are substituted into the model together, and the first and second category information corresponding to the object category in the natural motion pattern library are used as the real samples.
[0101] Specifically, in addition to expressing the length, width, outline and other information of the object body, the shape feature information may also include the object position. In the storyboard design and storyboard of a two-dimensional dynamic image, the three-dimensional environment in which the target object is located can be deduced through the indicator lines and the picture information, and the lens that meets the requirements of the original painting can be determined. Among them, the indicator line can show the position and direction of the target object in space. By analyzing the length and / or angle of the indicator line, the position relationship of the target object relative to the overall spatial environment and other objects can be inferred. The indicator line can directly determine a clear perspective space. When the actual size of the object is known, the size and orientation of the object in the lens can be determined based on the line of sight angle of the vanishing point and the azimuth of the lens, and the principle of "similar triangles" can be used to directly obtain the range value of the three-dimensional coordinates of the object. The picture information can also provide clues to construct a three-dimensional environment. For example, perspective effects, shadows and lighting can help determine the position and shape of an object. By observing the perspective relationship and shadow effects in the picture, the spatial position of the target object can be inferred. According to the perspective phenomenon, in the same direction, the size of an object becomes smaller as the distance increases. The position of the moving object in each original painting can be roughly estimated based on the size of the object drawn in the original painting.
[0102] As a preferred embodiment, after step S3 and before step S4, the method further includes:
[0103] Repeat steps S2-S3 for multiple times, outputting an output result each time after executing steps S2-S3, and each output result includes all target body dynamic parameters at all given moments in the process of completing the object behavior;
[0104] The dynamic parameter range of the target body at each given moment is determined based on multiple output results, and a set of target body dynamic parameters is selected and output from the dynamic parameter range of the target body at all given moments as all target body dynamic parameters output by the second adversarial network model.
[0105] Specifically, the embodiment of the present invention can directly substitute the parameters outputted from the above steps S2-S3 into the modeling model. Alternatively, the operations of steps S2-S3 can be repeated multiple times. After the operations of steps S2-S3 are repeated multiple times, multiple output results will be obtained, and the range of posture parameters with the highest probability of occurrence at each given moment can be determined based on the multiple output results. This decision step can be implemented based on statistics or other existing decision methods.
[0106] Furthermore, the range of posture parameters with the highest probability of appearing at each given moment can be determined by random forest decision making; then a posture parameter is selected from it so that the dynamic parameters generated during the overall movement can still be discriminated as real samples by the discriminant model D. This can be regarded as stacking another GAN, in which the real samples of the discriminant model D are the same as the samples of the second adversarial network model. In some embodiments, it can also be generated step by step in reverse time order. The so-called step by step generation in reverse time order refers to the process of gradually generating real samples in reverse order starting from the output of the generative model. For example, given original painting 1, original painting 3, original painting 5, original painting 7 and original painting 9; intermediate painting 2 is derived from original painting 1 and original painting 3, intermediate painting 4 is derived from original painting 3 and original painting 5, and intermediate painting 6 and intermediate painting 8 are derived in this order; wherein the relationship between the original painting and the intermediate painting is arranged in order. Reverse time order generation means that intermediate painting 8 is derived from original painting 9 and original painting 7, and intermediate painting 6, intermediate painting 4 and intermediate painting 2 are derived in this order.
[0107] As a preferred implementation, step S4 further includes: adding texture and / or coloring to the target object model.
[0108] Specifically, the model directly formed by the parameters output by the adversarial network model can be called the "naked model" or "textureless model" of the object. Textures need to be added and the surface material of the model, such as the exterior of the object, including the character's clothing, hairstyle, hair color, accessories, etc., needs to be selected for physical simulation.
[0109] In addition to textures, you can also change the appearance of your model by adding coloring effects. This is done by selecting appropriate colors or material properties and applying them to your model.
[0110] The global information of the model is extracted according to the needs, and the production of two-dimensional dynamic images can be assisted based on the extracted global information, reducing the drawing of the front object framework, and the artist will subsequently improve the details.
[0111] Furthermore, the extracted global information can be transferred to an image style. Image style transfer refers to applying the style of one image to another image so that the target image has similar style features to the source image. In the production of two-dimensional dynamic images, the extracted global information can be transferred to an image style so that the generated dynamic image has a style similar to the source image, thereby achieving better results.
[0112] As a preferred implementation, step S4 further includes:
[0113] The target object model is used to perform motion simulation, and screenshots are taken during the simulation process, and the screenshots are output as the first original picture, the second original picture, and the intermediate picture between the first original picture and the second original picture.
[0114] Specifically, in this embodiment, the global information of the model can be directly screenshoted to obtain the in-between paintings between the original paintings, thereby realizing the automatic generation of in-between paintings, greatly reducing the time for drawing the in-between paintings and the workload of repeated drawing, improving production efficiency, while maintaining the overall style and details of the original paintings, and ensuring the dynamic smoothness of the in-between paintings.
[0115] Furthermore, since the parameters in the natural motion pattern library are obtained through capture, their parameters are consistent with the human body's motion mechanism. Screenshots can also be used directly as original paintings. Since some original paintings are extremely simple (such as stick figures), detailed skeletal muscle models can add more details and realism to the simple original paintings, which can optimize the original paintings to a certain extent.
[0116] As a preferred embodiment, the method further includes after step S4:
[0117] The two intermediate pictures are respectively used as the first original picture and the second original picture, and the process returns to step S2.
[0118] Specifically, in this embodiment, the in-between picture obtained according to the parameters generated by the adversarial network model can be used as the original picture, re-input into the adversarial network model for iteration, and a new in-between picture can be continuously generated, and the original picture between the two in-between pictures can be optimized through the new in-between picture.
[0119] For example, the original artist draws original painting 1, original painting 3, and original painting 5. Input original painting 1 and original painting 3 into the adversarial network model to generate parameters, and generate intermediate painting 2 according to these parameters; input original painting 3 and original painting 5 into the adversarial network model to generate parameters, and generate intermediate painting 4 according to these parameters. A dynamic image can be realized in the order of original painting 1, intermediate painting 2, original painting 3, intermediate painting 4, and original painting 5. In the embodiment of the present invention, intermediate painting 2 and intermediate painting 4 can be further re-input into the model to obtain a new intermediate painting 31, through which the original painting 3 can be optimized, and the original painting can be continuously optimized to make it more in line with the desired effect.
[0120] After the original picture is input into the adversarial network model in the embodiment of the present invention, the intermediate pictures generated by using the model output parameters may be more than one, or may be multiple consecutive pictures.
[0121] The two-dimensional dynamic image production method of the embodiment of the present invention can be applied to the production of animation, movies and games. By centrally capturing and generating actions, the required actions can be directly called, thereby simplifying the production process and saving costs; at the same time, a series of interpolation operations can be realized, and the actions can be exaggerated without the need for subsequent changes, further simplifying the process.
[0122] The method can also be applied to the production of the metaverse. The metaverse is a virtual real world that contains various virtual scenes and characters. Through the two-dimensional dynamic image production method of the embodiment of the present invention, the character actions in the metaverse can be easily generated to make them more vivid and realistic.
[0123] In addition, this method can also be applied to the design of robot movements. According to the robot's starting state and final state, the existing database can be used to automatically generate the process, and the generated results can be continuously evaluated to select the best strategy. For example, if a robot is required to walk from point A to point B, it can complete a series of leg-lifting and arm-swinging movements by itself based on the existing data.
[0124] In addition to the above application fields, the method of the present invention is applicable to other fields involving the production of two-dimensional dynamic images, which will not be listed here one by one.
[0125] The advantages or beneficial effects of adopting the above technical solution are: the present invention can generate two-dimensional dynamic images more efficiently by adopting artificial intelligence technology, and can also simulate more realistic and natural changes in object shape and spatial movement, greatly improving the production capacity and finished product effect of two-dimensional dynamic images, and reducing the time consumption and limitations of manpower and capital investment.
[0126] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of this specification and illustrations should be included in the protection scope of the present invention.
Claims
1. A method for producing a two-dimensional dynamic image, characterized in that: Pre-establishing a natural motion pattern library, wherein the natural motion pattern library pre-stores parameter information of objects of different categories, wherein the parameter information includes first-category information for representing all body posture parameters of each of the objects at a fixed time and second-category information for representing all body dynamic parameters of each of the objects at all given times during the completion of a predetermined action; The two-dimensional dynamic image production method comprises: Step S1, obtaining a first original picture and a second original picture, wherein the first original picture and the second original picture both contain the same target object, and determining an object behavior of the target object between the first original picture and the second original picture; Step S2, inputting the first original picture and the second original picture into a pre-built first adversarial network model respectively, wherein the first adversarial network model is used to output a first posture parameter of the target object in the first original picture at a fixed time and a second posture parameter of the target object in the second original picture at a fixed time according to the first type of information in the natural motion pattern library; Step S3, inputting the first body posture parameter, the second body posture parameter and the object behavior into a pre-constructed second adversarial network model, wherein the second adversarial network model is used to output all target body dynamic parameters of the target object at all given moments in the process of completing the object behavior according to the second type of information in the natural motion pattern library; Step S4, substituting all the target body dynamic parameters output by the second adversarial network model into a preset modeling model to obtain a target object model.
2. The two-dimensional dynamic image production method according to claim 1, characterized in that: Also includes: Pre-establishing a body posture parameter library, wherein the body posture parameter library pre-stores all callable body posture parameters of the objects of different categories without overall spatial motion; Each of the objects includes a plurality of blocks; The steps of establishing the natural motion pattern library include: Step A1, capturing motion data of each of the subjects in the body parameter library when performing a series of body parameters to complete a predetermined action; Step A2, using the correlation ratio of the moving distance of all the blocks of the object in the motion data to the actual measurement information of the block characteristics as the predetermined action to generate a series of dynamic parameters; Step A3, defining the predetermined action, packaging the action definition, the body posture parameters and the dynamic parameters in chronological order to form body dynamic parameters of each object and including them in the natural movement pattern library.
3. The two-dimensional dynamic image production method according to claim 2, characterized in that: The step A3 also includes: assigning exaggerated variables to the body parameters and / or the dynamic parameters corresponding to the action definition, and packaging the exaggerated variables with the action definition, the body parameters and the dynamic parameters in chronological order to form body dynamic parameters for each of the objects and including them in the natural motion pattern library.
4. The two-dimensional dynamic image production method according to claim 2, characterized in that: Each of the blocks has a corresponding block code; The step of establishing the body parameter library comprises: Step B1, for each of the objects, determining the connection relationship between all the blocks in the object; Step B2, determining a movable spatial range of each of the body blocks when it is fixed with one of the adjacent body blocks, the movable spatial range comprising a plurality of body block regions, each of the body block regions having a corresponding region code; Step B3, determining the movement information of each body block relative to a preset standard posture when the body block is located in each body block area, and summarizing the body block code, the area code, and the movement information and including them in the body posture parameter library.
5. The two-dimensional dynamic image production method according to claim 1, characterized in that: After step S3 and before step S4, the following steps are also included: Repeating steps S2-S3 for multiple times, outputting an output result each time after executing steps S2-S3, and each output result includes all target body dynamic parameters of the target object at all given moments in the process of completing the object behavior; The dynamic parameter range of the target body at each given moment is determined based on the multiple output results, and a set of target body dynamic parameters is selected and output from the dynamic parameter range of the target body at all given moments as all the target body dynamic parameters output by the second adversarial network model.
6. The two-dimensional dynamic image production method according to claim 1, characterized in that: The step S4 further includes: adding texture and / or coloring to the target object model.
7. The two-dimensional dynamic image production method according to claim 1 or 6, characterized in that: The step S4 further comprises: The target object model is used to perform motion simulation, and screenshots are taken during the simulation process, and the screenshots are output as the first original picture, the second original picture, and an intermediate picture between the first original picture and the second original picture.
8. The two-dimensional dynamic image production method according to claim 7, characterized in that: After step S4, the following steps are also included: The two intermediate pictures are used as the first original picture and the second original picture respectively, and the process returns to step S2.
9. The two-dimensional dynamic image production method according to claim 1, characterized in that: The first adversarial network model includes a first generative model and a first discriminative model; Then in the step S2, the first generation model is used to generate a plurality of first candidate items according to the input first original picture or the second original picture, each of the first candidate items includes the body parameters of the target object at a fixed time; The first discriminant model is connected to the first generative model, and is used to sequentially judge the plurality of first candidate items output by the first generative model using the first type of information in the natural motion pattern library as a real sample and the shape feature information expressed by the first original painting or the second original painting as a condition, to obtain a first judgment result; as well as The first evaluation result is input into the first discrimination model again to determine whether the first candidate item in the first evaluation result is the real sample, and the first candidate item in the first evaluation result is output after being determined to be the real sample.
10. The two-dimensional dynamic image production method according to claim 1, characterized in that: The second adversarial network model includes a second generative model and a second discriminative model; Then in the step S3, the second generation model is used to generate a plurality of second alternative items according to the input first posture parameter, the second posture parameter and the object behavior, each of the second alternative items includes all target body dynamic parameters of the target object at all given moments in the process of completing the object behavior; The second discriminant model is connected to the second generative model, and is used to sequentially judge the plurality of second alternative items output by the second generative model using the second type of information in the natural motion pattern library as a real sample and the output of the first adversarial network model as a condition to obtain a second judgment result; as well as The second evaluation result is input into the second discrimination model again to determine whether the second candidate item in the second evaluation result is the real sample, and the second candidate item in the second evaluation result is output after it is determined to be the real sample.
