Processing method and device of virtual model and electronic equipment
By acquiring and updating the animation data and skeletal motion of the facial model, the problem of abnormal animation display after facial feature replacement was solved, achieving normal animation effects and a good user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2024-11-27
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, when users replace facial features during dynamic display of facial models, the animation becomes abnormal, affecting the gaming experience.
By acquiring the animation data of the baseline facial model, the target model part is determined, and the skeletal movement of the baseline facial model is updated based on the animation data to generate the display animation of the target facial model, ensuring that the animation effect of the replaced facial model is normal.
It allows users to replace various parts of the facial model according to their needs, ensuring that the animation of the replaced facial model displays normally, thus improving the facial model creation experience.
Smart Images

Figure CN122115649A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of virtual 3D model technology, and more specifically, to a method, apparatus, and electronic device for processing virtual models. Background Technology
[0002] In some games, players can customize their character's facial features. For example, players can adjust the details of the facial features or directly replace a part of the model, such as the mouth, to create a customized appearance. However, when the facial model needs to be displayed dynamically, if a player chooses a feature that differs from the standard facial features, directly driving the modified facial model through the existing animation methods will usually result in abnormal dynamic display, leading to a poor player experience. Summary of the Invention
[0003] In view of this, the purpose of this disclosure is to provide a method, apparatus and electronic device for processing virtual models, so that users can replace various parts of a facial model as needed, and ensure that the animation display effect of the replaced facial model is normal, thereby improving the user's facial model creation experience.
[0004] In a first aspect, embodiments of this disclosure provide a method for processing a virtual model. The method includes: acquiring animation data of a reference facial model; wherein the reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the skeleton of the reference model part corresponds to the skeleton of the replaceable model part; the animation data is used to: control the skeleton of the reference facial model to generate movement; determine a target model part from the at least one replaceable model part; update the reference model part in the reference facial model corresponding to the target model part based on the target model part to obtain a target facial model; and control the skeleton of the target facial model to generate movement based on the animation data to generate a display animation corresponding to the target facial model.
[0005] Secondly, embodiments of this disclosure provide a virtual model processing apparatus, comprising: an animation data acquisition module for acquiring animation data of a reference facial model; wherein the reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the skeleton of the reference model part corresponds to the skeleton of the replaceable model part; the animation data is used to: control the skeleton of the reference facial model to generate movement; a facial model update module for determining a target model part from at least one replaceable model part, and updating the reference model part in the reference facial model corresponding to the target model part based on the target model part, thereby obtaining a target facial model; and an animation generation module for controlling the skeleton of the target facial model to generate movement based on the animation data, thereby generating a display animation corresponding to the target facial model.
[0006] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described virtual model processing method.
[0007] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-described virtual model processing method.
[0008] The embodiments of the present invention bring the following beneficial effects:
[0009] The aforementioned virtual model processing method, apparatus, and electronic device acquire animation data of a reference facial model. The reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the skeleton of each reference model part corresponds to the skeleton of the replaceable model part; the animation data is used to: control the skeleton of the reference facial model to generate movement; determine a target model part from at least one replaceable model part; based on the target model part, update the reference model part in the reference facial model corresponding to the target model part to obtain the target facial model; and control the skeleton of the target facial model to generate movement based on the animation data to generate a display animation corresponding to the target facial model. This method allows users to replace various parts of the facial model according to their needs, ensuring that the animation display effect of the replaced facial model is normal, thus improving the user's facial model creation experience.
[0010] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure are realized and obtained through the structures particularly pointed out in the description, claims and drawings.
[0011] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0013] Figure 1A flowchart illustrating a virtual model processing method provided in this embodiment of the disclosure;
[0014] Figure 2 A schematic diagram of a reference model portion provided for embodiments of this disclosure;
[0015] Figure 3 A schematic diagram illustrating alternative component styles provided in embodiments of this disclosure;
[0016] Figure 4 A schematic diagram of the structure of a virtual model processing device provided in an embodiment of this disclosure;
[0017] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0019] Character customization systems, a common feature in mainstream 3D games, are character creation systems that allow players to adjust and customize their game character's facial appearance by manipulating various facial feature sliders or parameters in a virtual interface. This typically includes adjusting facial contours, eyes, nose, mouth, hairstyle, etc., enabling players to create their own unique virtual character according to their personal preferences.
[0020] With advancements in technology and design, preset character gender, age, and race are widely used to enhance the freedom of character customization. However, this increased freedom can lead to unpredictable and poor presentation of game story animations.
[0021] The character creation system now offers even greater freedom in customization, allowing for the replacement of facial components. Players can replace parts of the face to achieve complete freedom in customization. Under this design premise, applying skeletal animation to an unknown face has become a new technical challenge.
[0022] In current games with character customization features, adjustments are typically limited to the overall facial features and contours. It's usually possible to pre-configure the maximum and minimum values for bone offset and rotation for the bones in the facial model that can be adjusted through customization, or to pre-configure the corresponding blendshape deformer in DCC software to allow players to create game characters through character customization.
[0023] However, both of the above methods only support sculpting a single, overall facial model and cannot dynamically replace individual facial features while maintaining the current sculpting data and display effect. If the entire face is used as a unit to replace individual facial components, a massive amount of exhaustive resources would be required, which is extremely large and difficult to maintain.
[0024] Furthermore, maintaining the freedom of character customization can result in very strange facial features. When players create oddly displayed faces, game developers are forced to choose between two options: either reduce the facial animation amplitude in-game, or allow the animation to continue running unnecessarily on such strange facial features. Both approaches lead to a poor gaming experience for players.
[0025] Based on this, the present disclosure provides a virtual model processing method, apparatus, and electronic device, which can be applied to scenarios where facial model creation is required.
[0026] See Figure 1 First, a method for processing a virtual model provided by an embodiment of the present invention will be introduced. This method includes the following steps:
[0027] Step S102: Obtain animation data of a reference facial model; wherein, the reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the bones of the reference model parts correspond to the bones of the replaceable model parts; the animation data is used to: control the bones of the reference facial model to generate movement.
[0028] The aforementioned baseline facial model is typically a 3D model, featuring elements such as eyes, nose, mouth, ears, forehead, and chin. Alternatively, it can be configured to omit one or more of these elements, or include features like horns in addition to the aforementioned elements. Specific settings can be customized to meet specific needs and are not limited here.
[0029] The aforementioned reference model parts typically refer to the parts of a reference facial model whose shapes can be changed. Changing the shape of a reference model part can be done by replacing it with a corresponding replaceable model part, or by altering its shape through preset model adjustment operations.
[0030] The aforementioned replaceable model parts are typically pre-built for the baseline model part, and there can be one or more of them. For example, if the baseline model part is the part of a facial model that includes the nose, then the corresponding replaceable model part is also the part of a model that includes the nose. The nose shape in the replaceable model part is usually different from the nose shape in the baseline model part.
[0031] The replaceable model portion needs to be smoothly connected to all other parts of the facial model except for the baseline model portion. In creating the replaceable model portion, you can first adjust the display shape of a certain facial feature in the baseline facial model, then compare the adjusted model with the baseline facial model, and identify the changed parts of the model as the replaceable model portion.
[0032] When adjusting the displayed shape of facial features in a baseline facial model, adjustments to some parts of the shape may be achieved by adjusting the position, size, or posture of the bones corresponding to those features, while adjustments to other parts may be achieved by changing the positions of the vertices that make up the model. When it is necessary to adjust the bones corresponding to facial features, it is necessary to record the position, size, and posture of the bones after adjustment, or only record the amount of adjustment of the bones relative to their original position, size, and posture. The specific settings can be configured according to requirements and are not limited here.
[0033] The skeletons of the replaceable model part and its corresponding base model part are usually in one-to-one correspondence. That is, the number of bones in the replaceable model part is the same as the number of bones in the base model part, and the connection relationship between the bones in the replaceable model part also corresponds to the connection relationship between the bones in the base model part. For example, the bones in the base model part are bone 1 and bone 2, and bone 1 drives the movement of bone 2; the corresponding bones in the replaceable model part are bone 3 and bone 4, where bone 3 corresponds to bone 1 and bone 4 corresponds to bone 2. In the replaceable model part, bone 3 also drives the movement of bone 4.
[0034] The aforementioned animation data can be used to control the movement of the bones in a baseline facial model, thereby causing changes in the surface of the baseline facial model, enabling it to display various facial expressions, and generating corresponding animations. This animation data typically specifies which bones in the baseline facial model perform what kind of movement at what time; the types of movement usually include offset or rotation.
[0035] Step S104: Determine the target model part from at least one replaceable model part, and based on the target model part, update the reference model part in the reference facial model that corresponds to the target model part to obtain the target facial model.
[0036] The aforementioned target model components can be one or more. When there are multiple target model components, each target model component corresponds to a different baseline model component. These target model components can be selected by the user through a human-computer interaction device, or they can be automatically set by the system. For example, in scenarios where it is necessary to automatically replace the baseline model component in the baseline facial model with other replaceable model components, different replaceable model components can be used in different time periods. The replaceable model component used in the corresponding time period can be considered the target model component.
[0037] Once the target model part is determined, the baseline model part can be directly replaced with the target model part. It is worth noting that the names of the corresponding bones in the baseline model part and the corresponding replaceable model part can be set to be the same. This ensures the motion effect of the replaced model when the bones are driven by animation data in the later stage.
[0038] Alternatively, the difference data between the replaceable model part and the baseline model part can be pre-saved. This difference data can include the positional differences of the corresponding model vertices, the size of the corresponding bones, and the pose differences. After determining that a certain replaceable model part is the target model part, the baseline model part corresponding to the target model part can be offset in terms of model vertex position and updated in terms of bone size and pose based on the difference data corresponding to the replaceable model part. This ensures that the updated baseline model part has the same shape and bone structure as the replaceable model part. Finally, the target facial model is obtained.
[0039] Step S106: Based on the animation data, control the bones of the target facial model to generate motion, and generate the display animation corresponding to the target facial model.
[0040] Since the skeleton of the target model corresponds to the skeleton of the base model it replaces, the skeleton of the target facial model also corresponds to the skeleton of the base facial model. Furthermore, the skeleton of the target facial model can be controlled to move based on animation data, causing the target facial model to produce corresponding facial expression changes and generating a display animation that records these expression changes.
[0041] The aforementioned method for processing virtual models involves acquiring animation data of a baseline facial model. The baseline facial model comprises multiple baseline model parts; each baseline model part has at least one corresponding replaceable model part; the skeletons of the baseline model parts correspond to the skeletons of the replaceable model parts. The animation data is used to: control the movement of the skeletons of the baseline facial model; determine a target model part from at least one replaceable model part; based on the target model part, update the baseline model part in the baseline facial model corresponding to the target model part to obtain the target facial model; and control the movement of the skeletons of the target facial model based on the animation data to generate a display animation corresponding to the target facial model. This method allows users to replace various parts of the facial model as needed, ensuring that the animation display effect of the replaced facial model is normal, thus improving the user's facial model creation experience.
[0042] The following embodiments provide a specific method for determining a target model part from at least one replaceable model part, and updating the reference model part in the reference facial model corresponding to the target model part based on the target model part to obtain a target facial model.
[0043] In practical applications, users typically select a specific replaceable model as the target model part. For example, multiple replaceable model identifiers can be displayed in a graphical user interface. After a user selects an identifier via touch or mouse, the replaceable model corresponding to that identifier is identified as the target model part. When a user selects an identifier via touch or mouse, a selection command is usually generated for the replaceable model part corresponding to that identifier. For convenience, the replaceable model part corresponding to the selected identifier is referred to as the "first model part." In response to the selection command for the first model part among at least one replaceable model part, the first model part is identified as the target model part. In specific implementations, there can be various ways to generate the selection command for the replaceable model part, which are not limited here.
[0044] Each replaceable model part typically has corresponding bone parameters, which indicate the size and pose of the bones in that replaceable model part. Bone parameters can directly include the size, position, and pose parameters of each bone in the replaceable model, or they can include the scaling, offset, and rotation parameters of the replaceable model's bones compared to the bones in the baseline model part. The specific settings can be configured according to requirements and are not limited here.
[0045] For ease of reference, the skeletal parameters of the target model portion will be referred to as the "first skeletal parameters." The first skeletal parameters indicate the size and pose of the bones in the target model portion. After determining the target model portion, the size and pose of the bones in the reference facial model that are related to the target model portion need to be updated based on the first skeletal parameters of the target model portion.
[0046] For ease of writing, the skeletons of the reference model are referred to as the first skeletons, and the skeletons of the target model are referred to as the second skeletons; multiple first skeletons correspond one-to-one with multiple second skeletons. The parameters of the first skeletons can include size difference parameters and pose difference parameters between the multiple second skeletons and their corresponding first skeletons. Skeleton difference parameters can be the skeleton scaling factor or the size difference between the corresponding skeleton in the target model and the corresponding skeleton in the reference model; no restrictions are imposed here. The pose difference parameters typically include offset and rotation parameters. When the size of a second skeleton is no different from that of its corresponding first skeleton, the size difference parameter for that second skeleton can be omitted, or it can be set to 0 or empty. The same applies to pose difference parameters.
[0047] For each first bone in the baseline model portion of the target facial model, its size needs to be updated based on the size difference parameters corresponding to the first bone in the first bone parameters, so that the updated first bone's size matches the corresponding second bone's size. Then, based on the pose difference parameters corresponding to the first bone in the first bone parameters, the pose of the updated first bone is updated, so that the updated first bone's pose matches the corresponding second bone's pose. Alternatively, the execution order of these two steps can be reversed; that is, the first bone's pose can be updated first, followed by its size. This can be controlled according to specific requirements.
[0048] In practical applications, the facial model can be divided into four basic model parts: the nose model, the eye model, the mouth model, and the ear model, such as... Figure 2 As shown. Each baseline model section is adjacent to at least one other baseline model section among multiple baseline model sections. From Figure 2 As can be seen, the eye model is adjacent to the mouth, ear, and nose models; the ear model is only adjacent to the eye model. Adjacent baseline model parts are smoothly connected. Typically, the replaceable model part is also smoothly connected to other adjacent baseline model parts to achieve a better local face-swapping effect.
[0049] In practical applications, after a player replaces a portion of the baseline facial model, they may also adjust the target facial model. After an adjustment operation, it's necessary to obtain skeletal adjustment data for the target facial model. This skeletal adjustment data typically includes the bones to be adjusted and their adjustment parameters. The adjustment parameters indicate the amount of size change, offset, and / or rotation of the bones to be adjusted. That is, the player can adjust one or more of the bone's size, position, and posture. The player can directly adjust these bone parameters or perform shape adjustments on the facial model similar to "pinching" the face, resulting in changes to the facial model's skeleton. Then, based on the adjustment parameters, the bones to be adjusted are adjusted to match the player's adjustments. Furthermore, the adjusted bones of the target facial model can be controlled to move based on animation data, updating the corresponding display animation of the target facial model.
[0050] This disclosure also provides another method for processing virtual models. This method in... Figure 1 This method is implemented based on the method shown. It allows for arbitrary replacement of facial feature models without generating additional character skeletal assets. Players can inherit their character creation data after creating a face with existing features and then choosing to replace a specific feature. Despite this high degree of freedom in character creation, in-game facial animations still function correctly.
[0051] In this method, the facial bones are first divided into sections (i.e., divided into multiple basic model parts). When replacing facial components (equivalent to the "replaceable model parts" mentioned above), it is very clear which bones can be redirected in layers. Finally, the offset and rotation of the face shaping data are used as post-processing steps and superimposed on the facial result.
[0052] This method uses facial features as the basic unit to plan segmentation lines to clearly define the four basic model parts: eyes, mouth, nose, and ears. Figure 2 As shown, this ensures that subsequent replacement facial components can seamlessly integrate with any area.
[0053] Determining a standard facial component is crucial because subsequent specialized facial components will be calculated differently based on the standard version. This also means that the standard facial component should not have an overly personalized design.
[0054] To meet players' diverse facial customization needs, the replaceable components offer a wide variety of styles. For example... Figure 3As shown, three styles for the eye component, three styles for the nose component, and three styles for the mouth component are displayed, allowing players to choose freely. To ensure proper playback of facial animations in the game, the skinning method uses the conventional intuitive alignment, exporting the current pose data for subsequent layering and overlaying upon completion of the skinning process.
[0055] To generate animations for the facial models created by players after facial sculpting, it is first necessary to run facial animations based on standard facial components; then, component differences are layered and overlaid, and further, the facial sculpting data is overlaid, that is, the offset data created by the player is overlaid as a whole, and finally the facial animation corresponding to the facial model after facial sculpting is obtained.
[0056] This method allows for more flexible facial component design without the need to produce additional bone and animation resources. The adaptation process is also very simple, requiring only skinning of a single facial component while preserving the normal operation of in-game facial animations.
[0057] For the above method embodiments, see Figure 4 A virtual model processing apparatus is shown, the apparatus comprising:
[0058] Animation data acquisition module 402 is used to acquire animation data of a reference facial model; wherein, the reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the bones of the reference model parts correspond to the bones of the replaceable model parts; the animation data is used to control the bones of the reference facial model to generate movement;
[0059] The facial model update module 404 is used to determine a target model part from at least one replaceable model part, and based on the target model part, update the reference model part in the reference facial model corresponding to the target model part to obtain the target facial model;
[0060] The animation generation module 406 is used to control the movement of the skeleton of the target facial model based on animation data, and generate the display animation corresponding to the target facial model.
[0061] The aforementioned virtual model processing device acquires animation data of a reference facial model. The reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the skeletons of the reference model parts correspond to the skeletons of the replaceable model parts. The animation data is used to: control the skeletons of the reference facial model to move; determine a target model part from at least one replaceable model part; update the reference model part in the reference facial model corresponding to the target model part based on the target model part, thereby obtaining the target facial model; and control the skeletons of the target facial model to move based on the animation data, generating a display animation corresponding to the target facial model. This method allows users to replace various parts of the facial model as needed, ensuring that the animation display effect of the replaced facial model is normal, thus improving the user's facial model creation experience.
[0062] The aforementioned facial model update module is also used to: update the size and pose of the bones in the reference facial model that are related to the target model based on the first bone parameters of the target model part; the first bone parameters are used to indicate the size and pose of the bones in the target model part.
[0063] The aforementioned baseline model portion has multiple first bones; the target model portion has multiple second bones; the multiple first bones correspond one-to-one with the multiple second bones; the first bone parameters include size difference parameters and pose difference parameters between the multiple second bones and their corresponding first bones; the aforementioned facial model update module is further used to: for each first bone in the baseline model portion of the baseline facial model and the target model portion, update the size of the first bone based on the size difference parameters corresponding to the first bone in the first bone parameters, so that the updated first bone is consistent with the size of the corresponding second bone; update the pose of the size-updated first bone based on the pose difference parameters corresponding to the first bone in the first bone parameters, so that the updated first bone is consistent with the pose of the corresponding second bone.
[0064] The pose difference parameters mentioned above include offset parameters and rotation parameters.
[0065] The aforementioned device further includes: a bone adjustment data acquisition module, which acquires bone adjustment data for a target facial model; the bone adjustment data includes the bone to be adjusted and adjustment parameters; the adjustment parameters are used to indicate: the size change, offset, and / or rotation of the bone to be adjusted; a bone adjustment module, which is used to adjust the bone to be adjusted based on the adjustment parameters; and controls the adjusted bones of the target facial model to generate movement based on animation data, and updates the display animation corresponding to the target facial model.
[0066] The aforementioned multiple reference model parts include: a nose model part, an eye model part, a mouth model part, and an ear model part; each reference model part is adjacent to at least one other reference model part among the multiple reference model parts, and the two adjacent reference model parts are smoothly connected; the replaceable model part is smoothly connected to other reference model parts adjacent to the corresponding reference model part.
[0067] The aforementioned facial model update module is also configured to: in response to a selection instruction for a first model portion in at least one replaceable model portion, determine the first model portion as the target model portion.
[0068] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-described virtual model processing method, for example:
[0069] Animation data of a reference facial model is obtained; wherein the reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the skeleton of the reference model part corresponds to the skeleton of the replaceable model part; the animation data is used to: control the skeleton of the reference facial model to generate movement; determine a target model part from at least one replaceable model part; based on the target model part, update the reference model part in the reference facial model corresponding to the target model part to obtain the target facial model; control the skeleton of the target facial model to generate movement based on the animation data, and generate a display animation corresponding to the target facial model.
[0070] The above method allows users to replace various parts of the facial model as needed, and ensures that the animation display effect of the replaced facial model is normal, thereby improving the user's facial model creation experience.
[0071] Optionally, the step of updating the reference model part corresponding to the target model part in the reference facial model based on the target model part to obtain the target facial model includes: updating the size and pose of the bones of the reference model part corresponding to the target model part in the reference facial model based on the first bone parameters of the target model part; the first bone parameters are used to indicate the size and pose of the bones of the target model part.
[0072] Optionally, the aforementioned baseline model portion has multiple first bones; the target model portion has multiple second bones; the multiple first bones correspond one-to-one with the multiple second bones; the first bone parameters include size difference parameters and pose difference parameters between the multiple second bones and the corresponding first bones; the step of updating the size and pose of the bones in the baseline model portion of the baseline facial model and the baseline model portion of the target model portion based on the first bone parameters of the target model portion includes: for each first bone in the baseline facial model and the baseline model portion of the target model portion, updating the size of the first bone based on the size difference parameters corresponding to the first bone in the first bone parameters, so that the updated first bone is consistent with the size of the corresponding second bone; updating the pose of the first bone after size update based on the pose difference parameters corresponding to the first bone in the first bone parameters, so that the updated first bone is consistent with the pose of the corresponding second bone.
[0073] Optionally, the pose difference parameters mentioned above include offset parameters and rotation parameters.
[0074] Optionally, the above method further includes: acquiring skeletal adjustment data for the target facial model; the skeletal adjustment data includes the bones to be adjusted and adjustment parameters; the adjustment parameters are used to indicate: the amount of size change, offset, and / or rotation of the bones to be adjusted; adjusting the bones to be adjusted based on the adjustment parameters; controlling the adjusted bones of the target facial model to generate movement based on the animation data, and updating the display animation corresponding to the target facial model.
[0075] Optionally, the aforementioned multiple reference model parts include: a nose model part, an eye model part, a mouth model part, and an ear model part; each reference model part is adjacent to at least one other reference model part among the multiple reference model parts, and the two adjacent reference model parts are smoothly connected; the replaceable model part is smoothly connected to other reference model parts adjacent to the corresponding reference model part.
[0076] Optionally, the step of determining the target model portion from at least one replaceable model portion includes: in response to a selection instruction for a first model portion among at least one replaceable model portion, determining the first model portion as the target model portion.
[0077] See Figure 5 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the processing method of the virtual model described above.
[0078] Furthermore, Figure 5The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.
[0079] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0080] The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0081] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the processing method of the virtual model described above.
[0082] This disclosure provides a method, apparatus, and electronic device for processing virtual models, including a computer-readable storage medium storing program code. The program code includes instructions that can be used to execute the methods described in the preceding method embodiments, for example:
[0083] Animation data of a reference facial model is obtained; wherein the reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the skeleton of the reference model part corresponds to the skeleton of the replaceable model part; the animation data is used to: control the skeleton of the reference facial model to generate movement; determine a target model part from at least one replaceable model part; based on the target model part, update the reference model part in the reference facial model corresponding to the target model part to obtain the target facial model; control the skeleton of the target facial model to generate movement based on the animation data, and generate a display animation corresponding to the target facial model.
[0084] The above method allows users to replace various parts of the facial model as needed, and ensures that the animation display effect of the replaced facial model is normal, thereby improving the user's facial model creation experience.
[0085] Optionally, the step of updating the reference model part corresponding to the target model part in the reference facial model based on the target model part to obtain the target facial model includes: updating the size and pose of the bones of the reference model part corresponding to the target model part in the reference facial model based on the first bone parameters of the target model part; the first bone parameters are used to indicate the size and pose of the bones of the target model part.
[0086] Optionally, the aforementioned baseline model portion has multiple first bones; the target model portion has multiple second bones; the multiple first bones correspond one-to-one with the multiple second bones; the first bone parameters include size difference parameters and pose difference parameters between the multiple second bones and the corresponding first bones; the step of updating the size and pose of the bones in the baseline model portion of the baseline facial model and the baseline model portion of the target model portion based on the first bone parameters of the target model portion includes: for each first bone in the baseline facial model and the baseline model portion of the target model portion, updating the size of the first bone based on the size difference parameters corresponding to the first bone in the first bone parameters, so that the updated first bone is consistent with the size of the corresponding second bone; updating the pose of the first bone after size update based on the pose difference parameters corresponding to the first bone in the first bone parameters, so that the updated first bone is consistent with the pose of the corresponding second bone.
[0087] Optionally, the pose difference parameters mentioned above include offset parameters and rotation parameters.
[0088] Optionally, the above method further includes: acquiring skeletal adjustment data for the target facial model; the skeletal adjustment data includes the bones to be adjusted and adjustment parameters; the adjustment parameters are used to indicate: the amount of size change, offset, and / or rotation of the bones to be adjusted; adjusting the bones to be adjusted based on the adjustment parameters; controlling the adjusted bones of the target facial model to generate movement based on the animation data, and updating the display animation corresponding to the target facial model.
[0089] Optionally, the aforementioned multiple reference model parts include: a nose model part, an eye model part, a mouth model part, and an ear model part; each reference model part is adjacent to at least one other reference model part among the multiple reference model parts, and the two adjacent reference model parts are smoothly connected; the replaceable model part is smoothly connected to other reference model parts adjacent to the corresponding reference model part.
[0090] Optionally, the step of determining the target model portion from at least one replaceable model portion includes: in response to a selection instruction for a first model portion among at least one replaceable model portion, determining the first model portion as the target model portion.
[0091] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0092] Furthermore, in the description of the embodiments of this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure based on the specific circumstances.
[0093] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this disclosure, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0094] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0095] Finally, it should be noted that the above embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for processing virtual models, characterized in that, The method includes: Obtain animation data from the baseline facial model; The reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the skeleton of the reference model part corresponds to the skeleton of the replaceable model part; the animation data is used to control the skeleton of the reference facial model to generate movement. A target model part is determined from the at least one replaceable model part, and the reference model part corresponding to the target model part in the reference facial model is updated based on the target model part to obtain the target facial model; Based on the animation data, the skeleton of the target facial model is controlled to move, generating a display animation corresponding to the target facial model.
2. The method according to claim 1, characterized in that, The step of updating the reference model portion corresponding to the target model portion in the reference facial model based on the target model portion to obtain the target facial model includes: Based on the first bone parameters of the target model portion, the size and pose of the bones in the reference facial model that are the reference model portion of the target model portion are updated; the first bone parameters are used to indicate the size and pose of the bones of the target model portion.
3. The method according to claim 2, characterized in that, The baseline model part has multiple first bones; the target model part has multiple second bones; the multiple first bones correspond one-to-one with the multiple second bones; the first bone parameters include the size difference parameters and pose difference parameters between the multiple second bones and the corresponding first bones. The step of updating the size and pose of the bones in the reference facial model that are related to the target model based on the first bone parameters of the target model includes: For each first bone in the reference model part of the reference facial model and the target model part, the size of the first bone is updated based on the size difference parameter corresponding to the first bone in the first bone parameters, so that the updated first bone is consistent with the size of the corresponding second bone; Based on the pose difference parameters corresponding to the first bone in the first bone parameters, the pose of the first bone after size update is updated so that the pose of the updated first bone is consistent with that of the corresponding second bone.
4. The method according to claim 3, characterized in that, The pose difference parameters include offset parameters and rotation parameters.
5. The method according to claim 1, characterized in that, The method further includes: Obtain skeletal adjustment data for the target facial model; the skeletal adjustment data includes the bones to be adjusted and adjustment parameters; the adjustment parameters are used to indicate: the amount of size change, offset, and / or rotation of the bones to be adjusted; The bone to be adjusted is adjusted based on the aforementioned adjustment parameters; Based on the animation data, the adjusted skeleton of the target facial model is controlled to move, and the display animation corresponding to the target facial model is updated.
6. The method according to claim 1, characterized in that, The multiple baseline model parts include: a nose model part, an eye model part, a mouth model part, and an ear model part; Each baseline model portion is adjacent to at least one other baseline model portion among the plurality of baseline model portions, and there is a smooth connection between two adjacent baseline model portions; the replaceable model portion is smoothly connected to other baseline model portions adjacent to the corresponding baseline model portion.
7. The method according to claim 6, characterized in that, The step of determining the target model portion from the at least one replaceable model portion includes: In response to a selection instruction for a first model portion among the at least one replaceable model portions, the first model portion is identified as the target model portion.
8. A processing apparatus for a virtual model, characterized in that, The device includes: The animation data acquisition module is used to acquire animation data from the baseline facial model; The reference facial model includes multiple reference model parts; each reference model part has at least one corresponding replaceable model part; the skeleton of the reference model part corresponds to the skeleton of the replaceable model part; the animation data is used to control the skeleton of the reference facial model to generate movement. A facial model update module is used to determine a target model part from the at least one replaceable model part, and update the reference model part in the reference facial model corresponding to the target model part based on the target model part to obtain a target facial model; An animation generation module is used to control the bones of the target facial model to move based on the animation data, and generate a display animation corresponding to the target facial model.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the virtual model processing method according to any one of claims 1-7.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the virtual model processing method according to any one of claims 1-7.