Avatar configuration method and apparatus, device, and storage medium
Through the virtual image configuration method, users can adjust the skeletal model of the virtual object in the virtual image configuration interface to realize virtual image customization, which solves the problem of low development efficiency in the existing technology and improves the efficiency of application development and maintenance.
Patent Information
- Application Number
- PCT/CN2024/077870
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-11
- Filing Date
- 2024-02-21
- Publication Date
- 2024-10-17
AI Technical Summary
In the existing technology, developing avatar customization functions requires developers to make a large number of avatars in advance, resulting in low efficiency in application development and maintenance and inability to achieve customization in sufficient detail.
By providing a virtual image configuration method and using a computer device to display the virtual image configuration interface, the user can adjust the image parameters in the skeletal model of the virtual object, update the virtual image in real time according to the user's configuration operation, simplify the development process, and improve efficiency.
There is no need to prepare a large number of virtual images in advance. Users can customize virtual images, significantly reducing the workload of development and updates, and improving the efficiency of application development and maintenance.
Smart Images

Figure CN2024077870_17102024_PF_FP_ABST
Abstract
Description
Virtual image configuration method, device, equipment and storage medium
[0001] Related applications
[0002] This application claims priority to Chinese patent application number 2023104160808, filed on April 11, 2023, entitled “Virtual image configuration method, device, equipment and storage medium,” the entire text of which is incorporated herein by reference. Technical Field
[0003] The present application relates to the field of virtual scene technology, and in particular to a virtual image configuration method, device, equipment and storage medium. Background Art
[0004] Applications that provide virtual scenes can usually provide users with the function of customizing the virtual images of virtual objects.
[0005] In related technologies, developers use Blendshape technology to create several virtual images (for example, several human faces) in advance. In subsequent applications, when users customize virtual images, vertex differences are performed on the pre-made virtual images to obtain the user-customized virtual image.
[0006] However, in order to achieve sufficiently detailed customization of virtual images in the above solution, developers are required to prepare a large number of virtual images in advance, which reduces the efficiency of application development and maintenance.
[0007] Summary of the Invention
[0008] This application provides a method, apparatus, device, and storage medium for configuring a virtual image. The technical solution is as follows:
[0009] According to one aspect of the present application, a method for configuring a virtual image is provided, the method comprising:
[0010] A method for configuring a virtual image, executed by a computer device, comprising:
[0011] Displaying a virtual image configuration interface, wherein the virtual image configuration interface includes a virtual image of a virtual object and configuration options corresponding to at least one image parameter, wherein the image parameter corresponding to each configuration option corresponds to a skeletal part of the skeletal model of the virtual object;
[0012] In response to a configuration operation, determining a target configuration option indicated by the configuration operation from the configuration options, and obtaining a parameter value of a target image parameter corresponding to the target configuration option;
[0013] Determining a target skeleton portion corresponding to the target image parameter, adjusting a position of the target skeleton portion in the skeleton model according to a parameter value of the target image parameter, and obtaining position information of the target skeleton portion after adjustment in the skeleton model; and
[0014] Based on the adjusted position information of the target skeleton part in the skeleton model, the virtual image is updated and displayed in the virtual image configuration interface.
[0015] According to another aspect of the present application, a virtual image configuration device is provided, the device comprising:
[0016] an interface display module, configured to display a virtual image configuration interface, wherein the virtual image configuration interface includes a virtual image of a virtual object and configuration options corresponding to at least one image parameter, wherein the image parameter corresponding to each configuration option corresponds to a skeletal part in the skeletal model of the virtual object;
[0017] a position acquisition module, configured to, in response to a configuration operation, determine a target configuration option indicated by the configuration operation from the configuration options, and obtain a parameter value of a target image parameter corresponding to the target configuration option; determine a target skeletal portion corresponding to the target image parameter, adjust a position of the target skeletal portion in the skeletal model according to the parameter value of the target image parameter, and obtain position information of the target skeletal portion after adjustment in the skeletal model; and
[0018] The image updating module is used to update and display the virtual image in the virtual image configuration interface based on the adjusted position information of the target skeleton part in the skeleton model.
[0019] According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the virtual image configuration method as described above.
[0020] According to another aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the virtual image configuration method as described above.
[0021] According to another aspect of the present application, a computer program product is provided, which includes computer instructions stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the virtual image configuration method described above.
[0022] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.
[0024] FIG1 is a block diagram of a computer system provided by an exemplary embodiment of the present application;
[0025] FIG2 is a flowchart of a method for configuring a virtual image provided by an exemplary embodiment of the present application;
[0026] FIG3 is a flowchart of a method for configuring a virtual image provided by an exemplary embodiment of the present application;
[0027] FIG4 is a flowchart of a method for configuring a virtual image provided by an exemplary embodiment of the present application;
[0028] FIG5 is a flowchart of a method for configuring a virtual image provided by an exemplary embodiment of the present application;
[0029] FIG6 is a flow chart of the offline portion of face pinching logic development involved in this application;
[0030] FIG7 is a flow chart of the online part of face pinching logic development involved in this application;
[0031] Figures 8 and 9 are interface diagrams for importing and creating skeleton Mesh files involved in this application;
[0032] FIG10 is an interface diagram of face resource configuration involved in this application;
[0033] FIG11 is a schematic diagram of a character image involved in this application;
[0034] FIG12 is a schematic diagram of the interface involved in this application;
[0035] FIG13 is a schematic diagram of the animation blueprint involved in this application;
[0036] FIG14 is a structural block diagram of a virtual image configuration device provided by an exemplary embodiment of the present application;
[0037] FIG15 is a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0040] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0041] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0042] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the attack operations and other object behaviors involved in this application were obtained with full authorization.
[0043] It should be understood that although the terms first, second, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter without departing from the scope of this disclosure. 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".
[0044] To facilitate understanding, we first introduce the explanations of some terms involved in this application.
[0045] 1) Skeletal Animation: It is a type of model animation that generates animation for the model by changing the orientation and position of the bones.
[0046] 2) Model: It is composed of triangular faces, which are also called meshes. Each mesh has vertices.
[0047] In skeletal animation, the mesh is also called the skin; the connections between bones are called joints, and the bones can rotate around the joints.
[0048] 3) Face-pinching: In online games, it generally refers to the data operation of customizing the appearance of virtual characters (also known as Do It Yourself (DIY)).
[0049] FIG1 shows a block diagram of a computer system according to an exemplary embodiment of the present application. The computer system 100 includes a first terminal 110 , a server 120 , and a second terminal 130 .
[0050] The first terminal 110 has a client 111 installed and running that supports a virtual scene. This client 111 can be a multiplayer online battle program. When the first terminal runs client 111, the user interface of client 111 is displayed on the screen of the first terminal 110. Client 111 can be any of a simulation program, a competitive shooting game, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person shooter (FPS), a third-person shooter (TPS), a multiplayer online battle arena (MOBA), or a simulation game (SLG). In this embodiment, the example of client 111 being an FPS game is used. The first terminal 110 is used by a first user 112. The first user 112 uses the first terminal 110 to control a first virtual object in the virtual scene to perform activities. The first virtual object can be referred to as the virtual object of the first user 112. The activities of the first virtual object include, but are not limited to, at least one of: moving, jumping, teleporting, performing skills, using props, adjusting body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, and throwing. Illustratively, the first virtual object is a first virtual character, such as a simulated human character or an animated character. A virtual object is an object that can move in a virtual scene. It can move under user control, automatically according to pre-set rules, or under artificial intelligence control.
[0051] The second terminal 130 has a client 131 installed and running that supports a virtual scene. The client 131 can be a multiplayer online battle program. When the second terminal 130 runs the client 131, the user interface of the client 131 is displayed on the screen of the second terminal 130. The client can be any of a simulation program, a competitive shooting game, a VR application, an AR program, a three-dimensional map program, a virtual reality game, an augmented reality game, an FPS, a TPS, a MOBA, and a SLG. In this embodiment, the client is a MOBA game as an example. The second terminal 130 is a terminal used by a second user 132. The second user 132 uses the second terminal 130 to control a second virtual object in the virtual scene to perform activities. The second virtual object can be referred to as a virtual object of the second user 132. Schematically, the second virtual object is a second virtual character, such as a simulated human character or an anime character.
[0052] Optionally, the first virtual object and the second virtual object are in the same virtual scene. Optionally, the first virtual object and the second virtual object may belong to the same camp, the same team, the same organization, have a friendship relationship, or have temporary communication permissions. Optionally, the first virtual object and the second virtual object may belong to different camps, different teams, different organizations, or have a hostile relationship.
[0053] Optionally, the client installed on the first terminal 110 and the second terminal 130 is the same, or the client installed on the two terminals is the same type of client on different operating system platforms (Android or iOS). The first terminal 110 can generally refer to one of multiple terminals, and the second terminal 130 can generally refer to another of the multiple terminals. This embodiment only uses the first terminal 110 and the second terminal 130 as an example. The first terminal 110 and the second terminal 130 can be of the same or different device types, including at least one of a smartphone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.
[0054] FIG1 shows only two terminals, but in different embodiments, multiple other terminals 140 may be connected to the server 120. Optionally, one or more terminals 140 may be terminals corresponding to developers, and a development and editing platform for a client supporting a virtual scene may be installed on the terminal 140. The developer may edit and update the client on the terminal 140 and transmit the updated client installation package to the server 120 via a wired or wireless network. The first terminal 110 and the second terminal 130 may download the client installation package from the server 120 to update the client.
[0055] The first terminal 110 , the second terminal 130 , and the other terminals 140 are connected to the server 120 via a wireless network or a wired network.
[0056] Server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 120 provides backend services for clients supporting 3D virtual scenes. Optionally, server 120 performs primary computing tasks, while the client performs secondary computing tasks; alternatively, server 120 performs secondary computing tasks, while the client performs primary computing tasks; alternatively, server 120 and the client utilize a distributed computing architecture for collaborative computing.
[0057] In an illustrative example, the server 120 includes a processor 122, a user account database 123, a battle service module 124, and a user-facing input / output interface (I / O interface) 125. The processor 122 is configured to load instructions stored in the server 120 and process data in the user account database 123 and the battle service module 124. The user account database 123 is configured to store user account data used by the first terminal 110, the second terminal 130, and other terminals 140, such as user account avatars, user account nicknames, user account combat power indexes, and the service areas where the user accounts are located. The battle service module 124 is configured to provide multiple battle rooms for users to engage in battles, such as 1v1 battles, 3v3 battles, 5v5 battles, etc. The user-facing I / O interface 125 is configured to establish communication and exchange data with the first terminal 110 and / or the second terminal 130 via a wireless network or a wired network.
[0058] The method provided in this application can be applied to, but is not limited to, at least one of the following scenarios: virtual reality applications, simulation programs, first-person shooter games (FPS), third-person shooter games (TPS), multiplayer gunfight survival games, and other applications that allow users to customize the virtual image of virtual objects. The following embodiments are illustrated by using applications in games as examples.
[0059] FIG2 shows a flowchart of a method for configuring a virtual image provided by an exemplary embodiment of the present application. The method can be executed by a computer device. The method includes:
[0060] Step 210: Displaying a virtual image configuration interface, the virtual image configuration interface includes a virtual image of the virtual object and configuration options corresponding to at least one image parameter, wherein the image parameter corresponding to each configuration option corresponds to a skeletal part in the skeletal model of the virtual object.
[0061] The avatar is the visual effect presented by the virtual object in the virtual scene. In the embodiment of the present application, the at least one avatar parameter may be a parameter corresponding to each shape-adjustable appearance part of the avatar. For example, the avatar parameter may include eyebrow height, eyebrow width, nose height, nose width, eye height, eye width, eye size, etc.
[0062] The above-mentioned image parameters are merely examples and are not intended to be limiting in this embodiment. Developers can customize the types of image parameters based on product requirements. For example, the above-mentioned eyebrow height can be further refined into eyebrow edge height, eyebrow middle height, and nose height. The above-mentioned nose height can be further refined into pen tip height, nose bridge height, and so on. This embodiment does not limit the types of these image parameters.
[0063] In skinned animation, the skeleton is constructed from rigid "bones". These rigid components (i.e. bones, also called "joints" in some scenes) are not rendered and displayed, and are always hidden. A smooth triangular mesh called skin is bound to the skeleton, and its vertices follow the movement of the joints. Each vertex on the skin can be bound to one or more bones according to the weight, so that when the position of the bone changes, the skin can stretch naturally. The model of the skeleton that makes up the virtual object is the above-mentioned skeleton model (wherein the skeleton model is different from the object model of the virtual object, and the object model refers to the model obtained by skinning the skeleton model). In an embodiment of the present application, each image parameter can correspond to one or more vertices on the skin, and the skeleton to which the one or more vertices corresponding to the image parameter are bound is the skeleton part corresponding to the image parameter. Wherein skinning refers to the process of binding the skin to the skeleton.
[0064] In a possible implementation, the above-mentioned skeleton model is stored in the form of skeleton matrix data; for example, the skeleton matrix data includes two parts: skeleton and posture, which are respectively introduced with examples below.
[0065] 1. Skeletons are composed of joints and can be a tree structure. They are stored in memory as arrays. The structure of skeleton-related data can be shown below.
[0066] 1) The joint data structure (struct Joint) includes: the joint name (const char* m_name), the joint's parent node index (U8m_iParent), and the inverse matrix of the bind pose (Matrix4x3m_invBindPose) corresponding to the joint when it is bound to the skinned mesh vertex.
[0067] 2) The skeleton data structure (struct Skeleton) includes: the joint data (U32m_jointCount) included in the skeleton, and the data structure array (Joint*m_aJoint) of each joint contained in the skeleton.
[0068] 2. Pose describes relative pose positions, typically using a T-pose as the binding pose (i.e., the initial pose format, which can also be understood as the initial pose space). By rotating, translating, and scaling the joints arbitrarily, the skeleton can assume various poses. The pose of a joint is defined as its position, orientation, and scale relative to a frame of reference. The pose of a joint is typically represented as a 4×4 or 4×3 matrix, or as an SQT data structure. Using the SQT data structure as an example, the structure of pose-related data can be shown below.
[0069] 1) Local pose: The pose position of the child node relative to the parent node, stored in SQT format (scale, quaternion, translation); it is generally considered to be synchronized with the scale.
[0070] A data structure (struct JointPose) of a local joint pose may include: a quaternion (Quaternion m_rot), a translation (Vector3m_trans), and a uniform scale (F32m_scale); or, another data structure (struct JointPose) of a local joint pose may include: a quaternion, a translation (Vector4m_trans), and a non-uniform scale (Vector4m_scale).
[0071] The data structure of the local skeleton pose (struct SkeletonPose) can include: the number of bones + joints (Skeleton*m_pSkeleton) and multiple local joint poses (JointPose*m_aLocalPose). The size of the array of local joint poses is consistent with the number of joints.
[0072] 2) Global pose: Since the SQT matrix of each child node is relative to the parent node space, in order to convert the SQT matrix of the child node into the model space or world space matrix, it is necessary to recursively calculate layer by layer to the root node.
[0073] For example: the j-th layer child node recursively reaches the root node (defining p(j) to represent the parent node of node j), P(j->M)=P(j->p(j))*P(p(j)->p(p(j)))....
[0074] The data structure of the global skeleton pose (struct SkeletonPose) may include: the number of bones + joints (Skeleton*m_pSkeleton) and multiple local joint poses (JointPose*m_aLocalPose), and multiple global joint poses (Matrix44*m_aGlobalPose).
[0075] The configuration option is used to configure the parameter value of the image parameter corresponding to the configuration option. One image parameter can correspond to one configuration option. In other embodiments, one image parameter can also correspond to multiple configuration options. The configuration option can provide the function of adjusting within the value range of the image parameter. In an embodiment of the present application, one or more bones (or joints) in the skeletal model of the virtual object can be transformed in position (including coordinate transformation, direction transformation, etc.) and can constitute a skeletal part (or, a skeletal part is composed of one or more joints), and each skeletal part can correspond to an image parameter; in the virtual image configuration interface, a configuration option can be set corresponding to each image parameter.
[0076] Among them, due to changes in the skeleton part, the appearance of the virtual object will be affected through the associated vertices (Vertex), and the purpose of the user's adjustment of the virtual image of the virtual object is also to change the appearance of the virtual object; based on this, the embodiment of the present application provides a solution for associating the image parameters of the virtual image with the skeleton part of the virtual object, expanding the bones / joints of the skeleton model of the virtual object, setting bones / joints that can affect the virtual image of the virtual object (such as the image of the face), and setting corresponding configuration options.
[0077] Specifically, developers can develop the skeletal part (including one or more joint points) in the skeletal model of the virtual object based on adjustable image parameters (such as eyebrow height, eye width, nose height, etc.). For example, corresponding to the image parameter of eyebrow height, one or more joint points corresponding to the eyebrows can be added to the skeletal model of the virtual object; corresponding to the image parameter of eye width, one or more joint points corresponding to the corners of the eyes can be added to the skeletal model of the virtual object; corresponding to the image parameter of nose height, one or more joint points corresponding to the nose can be added to the skeletal model of the virtual object; at the same time, the developer also sets corresponding configuration options for the above-mentioned joint points related to the eyebrows, corners of the eyes, nose, etc.
[0078] Among them, the above-mentioned configuration options can be options in the form of a drag bar, or options in the form of a selection box or input box, etc. The embodiment of the present application does not limit the implementation form of the above-mentioned configuration options.
[0079] Step 2201: In response to a configuration operation, a target configuration option indicated by the configuration operation is determined from the configuration options, and a parameter value of a target image parameter corresponding to the target configuration option in at least one image parameter is obtained.
[0080] Step 2202: Determine the target skeleton portion corresponding to the target image parameter, adjust the position of the target skeleton portion in the skeleton model according to the parameter value of the target image parameter, and obtain the adjusted position information of the target skeleton portion in the skeleton model.
[0081] The target configuration option is any one of the configuration options corresponding to at least one image parameter. The target image parameter is the image parameter corresponding to the target configuration option among the at least one image parameter. The image parameter expresses a dimension of the virtual image, and the parameter value of the image parameter is quantized along this dimension. The target skeletal portion is the skeletal portion corresponding to the target image parameter corresponding to the target configuration option. Upon receiving a configuration operation, the computer device can obtain the parameter value of the target image parameter corresponding to the target configuration option after the configuration operation is executed, such as eyebrow height, nose width, etc.
[0082] In an embodiment of the present application, the user can perform configuration operations on the configuration options corresponding to the image parameters that need to be adjusted in the virtual image configuration interface. For example, when the above-mentioned configuration options can be options in the form of a drag bar, the user can drag the block / dot controls in the above-mentioned drag bar to modify the parameter value of the image parameter; or, when the above-mentioned configuration options are options in the form of a selection box, the user can click on the option to pop up a drop-down selection box, which contains a plurality of parameter options. Select a parameter option from the drop-down selection box to set the parameter value of the image parameter to the parameter value corresponding to the selected parameter option.
[0083] After receiving the above configuration operation, the computer device determines the adjusted position information of the skeletal part corresponding to the image parameter that needs to be adjusted in the skeletal model based on the result of the user's configuration operation; wherein, for a configuration option, different parameter values of the configuration option can correspond to different position information of the skeletal part of the configuration option in the skeletal model.
[0084] Step 230: Based on the adjusted position information of the target skeleton part in the skeleton model, the virtual image is updated and displayed in the virtual image configuration interface.
[0085] In an embodiment of the present application, after the position of the target bone part in the bone model changes, the computer device can generate an updated virtual image based on the changed bone model and display it in the virtual image configuration interface.
[0086] For example, a computer device can generate an updated virtual image based on the changed skeletal model through a game engine (such as UE4 engine, etc.).
[0087] In a possible implementation, the process of updating the displayed avatar in the avatar configuration interface based on the adjusted position information of the target skeletal part in the skeletal model may include:
[0088] Based on the adjusted position information of the target bone part in the bone model, the bone model is subjected to skin deformation processing to obtain an updated virtual image;
[0089] The updated avatar is displayed on the avatar configuration interface.
[0090] In an embodiment of the present application, the computer device can use skin deformation technology to perform skin deformation processing on the skeleton model based on the adjusted position information of the target skeleton part in the skeleton model to obtain an updated virtual image.
[0091] Skin deformation refers to the deformation of the object model's skin within the constraints of the skeleton model's bones. As the skeleton's bones change, the skin also changes due to the binding relationship between the object model's skin and the skeleton model. Because the skin is constrained by the skeleton's structure, deformation is reasonable. Compared to directly deforming the avatar, this avoids distortion caused by localized deformation of the avatar.
[0092] In an embodiment of the present application, after the position of the target skeleton part in the skeleton model changes, the position of the vertex bound to the target skeleton part in the object model of the virtual object will also change accordingly. This is the skin deformation process.
[0093] Through skin deformation processing, combined with changes in vertex positions, the object model can be updated, that is, the avatar displayed on the avatar configuration interface is updated corresponding to the above configuration operations.
[0094] In the above scheme, the virtual image can be updated by performing skin deformation processing on the adjusted skeleton model. There is no need to develop different virtual images for each image parameter, which can greatly simplify the workload in the development process and improve the efficiency of application development and updating.
[0095] In a possible implementation, the computer device may further store image data of the virtual object, where the image data includes bone matrix data of the updated bone model.
[0096] In an embodiment of the present application, after a user completes custom configuration of an avatar for a virtual object, the computer device may store the avatar data corresponding to the virtual object so that the avatar configured by the user can be displayed outside of the avatar configuration interface. The avatar data may include skeletal matrix data of the skeletal model updated by the user's configuration.
[0097] In a possible implementation, the image data may include bone matrix data corresponding to the updated complete bone model of the virtual object.
[0098] That is to say, in the above scheme, the computer device can save a complete skeleton matrix data of the virtual object, which contains the matrix data of all bones / joints of the virtual object; the skeleton matrix data is based on the user's configuration operation, and is modified from the initial skeleton matrix data of the virtual object.
[0099] The initial skeletal matrix may include the initial matrix data for all bones / joints of the virtual object, that is, the matrix data for all bones / joints of the virtual object in its initial posture and initial body shape. The initial skeletal matrix may include all skeletal parts corresponding to the image parameters, and may also include bones / joints other than those corresponding to the image parameters. For example, the skeletal model of the virtual object may include not only the skeletal parts corresponding to the various image parameters (such as the skeletal parts corresponding to the virtual object's facial features and hair), but also other skeletal parts used to control the virtual object's posture (such as the virtual object's hand bones / joints, knee bones / joints, etc.).
[0100] When the skeleton model of a virtual object also includes other skeleton parts for controlling the posture of the virtual object, when a subsequent computer device generates and controls the virtual object in a virtual scene, it can reuse the complete skeleton matrix data of the virtual object to generate the virtual object and control the virtual object to perform actions. There is no need to rebuild the updated skeleton matrix data of the virtual object, thereby improving the processing efficiency when subsequently generating and controlling the virtual object in a virtual scene and reducing computing requirements.
[0101] In another possible implementation, the image data may also include the updated complete skeleton matrix data of the virtual object, and the skeleton matrix data corresponding to the changed skeleton parts compared with the initial skeleton matrix data of the virtual object.
[0102] That is, in the above scheme, the computer device can only store the difference data between the updated complete skeletal model of the virtual object and the initial skeletal model of the virtual object; wherein, this difference data is combined with the initial skeletal matrix data to obtain the updated complete skeletal matrix data of the virtual object. The above initial skeletal matrix data can be shared by multiple virtual objects. Therefore, the system only needs to store one copy of the initial skeletal matrix data and the difference data for each virtual object, which can achieve accurate representation of the updated model of each virtual object, and can greatly reduce the storage resources used by the entire system to store the skeletal matrix data of each virtual object.
[0103] For example, taking the face-pinching scene in the game as an example, each virtual object of the same family and gender uses the same initial bone matrix data. The initial bone matrix data can be stored on the server side. The user corresponding to each virtual object can load the above initial bone matrix data on his own terminal and DIY the image parameters of his own virtual object through the above configuration control. After completing the configuration, each terminal / game server only needs to store the difference data of each virtual object, and there is no need to store a complete bone matrix data for each virtual object separately.
[0104] To sum up, in the scheme shown in the embodiment of the present application, at least one image parameter of the virtual image displayed in the virtual image configuration interface corresponds to a respective configuration option, and the image parameter corresponding to each configuration option corresponds to a bone part in the bone model of the virtual object; when a configuration operation on the target configuration option in the virtual image configuration interface is received, the adjusted position information of the target bone part corresponding to the target configuration option in the bone model is obtained, and the displayed virtual image is updated based on the adjusted position information of the target bone part in the bone model; in the above scheme, according to the user's configuration operation on the image parameter of the virtual image, the position of the corresponding bone part in the bone model corresponding to the virtual image is directly adjusted, that is, customized configuration of the virtual image can be realized, without the need to prepare a large number of virtual images in advance, which can greatly reduce the workload in the application development process, thereby improving the efficiency of application development and updating.
[0105] FIG3 shows a flowchart of a method for configuring a virtual image provided by an exemplary embodiment of the present application. The method can be executed by a computer device. In the embodiment shown in FIG2 , step 210 can be implemented as steps 210a, 210b, and 210c:
[0106] Step 210a: Obtain a skeleton file and a first description file of the virtual object, wherein the skeleton file includes initial skeleton matrix data of the virtual object, and the first description file is used to indicate at least one image parameter.
[0107] In an embodiment of the present application, for each virtual object, developers can pre-develop and configure a corresponding skeleton file and a first description file, wherein the above-mentioned skeleton file stores the initial skeleton matrix data corresponding to the virtual object.
[0108] In game engines, bones are usually represented by matrices, namely bone matrices. Each bone can have one or more matrices that control the transformation of the vertices associated with it.
[0109] The above-mentioned skeleton file and first description file can be files that can be parsed and processed by the game engine respectively. For example, taking the UE4 engine as an example, the above-mentioned skeleton file can be the engine file of the virtual engine (such as .fbx file), and the above-mentioned first description file can be a JSON file.
[0110] Step 210b: Based on the skeleton file, display the initial avatar in the avatar configuration interface.
[0111] In an embodiment of the present application, the computer device can generate an initial virtual image of the virtual object through a game engine based on the initial bone matrix data in the bone file through skinning technology.
[0112] Step 210c: Based on the first description file, display configuration options corresponding to at least one avatar parameter in the avatar configuration interface.
[0113] In an embodiment of the present application, the computer device can use the game engine to display the configuration options corresponding to each image parameter in the virtual image configuration interface based on at least one image parameter indicated by the first description file, thereby realizing the user's visual configuration of the virtual image.
[0114] In a possible implementation, the avatar configuration interface may display different parts of the avatar of the virtual object according to the position of the avatar currently adjusted by the user.
[0115] For example, a part selection control may be displayed in the virtual image configuration interface. After the user clicks the part selection control, a part selection box may pop up, which contains one or more part options, such as head, upper body, whole body, etc.; different part options correspond to different body parts of the virtual image and adjustable image parameters; for example, when the user selects the head part option, the virtual image configuration interface may display the head image of the virtual object, as well as the configuration options corresponding to the head (such as eyes, nose, eyebrows, etc.); when the user selects the upper body part option, the virtual image configuration interface may display the upper body image of the virtual object, as well as the configuration options of the chest (such as chest circumference, arm span, etc.); when the user selects the upper body part option, the virtual image configuration interface may display the full body image of the virtual object, as well as the configuration options of the lower body (such as leg length, waist circumference, etc.).
[0116] Through the above scheme, the skeleton file and the first description file are used to display the virtual image and the configuration options corresponding to the adjustable image parameters of the virtual image in the virtual image in the virtual image configuration interface respectively. When the image parameters are subsequently adjusted through the configuration options, a new virtual image can be obtained by adjusting the position information of the skeleton part based on the initial skeleton matrix data. There is no need to develop a different virtual image for each image parameter, which can greatly simplify the workload in the development process and improve the efficiency of application development and updating.
[0117] In a possible implementation, the first description file includes an identifier of at least one image parameter and an adjustment range of each of the at least one image parameter;
[0118] The step of displaying configuration options corresponding to at least one avatar parameter in the avatar configuration interface based on the first description file may include:
[0119] Based on the identifier of the first image parameter, the option name of the first configuration option is displayed in the virtual image configuration interface; the first image parameter is any one of the at least one image parameter; the first configuration option is a configuration option corresponding to the first image parameter;
[0120] Based on the adjustment range of the first avatar parameter, an option control of the first configuration option is displayed in the virtual avatar configuration interface.
[0121] In an embodiment of the present application, for each adjustable image parameter, the above-mentioned first description file can save the corresponding identifier and adjustment range of the image parameter. With the identifier and adjustment range of the image parameter, the computer device can display the name and option control of the corresponding image parameter in the virtual image configuration interface, thereby facilitating the user to perform customized configuration operations on the image parameter.
[0122] That is to say, the above-mentioned first description file can describe the adjustable image parameters, the initial values of each image parameter, and the adjustable range of each image parameter. The computer device can automatically generate configuration options corresponding to the above-mentioned image parameters through the first description file. By replacing the image parameters in the first description file, the configuration options in the virtual image configuration interface can be modified, thereby greatly improving the flexibility of developing / updating the configuration options in the virtual image configuration interface.
[0123] Based on the embodiment shown in FIG2 or FIG3 , FIG4 shows a flowchart of a virtual image configuration method provided by an exemplary embodiment of the present application. The method can be executed by a computer device. That is, in the embodiment shown in FIG2 , step 2202 can be implemented as step 22021: determining the target skeletal part corresponding to the target image parameter, obtaining the driving attribute information of the target image parameter, adjusting the position of the target skeletal part in the skeletal model based on the parameter value of the target image parameter and the driving attribute information, and obtaining the adjusted position information of the target skeletal part in the skeletal model; wherein the driving attribute information of the target image parameter is used to indicate how the position information of the target skeletal part changes when the parameter value of the target image parameter changes.
[0124] The driving attribute information of the target image parameter is used to indicate how the position information of the target skeleton part changes when the parameter value of the target image parameter changes.
[0125] In an embodiment of the present application, when the game engine in the computer device obtains the driving attribute information of the target image parameters, the game engine can determine the change mode of the position information of the target skeletal part. On this basis, combined with the parameter value of the target image parameter corresponding to the target configuration option, the position information of the target skeletal part after adjustment in the skeletal model can be determined, so that the user can directly modify the skeletal matrix data of the virtual object through the configuration operation of the configuration options in the interface, thereby ensuring the operability of the user to customize the skeletal matrix data of the virtual object.
[0126] In a possible implementation, the driving attribute information of the target image parameter includes:
[0127] The mapping relationship between the parameter values of the target image parameters and the position information of the target skeleton part.
[0128] In the embodiment of the present application, the mapping relationship between the parameter values of the target image parameters and the position information of the target skeletal part can be a formula for calculating the position information of the target skeletal part through the parameter values of the target image parameters.
[0129] Alternatively, the mapping relationship between the parameter values of the target image parameters and the position information of the target skeletal part may also be a mapping table between the parameter values of the target image parameters and the position information of the target skeletal part.
[0130] In the above scheme, each image parameter corresponds to its own driving attribute information, which is used to indicate the relationship between its parameter value and the position information of the corresponding skeletal part. In this way, the user can modify the parameter value indicated by the corresponding configuration option, that is, the accurate modification of the skeletal matrix data corresponding to the image parameter can be realized in the background, which reduces the complexity of the user's modification of the skeletal matrix data and improves the operational efficiency of the user's customized virtual image.
[0131] In a possible implementation, the virtual image configuration method further includes: obtaining a second description file of the virtual object, wherein the second description file includes driving attribute information of at least one image parameter.
[0132] In an embodiment of the present application, the driving attribute information of each image parameter of the above-mentioned virtual object can be pre-set by the developer in the second description file corresponding to the virtual object. When the virtual image configuration interface is displayed, the computer device can load the above-mentioned second description file through the game engine to obtain the driving attribute information of each image parameter of the virtual object. Through the above scheme, the developer only needs to pre-set the description file used to describe the driving attribute information of each image parameter. The description file can be loaded by the computer device later and the bone matrix data of the virtual object can be automatically modified according to the user's configuration operation. When the adjustment effect of a certain image parameter needs to be modified later, the developer only needs to modify the driving attribute information in the description file. When a new adjustable image parameter needs to be added, it is only necessary to add the corresponding driving attribute information in the description file, thereby greatly improving the development efficiency of the developer.
[0133] The second description file and the first description file may be the same description file; or, the second description file and the first description file may be different description files.
[0134] In a possible implementation, the step of obtaining the adjusted position information of the target skeletal part in the skeletal model based on the parameter values of the target image parameters and the driving attribute information of the target image parameters may include:
[0135] The adjusted position information of the target skeleton part in the skeleton model is obtained through a plug-in based on the animation blueprint, the parameter value of the target image parameter, and the driving attribute information of the target image parameter.
[0136] In an embodiment of the present application, a plug-in based on an animation blueprint can be set up in the application. Through this plug-in, the logic of obtaining the adjusted position information of the target bone part in the bone model based on the parameter values of the target image parameters and the driving attribute information of the target image parameters is implemented.
[0137] Among them, Animation Blueprint is a visual script that can be used to create and control complex animation behaviors.
[0138] An Animation Blueprint is a specialized Blueprint used to control the animation of a Skeletal Mesh. Computers can edit the Animation Blueprint graph in its editor to perform animation blending, such as directly controlling the bones of a skeleton, or setting up logic that ultimately defines the final animation pose of the Skeletal Mesh to be used at each frame.
[0139] In an embodiment of the present application, a computer device can implement user configuration operations with the help of an animation blueprint-based plug-in to automatically modify the bone matrix data of a virtual object. It can implement the operation process of automatically modifying the bone matrix data of a virtual object through user configuration operations, simplify the user operation steps, and improve the human-computer interaction efficiency during the bone matrix data modification process.
[0140] Based on the embodiment shown in FIG4 , FIG5 shows a flowchart of a method for configuring a virtual image provided by an exemplary embodiment of the present application. This method can be executed by a computer device. That is, in the embodiment shown in FIG2 , steps 240 and 250 may also be included:
[0141] Step 240: Based on the adjusted position information of the target skeleton part in the skeleton model, generate the specified animation of the virtual image through the animation blueprint.
[0142] In an embodiment of the present application, based on the animation blueprint, after updating the displayed virtual image, or during the process of updating the displayed virtual image, the computer device can also generate a specified animation based on the adjusted position information of the target skeletal part in the skeletal model to reflect the action effect of the updated virtual image.
[0143] Step 250: Display the specified animation of the avatar in the avatar configuration interface.
[0144] After generating the above-mentioned specified animation, the computer device can display the specified animation of the virtual image in the virtual image configuration interface, thereby showing the action effect of the updated virtual image to the user.
[0145] In skeletal animation, the virtual engine can directly drive the movement of the virtual object through skeletal data. On this basis, in the scheme shown in the embodiment of the present application, after the user directly modifies the skeletal matrix data corresponding to the virtual image of the virtual object based on the configuration control, the computer device can directly generate the animation effect of the virtual object after the skeletal matrix data is modified according to the modified skeletal matrix data (wherein the position information of the target skeletal part is the adjusted position information), so that the user can see the modification effect of the virtual image more intuitively through the animation, so that the user can judge whether the above-mentioned virtual image needs to be further adjusted through the animation effect, thereby improving the interaction efficiency of the user's customized virtual image.
[0146] In a possible implementation, the above-mentioned specified animation is a local animation corresponding to the target skeleton part.
[0147] For example, each time the user configures an image parameter, the computer device can generate an action effect corresponding to the image parameter through the animation blueprint based on the configured image parameter. For example, after the user configures the eyebrow position, the computer device can generate a specified animation of raising the eyebrows based on the animation blueprint and display it to the user, thereby being able to display the animation effect after the corresponding image parameter is modified according to the user's configuration operation, and more specifically reflect the effect of the user's customization of a virtual image of a virtual object.
[0148] In another possible implementation, the above-mentioned specified animation is the overall animation corresponding to the skeletal model.
[0149] For example, each time the user configures an image parameter, the computer device can generate the overall action effect of the image object based on the animation blueprint after the image parameter configuration and display it to the user. For example, the running action, skill action, etc. after the image parameter configuration are displayed to the user, thereby reflecting the impact of the user's customization of one or more virtual images of the virtual object on the overall virtual image of the virtual object.
[0150] The solutions shown in the above embodiments of this application can be applied to any scenario where the virtual image of a virtual object is customized, such as face pinching, body shape adjustment (adjustment of parameters such as height and body shape), etc. Specifically, in a game scenario, based on the solutions shown in the above embodiments of this application, the following interactive effects can be achieved:
[0151] 1) Allow players to customize their facial effects;
[0152] 2) The slider that supports players is operation and visualization operation;
[0153] 3) Players can save their customized face-pinching data online;
[0154] 4) Support players to save and reset face-shaping data at any time;
[0155] 5) Multiple custom attributes and multiple custom pinchable areas;
[0156] 6) Face pinching is compatible with the playback of expression animations.
[0157] Taking the development and implementation of the face-shaping feature in games as an example, this solution begins with artists creating face-shaping data based on facial skeletons in development tools, exporting it in JSON format and importing it into the engine. The technical team dynamically adds and reads the JSON data when the face-shaping interface loads, parses the data, and initializes the range of values for face-shaping. After the player performs the face-shaping operation, the data is saved and the position of the face-shaping skeleton is updated in the animation thread. Separate animation update nodes are also required to update the large amount of skeleton information.
[0158] The above solution can be implemented as follows:
[0159] 1. Offline part:
[0160] Please refer to Figure 6, which shows a schematic diagram of the offline process of the face-pinching logic development involved in this application. As shown in Figure 6, the process can be as follows:
[0161] S61, generating skeleton data: exporting the produced model file in the form of skeleton data through any third-party model production tool. The main purpose here is to obtain the initial skeleton data in the model file.
[0162] S62, exporting skeleton data: statically exporting the designed skeleton data in any file format, as long as the data includes the initial skeleton matrix data.
[0163] S63, import into game engine: import local static data into the game engine in a format supported by any current engine. The main purpose here is to provide the data to the game engine for use. The essence of the solution is to modify the initial bone matrix data of the face.
[0164] S64, data reading: Customize the function of parsing specific data structures. The main purpose is to parse the current data format for use in subsequent processes.
[0165] S65, generate a UI panel based on the data structure: implement specific functions to restore the UI presentation of the parsed initial skeletal data. For example, the skeletal data includes skull coordinates, which need to be displayed to the player in the form of a UI for the player to operate the UI.
[0166] Among them, the player modifies the initial skeleton data in the form of a UI panel, which can be a slider or an edit box. The method is not limited. What is essentially modified is the underlying initial skeleton data. The skeleton data modified by the player is refreshed and recalculated, and assigned to the new skeleton data for display.
[0167] 2. Online part:
[0168] Please refer to Figure 7, which shows a flow chart of the online part of the face-pinching logic development involved in this application. Taking the implementation of the face-pinching logic through the UE4 engine as an example, as shown in Figure 7, the process can be as follows:
[0169] S71, Generate Skeleton Model: The artist generates a description file for the face-pinching skeleton model based on the development tool. This requires the artist tool plug-in. Provide a skeleton file and a JSON file.
[0170] S72, JSON file generation: The JSON file describes how to pinch the face of this skeleton, with the following information:
[0171] A) How many adjustable parameters are there, such as "eyebrow distance", "nose tip height", etc.
[0172] B) What is the adjustable range of these parameters, such as "eyebrow spacing": 0~100, the default value is 50.
[0173] C) When parameters change, how should bone parameters be modified to reflect the corresponding changes in the mesh? For example, when "EyeBrow Distance" is 0, the EyeBrow bone should be transformed by (10, 0, 0) relative to its original position and rotated by (0, 30, 0). The bone names and values here are for example purposes only.
[0174] The above JSON file code can be as follows:
[0175] S73, import file into engine: import the generated JSON file and skeleton Mesh file into the UE4 engine. The JSON file contains information describing how to pinch the face of the skeleton.
[0176] Please refer to FIG8 and FIG9, which show the interface diagrams for importing and creating the skeleton Mesh file involved in this application.
[0177] S74, parsing data structure: After importing into the engine, first configure the facial resources and configure them into a table in order to load the resources in the subsequent process.
[0178] Please refer to FIG10 , which shows an interface diagram of face resource configuration involved in this application.
[0179] The facial resources mentioned above may refer to facial model resources, animation state machine resources corresponding to the facial model resources, and the like.
[0180] S75, Generate Custom Face Data: At runtime, the system will dynamically load the component resources in the table according to the configuration. After the resource loading callback returns, the character will be dynamically assembled. After assembly, the character is a complete character.
[0181] Please refer to FIG11 , which shows a schematic diagram of a character image involved in this application.
[0182] The UI designer builds the UI panel for players to perform face-pinching operations based on UI requirements. The underlying framework dynamically updates the parsed data at runtime to populate the UI information. For example, if the parsed pinchable part name and pinchable data range are populated, the current pinchable part will be populated into the UI display, for example: eyebrows: pinchable range: 0-50.
[0183] The technical side provides a basic face-shaping framework, which is completed in the form of a plugin. First, the data parsing plugin is responsible for parsing the art JSON file. The above JSON file is parsed into a UI information interface that can be edited by the user. For example, please refer to Figure 12, which shows a schematic diagram of the interface involved in this application. The UI information can be shown in the right box 1201 in Figure 12.
[0184] This application also provides a plug-in based on animation blueprint to calculate the face-pinching parameters to the actual bone change values.
[0185] For example, the user's pinched value is combined with the current bone to continue position calculation. The specific algorithm can be: FVector:OneVector+ScaleFactor*Alpha; that is, current value + scale factor * input Alpha value.
[0186] Please refer to FIG13 , which shows a schematic diagram of the animation blueprint involved in this application.
[0187] Perform face pinching (modifying skeletons) during character animation playback. The advantage of performing face pinching in the Animation Blueprint is that you don't have to modify the skeleton itself. Multiple characters sharing the same skeleton can perform face pinching independently by simply entering different face pinching parameters in the Animation Blueprint. In other words, two different characters can use the same facial skeleton. This allows for differentiation through face and skeleton pinching. This custom animation node is implemented in the underlying C++ language and primarily handles modifying facial skeleton position information.
[0188] During runtime, when the player moves the slider, the modified rate value is transmitted to the face-shaping system, which converts the rate value into coordinate information for the position of the facial bones. Then, through the custom bone nodes, the position of the facial bones is modified to achieve the face-shaping effect.
[0189] In the above process, the UE4 engine plug-in generates customized face pinching range data based on the parsed JSON data. The process can be as follows:
[0190] S1, create a face pinching object;
[0191] S2, set up the character's skeletal network (SkeletalMesh);
[0192] S3, set the face-pinching configuration JSON data generated by the art tool;
[0193] S4. After the settings are completed, you can obtain various information: the total number of face pinching parameters configured, the text information specified for each face pinching parameter, and the maximum / minimum / default values;
[0194] S5, start face pinching, that is, set the value of each face pinching parameter: rate is a proportional value between 0 and 1, which means setting the face pinching parameter to a position between the minimum / maximum values specified in the JSON file;
[0195] S6, calculate the numerical results of face pinching and set them into the animation blueprint system.
[0196] Through the scheme shown in the above embodiments of the present application, players can customize their face-pinching behaviors in the game with a high degree of freedom. For example, a large number of custom character attributes can be defined, different facial areas (eye area, eyebrow area, mouth area, etc.) can be defined, basic facial expression animation display can be realized, different colors, types, materials and styles can be selected for corresponding makeup, and data of arbitrary character changes can be saved. The visual function interface is completed in the user interface (UI) design tool (easy to adjust), which can realize quick switching between male and female.
[0197] In the above solution, facial data creation is done within development tools, such as Digital Content Creation (DCC) tools, and is not subject to external technical constraints such as the engine. This clear, easy-to-use, and user-friendly process design makes it more easily accepted by developers. The skeletal skinning deformation-based technical solution transforms the position of the basic facial skeleton, indirectly driving the transformation of the vertex positions of the bound mesh. This essentially modifies the local transformation (LocalTransform) information of the skeleton.
[0198] FIG14 shows a block diagram of a virtual image configuration device provided by an exemplary embodiment of the present application. The device includes:
[0199] The interface display module 1401 is configured to display an avatar configuration interface, wherein the avatar configuration interface includes an avatar of a virtual object and configuration options corresponding to at least one avatar parameter, wherein the avatar parameter corresponding to each configuration option corresponds to a skeletal part in the skeletal model of the virtual object;
[0200] The position acquisition module 1402 is configured to, in response to a configuration operation, determine a target configuration option indicated by the configuration operation from the configuration options, obtain a parameter value of a target image parameter corresponding to the target configuration option among the at least one image parameter; determine a target skeletal portion corresponding to the target image parameter, adjust a position of the target skeletal portion in the skeletal model according to the parameter value of the target image parameter, and obtain position information of the target skeletal portion after the adjustment in the skeletal model;
[0201] The image updating module 1403 is used to update the virtual image displayed in the virtual image configuration interface based on the adjusted position information of the target skeleton part in the skeleton model.
[0202] In one possible implementation, the image update module 1403 is used to perform skin deformation processing on the skeleton model based on the adjusted position information of the target skeleton part in the skeleton model to obtain an updated virtual image; and display the updated virtual image in the virtual image configuration interface.
[0203] In one possible implementation, the interface display module 1401 is used to obtain a skeleton file and a first description file of a virtual object; the skeleton file contains initial skeleton matrix data of the virtual object; the first description file is used to indicate at least one image parameter; based on the skeleton file, the initial virtual image is displayed in the virtual image configuration interface; based on the first description file, configuration options corresponding to at least one image parameter are displayed in the virtual image configuration interface.
[0204] In one possible implementation, the first description file includes an identifier of at least one avatar parameter and an adjustment range of each of the at least one avatar parameter; the interface display module 1401 is configured to display the name of a first configuration option in the avatar configuration interface based on the identifier of the first avatar parameter; the first avatar parameter is any one of the at least one avatar parameter; and the first configuration option is a configuration option corresponding to the first avatar parameter.
[0205] Based on the adjustment range of the first avatar parameter, an option control of the first configuration option is displayed in the virtual avatar configuration interface.
[0206] In one possible implementation, the position acquisition module 1402 is used to obtain the driving attribute information of the target image parameter, adjust the position of the target skeletal part in the skeletal model based on the parameter value of the target image parameter and the driving attribute information, and obtain the adjusted position information of the target skeletal part in the skeletal model; wherein the driving attribute information of the target image parameter is used to indicate how the position information of the target skeletal part changes when the parameter value of the target image parameter changes.
[0207] In a possible implementation, the driving attribute information of the target image parameter includes: a mapping relationship between the parameter value of the target image parameter and the position information of the target skeleton part.
[0208] In a possible implementation, the device further includes: an acquisition module, configured to acquire a second description file of the virtual object, wherein the second description file includes driving attribute information of at least one image parameter.
[0209] In one possible implementation, the position acquisition module 1402 is used to obtain the adjusted position information of the target skeleton part in the skeleton model based on the parameter values of the target image parameters and the driving attribute information of the target image parameters through a plug-in based on the animation blueprint.
[0210] In a possible implementation, the apparatus further includes: an animation generation module, configured to generate a specified animation of the avatar through an animation blueprint based on the adjusted position information of the target skeletal part in the skeletal model;
[0211] The animation display module is used to display the specified animation of the virtual image in the virtual image configuration interface.
[0212] In a possible implementation, the designated animation is a local animation corresponding to the target skeleton part; or, the designated animation is an overall animation corresponding to the skeleton model.
[0213] In a possible implementation, the device further includes: a storage module for storing image data of the virtual object, where the image data includes skeleton matrix data of the updated skeleton model.
[0214] It should be noted that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0215] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as the technical effects in the embodiment of the method, and will not be elaborated here.
[0216] FIG15 illustrates a block diagram of a computer device 1500 according to an exemplary embodiment of the present application. Computer device 1500 may be a portable mobile terminal, such as a smartphone, tablet computer, or MP3 (Moving Picture Experts Group Audio Layer III) or MP4 (Moving Picture Experts Group Audio Layer IV) player. Computer device 1500 may also be referred to as a user device, portable terminal, or other similar terminology.
[0217] Typically, the computer device 1500 includes a processor 1501 and a memory 1502 .
[0218] The processor 1501 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 1501 may be implemented in at least one hardware form selected from the group consisting of a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), and a PLA (Programmable Logic Array).
[0219] Memory 1502 may include one or more computer-readable storage media, which may be tangible and non-transitory. Memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1502 is used to store at least one instruction, which is executed by processor 1501 to implement the virtual image configuration method provided in the embodiments of the present application.
[0220] In some embodiments, the computer device 1500 may further include a peripheral device interface 1503 and at least one peripheral device. Specifically, the peripheral device includes at least one of a radio frequency circuit 1504 , a touch screen display 1505 , a camera 1506 , an audio circuit 1507 , and a power supply 1508 .
[0221] In some embodiments, the computer device 1500 further includes one or more sensors 1509 , including but not limited to an acceleration sensor 1510 , a gyroscope sensor 1511 , a pressure sensor 1512 , an optical sensor 1513 , and a proximity sensor 1514 .
[0222] Those skilled in the art will appreciate that the structure shown above does not limit the computer device 1500 , and the computer device 1500 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0223] In an exemplary embodiment, a chip is further provided. The chip includes a programmable logic circuit and / or program instructions. When the chip is run on a computer device, it is used to implement the virtual image configuration method described in the above aspects.
[0224] In an exemplary embodiment, a computer program product is also provided. The computer program product includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to implement the avatar configuration methods provided in the above-described method embodiments.
[0225] In an exemplary embodiment, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the virtual image configuration method provided by the above-mentioned method embodiments.
[0226] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0227] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0228] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
[0229] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0230] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for configuring a virtual image, executed by a computer device, the method include: Displaying a virtual image configuration interface, wherein the virtual image configuration interface includes a virtual image of a virtual object and configuration options corresponding to at least one image parameter, wherein the image parameter corresponding to each configuration option corresponds to a bone part in a bone model of the virtual object; In response to a configuration operation, determining a target configuration option indicated by the configuration operation from the configuration options, and acquiring a parameter value of a target image parameter corresponding to the target configuration option in the at least one image parameter; Determine the target skeleton part corresponding to the target image parameter, adjust the position of the target skeleton part in the skeleton model according to the parameter value of the target image parameter, and obtain the adjusted position information of the target skeleton part in the skeleton model; and Based on the adjusted position information of the target skeleton part in the skeleton model, the virtual image is updated and displayed in the virtual image configuration interface.
2. The method according to claim 1, wherein the virtual image is updated and displayed in the virtual image configuration interface based on the position information of the target skeleton part after adjustment in the skeleton model, include: Based on the adjusted position information of the target skeleton part in the skeleton model, the skeleton model is subjected to skin deformation processing to obtain the updated virtual image; The updated virtual image is displayed on the virtual image configuration interface.
3. The method according to claim 1 or 2, wherein the displaying the virtual image configuration interface, include: Acquire a skeleton file and a first description file of the virtual object, wherein the skeleton file includes initial skeleton matrix data of the virtual object, and the first description file is used to indicate the at least one image parameter; Based on the skeleton file, displaying the initial virtual image in the virtual image configuration interface; Based on the first description file, configuration options corresponding to the at least one image parameter are displayed in the virtual image configuration interface.
4. The method according to claim 3, wherein the first description file includes an identifier of the at least one image parameter and an adjustment range of the at least one image parameter; Based on the first description file, displaying configuration options corresponding to the at least one image parameter in the virtual image configuration interface, include: Based on an identifier of a first image parameter, displaying an option name of the first configuration option in the virtual image configuration interface, the first image parameter being any one of the at least one image parameter, and the first configuration option being a configuration option corresponding to the first image parameter; Based on the adjustment range of the first image parameter, an option control of the first configuration option is displayed in the virtual image configuration interface.
5. The method according to any one of claims 1 to 4, wherein the position of the target skeleton part in the skeleton model is adjusted according to the parameter value of the target image parameter to obtain the adjusted position information of the target skeleton part in the skeleton model, include: Acquire the driving attribute information of the target image parameter, adjust the position of the target skeletal part in the skeletal model based on the parameter value of the target image parameter and the driving attribute information, and obtain the adjusted position information of the target skeletal part in the skeletal model; The driving attribute information of the target image parameter is used to indicate the changing mode of the position information of the target skeleton part when the parameter value of the target image parameter changes.
6. The method according to claim 5, wherein the driving attribute information of the target image parameter is include: The mapping relationship between the parameter value of the target image parameter and the position information of the target skeleton part.
7. The method according to claim 5 or 6, further comprising: include: A second description file of the virtual object is obtained, and driving attribute information of each of the at least one image parameter included in the second description file is obtained.
8. The method according to any one of claims 5 to 7, wherein the position of the target skeleton part in the skeleton model is adjusted based on the parameter value of the target image parameter and the driving attribute information to obtain the adjusted position information of the target skeleton part in the skeleton model, include: Through a plug-in based on the animation blueprint, based on the parameter value of the target image parameter and the driving attribute information of the target image parameter, the position of the target bone part in the bone model is adjusted, and the adjusted position information of the target bone part in the bone model is obtained.
9. The method according to claim 8, further comprising: include: Based on the adjusted position information of the target skeletal part in the skeletal model, generating a specified animation of the avatar through the animation blueprint; The specified animation of the virtual image is displayed in the virtual image configuration interface.
10. According to the method of claim 9, the specified animation is one of a local animation corresponding to the target skeleton part or an overall animation corresponding to the skeleton model.
11. The method according to any one of claims 1 to 10, further comprising: include: The image data of the virtual object is stored, wherein the image data includes the updated skeleton matrix data of the skeleton model.
12. A virtual image configuration device, the device include: An interface display module, used for displaying a virtual image configuration interface, wherein the virtual image configuration interface includes a virtual image of a virtual object and configuration options corresponding to at least one image parameter, wherein the image parameter corresponding to each configuration option corresponds to a bone part in a bone model of the virtual object; A position acquisition module, configured to, in response to a configuration operation, determine from the configuration options a target configuration option indicated by the configuration operation, and acquire a parameter value of a target image parameter corresponding to the target configuration option; Determine the target skeleton part corresponding to the target image parameter, adjust the position of the target skeleton part in the skeleton model according to the parameter value of the target image parameter, and obtain the adjusted position information of the target skeleton part in the skeleton model; and The image updating module is used to update and display the virtual image in the virtual image configuration interface based on the adjusted position information of the target skeleton part in the skeleton model.
13. A computer device, wherein the computer device include: A processor and a memory, wherein at least one program is stored in the memory; The processor is used to execute the at least one program in the memory to implement the virtual image configuration method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, wherein executable instructions are stored in the computer-readable storage medium, and wherein the executable instructions are loaded and executed by a processor to implement the virtual image configuration method according to any one of claims 1 to 11.
15. A computer program product, comprising computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the virtual image configuration method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Method for implementing real time altering virtual role appearance in network game
CN101276475A
Virtual image generation method and device, electronic equipment and storage medium
CN110766777A
Method and device for generating three-dimensional virtual image
CN113096224A
Image adjustment method and device of virtual object, electronic equipment and storage medium
CN114612643A
Role model form adjustment method and device, processing equipment and storage medium
CN115131477A
Cited By
Virtual object model processing method and device, electronic equipment and storage medium
CN119680202A
Component rendering method and device based on parameter updating
CN121193809A
