Object creation method and device
By receiving object generation instructions, determining the target object template, and selecting and splicing target component elements, the problem of inefficient creation of scene designers in animation games is solved, efficient object generation is achieved, and cost is reduced.
Patent Information
- Application Number
- CN202111583384.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-12-22
AI Technical Summary
In the prior art, scene designers in animation games need to create a large number of objects, resulting in high time and labor costs and lack of efficient object creation methods.
Provides an object creation method, which determines the target object template by receiving object generation instructions, and selects the target component elements according to the preset element selection rules, and splices the target component elements based on the target object template to generate the target object.
It improves the efficiency of object generation, reduces time and labor costs, and meets users' needs for the richness of objects in animation and game scenes.
Smart Images

Figure CN114255310B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an object creation method and apparatus, a computing device, and a computer-readable storage medium. Background Art
[0002] With the development of the animation and game industry, users have higher and higher requirements for the richness of scenes in animation and games. In practical applications, in order to meet the viewing experience of users, more and more objects need to be displayed in the scenes of animation and games. Currently, designers often use hand-drawing to create these objects. This not only consumes a lot of time and manpower costs, so there is an urgent need for solutions to the above problems. Summary of the invention
[0003] In view of this, embodiments of the present application provide an object creation method and apparatus, a computing device, and a computer-readable storage medium to address the technical deficiencies in the prior art.
[0004] According to a first aspect of an embodiment of the present application, there is provided a method for creating an object, comprising:
[0005] Receive an object generation instruction and determine a target object template;
[0006] According to a preset element selection rule, a target component element corresponding to the target object template is selected;
[0007] The target component elements are spliced based on the target object template to generate a target object that responds to the object generation instruction.
[0008] Optionally, determining the target object template includes:
[0009] Determine the target object template from the object templates in the object material library according to a preset template selection rule; or
[0010] According to the template information carried in the object generation instruction, a target object template corresponding to the template information is determined.
[0011] Optionally, the object material library is constructed in the following manner:
[0012] Create an object template according to preset object template information;
[0013] Creating a component element corresponding to the object template according to key point information of the key points of the virtual component element in the object template;
[0014] The object material library is constructed based on the object template and the component elements.
[0015] Optionally, selecting the target component element corresponding to the target object template according to a preset element selection rule includes:
[0016] Determining a virtual component element in the target object template;
[0017] According to the correspondence between the virtual component element and the component element in the object material library, a target component element corresponding to the target object template is randomly selected from the component elements.
[0018] Optionally, in the case where the object corresponding to the object template is an actionable object, after creating the component element corresponding to the object template according to the key point information of the key points of the virtual component element in the object template, the method further includes:
[0019] Determine a target key point and movement information of the target key point among the key points of the virtual component element of the object template according to a movement rule corresponding to a preset action type;
[0020] The object material library is constructed based on the object template, the component elements and the movement information.
[0021] Optionally, after splicing the target component elements based on the target object template to generate the target object in response to the object generation instruction, the method further includes:
[0022] Determining the target movement information corresponding to the target object template according to the correspondence between the object template and the movement information in the object material library;
[0023] Based on the target object and the target movement information, create at least one animation frame corresponding to the target object;
[0024] A target animation is created based on the at least one animation frame.
[0025] Optionally, the step of splicing the target component elements based on the target object template to generate a target object in response to the object generation instruction includes:
[0026] Based on the target object template, the target component elements are spliced to obtain an initial object;
[0027] Verifying the initial object according to preset verification rules;
[0028] In a case where the verification passes, the initial object is used as a target object in response to the object generation instruction.
[0029] Optionally, the verifying the initial object according to a preset verification rule includes:
[0030] Encode a component element of a first preset object in the first preset object set into a first element vector, and encode movement information corresponding to the first preset object into a first movement vector;
[0031] Calculating a first element vector average value based on the first element vector, and calculating a first motion vector average value based on the first motion vector;
[0032] Encoding the target component element of the initial object into a target element vector, and encoding the target movement information of the initial object into a target movement vector;
[0033] Calculating a first element similarity according to a first preset algorithm, an average value of the first element vector and the target element vector, and calculating a first motion similarity according to a second preset algorithm, an average value of the first motion vector and the target motion vector;
[0034] A verification result of the initial object is determined based on the first element similarity and the first movement similarity.
[0035] Optionally, after encoding the target motion information of the initial object into a target motion vector, the method further includes:
[0036] When the number of second preset objects in the second preset object set is greater than a preset number, encoding component elements of the second preset objects in the second preset object set as a second element vector, and encoding movement information corresponding to the second preset objects as a second movement vector;
[0037] calculating a second element vector average value of the second element vector, and calculating a second moving vector average value of the second moving vector;
[0038] Calculating a second element similarity according to a third preset algorithm, an average value of the second element vector and the target element vector, and calculating a second motion similarity according to a fourth preset algorithm, an average value of the second motion vector and the target motion vector;
[0039] Determining a first verification result of the initial object based on the first element similarity and the first movement similarity;
[0040] A verification result of the initial object is determined based on the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity.
[0041] Optionally, determining the verification result of the initial object based on the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity includes:
[0042] When the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity meet a preset verification condition, determining that the verification result of the initial object is verification passed;
[0043] When the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity do not satisfy the preset verification condition, determining that the verification result of the initial object is verification failure;
[0044] When either the first element similarity and the first movement similarity does not satisfy the preset verification condition, or when either the second element similarity and the second movement similarity does not satisfy the preset verification condition, a user verification result input by a user for the initial object is received, and the user verification result is used as the verification result of the initial object.
[0045] Optionally, after determining the verification result of the initial object, the method further includes:
[0046] If the verification result of the initial object is that the verification is passed, adding the initial object to the first preset object set;
[0047] When the verification result of the initial object is verification failure, the initial object is added to the second preset object set.
[0048] Optionally, the step of splicing the target component elements based on the target object template to generate a target object in response to the object generation instruction includes:
[0049] splicing the target component elements according to the connection relationship of the virtual component elements in the target object template to generate a target object in response to the object generation instruction; or
[0050] Based on the correspondence between the key points of the virtual component elements in the target object template and the key points of the target component elements, the target component elements are spliced to generate a target object in response to the object generation instruction.
[0051] According to a second aspect of an embodiment of the present application, there is provided an object creation device, including:
[0052] A determination module is configured to receive an object generation instruction and determine a target object template;
[0053] A selection module is configured to select a target component element corresponding to the target object template according to a preset element selection rule;
[0054] The generation module is configured to splice the target component elements based on the target object template to generate a target object in response to the object generation instruction.
[0055] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the object creation method when executing the computer instructions.
[0056] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the object creation method are implemented.
[0057] In an embodiment of the present application, when an object generation instruction is received, a target object template is determined; and according to a preset element selection rule, a target component element corresponding to the target object template is selected, thereby realizing the selection of component elements constituting the target object, and then the selected target component elements are spliced based on the target object template to generate a target object in response to the object generation instruction, thereby realizing the generation of the target object by automatically selecting the target component elements required to create the target object and then splicing them, thereby improving the generation efficiency of the target object. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a structural block diagram of a computing device provided by an embodiment of the present application;
[0059] Figure 2 is a flowchart of an object creation method provided by an embodiment of the present application;
[0060] Figure 3 It is a processing flow chart of a method for creating an object in a game scene provided by an embodiment of the present application;
[0061] Figure 4 is a schematic flow chart of creating a character material library in an object creation method provided in an embodiment of the present application;
[0062] Figure 5 is a process flow chart of generating a role in an object creation method provided in an embodiment of the present application;
[0063] Figure 6 It is a structural diagram of an object creation device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0064] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0065] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0066] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0067] First, the terms involved in one or more embodiments of the present invention are explained.
[0068] One-Hot encoding: Also known as one-bit effective encoding, it mainly uses an N-bit state register to encode N states, each state has its own independent register bit, and only one bit is valid at any time. One-Hot encoding is the representation of categorical variables as binary vectors. This first requires mapping categorical values to integer values. Then, each integer value is represented as a binary vector, which is zero value except for the index of the integer, which is marked as 1.
[0069] In the present application, a method and apparatus for creating an object, a computing device, and a computer-readable storage medium are provided, which are described in detail one by one in the following embodiments.
[0070] Figure 1 The structure block diagram of a computing device 100 according to an embodiment of the present application is shown. The components of the computing device 100 include but are not limited to a memory 110 and a processor 120. The processor 120 is connected to the memory 110 via a bus 130, and the database 150 is used to store data.
[0071] The computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 140 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0072] In one embodiment of the present application, the above components of the computing device 100 and Figure 1 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 1 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0073] The computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 100 may also be a mobile or stationary server.
[0074] The processor 120 may execute Figure 2 Steps in the object creation method shown. Figure 2 A flowchart of an object creation method provided according to an embodiment of the present application is shown, which specifically includes the following steps:
[0075] Step 202: Receive an object generation instruction and determine a target object template.
[0076] Among them, the object generation instruction refers to an instruction for instructing the generation or creation of an object. Specifically, the object can be any image-bearing person, animal, plant, vehicle or building, etc., which is not limited here. The target object template refers to a template used to describe the target object to be created. In practical applications, it is usually necessary to pre-create a variety of virtual objects in the production process of a game or animated film. In order to enrich the game scene or movie scene, even if these objects are the same object, their shapes or forms may be different. In order to avoid making or creating each object separately, objects with similar or identical forms or forms in the same object can be divided into one type, and a unified object template can be used to describe them.
[0077] In specific implementation, the object to be created can be split into multiple components (component elements). For example, a character object can be split into component elements such as head, torso, limbs, weapons, accessories, etc., and objects with similar component elements can be classified into a type, so that they correspond to an object template. And in the object template, these component elements are described in a unified shape or style. In actual applications, these component elements can be two-dimensional or three-dimensional, which is not limited here.
[0078] For example, in game A, the characters are designed with different weapons and body shapes, where the warrior is larger and uses a sword as his weapon, while the archer is smaller and uses a bow as his weapon. Therefore, the characters can be divided into two types, and each type of character object corresponds to a different character template. The character template is used to uniformly describe the body parts and weapons of each character object.
[0079] For example, in an animated film, the styles of vehicle objects are planned to be different, and the vehicle objects are divided into buses, subways, cars, etc. Each vehicle has a different style of body, wheels, lights, etc. Therefore, each style of vehicle object can be mapped to a different vehicle template. The vehicle template is used to uniformly describe the components of each vehicle object (body, wheels, lights, etc.).
[0080] In the specific implementation, considering the different scene requirements for creating the target object, and the various ways of creating the target object template, in order to meet the creation requirements of various creation scenes, the embodiment of the present application determines the target object template, which is specifically implemented in two ways:
[0081] Method 1: According to a preset template selection rule, the target object template is determined from the object templates in the object material library.
[0082] The template selection rule refers to the pre-set rule for selecting a template. In actual applications, the template selection rule can be random selection or selection according to a preset selection order, such as the preset selection order is object template 1 and object template 2. If object template 1 was selected as the target object template last time, object template 2 is selected as the target object template this time.
[0083] The object material library refers to a library created in advance to store the materials needed to create objects. Specifically, the library can be a database, a folder, or a storage space in a certain area, etc., which is not limited here. In actual applications, in order to facilitate the management and use of object materials, these materials can be stored in the object material library according to categories.
[0084] The embodiment of the present application is explained by taking a character object as an example. When a character object creation instruction submitted by a user is received, a warrior character template is randomly selected as a target character template from two object templates (a warrior character template and an archer character template) in the object material library.
[0085] Method 2: Determine the target object template corresponding to the template information according to the template information carried by the object generation instruction.
[0086] The template information can be understood as information used to identify or search for a template, such as a template name, a template ID, or the type of object corresponding to the template, etc., which is not limited here. In specific implementation, in order to allow the user to directly specify the type of object to be created, the template information required for the target object to be created can be input or selected before submitting the object generation instruction, and the submitted object generation instruction will carry the template information. And further, based on the template information, the corresponding target object template can be searched.
[0087] For example, if the template identifier carried in the object generation instruction submitted by the user is "character template 2", then based on the correspondence between the template identifier "character template 2" and the character template, it can be determined that the target character template corresponding to the template identifier is the warrior character template.
[0088] In summary, the target object template is determined by using template selection rules or template information, which increases the flexibility and diversity of determining the target object template and improves the user's creation experience.
[0089] Furthermore, in order to avoid temporarily creating the materials needed for the object during the object creation process, thereby increasing the time cost of creating the object, these materials that may be used can be created in advance, and then the object material library can be constructed based on these materials. In the embodiment of the present application, the construction is carried out in the following manner:
[0090] Create an object template according to preset object template information;
[0091] Creating a component element corresponding to the object template according to key point information of the key points of the virtual component element in the object template;
[0092] The object material library is constructed based on the object template and the component elements.
[0093] The preset object template information refers to the information preset to create the object template. Specifically, the information may include which virtual component elements the object template includes and key point information of the key points of each virtual component element, etc., which is not limited here. In addition, the preset object template information may also include information such as the template name and template identifier. In practical applications, the number of the object templates may be one or more.
[0094] Among them, virtual component elements refer to component elements in the object template. Since component elements in the object template usually do not have specific images, they are called virtual component elements. Specifically, the number of virtual component elements can be one or more. Correspondingly, key points refer to points that can be used to locate or mark key parts in component elements. For example, for the upper arm, its key points can be its joint points; for the head, its key points include the location points of the eyes and mouth, and the location points connected to the neck, etc. All of this information can be used as preset object template information to create object templates.
[0095] On the basis of creating an object template, based on the key point information of the key points of the virtual component elements in the object template, component elements that meet the key point information can be created. And because the created component elements have these key point information, they can better fit the object template. And on the basis of creating the component elements corresponding to the object template, the created object template and its corresponding component elements are stored to form an object material library.
[0096] It should be noted that since the key point information is only some descriptive information of the key points in the virtual component element, various component elements can be created based on this information. For example, if the position information of the three joints of the arm is used as the key point information of the arm component element, a strong arm or a thin arm can be created based on the position information of the three key points.
[0097] For example, based on the template name of the preset object template: object template 2, the virtual component elements corresponding to the template name include: head, torso, limbs, weapons and accessories, as well as the position information of the key points corresponding to each virtual component element, and a warrior character template is created. Then, according to the key point information of the key points of the virtual part elements in the warrior character template, the component elements corresponding to each virtual component element in the warrior character template are created. An object material library is constructed based on the warrior character template and the head, torso, limbs, weapons and accessories corresponding to the warrior character template.
[0098] In summary, an object material library is constructed based on the created object templates and component elements as a material library for creating objects, thereby improving the efficiency of creating objects.
[0099] In practical applications, considering that the object corresponding to the object template is an actionable object, the created object usually needs to have not only an image but also be able to perform specific actions. In order to more conveniently complete the creation of the image and action of the object, the embodiment of the present application creates an object material library, which is specifically implemented in the following manner:
[0100] Determine a target key point and movement information of the target key point among the key points of the virtual component element of the object template according to a movement rule corresponding to a preset action type;
[0101] The object material library is constructed based on the object template, the component elements and the movement information. The preset action type refers to a pre-set action type, and the animation type includes action types such as raising hands, putting hands on hips, running, and swinging swords. Correspondingly, the movement rule refers to the rule for moving the component elements required to execute the preset action type. Specifically, the movement rule can be a movement angle (such as 30 degrees, 45 degrees), a movement direction (forward, backward), or movement to a certain part (such as the waist) for a target key point in a certain component element, which is not limited here.
[0102] In practical applications, when an object performs a certain type of action, not every component element needs to move. And not every key point needs to move when the component element moves. In order to more easily describe the movement of the component element, the movement of the key points in the component element can be described by setting movement rules. In addition, the key points that need to be moved (i.e., target key points) can be determined in the key points of the object template through movement rules, and the movement of the target key points can be described. Accordingly, movement information refers to the position information (such as coordinate information) or movement trajectory of the moving end point of the target key point determined according to the movement rules. The object material library is constructed based on the object template, component elements and movement information.
[0103] For example, when the preset action type is the hand-raising type, the movement rule corresponding to the hand-raising is that the area between the elbow key point and the wrist key point of the right upper arm component element moves upward at an angle of 165 degrees. Then, according to the movement rule, the wrist key point among the key points of the arm component element in the key points of the virtual component element of the warrior character template is used as the target key point, and the movement trajectory p1 of the wrist key point is calculated based on the 165-degree angle and the lengths of the wrist key point and the elbow key point, and the movement trajectory p1 is used as the movement information.
[0104] In summary, an object material library is constructed based on the created object template, component elements and movement information, so as to achieve the creation of object actions based on the creation of the object.
[0105] Step 204: According to a preset element selection rule, a target component element corresponding to the target object template is selected.
[0106] Specifically, based on the above determination of the target object template, considering that the target object template is only a simple description of the component elements of the target object and cannot present the specific image of the target object, it is necessary to select the target component elements corresponding to the target object template based on the determination of the target object template, so as to realize the creation of the target object based on these selected target component elements.
[0107] The element selection rule refers to the rule for selecting component elements. Specifically, the rule can be random selection or selection based on the selection frequency of each component element. Specifically, component elements with low selection frequency can be selected first to ensure the diversity of the created target objects.
[0108] In specific implementation, since it is necessary to ensure that each object component constituting the object is selected during selection, it is necessary to determine the virtual component elements in the target object template, and then select the target component elements based on the virtual component elements. The embodiment of the present application is specifically implemented in the following manner:
[0109] Determining a virtual component element in the target object template;
[0110] According to the correspondence between the virtual component elements in the target object template and the component elements in the object material library, a target component element corresponding to the target object template is randomly selected from the component elements.
[0111] Since the target object template is an object template in the object material library, each virtual component element in the object template corresponds to at least one component element. Therefore, it is necessary to select a component element for the target object (ie, the target component element) from the component elements corresponding to each virtual component element.
[0112] Using the above example, since the warrior character template includes 5 virtual component elements, each of the 5 virtual component elements corresponds to 3 component elements in the object material library. A component element is randomly selected from the 3 component elements corresponding to each virtual component element, that is, a total of 5 component elements are selected as target component elements.
[0113] In summary, according to the correspondence between the virtual component elements in the target object template and the component elements in the object material library, the target component elements corresponding to the target object template are randomly selected from the component elements, thereby ensuring the accuracy and selection efficiency of the selected target component elements.
[0114] Step 206: splicing the target component elements based on the target object template to generate a target object in response to the object generation instruction.
[0115] Specifically, based on the above selection of target component elements, considering that these target component elements are scattered and need to be spliced in a certain order or manner to generate a target object, the connection relationship between the target component elements can be determined according to the connection relationship indicated by the target object template, and the target component elements can be spliced according to the connection relationship to generate the target object.
[0116] In specific implementation, the connection relationship indicated by the target object template is varied. In order to ensure the splicing efficiency and accuracy, the embodiment of the present application is implemented in the following two ways:
[0117] Method 1: splicing the target component elements according to the connection relationship of the virtual component elements in the target object template to generate a target object that responds to the object generation instruction.
[0118] In specific implementation, since there is a corresponding relationship between the virtual component elements and the target component elements, the connection relationship between the virtual component elements is the connection relationship between the target component elements. Therefore, the target component elements can be directly spliced based on the connection relationship to generate the target object.
[0119] Using the above example, the connection relationship between the virtual component elements in the warrior character template is: the head is connected to the torso, the torso is connected to the limbs, the limbs are connected to the weapons, and the accessories are connected to the head. Then, according to this connection relationship, the target component elements corresponding to the virtual component elements are spliced to generate the target object.
[0120] In summary, according to the corresponding relationship between the virtual component elements and the target component elements, and the connection relationship between the virtual component elements, the target component elements are spliced to generate the target object. The target object is generated by splicing the selected target component elements, and the generation efficiency of the generated target object is improved.
[0121] Method 2: Based on the correspondence between the key points of the virtual component elements in the target object template and the key points of the target component elements, the target component elements are spliced to generate a target object that responds to the object generation instruction.
[0122] In addition to the above implementation, in order to further ensure the accuracy of splicing, the position information of the key points of the target component elements can be determined based on the correspondence between the key points in the virtual component elements and the key points in the target component elements, and based on the position information of the key points in the virtual component elements. Then, the target component elements are spliced by placing the target key elements according to the position information. The target object generated after splicing not only has the same connection relationship as the target object template, but also the key points of each target component element can overlap with the key points of the corresponding virtual component elements.
[0123] For example: the torso component element in the virtual component element of the warrior character template includes three key points, which are the left shoulder key point, the right shoulder key point and the navel key point, respectively. The screen coordinates of the left shoulder key point are C1, the screen coordinates of the right shoulder key point are C2, and the screen coordinates of the navel key point are C3. The torso component element in the target component element also includes these three key points. Among these three key points, the left key point is placed at C1, the right shoulder key point is placed at C2, and the navel key point is placed at C3. Similarly, other target component elements are placed in this way, and the placed target component elements are also spliced to generate the target character A.
[0124] In summary, according to the corresponding relationship between the virtual component elements and the target component elements, and the connection relationship between the virtual component elements, the target component elements are spliced to generate the target object. The target object is generated by splicing the selected target component elements, and the generation efficiency of the generated target object is improved.
[0125] Furthermore, considering that the object generated by splicing the target component elements based on the target object template may be inconsistent or unreasonable, in order to ensure the availability of the generated object, the generated object needs to be verified. In the embodiment of the present application, this is specifically implemented in the following way:
[0126] Based on the target object template, the target component elements are spliced to obtain an initial object;
[0127] Verifying the initial object according to preset verification rules;
[0128] In a case where the verification passes, the initial object is used as a target object in response to the object generation instruction.
[0129] The preset verification rule refers to the rule used to verify whether the spliced object (i.e., the initial object) is usable. Specifically, the preset verification rule can be to verify whether the ratio between the target component elements meets the preset ratio threshold, or to verify whether there is a gap at the splicing between the target component elements, etc., without limitation here. In specific implementation, the preset verification rule can be set according to the problems that are usually prone to occur in the actual verification scenario, without limitation here.
[0130] Furthermore, the initial object is verified according to the preset verification rules; if the verification passes, it indicates that the initial object is reasonable, that is, usable; the initial object is used as the target object. If the verification fails, it indicates that the initial object is unreasonable, that is, unusable; the initial object can be deleted. In addition, the name or identifier of the target object template and the target component element can also be recorded. If these target component elements are still selected for the target object template in the subsequent generation of the target object, the selection can be abandoned and the target component element can be selected again.
[0131] For example: on the basis of splicing to obtain the initial character A, calculate the ratio between each target component element in the initial character A, and compare the ratio with the preset ratio threshold. Assume that the preset arm component element length and torso component element length ratio interval is [p1, p2], and the calculated length ratio of the arm component element and torso component element in the initial character A is p3, and p3 is between [p1, p2], which indicates that the verification is passed, and the initial character A is used as the target character A that responds to the object creation instruction.
[0132] In summary, when the verification is passed, the spliced initial object is used as the target object in response to the object generation instruction, which ensures the rationality of the generated target object.
[0133] In a specific implementation, the verifying the initial object according to the preset verification rules includes:
[0134] Encode a component element of a first preset object in the first preset object set into a first element vector, and encode movement information corresponding to the first preset object into a first movement vector;
[0135] Calculating a first element vector average value based on the first element vector, and calculating a first motion vector average value based on the first motion vector;
[0136] Encoding the target component element of the initial object into a target element vector, and encoding the target movement information of the initial object into a target movement vector;
[0137] Calculating a first element similarity according to a first preset algorithm, an average value of the first element vector and the target element vector, and calculating a first motion similarity according to a second preset algorithm, an average value of the first motion vector and the target motion vector;
[0138] A verification result of the initial object is determined based on the first element similarity and the first movement similarity.
[0139] The first preset object set refers to a set consisting of at least one reasonable (available) object. Correspondingly, the first preset object refers to an object in the first preset object set. Further, by vector encoding the component elements of the first preset object, the element vectors (i.e., the first element vectors) corresponding to these component elements can be generated. By vector encoding the movement information of the first preset object, the movement vectors (i.e., the first movement vectors) corresponding to these movement information can be generated. In specific implementation, vector encoding can be implemented using One-Hot encoding.
[0140] Taking One-Hot as an example, the component elements of the first preset object in the first preset object set are encoded as the first element vector. Each component element in the components contained in the object library can be pre-set as a classification variable, and these classification variables are arranged in a preset order. Then, according to the arrangement result, the component elements contained in each first preset object are respectively encoded as binary vectors, that is, first element vectors. For example: the object library contains n component elements, and the arrangement results of these component elements are: {component element 1, component element 2,..., component element n}. If the component elements contained in the first preset object M are component element 1, component element 5, component element 10 and component element n. Then the component elements of the first preset object M are converted into the first vector elements: 100010000100...01.
[0141] Similarly, the movement information corresponding to the first preset object is encoded as a first movement vector. Each preset movement information can also be used as a classification variable, and then these classification variables are arranged in a preset arrangement order. Then, according to the arrangement result, the movement information corresponding to each first preset object is respectively encoded into a binary code, that is, a first movement vector. Then, the average value of the component elements of these first preset objects (that is, the first element average value) is calculated. And the average value of the movement information of these first preset objects (that is, the first moving average value) is calculated.
[0142] In addition, encoding the target component element of the initial object into a target component vector and encoding the target movement information corresponding to the initial object into a target movement vector may also adopt the above encoding method, which will not be repeated here.
[0143] Based on this, the similarity of the component elements between the initial object and the pre-created reasonable object (i.e., the first element similarity) is calculated according to the first preset algorithm, the average value of the first element vector, and the target element vector. Among them, the first preset algorithm refers to an algorithm for calculating the first element similarity. In specific implementation, the first preset algorithm can be a Minkowski distance algorithm, a Manhattan distance algorithm, a Euclidean distance algorithm, a Chebyshev distance algorithm, a cosine similarity algorithm, a Pearson correlation coefficient algorithm, a Mahalanobis distance algorithm, a Hamming distance algorithm, etc., which are not limited here.
[0144] For example, the first preset algorithm may be as shown in the following formula 1:
[0145]
[0146] Among them, CP is the first element vector of the initial object, CP mean is the average value of the first element vector. Sim P is the first element similarity.
[0147] The second preset algorithm can be shown as the following formula 2:
[0148]
[0149] Among them, CA is the first motion vector of the initial object, CA mean is the first moving vector average. Sim A is the first moving similarity.
[0150] Specifically, the specific implementation of calculating the first movement similarity according to the second preset algorithm, the average value of the first movement vector and the target movement vector is similar to the specific implementation of calculating the first element similarity mentioned above, and will not be repeated here. And the second preset algorithm refers to the algorithm for calculating the first movement similarity. The second preset algorithm can also be a Minkowski distance algorithm, a Manhattan distance algorithm, a Euclidean distance algorithm, a Chebyshev distance algorithm, a cosine similarity algorithm, a Pearson correlation coefficient algorithm, a Mahalanobis distance algorithm, a Hamming distance algorithm, etc., which are not limited here.
[0151] In practical applications, the higher the first element similarity, the more reasonable the initial object; the higher the first movement similarity, the more reasonable the initial object. When both are greater than their corresponding similarity thresholds, it means that the initial object is reasonable, and the verification result of the initial object is determined to be verified passed.
[0152] When any of the first element similarity and the first movement similarity is less than the corresponding similarity threshold, it indicates that the initial object may be unreasonable. In this case, the verification result of the initial object can be directly determined as verification failure. In addition, in order to further ensure the accuracy of the verification, the initial object can be manually verified, and the result of the manual verification can be determined as the verification result of the initial object.
[0153] For example, the first element similarity is 0.6, and its corresponding similarity threshold is 0.5, and the first movement similarity is 0.7, and its corresponding similarity threshold is also 0.5. If both are greater than their corresponding similarity thresholds, the verification result of the initial object is determined to be verification passed.
[0154] In summary, the initial object is verified by calculating the component element similarity and movement similarity between the initial object and the reasonable object, thereby ensuring the accuracy of the verification of the initial object.
[0155] In practical applications, it is considered that the initial object is verified by calculating the similarity of the initial object and the reasonable object in terms of component elements and movement information. The verification result may still be inaccurate. In order to further improve the accuracy of the verification, in the embodiment of the present application, after encoding the target movement information of the initial object into a target movement vector, it is specifically implemented in the following manner:
[0156] When the number of second preset objects in the second preset object set is greater than a preset number, encoding component elements of the second preset objects in the second preset object set as a second element vector, and encoding movement information corresponding to the second preset objects as a second movement vector;
[0157] calculating a second element vector average value of the second element vector, and calculating a second moving vector average value of the second moving vector;
[0158] Calculating a second element similarity according to a third preset algorithm, an average value of the second element vector and the target element vector, and calculating a second motion similarity according to a fourth preset algorithm, an average value of the second motion vector and the target motion vector;
[0159] A verification result of the initial object is determined based on the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity.
[0160] The second preset object set refers to a set consisting of at least one unreasonable (unusable) object. Correspondingly, the second preset object refers to an object in the second preset object set. Furthermore, by vector encoding the component elements of the second preset object, the element vectors (i.e., two-element vectors) corresponding to these component elements can be generated. By vector encoding the movement information of the second preset object, the movement vectors (i.e., second movement vectors) corresponding to these movement information can be generated. In specific implementation, the encoding method of the two is similar to the above-mentioned method of encoding the component elements and movement information of the first preset object, and will not be repeated here.
[0161] The method for calculating the second element vector average value of the second element vector and the second moving vector average value of the second moving vector are similar to the method for calculating the first element vector average value, which will not be described in detail herein.
[0162] In addition, the specific implementation of calculating the second element similarity (the similarity between the target component element of the initial object and the component element of the unreasonable object) according to the third preset algorithm (the algorithm for calculating the second element similarity), the average value of the second element vector and the target element vector, and the specific implementation of calculating the second movement similarity (the similarity between the target movement information of the initial object and the movement information of the unreasonable object) according to the fourth preset algorithm (the algorithm for calculating the second movement similarity), the average value of the second movement vector and the target movement vector are similar to the specific implementation of calculating the first element similarity mentioned above, and will not be repeated here.
[0163] Furthermore, based on the first element similarity, the first movement similarity, the second element similarity and the second movement similarity, the verification result of the initial object can be determined. Among them, the higher the first element similarity, the more reasonable the initial object; the higher the first movement similarity, the more reasonable the initial object. The higher the second element similarity, the more unreasonable the initial object; the higher the second movement similarity, the more unreasonable the initial object.
[0164] In specific implementation, there are various verification methods for determining the verification result of the initial object. Specifically, when the first element similarity and the first movement similarity are both greater than a preset threshold, and / or when the second element similarity and the second movement similarity are both less than the preset threshold, the verification result of the initial object can be determined to be verified as passed; when any one of the first element similarity and the first movement similarity is less than or equal to the preset threshold, and / or when any one of the second element similarity and the second movement similarity is greater than or equal to the preset threshold, the verification result of the initial object can be determined to be verified as failed, etc., without limitation here.
[0165] For example, the first element similarity is 0.4, the first movement similarity is 0.7, the second element similarity is 0.4, and the second movement similarity is 0.3. When the preset threshold is 0.4, the first element similarity is less than the preset threshold, and the other similarities all meet the preset threshold, then the verification result of the initial object is determined to be verification failure.
[0166] In summary, by calculating the component element similarity and movement similarity between the initial object and a reasonable object, and calculating the component element similarity and movement similarity between the initial object and an unreasonable object, the initial object is verified, which further improves the verification accuracy of the initial object.
[0167] Furthermore, the verification result of the initial object is determined based on the first element similarity, the first movement similarity, the second element similarity and the second movement similarity. In the embodiment of the present application, this is specifically implemented in the following manner:
[0168] When the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity meet a preset verification condition, determining that the verification result of the initial object is verification passed;
[0169] When the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity do not satisfy the preset verification condition, determining that the verification result of the initial object is verification failure;
[0170] When either the first element similarity and the first movement similarity does not satisfy the preset verification condition, or when either the second element similarity and the second movement similarity does not satisfy the preset verification condition, a user verification result input by a user for the initial object is received, and the user verification result is used as the verification result of the initial object.
[0171] Specifically, the preset verification condition refers to the condition for verifying the initial object based on the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity. The condition can be various. For example, the preset verification condition can be different verification conditions set based on each similarity, or the same verification condition can be set for all similarities, which is not limited here.
[0172] For example, the preset verification condition may be that the first element similarity is greater than the first element threshold (the similarity threshold corresponding to the first element similarity), the first movement similarity is greater than the first movement threshold (the similarity threshold corresponding to the first movement similarity), and the second element similarity is less than the second element threshold (the similarity threshold corresponding to the second element similarity), and the second movement similarity is less than the second movement threshold (the similarity threshold corresponding to the second movement similarity). When each of the above similarities satisfies the preset verification condition, it means that the initial object is reasonable, and the verification result of the initial object is determined to be passed;
[0173] In the case where each of the above similarities does not satisfy the preset verification condition (i.e., the first element similarity is less than or equal to the first element threshold, the first movement similarity is less than or equal to the first movement threshold, and the second element similarity is greater than or equal to the second element threshold, and the second movement similarity is greater than or equal to the second movement threshold), it means that the initial object is unreasonable, and the verification result of the initial object is determined to be verification failure;
[0174] In addition, there is a situation where any one, two or three of the above four similarities do not meet the preset verification conditions. In this case, it is impossible to determine whether the initial object is reasonable. It is also impossible to determine whether the initial object is unreasonable. In order to further ensure the accuracy of the verification, the user can manually verify the initial object, and the result of the manual verification (i.e., the user verification result) is determined as the final verification result of the initial object.
[0175] In summary, the verification result of the initial object is determined according to whether the first element similarity, the first movement similarity, the second element similarity and the second movement similarity meet the preset verification condition, which increases the accuracy of the verification and also increases the diversity of the verification.
[0176] Since the first preset object set is a set composed of reasonable objects, and the second preset object set is a set composed of unreasonable objects. Generally, the more objects there are in these two sets, the more accurate the verification result of the initial object. Therefore, in order to further improve the accuracy of the verification, the objects contained in these two sets can be expanded. In the embodiment of the present application, after determining the verification result of the initial object, it can be determined whether the initial object is reasonable or unreasonable. Therefore, according to the verification result, the two sets can be expanded through the initial object, which is specifically achieved in the following way:
[0177] If the verification result of the initial object is that the verification is passed, adding the initial object to the first preset object set;
[0178] When the verification result of the initial object is verification failure, the initial object is added to the second preset object set.
[0179] In specific implementation, if the verification result of the initial object is that the verification is passed, it indicates that the initial object is reasonable, so the initial object can be added to the first preset object set as a reasonable object. If the verification result of the initial object is that the verification is not passed, it indicates that the initial object is unreasonable, so the initial object can be added to the second preset object set as an unreasonable object.
[0180] For example, if the verification result of the initial person A is passed, the initial person A is added to the reasonable object set as a reasonable object. If the verification result of the initial person A is failed, the initial person A is added to the unreasonable object set as an unreasonable object.
[0181] In summary, according to the verification result of the initial object, the initial object is added to the first preset object set or the second preset object set, thereby expanding the first preset object set or the second preset object set and further improving the accuracy of subsequent verification.
[0182] In a specific implementation, after the target object is generated, and in the case that there is movement information in the object material library, the target component elements are spliced based on the target object template to generate the target object in response to the object generation instruction, and the method further includes:
[0183] Determining the target movement information corresponding to the target object template according to the correspondence between the object template and the movement information in the object material library;
[0184] Based on the target object and the target movement information, create at least one animation frame corresponding to the target object;
[0185] A target animation is created based on the at least one animation frame.
[0186] Among them, the target movement information refers to the movement information corresponding to the target object template. In practical applications, when creating an object template, the actions that the object corresponding to the object template can perform are usually determined. Therefore, there is a corresponding relationship between the object template and the movement information corresponding to the execution of the action. Therefore, the target movement information of the target object template can be determined based on the corresponding relationship. Furthermore, based on the target object and the target movement information, an animation frame of the target object during the movement process can be created. Specifically, the at least one animation frame can include any one or more animation frames of the target object during the movement process.
[0187] Furthermore, on the basis of creating the animation frames, the created animation frames are spliced in the order of movement to create the animation of the target object during the movement (ie, the target animation).
[0188] For example, assuming that the target movement information corresponding to the target person A is the position information of the wrist key point after raising the hand, based on the position information, create an animation frame of the target person A after raising the hand. The animation frame of the original position of the target person A is used as the initial animation frame, and the animation frame after raising the hand is used as the final animation frame, and the corresponding other animation frames are inserted therein to generate the target animation.
[0189] In summary, the target object and the target movement information are used to create at least one animation frame corresponding to the target object, and a target animation is created based on the animation frame, thereby realizing animation production of the target object and improving production efficiency.
[0190] The object creation method provided in the embodiment of the present application determines a target object template when an object generation instruction is received; and selects a target component element corresponding to the target object template according to a preset element selection rule, thereby realizing the selection of component elements constituting the target object, and then splicing the selected target component elements based on the target object template to generate a target object in response to the object generation instruction, thereby realizing the generation of the target object by automatically selecting the target component elements required to create the target object and then splicing them, thereby improving the generation efficiency of the target object.
[0191] The following combination Figure 3 , taking the application of the object creation method provided by this application in a game scene as an example, the object creation method is further described. Figure 3 A processing flow chart of an object creation method applied to a game scene provided by an embodiment of the present application is shown, which specifically includes the following steps:
[0192] Step 302: Create a character skeleton according to the preset skeleton information in the game scene.
[0193] Specifically, the character skeleton can be understood as the object template in the above method embodiment.
[0194] Step 304: Create component elements corresponding to the character skeleton according to the key point information of the key points of the virtual components in the character skeleton.
[0195] Step 306: Construct a character material library of the game scene based on the character skeleton and component elements.
[0196] The character material library may be understood as the object material library in the above method embodiment.
[0197] Specifically, the above steps 302 to 306 can be understood as a process of pre-producing a character material library. Figure 4 is a schematic flow chart of creating a character material library in an object creation method provided in an embodiment of the present application, such as Figure 4As shown, the characters need to be classified (i.e., character classification). Then, the skeleton of each type of character is disassembled according to the classification results to obtain the disassembled character skeleton. Then, the skeleton of each character is made. In addition, the character is disassembled for each type of character to obtain the corresponding parts (i.e., part elements) of each character, and parts are made. Then, a character material library is created based on the made character skeletons and parts.
[0198] Step 308: upon receiving the character generation instruction submitted by the user, determine the target character skeleton from the character skeletons in the character material library according to the preset skeleton selection rule.
[0199] Specifically, the target character skeleton can be understood as the target object template in the above method embodiment.
[0200] Step 310: Determine the virtual component elements in the skeleton of the target character.
[0201] Step 312: According to the correspondence between the virtual component elements and the component elements in the character material library, randomly select the target component element corresponding to the target character skeleton in the component.
[0202] Step 314: splicing the target component elements based on the target character skeleton to obtain the initial character.
[0203] Step 316: Verify the initial role according to preset verification rules.
[0204] Step 318: If the verification is successful, the initial role is used as the target role in response to the role generation instruction.
[0205] Steps 308 to 318 are the process of formally creating the generated character. Specifically, Figure 5 is a process flow chart of generating a role in an object creation method provided in an embodiment of the present application, Figure 5 The character generation process shown is based on character classification, randomly selecting character skeletons (i.e., random skeletons) and randomly selecting parts (random parts), and assembling the selected parts to form an initial character for character feasibility verification. If the verification passes, the character (target character) generation is completed.
[0206] The object creation method provided in the embodiment of the present application determines the skeleton of a target character upon receiving a character generation instruction; and selects the target component elements corresponding to the skeleton of the target character according to a preset element selection rule, thereby realizing the selection of component elements constituting the target character, and then splicing the selected target component elements based on the skeleton of the target character to generate a target object in response to the character generation instruction, thereby realizing the generation of the target character by automatically selecting the target component elements required for creating the target character and then splicing them, thereby improving the generation efficiency of the target character.
[0207] Corresponding to the above method embodiment, the present application also provides an object creation device embodiment, Figure 6 FIG. 1 is a schematic diagram showing the structure of an object creation device provided by an embodiment of the present application. Figure 6 As shown, the device comprises:
[0208] The determination module 602 is configured to receive an object generation instruction and determine a target object template;
[0209] The selection module 604 is configured to select the target component element corresponding to the target object template according to a preset element selection rule;
[0210] The generation module 606 is configured to splice the target component elements based on the target object template to generate a target object in response to the object generation instruction.
[0211] Optionally, the determining module 602 is further configured to:
[0212] Determine the target object template from the object templates in the object material library according to a preset template selection rule; or
[0213] According to the template information carried in the object generation instruction, a target object template corresponding to the template information is determined.
[0214] Optionally, the object material library is constructed by running the following modules:
[0215] A template creation module is configured to create an object template according to preset object template information;
[0216] An element creation module is configured to create a component element corresponding to the object template according to key point information of key points of the virtual component element in the object template;
[0217] The first construction module is configured to construct the object material library based on the object template and the component elements.
[0218] Optionally, the selection module 604 is further configured to:
[0219] Determining a virtual component element in the target object template;
[0220] According to the correspondence between the virtual component element and the component element in the object material library, a target component element corresponding to the target object template is randomly selected from the component elements.
[0221] Optionally, when the object corresponding to the object template is an actionable object, the object creation device further includes:
[0222] A key point determination module is configured to determine a target key point and movement information of the target key point among the key points of the virtual component element of the object template according to a movement rule corresponding to a preset action type;
[0223] The second construction module is configured to construct the object material library based on the object template, the component elements and the movement information.
[0224] Optionally, the object creation device further includes:
[0225] An information determination module is configured to determine the target movement information corresponding to the target object template according to the correspondence between the object template and the movement information in the object material library;
[0226] An animation frame creation module is configured to create at least one animation frame corresponding to the target object based on the target object and the target movement information;
[0227] The animation creation module is configured to create a target animation based on the at least one animation frame.
[0228] Optionally, the generating module 606 includes:
[0229] A splicing submodule is configured to splice the target component elements based on the target object template to obtain an initial object;
[0230] The verification submodule is configured to verify the initial object according to a preset verification rule; if the verification passes, the initial object is used as a target object in response to the object generation instruction.
[0231] Optionally, the verification submodule is further configured to:
[0232] Encode a component element of a first preset object in the first preset object set into a first element vector, and encode movement information corresponding to the first preset object into a first movement vector;
[0233] Calculating a first element vector average value based on the first element vector, and calculating a first motion vector average value based on the first motion vector;
[0234] Encoding the target component element of the initial object into a target element vector, and encoding the target movement information of the initial object into a target movement vector;
[0235] Calculating a first element similarity according to a first preset algorithm, an average value of the first element vector and the target element vector, and calculating a first motion similarity according to a second preset algorithm, an average value of the first motion vector and the target motion vector;
[0236] A verification result of the initial object is determined based on the first element similarity and the first movement similarity.
[0237] Optionally, the verification submodule is further configured to:
[0238] When the number of second preset objects in the second preset object set is greater than a preset number, encoding component elements of the second preset objects in the second preset object set as a second element vector, and encoding movement information corresponding to the second preset objects as a second movement vector;
[0239] calculating a second element vector average value of the second element vector, and calculating a second moving vector average value of the second moving vector;
[0240] Calculating a second element similarity according to a third preset algorithm, an average value of the second element vector and the target element vector, and calculating a second motion similarity according to a fourth preset algorithm, an average value of the second motion vector and the target motion vector;
[0241] Determining a first verification result of the initial object based on the first element similarity and the first movement similarity;
[0242] A verification result of the initial object is determined based on the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity.
[0243] Optionally, the verification submodule is further configured to:
[0244] When the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity meet a preset verification condition, determining that the verification result of the initial object is verification passed;
[0245] When the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity do not satisfy the preset verification condition, determining that the verification result of the initial object is verification failure;
[0246] When either the first element similarity and the first movement similarity does not satisfy the preset verification condition, or when either the second element similarity and the second movement similarity does not satisfy the preset verification condition, a user verification result input by a user for the initial object is received, and the user verification result is used as the verification result of the initial object.
[0247] Optionally, after determining the verification result of the initial object, the method further includes:
[0248] If the verification result of the initial object is that the verification is passed, adding the initial object to the first preset object set;
[0249] When the verification result of the initial object is verification failure, the initial object is added to the second preset object set.
[0250] Optionally, the generating module 606 is further configured to:
[0251] splicing the target component elements according to the connection relationship of the virtual component elements in the target object template to generate a target object in response to the object generation instruction; or
[0252] Based on the correspondence between the key points of the virtual component elements in the target object template and the key points of the target component elements, the target component elements are spliced to generate a target object in response to the object generation instruction.
[0253] The object creation device provided in the embodiment of the present application determines a target object template upon receiving an object generation instruction; and selects a target component element corresponding to the target object template according to a preset element selection rule, thereby realizing the selection of component elements constituting the target object, and then splicing the selected target component elements based on the target object template to generate a target object in response to the object generation instruction, thereby realizing the generation of the target object by automatically selecting the target component elements required to create the target object and then splicing them, thereby improving the generation efficiency of the target object.
[0254] The above is a schematic scheme of an object creation device of this embodiment. It should be noted that the technical scheme of the object creation device and the technical scheme of the object creation method described above are of the same concept, and the details not described in detail in the technical scheme of the object creation device can be found in the description of the technical scheme of the object creation method described above.
[0255] In one embodiment of the present application, a computing device is also provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the object creation method when executing the computer instructions.
[0256] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the object creation method described above are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the object creation method described above.
[0257] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which implement the steps of the object creation method as described above when executed by a processor.
[0258] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the object creation method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the object creation method described above.
[0259] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0260] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0261] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0262] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0263] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A method for creating an object, characterized in that: include: Receive an object generation instruction and determine a target object template; According to a preset element selection rule, a target component element corresponding to the target object template is selected; splicing the target component elements based on the target object template to obtain an initial object, calculating component element similarity and movement similarity between the initial object and a first preset object, and determining a verification result of the initial object based on the component element similarity and the movement similarity; In the case where the verification is passed, the initial object is used as the target object in response to the object generation instruction, and the first preset object is an object that has been verified by preset verification rules in advance and has passed the verification.
2. The object creation method according to claim 1, characterized in that: The step of determining the target object template includes: Determine the target object template from the object templates in the object material library according to a preset template selection rule; or According to the template information carried in the object generation instruction, a target object template corresponding to the template information is determined.
3. The object creation method according to claim 2, characterized in that: The object material library is constructed in the following way: Create an object template according to preset object template information; Creating a component element corresponding to the object template according to key point information of the key points of the virtual component element in the object template; The object material library is constructed based on the object template and the component elements.
4. The object creation method according to claim 3, characterized in that: The step of selecting the target component element corresponding to the target object template according to a preset element selection rule includes: Determining a virtual component element in the target object template; According to the correspondence between the virtual component element and the component element in the object material library, a target component element corresponding to the target object template is randomly selected from the component elements.
5. The object creation method according to claim 3, characterized in that: In the case where the object corresponding to the object template is an actionable object, after creating the component element corresponding to the object template according to the key point information of the key points of the virtual component element in the object template, the method further includes: Determine a target key point and movement information of the target key point among the key points of the virtual component element of the object template according to a movement rule corresponding to a preset action type; The object material library is constructed based on the object template, the component elements and the movement information.
6. The object creation method according to claim 5, characterized in that: After the target object is generated by splicing the target component elements based on the target object template and responding to the object generation instruction, the method further includes: Determining the target movement information corresponding to the target object template according to the correspondence between the object template and the movement information in the object material library; Based on the target object and the target movement information, create at least one animation frame corresponding to the target object; A target animation is created based on the at least one animation frame.
7. The object creation method according to claim 1, characterized in that: The calculating the component element similarity and the movement similarity between the initial object and the first preset object, and determining the verification result of the initial object based on the component element similarity and the movement similarity, includes: Encode a component element of a first preset object in the first preset object set into a first element vector, and encode movement information corresponding to the first preset object into a first movement vector; Calculating a first element vector average value based on the first element vector, and calculating a first motion vector average value based on the first motion vector; Encoding the target component element of the initial object into a target element vector, and encoding the target movement information of the initial object into a target movement vector; Calculating a first element similarity according to a first preset algorithm, an average value of the first element vector and the target element vector, and calculating a first motion similarity according to a second preset algorithm, an average value of the first motion vector and the target motion vector; A verification result of the initial object is determined based on the first element similarity and the first movement similarity.
8. The object creation method according to claim 7, characterized in that: After encoding the target motion information of the initial object into a target motion vector, the method further includes: When the number of second preset objects in the second preset object set is greater than a preset number, encoding the component elements of the second preset objects in the second preset object set as a second element vector, and encoding the movement information corresponding to the second preset objects as a second movement vector, wherein the second preset objects are objects that have been pre-verified by a preset verification rule and have failed the verification; calculating a second element vector average value of the second element vector, and calculating a second moving vector average value of the second moving vector; Calculating a second element similarity according to a third preset algorithm, an average value of the second element vector and the target element vector, and calculating a second motion similarity according to a fourth preset algorithm, an average value of the second motion vector and the target motion vector; Determining a first verification result of the initial object based on the first element similarity and the first movement similarity; A verification result of the initial object is determined based on the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity.
9. The object creation method according to claim 8, characterized in that: The determining the verification result of the initial object based on the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity includes: When the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity meet a preset verification condition, determining that the verification result of the initial object is verification passed; When the first element similarity, the first movement similarity, the second element similarity, and the second movement similarity do not satisfy the preset verification condition, determining that the verification result of the initial object is verification failure; When either the first element similarity and the first movement similarity does not satisfy the preset verification condition, or when either the second element similarity and the second movement similarity does not satisfy the preset verification condition, a user verification result input by a user for the initial object is received, and the user verification result is used as the verification result of the initial object.
10. The object creation method according to any one of claims 7 to 9, characterized in that: After determining the verification result of the initial object, the method further includes: If the verification result of the initial object is that the verification is passed, adding the initial object to the first preset object set; When the verification result of the initial object is verification failure, the initial object is added to the second preset object set.
11. The object creation method according to claim 1, characterized in that: The step of splicing the target component elements based on the target object template to generate a target object in response to the object generation instruction includes: splicing the target component elements according to the connection relationship of the virtual component elements in the target object template to generate a target object in response to the object generation instruction; or Based on the correspondence between the key points of the virtual component elements in the target object template and the key points of the target component elements, the target component elements are spliced to generate a target object in response to the object generation instruction.
12. An object creation device, characterized in that: include: A determination module is configured to receive an object generation instruction and determine a target object template; A selection module is configured to select a target component element corresponding to the target object template according to a preset element selection rule; A generation module is configured to splice the target component elements based on the target object template to obtain an initial object, calculate the component element similarity and the movement similarity between the initial object and the first preset object, and determine the verification result of the initial object based on the component element similarity and the movement similarity; In the case where the verification is passed, the initial object is used as the target object in response to the object generation instruction, and the first preset object is an object that has been verified by preset verification rules in advance and has passed the verification.
13. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer instructions, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product, characterized in that The method comprises computer instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Animation production method, system and device and computer readable storage medium
CN112308951A