Search

CN-121999096-A - Animation synchronization method and electronic equipment

CN121999096ACN 121999096 ACN121999096 ACN 121999096ACN-121999096-A

Abstract

The application provides an animation synchronization method and electronic equipment, which are applied to the technical field of animation. The method comprises the steps of determining that an adjusting instruction is a target state value designated by an adjustable component when the adjusting instruction is received, determining a target time length required by the state of the adjustable component to be adjusted from a current state value to the target state value, and sending a control instruction to a controller of the adjustable component so that the controller controls the state of the adjustable component to be adjusted from the current state value to the target state value, and simultaneously controlling an animation object of the adjustable component to gradually change from a first state to a second state within the target time length. The method provided by the application can reduce the state change amplitude of the animation object and improve the smoothness of the animation object in the state change process, thereby improving the simulation effect of the animation object.

Inventors

  • LI XIN
  • ZHAO LONG
  • Tu Huixun
  • LUO HAITAO
  • LIU LIANGPING

Assignees

  • 长城汽车股份有限公司

Dates

Publication Date
20260508
Application Date
20260116

Claims (10)

  1. 1. A method of animation synchronization, the method comprising: When an adjustment instruction for an adjustable component is received, determining that the adjustment instruction is a target state value designated by the adjustable component; determining a target time period required for the state of the adjustable component to adjust from a current state value to the target state value; Transmitting a control instruction to a controller of the adjustable component to cause the controller to control the state of the adjustable component to adjust from the current state value to the target state value; And controlling the animation object of the adjustable component to gradually change from a first state to a second state within the target duration, wherein the first state corresponds to the current state value, and the second state corresponds to the target state value.
  2. 2. The method of claim 1, wherein after the sending control instructions to the controller of the adjustable component, the method further comprises: Determining whether status feedback periodically transmitted by the controller is received, wherein the status feedback comprises a real-time status value of the adjustable component; If so, when the real-time state of the animation object is not matched with the real-time state value, controlling the animation object to gradually change from a third state to the second state, wherein the third state corresponds to the real-time state value included in the state feedback received at the last time.
  3. 3. The method of claim 2, wherein the method further comprises: When the state feedback is not received within the expected time, controlling the animation object to stop gradual change; The expected time comprises a time period in a preset time period after the control instruction is sent to the controller, and a time period in the preset time period after the state feedback is received each time.
  4. 4. A method according to claim 3, wherein after said controlling said animated object to stop fading, said method further comprises: and under the condition that at least one state feedback is received in advance, controlling the animation object to gradually change into a fourth state, wherein the fourth state corresponds to the real-time state value in the state feedback received last time.
  5. 5. A method according to claim 3, wherein said controlling said animated object to stop fading when said status feedback is not received within an expected time comprises: When the state feedback is not received within the expected time, determining whether the abnormal times reach a preset times threshold, wherein the abnormal times comprise times of continuously receiving the state feedback within the expected time for a plurality of times; And if the number of times threshold is reached, controlling the animation object to stop gradual change.
  6. 6. The method of claim 2, wherein the controlling the animated object of the adjustable member to fade from the first state to the second state over the target time period comprises: after the control instruction is sent to the controller, determining whether the state feedback sent by the controller is received; And if the state feedback is received, controlling the animation object to gradually change from the first state to the second state within the target duration.
  7. 7. The method of claim 6, wherein the determining a target length of time required for the state of the adjustable component to adjust from a current state value to the target state value comprises: Determining a duration of an interval between receiving the status feedback from the first time and sending the control instruction to the controller; And determining the target time length according to the difference value between the actual time length and the interval time length, wherein the actual time length is the time length required by the state of the adjustable component to be adjusted from the current state value to the target state value.
  8. 8. The method of claim 7, wherein the determining the target time period based on a difference between an actual time period and the interval time period comprises: Determining whether the interval duration is greater than a preset duration upper limit; if so, determining the target duration according to the difference between the actual duration and the interval duration.
  9. 9. The method of claim 2, wherein the controlling the animated object to fade from the first state to the second state over the target time period comprises: Determining a duration of an interval between receiving the status feedback from the first time and sending the control instruction to the controller; Determining a residual time length which is equal to the target time length minus the interval time length when the interval time length is larger than the upper limit of the preset time length; and when the interval duration is smaller than or equal to the preset duration upper limit, controlling the animation object to gradually change from the first state to the second state in the target duration.
  10. 10. An electronic device, the electronic device comprising: A memory for storing executable program code; a processor for invoking and executing the executable program code from the memory to cause the electronic device to perform the method of any of claims 1-8.

Description

Animation synchronization method and electronic equipment Technical Field The present application relates to the field of animation technology, and more particularly, to an animation synchronization method and an electronic device in the field of animation technology. Background Currently, for some adjustable components (hereinafter referred to as adjustable components), such as skylights, curtains, seats, etc., corresponding animation objects are generally set, and the state change of the adjustable components is simulated through the state change of the animation objects, so that a user can conveniently determine the state change of the adjustable components according to the state change of the animation objects. It is a common practice to receive state feedback periodically fed back by the controller in the process of controlling the adjustable component to perform state adjustment by the controller of the adjustable component, and adjust the state of the animation object according to the state value of the adjustable component included in the state feedback, so that the state of the animation object corresponds to the state of the adjustable component. The problem with the above method is that the controller periodically sends status feedback, so that the acquired status value is periodically hopped, and when the status of the animation object is adjusted based on the hopped status value, the status of the animation object is hopped and not smooth, and the simulation effect of the animation object is remarkably reduced. Disclosure of Invention The application provides an animation synchronization method and electronic equipment, which can improve the smoothness of an animation object of an adjustable component. In a first aspect, there is provided an animation synchronization method, the method comprising: When an adjustment instruction for an adjustable component is received, determining that the adjustment instruction is a target state value designated by the adjustable component; determining a target time period required for the state of the adjustable component to adjust from a current state value to the target state value; Transmitting a control instruction to a controller of the adjustable component to cause the controller to control the state of the adjustable component to adjust from the current state value to the target state value; And controlling the animation object of the adjustable component to gradually change from a first state to a second state within the target duration, wherein the first state corresponds to the current state value, and the second state corresponds to the target state value. In the embodiment of the application, in the process of controlling the adjustable object, when an adjusting instruction of the adjustable component is received, the adjusting instruction is determined to be a target state value designated by the adjustable component, the target time length required for adjusting the state of the adjustable component from the current state value to the target state value is determined, and a control instruction is sent to a controller of the adjustable component, so that the controller controls the state of the adjustable component to be adjusted from the current state value to the target state value, and meanwhile, the animation object of the adjustable component is controlled to gradually change from the first state to the second state within the target time length. The method provided by the application can realize decoupling between the state change of the adjustable component and the state change of the corresponding animation object, and the state of the animation object is controlled to be graded at a uniform speed in the process of continuously changing the state of the adjustable component, so that the state change amplitude of the animation object can be reduced, the smoothness of the animation object in the state change process is improved, and the simulation effect of the animation object can be improved. Optionally, after the sending of the control instruction to the controller of the adjustable component, the method further comprises: Determining whether status feedback periodically transmitted by the controller is received, wherein the status feedback comprises a real-time status value of the adjustable component; If so, when the real-time state of the animation object is not matched with the real-time state value, controlling the animation object to gradually change from a third state to the second state, wherein the third state corresponds to the real-time state value included in the state feedback received at the last time. In the embodiment of the application, under the condition of decoupling the state change of the adjustable component and the state change of the animation object, the state of the animation object is corrected when the state of the animation object and the state of the adjustable component are determined to deviate greatly bas