Model motion generation method and device based on vehicle-mounted terminal
By grouping the initial skeletal model and adjusting the controller, a target animation model is generated, which solves the problem of poor model display effect in the vehicle terminal and realizes a more realistic and vivid motion animation display.
Patent Information
- Application Number
- CN202410700453.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2025-12-02
AI Technical Summary
In existing vehicle-mounted terminals, the display effect of virtual scene models is poor, and the motion animation of characters, animals, etc. is stiff, lacking realism and vividness.
Create an initial skeletal model and group it, set up correction controllers and motion controllers, adjust the overall and local motion state of the skeletal group through the controllers, generate the target animation model and display the motion animation.
It improves the accuracy and presentation of model movements, enhances the realism and vividness of motion animation, and improves the user experience.
Smart Images

Figure CN121053264A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, specifically to a method and apparatus for generating model motion based on an in-vehicle terminal. Background Technology
[0002] In the human-machine interface of the in-vehicle terminal, the virtual scene displayed is a simulation of the current environment of the vehicle, which is called digital scene reconstruction. In digital scene reconstruction, by collecting information on vehicles, people, animals and the environment around the vehicle, a corresponding digital model is generated and then displayed on the human-machine interface of the in-vehicle terminal.
[0003] In related technologies, simple and crude models are often used to simulate and display the environment around a vehicle. Such models have poor display effects, and when displaying the movement animations of people, animals, etc. around the vehicle, the model's posture is stiff, and the realism and vividness of the movement animations are poor. Summary of the Invention
[0004] In view of this, the first aspect of this application provides a model motion generation method based on an in-vehicle terminal, the method comprising:
[0005] An initial skeletal model is created, and the bones in the initial skeletal model are grouped to obtain multiple bone groups; a bone belongs to one or more bone groups, and a bone group includes multiple bones.
[0006] A correction controller corresponding to the initial skeletal model is created, and a motion controller corresponding to each of the bone groups is created, and constraints are set for each of the motion controllers; the correction controller is used to control the overall motion state of the initial skeletal model, and the motion controller is used to control the local motion state of each bone group. The control center of the motion controller and the motion center of the corresponding bone group are on the same joint point, and the joint point is the connection point between the bones.
[0007] In response to a control operation triggered by the correction controller, the overall motion state corresponding to the initial skeletal model is determined; based on the overall motion state, in response to an adjustment operation triggered by each motion controller, the local motion state of each skeletal group corresponding to the overall motion state is adjusted according to the constraints.
[0008] Once all the bone groups in the initial skeletal model have been adjusted, a target animation model is generated based on the initial skeletal model.
[0009] Generate key motion frames corresponding to the target animation model under the overall motion state, and generate motion animation corresponding to the overall motion state based on the key motion frames;
[0010] In response to an animation display command from the vehicle terminal, the motion animation is displayed on the vehicle terminal's screen.
[0011] Optionally, displaying the motion animation on the vehicle terminal display screen in response to the animation display command of the vehicle terminal includes:
[0012] Determine the target type of the target to be detected, and obtain the target animation model corresponding to the target based on the target type;
[0013] Based on the motion state of the detected target, the display motion animation corresponding to the target animation model is determined, and the display motion animation is displayed on the vehicle terminal.
[0014] Optionally, generating key motion frames corresponding to the target animation model in the overall motion state, and generating motion animation corresponding to the overall motion state based on the key motion frames, includes:
[0015] For each of the overall motion states, the number of action frames corresponding to each of the overall motion states is determined according to a preset frame rate.
[0016] The correction controller controls the target animation model to move in each of the overall motion states; the key action frame group corresponding to each of the overall motion states is determined according to the preset frame rate; the number of key action frames in the key action frame group corresponding to the overall motion state is the same as the number of action frames corresponding to the overall motion state.
[0017] Based on the time sequence of each key action frame in the key action frame group, a motion animation corresponding to the overall motion state is generated.
[0018] Optionally, the creation of motion controllers corresponding one-to-one with each of the skeleton groups includes:
[0019] For each skeleton group, a motion controller is created with the motion center of the skeleton group as the control center to manipulate the movement of each bone in the skeleton group, and the motion center transformation of the skeleton group and the control center transformation of the motion controller are frozen.
[0020] Optionally, adjusting the local motion state of each skeleton group corresponding to the overall motion state in response to the adjustment operation triggered for each motion controller, according to the constraints, includes:
[0021] In response to the shape adjustment operation triggered by each motion controller, the shape of each bone in the skeleton group is adjusted during the linkage movement according to the motion linkage relationship between each bone in the skeleton group corresponding to the motion controller.
[0022] In response to rotation adjustment operations triggered for each motion controller, the rotational attributes of each bone in the bone group corresponding to the motion controller are adjusted during rotation.
[0023] A second aspect of this application provides a model motion generation device based on an in-vehicle terminal, the device comprising:
[0024] The model creation unit is used to: create an initial skeleton model and group the bones in the initial skeleton model to obtain multiple bone groups; a bone belongs to one or more bone groups, and a bone group includes multiple bones;
[0025] The controller creation unit is used to: create a correction controller corresponding to the initial skeletal model, and create motion controllers that correspond one-to-one with each of the bone groups, and set constraints for each of the motion controllers; the correction controller is used to control the overall motion state of the initial skeletal model, the motion controller is used to control the local motion state of each bone group, and the control center of the motion controller and the motion center of the corresponding bone group are on the same joint point, the joint point being the connection point between the bones;
[0026] A motion control unit is configured to: determine the overall motion state corresponding to the initial skeletal model in response to a control operation triggered by the correction controller; and, based on the overall motion state, adjust the local motion state of each skeletal group corresponding to the overall motion state in response to an adjustment operation triggered by each motion controller, according to the constraints.
[0027] The model generation unit is used to: generate a target animation model based on the initial skeleton model after all the bone groups in the initial skeleton model have been adjusted;
[0028] An animation generation unit is used to: generate key motion frames corresponding to the target animation model in the overall motion state, and generate motion animation corresponding to the overall motion state based on the key motion frames;
[0029] An animation display unit is configured to: display the motion animation on the display screen of the vehicle terminal in response to an animation display command from the vehicle terminal.
[0030] Optionally, the animation display unit is specifically used for:
[0031] Determine the target type of the target to be detected, and obtain the target animation model corresponding to the target based on the target type;
[0032] Based on the motion state of the detected target, the display motion animation corresponding to the target animation model is determined, and the display motion animation is displayed on the vehicle terminal.
[0033] Optionally, the animation generation unit is specifically used for:
[0034] For each of the overall motion states, the number of action frames corresponding to each of the overall motion states is determined according to a preset frame rate.
[0035] The correction controller controls the target animation model to move in each of the overall motion states; the key action frame group corresponding to each of the overall motion states is determined according to the preset frame rate; the number of key action frames in the key action frame group corresponding to the overall motion state is the same as the number of action frames corresponding to the overall motion state.
[0036] Based on the time sequence of each key action frame in the key action frame group, a motion animation corresponding to the overall motion state is generated.
[0037] Optionally, the controller creation unit is specifically used for:
[0038] For each skeleton group, a motion controller is created with the motion center of the skeleton group as the control center to manipulate the movement of each bone in the skeleton group, and the motion center transformation of the skeleton group and the control center transformation of the motion controller are frozen.
[0039] Optionally, the motion control unit is specifically used for:
[0040] In response to the shape adjustment operation triggered by each motion controller, the shape of each bone in the skeleton group is adjusted during the linkage movement according to the motion linkage relationship between each bone in the skeleton group corresponding to the motion controller.
[0041] In response to rotation adjustment operations triggered for each motion controller, the rotational attributes of each bone in the bone group corresponding to the motion controller are adjusted during rotation.
[0042] As can be seen from the above technical solutions, this application has the following advantages:
[0043] This application provides a method and apparatus for generating model motion based on an in-vehicle terminal. First, an initial skeletal model is created, and the bones in the initial skeletal model are grouped to obtain multiple bone groups. This improves the ease of operation during motion design and thus enhances the efficiency of model motion generation. Second, a correction controller corresponding to the initial skeletal model is created to control the overall motion state of the initial skeletal model. A one-to-one motion controller is created for each bone group to control the local motion state of each bone group under the overall motion state, improving the motion control accuracy of the initial skeletal model. Next, in response to a control operation triggered by the correction controller, the overall motion state of the initial skeletal model is determined. Based on this overall motion state, in response to adjustment operations triggered by each motion controller, the local motion state of each bone group under the overall motion state is adjusted according to the constraints of the motion controller. This adjustment method accurately adjusts the local motion state of each bone group under the overall motion state, improving the accuracy and vividness of the initial skeletal model's movements under various overall motion states. Then, after all the bone groups in the initial skeletal model have been adjusted, skinning is performed based on the initial skeletal model and the pre-created character model to generate the target animation model. Key motion frames corresponding to each overall motion state of the target animation model are also generated. Based on the key motion frames corresponding to each overall motion state, the corresponding motion animation is generated and displayed on the in-vehicle terminal. Therefore, this embodiment of the application, by grouping the initial skeletal model and adjusting the motion of each bone group, and adjusting the local motion states corresponding to each bone group under overall motion conditions, not only improves the accuracy of model motion adjustment but also enhances the final presentation effect of the model's motion. Thus, when the target animation model generated based on the initial skeletal model is displayed on the in-vehicle terminal, and the corresponding motion animation is displayed, the realism of the target animation model's motion effect is improved, enhancing the user experience. Attached Figure Description
[0044] Figure 1 A flowchart illustrating a model motion generation method based on an in-vehicle terminal, provided as an embodiment of this application;
[0045] Figure 2 This is a schematic diagram of the initial skeletal model bone grouping provided in the embodiments of this application;
[0046] Figure 3 This is a schematic diagram of the distribution of the circle controller provided in an embodiment of this application;
[0047] Figure 4 This is a schematic diagram of a model motion generation device based on an in-vehicle terminal, provided in an embodiment of this application. Detailed Implementation
[0048] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0049] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0050] It should be noted that the concepts of "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0051] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0052] See Figure 1 , Figure 1 A flowchart of a model motion generation method based on an in-vehicle terminal is provided for embodiments of this application. The method specifically includes the following steps:
[0053] Step 101: Create an initial skeleton model and group the bones in the initial skeleton model to obtain multiple bone groups.
[0054] In this embodiment, a bone belongs to one or more bone groups, and a bone group includes multiple bones. Based on the body structure of a human or animal, this application creates an initial skeletal model for the human or animal. For ease of description, this application uses a human as an example to illustrate the model motion generation process. It should be understood that the steps described below for creating, modifying, generating, and displaying human models can also be applied to animal models.
[0055] Since the movement of a human figure is driven by the skeleton when the vehicle terminal displays the human figure, and the movement of the skeleton cannot be accurately adjusted and morphological analysis cannot be performed when the skeleton is wrapped inside the model, in order to facilitate the analysis of the movement patterns and morphological states of the human figure around the vehicle body using data collected by the vehicle sensors, this application embodiment creates an initial skeleton model based on the human body structure. This initial skeleton model is a simple line model used to describe the movement and posture of the human figure. It usually includes a series of interconnected virtual skeleton lines. These skeleton lines are organized in a hierarchical structure to simulate the internal skeleton of the human figure. By controlling the movement of these skeleton lines, the model can be driven to perform various actions and posture changes.
[0056] Furthermore, to facilitate motion adjustment of each bone, the bones in the initial skeletal model were grouped into multiple bone groups. A bone can belong to one or more bone groups, and a bone group consists of multiple bones. For example, the hand bones in the initial skeletal model used to control the movement of the character's hand can be grouped into the same bone group as the forearm and upper arm bones to control the movement of the character's arm, or they can be grouped into the same bone group as the finger bones corresponding to each finger to control the fine movements of the character's hand.
[0057] Step 102: Create a correction controller corresponding to the initial skeletal model, and create motion controllers corresponding one-to-one with each of the skeletal groups, and set constraints for each motion controller.
[0058] The correction controller controls the overall motion state of the initial skeletal model, while the motion controller controls the local motion state of each bone group. The control center of the motion controller and the motion center of the corresponding bone group are located at the same joint point, which is the connection point between the bones. In this embodiment, the correction controller is located at the bottom of the initial skeletal model and can independently control the overall motion state of the initial skeletal model, such as movement, rotation, direction of movement, and speed. The motion controller is set for each bone group, and its control center is located at the same joint point as the motion center of the corresponding bone group. Through the motion controller, the individual bones in the corresponding bone group can be controlled to move, swing, rotate, and perform other actions around the motion center.
[0059] When creating motion controllers for each skeleton group, constraints are also set for each motion controller. These constraints can limit the range of motion of each bone in the corresponding skeleton group, such as swing amplitude and rotation angle.
[0060] In one possible implementation, when creating motion controllers for each skeleton group, the motion center of the skeleton group is used as the control center. Motion controllers are created to manipulate the movement of each bone in the skeleton group, and the transformation of the motion center of the skeleton group and the transformation of the control center of the motion controller are frozen.
[0061] Freezing and transforming the motion center of the skeleton group and the control center of the motion controller can fix the motion center of the skeleton group on the corresponding joint point and fix the control center of the motion controller on the same joint point. In this way, the control center and motion center will not shift during the control of skeleton movement, thereby improving the accuracy of motion adjustment for the initial skeleton model.
[0062] Step 103: In response to the control operation triggered for the correction controller, determine the overall motion state corresponding to the initial skeletal model; based on the overall motion state, in response to the adjustment operation triggered for each motion controller, adjust the local motion state of each skeletal group corresponding to the overall motion state according to the constraints.
[0063] The system receives control operations triggered by the correction controller, determines the guidance direction of the correction controller for the initial skeletal model based on the control operations, and then determines the overall motion state of the initial skeletal model through the correction controller.
[0064] Under the overall motion state corresponding to the correction controller, by controlling each motion controller, adjustment operations are triggered for each skeleton group. This allows for the adjustment of the local motion state of each skeleton group based on constraints within the overall motion state. For example, when the overall motion state of the initial skeleton model is forward walking, the arm skeleton groups corresponding to the two arms in the initial skeleton model can be used to represent the arm swing state of the character model when walking forward. By controlling the arm's swing amplitude, swing angle, and other parameters through the arm's corresponding motion controller and its constraints, the local motion state of the arm skeleton group is made more consistent with the basic motion law of the character. After determining the local motion state of the arm skeleton group, based on the connection relationship between the hand skeleton group and the arm skeleton group, and according to forward kinematics (FK), the local motion state of the hand skeleton group is adjusted under the influence of the arm skeleton group.
[0065] In this embodiment, the upper body and lower body skeletons of the initial skeletal model are separate, but they share the same starting point. In the upper body skeleton, forward kinematics is primarily used to adjust the movement between each skeleton group and its internal bones. In the lower body skeleton, inverse kinematics (IK) is primarily used to adjust the movement between each skeleton group and its internal bones. Forward kinematics follows the connection relationships between bones, with the upper-level bones driving the movement of the lower-level bones; for example, when controlling arm movement, the upper arm, forearm, and wrist rotate sequentially. Inverse kinematics, on the other hand, involves the lower-level bones driving the movement of the upper-level bones; for example, the wrist drives the arm rotation.
[0066] It should be understood that, in adjusting the initial skeletal model, the embodiments of this application can determine multiple overall motion states through a correction controller, and adjust the corresponding local motion states of each bone group in each overall motion state. Once all motion states have been adjusted, the initial skeletal model adjustment is considered complete.
[0067] See Figure 2 , Figure 2 This is a schematic diagram of the bone grouping of the initial skeletal model provided in an embodiment of this application. Figure 2 Taking the left leg of the character corresponding to the skeletal model as an example, create a reverse motion IK_L1 for the bones from the thigh to the ankle, and group it as Twist. The motion center is located at the joint corresponding to the knee to control the knee flexion. Create a motion controller with the joint corresponding to the knee as the control center to control the reverse motion IK_L1 and the direction of the knee. Create three reverse motions at the ankle node to control the direction of the foot. Among them, the toe reverse motion IK_L2 and the ball of the foot reverse motion IK_L3 are grouped together and named Toe, with the motion center located at the joint corresponding to the ball of the foot to control the direction of the toe; the heel reverse motion IK_L4 and the ball of the foot reverse motion IK_L3 are grouped together and named Ball, with the motion center located at the joint corresponding to the ball of the foot to control the direction of the heel. Combine the Toe and Ball groups into one group named Tip, with the center of motion located at the joint point corresponding to the toes, to control the direction of movement when the ball of the foot and heel move together; then combine the Tip group into another group named Ankle, with the center of motion located at the joint point corresponding to the ankle, to control the direction of movement when the toes and ball of the foot move together; finally, combine the Tip group into another group named Foot_L_G, with the center of motion located at the joint point corresponding to the heel, to control the direction of movement of the entire foot.
[0068] In one possible implementation, the local motion state of each skeletal group can be adjusted in the following way:
[0069] Step 11: In response to the shape adjustment operation triggered for each motion controller, adjust the shape of each bone in the skeleton group during the linkage movement according to the motion linkage relationship between each bone in the skeleton group corresponding to the motion controller.
[0070] Step 12: In response to the rotation adjustment operation triggered for each motion controller, adjust the rotation attributes of each bone in the bone group corresponding to the motion controller when rotating.
[0071] The motion linkages between the bones within a skeleton group include forward dynamics and reverse dynamics. In the embodiments of this application, when the motion controller controls the movement of each skeleton group, it is necessary not only to adjust the shape of each bone within the skeleton group itself, but also to adjust the relationship of morphological changes between other bones when their shapes change, based on the linkages between bones, such as the relationship of the upper arm driving the forearm, the relative rotation relationship between the palm and the forearm. For example, when the upper arm is raised, the forearm is also raised.
[0072] In addition to shape, the rotational relationships between bones within a skeleton group also need to be adjusted using a motion controller. The motion controller adjusts the rotational properties between individual bones that can rotate, including but not limited to rotation angle, rotation direction, and rotation range.
[0073] Furthermore, to improve adjustment accuracy when adjusting the shape and rotation properties of individual bones in the initial skeletal model, circle controllers can be created at some joint points. For example... Figure 3 As shown, the circles at the bottom of the initial skeletal model are correction controllers. Circle controllers are created at the joints corresponding to the neck, chest, elbows, wrists, waist and other parts of the initial skeletal model. These controllers are used to achieve precise control over the skeletal shape and rotation attributes of the initial skeletal model, thereby making the movements of the final generated target animation model more realistic and smooth.
[0074] When creating the circle controller, you can also modify its shape to better fit the movement patterns of the character model. For example, in Figure 3In the process, after creating a circle controller for the foot, the circle of this controller can be shaped like a foot to obtain a foot-shaped controller, which can then control the bone group Foot_L_G. Next, rotation properties are added to this foot-shaped controller, including heel rotation properties (Ball X Rotate), toe rotation properties (Toe X Rotate), toe and ball of the foot linked rotation properties (Ankle X Rotate, Ankle Y Rotate, Ankle Z Rotate), and ball of the foot and heel linked rotation properties (Tip X Rotate, Tip Y Rotate, Tip Z Rotate), so that the rotation of the model's foot can be accurately adjusted through this foot-shaped controller.
[0075] Step 104: After all the bone groups in the initial bone model have been adjusted, the target animation model is generated based on the initial bone model.
[0076] Once the local motion states of each bone group in the initial skeletal model have been adjusted, the adjusted initial skeletal model is bound to the character model, i.e., skinning, to generate the target animation model. During the skinning process, the weights of each joint in the initial skeletal model are adjusted according to the character's motion patterns. These weights describe the degree of influence of the bones on the model. Adjusting the weights allows control over the model's deformation and motion effects in the animation, making the model's movement more natural and realistic.
[0077] Specifically, when creating a character model, the unit scale can be determined in meters. The model is designed using 3D animation software such as Maya 2022. In this software, the character model uses quadrilateral topology, and the topology direction and density are designed according to the character's body structure. When designing the character model, the design requirements for each movement must also be considered to avoid any artifacts or distortions during movement. The average number of vertices and faces of the character model should be controlled within a certain threshold. These thresholds can be determined through stress testing on the vehicle-mounted terminal. A higher vertex threshold can be set without affecting the terminal's operating efficiency to improve the model's vividness and realism.
[0078] It should be noted that although there are differences in age, gender, body type, etc. among different people in daily life, the basic movement patterns they follow are similar. For example, the movement pattern of a person walking can be uniformly described as follows: the left and right feet alternately move forward, driving the torso forward to maintain body balance, coordinating with the bending and straightening of the two legs and the stepping, while the upper limbs and arms swing back and forth; in order to maintain the center of gravity, one leg is usually supported first before the other leg can be lifted to step; when the legs are separated and both feet are on the ground, the height of the head of the figure model is slightly lower than the height when standing normally; when one foot is on the ground and the other foot is lifted and bent forward, the height of the head of the figure model will be slightly higher, roughly the same as the height when standing normally.
[0079] In addition, the movement of character models is complex and varied. The walking patterns and speeds of adults and children are different. In this application embodiment, corresponding character models can be created for adults and children respectively. Furthermore, the number of faces and vertices of the child character model will be less than that of the adult character model.
[0080] Step 105: Generate key motion frames corresponding to the target animation model in the overall motion state, and generate motion animation corresponding to the overall motion state based on the key motion frames.
[0081] After obtaining the target animation model, the target animation model is framed according to its motion shape, speed and motion law, generating key motion frames of the target animation model under different overall motion states, and generating the motion animation corresponding to each overall motion state based on the key frames corresponding to each overall motion state.
[0082] Specifically, step 105 can be implemented in the following way:
[0083] Step 21: For each of the overall motion states, determine the number of action frames corresponding to each of the overall motion states according to the preset frame rate;
[0084] Step 22: Control the target animation model to move in each of the overall motion states using the correction controller; determine the key action frame groups corresponding to each of the overall motion states according to the preset frame rate;
[0085] Step 23: Generate motion animation corresponding to the overall motion state based on the time sequence of each key action frame in the key action frame group.
[0086] Generally, human or animal models have four main motion states: stationary, walking, running, and sprinting. In this embodiment, the motion state of a human target is determined by the speed of the human target around the vehicle body collected by the vehicle body sensors, and a corresponding motion animation is generated based on the motion state. In this embodiment, the motion state of a human target can be determined based on the speed of the human target detected by the vehicle body sensors. For example, when the speed of the human target is less than 0.5 m / s, it is stationary; when the speed of the human target is greater than or equal to 0.5 m / s and less than 1.55 m / s, it is walking; when the speed of the human target is greater than or equal to 1.55 m / s and less than 5.5 m / s, it is running; and when the speed of the human target is greater than or equal to 5.5 m / s, it is sprinting.
[0087] When obtaining key motion frame groups based on a preset frame rate, the number of key motion frames within the corresponding key motion frame group is the same as the number of motion frames corresponding to the overall motion state for a given motion state. For example, with a preset frame rate of 24 frames per second (FPS), the number of motion frames corresponding to a stationary state is 1 frame, the number of motion frames corresponding to a walking state is 24 frames, the number of motion frames corresponding to a running state is 16 frames, and the number of motion frames corresponding to a sprinting state is 8 frames. The key motion frame groups corresponding to each overall motion state are determined according to the preset frame rate. Specifically, the key motion frame group for a stationary state contains 1 key motion frame, the key motion frame group for a walking state contains 24 key motion frames, the key motion frame group for a running state contains 16 key motion frames, and the key motion frame group for a sprinting state contains 8 key motion frames. Taking the running state as an example, the 16 key motion frames in the key motion frame group are played in a loop according to their time sequence, forming a looping motion. The animation corresponding to this looping motion is used as the motion animation for the running state.
[0088] After designing the target animation model using 3D animation software, the unit of measurement can be determined in meters. The bound character model and the initial skeletal model can then be output together. The key motion frames corresponding to each overall motion state can be baked and then output.
[0089] The process of playing motion animations corresponding to the running state on the in-vehicle terminal is the process of looping the looping motions corresponding to the running state.
[0090] You can also set the number of frames for the still state to multiple frames, such as 2 frames, so that the character model can keep its feet still while its upper body moves slightly, making the model's movements more realistic and vivid.
[0091] Step 106: In response to the animation display command from the vehicle terminal, display the motion animation on the vehicle terminal display screen.
[0092] In this embodiment, an animation display command can be triggered by human or animal targets collected by the vehicle body sensors. The vehicle terminal obtains the speed of the human targets around the vehicle body collected by the vehicle body sensors based on the animation display command, determines the motion state of the human targets, and plays and displays the corresponding motion animation according to the motion state.
[0093] It should be understood that, in this embodiment of the application, the height, body shape, and other information of the person target collected by the vehicle body sensors can also be used to flexibly adjust the target animation model displayed on the vehicle terminal corresponding to the person target. For example, the height of the target animation model displayed on the vehicle terminal can be adjusted according to the height of the person target; in addition, when the height of the person target is lower than the basic height threshold, the person target can be identified as a child and a child animation model corresponding to the child can be displayed on the vehicle terminal.
[0094] Specifically, step 106 can be implemented in the following way:
[0095] Step 31: Determine the target type of the detected target, and obtain the target animation model corresponding to the detected target based on the target type;
[0096] Step 32: Based on the motion state of the detected target, determine the display motion animation corresponding to the target animation model, and display the display motion animation on the vehicle terminal.
[0097] After obtaining the target animation model, motion animations of the target animation model under different motion states are generated. When the in-vehicle terminal needs to display the motion effect of the target animation model, it only needs to detect the type and motion state of the targets around the vehicle, then match the target animation model corresponding to the target based on its type, and match the motion animation corresponding to the target animation model based on its motion state. The final matched motion animation is then displayed on the in-vehicle terminal. This method of pre-generating motion animations takes into account the chip performance of the in-vehicle terminal, reduces the computing resources occupied by the target animation model on the in-vehicle terminal, improves the efficiency of the in-vehicle terminal in displaying the detected target motion effect, and thus improves the display performance of the in-vehicle terminal.
[0098] The model motion generation method based on an in-vehicle terminal provided in this application firstly creates an initial skeletal model and groups the bones in the initial skeletal model to obtain multiple bone groups, which improves the operational convenience during motion design and thus helps to improve the efficiency of model motion generation. Secondly, a correction controller corresponding to the initial skeletal model is created to control the overall motion state of the initial skeletal model. A one-to-one motion controller is created for each bone group to control the local motion state of each bone group under the overall motion state, which improves the motion control accuracy of the initial skeletal model. Next, in response to the control operation triggered by the correction controller, the overall motion state corresponding to the initial skeletal model is determined. Based on the overall motion state, in response to the adjustment operation triggered by each motion controller, the local motion state of each bone group under the overall motion state is adjusted according to the constraints of the motion controller. This adjustment method can accurately adjust the local motion state of each bone group under the overall motion state, improving the accuracy and vividness of the initial skeletal model's movements under various overall motion states. Then, after all the bone groups in the initial skeletal model have been adjusted, skinning is performed based on the initial skeletal model and the pre-created character model to generate the target animation model. Key motion frames corresponding to each overall motion state of the target animation model are also generated. Based on the key motion frames corresponding to each overall motion state, the corresponding motion animation is generated and displayed on the in-vehicle terminal. Therefore, this embodiment of the application, by grouping the initial skeletal model and adjusting the motion of each bone group, and adjusting the local motion states corresponding to each bone group under overall motion conditions, not only improves the accuracy of model motion adjustment but also enhances the final presentation effect of the model's motion. Thus, when the target animation model generated based on the initial skeletal model is displayed on the in-vehicle terminal, and the corresponding motion animation is displayed, the realism of the target animation model's motion effect is improved, enhancing the user experience.
[0099] After designing the target animation model using 3D animation software, the unit of measurement can be determined in meters. The bound character model and the initial skeletal model can then be output together. The key motion frames corresponding to each overall motion state can be baked and then output.
[0100] Although the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous.
[0101] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.
[0102] See Figure 4 , Figure 4 A schematic diagram of a model motion generation device based on an in-vehicle terminal provided in this application embodiment, the device comprising:
[0103] The model creation unit 401 is used to: create an initial skeleton model and group the bones in the initial skeleton model to obtain multiple bone groups; one bone belongs to one or more bone groups, and one bone group includes multiple bones.
[0104] The controller creation unit 402 is used to: create a correction controller corresponding to the initial skeleton model, and create motion controllers that correspond one-to-one with each of the skeleton groups, and set constraints for each of the motion controllers; the correction controller is used to control the overall motion state of the initial skeleton model, the motion controller is used to control the local motion state corresponding to each skeleton group, the control center of the motion controller and the motion center of the corresponding skeleton group are on the same joint point, and the joint point is the connection point between the skeletons.
[0105] The motion control unit 403 is configured to: determine the overall motion state corresponding to the initial skeletal model in response to a control operation triggered by the correction controller; and adjust the local motion state of each skeletal group corresponding to the overall motion state in response to an adjustment operation triggered by each motion controller, according to the constraints.
[0106] The model generation unit 404 is used to: generate a target animation model based on the initial skeleton model after all the bone groups in the initial skeleton model have been adjusted.
[0107] Animation generation unit 405 is used to: generate key action frames corresponding to the target animation model in the overall motion state, and generate motion animation corresponding to the overall motion state based on the key action frames;
[0108] The animation display unit 406 is used to: display the motion animation on the display screen of the vehicle terminal in response to the animation display command of the vehicle terminal.
[0109] Optionally, the animation display unit 406 is specifically used for:
[0110] Determine the target type of the target to be detected, and obtain the target animation model corresponding to the target based on the target type;
[0111] Based on the motion state of the detected target, the display motion animation corresponding to the target animation model is determined, and the display motion animation is displayed on the vehicle terminal.
[0112] Optionally, the animation generation unit 405 is specifically used for:
[0113] For each of the overall motion states, the number of action frames corresponding to each of the overall motion states is determined according to a preset frame rate.
[0114] The correction controller controls the target animation model to move in each of the overall motion states; the key action frame group corresponding to each of the overall motion states is determined according to the preset frame rate; the number of key action frames in the key action frame group corresponding to the overall motion state is the same as the number of action frames corresponding to the overall motion state.
[0115] Based on the time sequence of each key action frame in the key action frame group, a motion animation corresponding to the overall motion state is generated.
[0116] Optionally, the controller creation unit 402 is specifically used for:
[0117] For each skeleton group, a motion controller is created with the motion center of the skeleton group as the control center to manipulate the movement of each bone in the skeleton group, and the motion center transformation of the skeleton group and the control center transformation of the motion controller are frozen.
[0118] Optionally, the motion control unit 403 is specifically used for:
[0119] In response to the shape adjustment operation triggered by each motion controller, the shape of each bone in the skeleton group is adjusted during the linkage movement according to the motion linkage relationship between each bone in the skeleton group corresponding to the motion controller.
[0120] In response to rotation adjustment operations triggered for each motion controller, the rotational attributes of each bone in the bone group corresponding to the motion controller are adjusted during rotation.
[0121] The names of the messages or information exchanged between multiple devices in the embodiments of this application are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0122] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0123] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications 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 application.
Claims
1. A method for generating model motion based on an in-vehicle terminal, characterized in that, The method includes: An initial skeletal model is created, and the bones in the initial skeletal model are grouped to obtain multiple bone groups; a bone belongs to one or more bone groups, and a bone group includes multiple bones. A correction controller corresponding to the initial skeletal model is created, and a motion controller corresponding to each of the bone groups is created, and constraints are set for each of the motion controllers; the correction controller is used to control the overall motion state of the initial skeletal model, and the motion controller is used to control the local motion state of each bone group. The control center of the motion controller and the motion center of the corresponding bone group are on the same joint point, and the joint point is the connection point between the bones. In response to a control operation triggered by the correction controller, the overall motion state corresponding to the initial skeletal model is determined; based on the overall motion state, in response to an adjustment operation triggered by each motion controller, the local motion state of each skeletal group corresponding to the overall motion state is adjusted according to the constraints. Once all the bone groups in the initial skeletal model have been adjusted, a target animation model is generated based on the initial skeletal model. Generate key motion frames corresponding to the target animation model under the overall motion state, and generate motion animation corresponding to the overall motion state based on the key motion frames; In response to an animation display command from the vehicle terminal, the motion animation is displayed on the vehicle terminal's screen.
2. The method according to claim 1, characterized in that, The step of displaying the motion animation on the vehicle terminal display screen in response to the animation display command of the vehicle terminal includes: Determine the target type of the target to be detected, and obtain the target animation model corresponding to the target type; Based on the motion state of the detected target, the display motion animation corresponding to the target animation model is determined, and the display motion animation is displayed on the vehicle terminal.
3. The method according to claim 1, characterized in that, The step of generating key motion frames corresponding to the target animation model under the overall motion state, and generating motion animation corresponding to the overall motion state based on the key motion frames, includes: For each of the overall motion states, the number of action frames corresponding to each of the overall motion states is determined according to a preset frame rate. The correction controller controls the target animation model to move in each of the overall motion states; the key action frame group corresponding to each of the overall motion states is determined according to the preset frame rate; the number of key action frames in the key action frame group corresponding to the overall motion state is the same as the number of action frames corresponding to the overall motion state. Based on the time sequence of each key action frame in the key action frame group, a motion animation corresponding to the overall motion state is generated.
4. The method according to claim 1, characterized in that, The creation of motion controllers corresponding one-to-one with each of the aforementioned skeleton groups includes: For each skeleton group, a motion controller is created with the motion center of the skeleton group as the control center to manipulate the movement of each bone in the skeleton group, and the motion center transformation of the skeleton group and the control center transformation of the motion controller are frozen.
5. The method according to claim 1 or 4, characterized in that, The adjustment of the local motion state of each skeleton group in the overall motion state in response to the adjustment operation triggered by each motion controller, according to the constraints, includes: In response to the shape adjustment operation triggered by each motion controller, the shape of each bone in the skeleton group is adjusted during the linkage movement according to the motion linkage relationship between each bone in the skeleton group corresponding to the motion controller. In response to rotation adjustment operations triggered for each motion controller, the rotational attributes of each bone in the bone group corresponding to the motion controller are adjusted during rotation.
6. A model motion generation device based on a vehicle-mounted terminal, characterized in that, The device includes: The model creation unit is used to: create an initial skeleton model and group the bones in the initial skeleton model to obtain multiple bone groups; a bone belongs to one or more bone groups, and a bone group includes multiple bones; The controller creation unit is used to: create a correction controller corresponding to the initial skeletal model, and create motion controllers that correspond one-to-one with each of the bone groups, and set constraints for each of the motion controllers; the correction controller is used to control the overall motion state of the initial skeletal model, the motion controller is used to control the local motion state of each bone group, and the control center of the motion controller and the motion center of the corresponding bone group are on the same joint point, the joint point being the connection point between the bones; A motion control unit is configured to: determine the overall motion state corresponding to the initial skeletal model in response to a control operation triggered by the correction controller; and, based on the overall motion state, adjust the local motion state of each skeletal group corresponding to the overall motion state in response to an adjustment operation triggered by each motion controller, according to the constraints. The model generation unit is used to: generate a target animation model based on the initial skeleton model after all the bone groups in the initial skeleton model have been adjusted; An animation generation unit is used to: generate key motion frames corresponding to the target animation model in the overall motion state, and generate motion animation corresponding to the overall motion state based on the key motion frames; An animation display unit is configured to: display the motion animation on the display screen of the vehicle terminal in response to an animation display command from the vehicle terminal.
7. The apparatus according to claim 6, characterized in that, The animation display unit is specifically used for: Determine the target type of the target to be detected, and obtain the target animation model corresponding to the target type; Based on the motion state of the detected target, the display motion animation corresponding to the target animation model is determined, and the display motion animation is displayed on the vehicle terminal.
8. The apparatus according to claim 6, characterized in that, The animation generation unit is specifically used for: For each of the overall motion states, the number of action frames corresponding to each of the overall motion states is determined according to a preset frame rate. The correction controller controls the target animation model to move in each of the overall motion states; the key action frame group corresponding to each of the overall motion states is determined according to the preset frame rate; the number of key action frames in the key action frame group corresponding to the overall motion state is the same as the number of action frames corresponding to the overall motion state. Based on the time sequence of each key action frame in the key action frame group, a motion animation corresponding to the overall motion state is generated.
9. The apparatus according to claim 6, characterized in that, The controller creation unit is specifically used for: For each skeleton group, a motion controller is created with the motion center of the skeleton group as the control center to manipulate the movement of each bone in the skeleton group, and the motion center transformation of the skeleton group and the control center transformation of the motion controller are frozen.
10. The apparatus according to claim 6 or 9, characterized in that, The motion control unit is specifically used for: In response to the shape adjustment operation triggered by each motion controller, the shape of each bone in the skeleton group is adjusted during the linkage movement according to the motion linkage relationship between each bone in the skeleton group corresponding to the motion controller. In response to rotation adjustment operations triggered for each motion controller, the rotational attributes of each bone in the bone group corresponding to the motion controller are adjusted during rotation.