Dynamic effect display method and system and vehicle-mounted terminal
By obtaining the vehicle's driving speed and dynamic efficiency resource collection, matching the target resource map kit and determining the dynamic efficiency playback parameters, the problem of high resource consumption in dynamic efficiency display is solved, and the complexity of dynamic efficiency display is reduced and the visual effect improvement is improved.
Patent Information
- Application Number
- CN202510533930.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-27
AI Technical Summary
In the dynamic performance display, the resource consumption is high, the difficulty of dynamic performance development is increasing, the GPU processing amount is large, and the memory usage is increasing, resulting in the problem of large resource consumption.
By obtaining the vehicle's driving speed and the collection of dynamic resources in the display mode, matching the target resource map kit, and determining the dynamic effect playback parameters based on the driving speed, including the frame rate and frame interval time, and playing all frame pictures in the target resource map kit in a loop to display the motion effect.
The complexity and resource consumption of animation effect display are reduced, and different animation effect styles and playback parameters are determined through dynamic vehicle speed parameters, which improves the visual effect and effectively reduces resource consumption.
Smart Images

Figure CN120045101A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of electronic devices, and particularly to a dynamic effect display method, system and vehicle-mounted terminal. Background Art
[0002] With the development of the automotive industry and the continuous improvement of consumers' requirements for driving experience, the functions of in-vehicle systems are becoming increasingly rich, and the display contents of the central control screen and in-vehicle instrument are also becoming increasingly rich. The central control screen and in-vehicle instrument can not only display basic driving information, such as driving speed, driving mileage, and battery power, etc., but also begin to introduce various display modes adapted to vehicle driving. Each display mode is set with a series of different dynamic effects to present a rich visual effect and bring an excellent driving experience to the driver and passengers.
[0003] In the related art, the display of dynamic effects usually uses a three-dimensional model plus texture as a specific dynamic object, and then adds a dynamic movement trajectory to the specific dynamic object to achieve. However, such a method still faces certain problems, that is, a series of dynamic effects under various display modes need to configure corresponding model source files and texture images. If the dynamic effects are relatively complex, the number of model source files and texture images will also increase. Moreover, during the implementation of the dynamic effects, post-processing needs to be performed on the corresponding model objects to improve the dynamic effect, resulting in a significant increase in the development difficulty of the dynamic effects, the amount of data processed by the GPU (Graphics Processing Unit), and the memory space occupied by the dynamic effects, causing the problem of large resource consumption. Summary of the Invention
[0004] In view of the above disadvantages, this application discloses a dynamic effect display method, system and vehicle-mounted terminal for solving the technical problem of large resource consumption in dynamic effect display.
[0005] In a first aspect, this application provides a dynamic effect display method, the method includes: if the interface switches to a preset display mode, obtain the driving speed of the vehicle and the set of dynamic effect resources in the display mode, each set of resource maps in the set of dynamic effect resources is associated with speed information, and each set of resource maps includes all frame pictures of a preset dynamic effect under the corresponding speed information; match a target set of resource maps from the set of dynamic effect resources according to the driving speed; determine the dynamic effect playback parameters of the target set of resource maps according to the driving speed, the dynamic effect playback parameters include frame rate and frame interval time; according to the dynamic effect playback parameters, loop play all the frame pictures in the target set of resource maps to perform dynamic effect display.
[0006] In an embodiment of the present application, the configuration method of the animation resource set includes: obtaining preset animations, the display frame rate of the interface, and the display resolution of the interface under different speed information, where the animation elements and the element change speeds corresponding to the preset animations under different speed information are different; playing each preset animation, and intercepting multiple static pictures according to the display frame rate and the display resolution; integrating the multiple static pictures corresponding to each preset animation into a resource map suite according to the interception order; associating each resource map suite with the corresponding speed information to obtain the animation resource set.
[0007] In an embodiment of the present application, the determining the animation playback parameters of the target resource map suite according to the driving speed includes: matching a target frame rate calculation strategy from a preset variety of frame rate calculation strategies according to the driving speed, where each calculation strategy in the variety of frame rate calculation strategies is associated with speed information; calculating the frame rate according to the driving speed and the target frame rate calculation strategy, where the frame rate is in a direct proportion relationship with the driving speed, and calculating the reciprocal of the frame rate to obtain the frame interval time, so as to obtain the animation playback parameters.
[0008] In an embodiment of the present application, the determining the animation playback parameters of the target resource map suite according to the driving speed further includes: matching a target transparency calculation strategy from a preset variety of transparency calculation strategies according to the driving speed, where each calculation strategy in the variety of transparency calculation strategies is associated with speed information; calculating the first transparency of the target resource map suite according to the driving speed and the target transparency calculation strategy, and the animation playback parameters further include the first transparency, where the first transparency is in a direct proportion relationship with the driving speed.
[0009] In an embodiment of the present application, the circularly playing all the frame pictures in the target resource map suite according to the animation playback parameters includes: integrating all the frame pictures into a single resource picture according to the frame sequence; performing a modulo operation on the real-time cumulative playback duration of the target resource map suite, the frame rate, and the total number of frames of the target resource map suite to determine the current frame index; extracting the texture data of the current frame from the resource picture according to the current frame index, and processing the texture data according to the first transparency to obtain the target texture data of the current frame; rendering the target texture data of the current frame onto the interface, and continuously updating the target texture data of the current frame with the target texture data of the next frame based on the frame interval time to complete the circular playback of all the frame pictures.
[0010] In an embodiment of the present application, the extracting of the texture data of the current frame from the resource picture according to the current frame index includes: calculating a texture scaling ratio by calculating a preset single-frame size and the total size of the resource picture, and calculating the number of horizontal frames of the resource picture by calculating a preset single-frame width and the total width of the resource picture; determining a vertical texture offset of the current frame in the resource picture according to the current frame index, the number of horizontal frames, the total height of the resource picture, and a preset single-frame height, and determining a horizontal texture offset of the current frame in the resource picture according to the current frame index, the number of horizontal frames, the total width, and the single-frame width; determining the position coordinates of the texture data of the current frame in the resource picture according to the texture scaling ratio, the vertical texture offset, and the horizontal texture offset; and extracting the texture data of the current frame from the resource picture according to the position coordinates.
[0011] In an embodiment of the present application, after the dynamic effect display, it further includes: if the change in the driving speed causes the target resource map suite to change, then matching a new target resource map suite from the dynamic effect resource set according to the changed driving speed, and determining a second transparency of the new target resource map suite and a third transparency of the previous target resource map suite according to the changed driving speed; playing all the frame pictures in the new target resource map suite in a loop according to the second transparency, and fading out the previous target resource map suite according to the third transparency to complete the switching between the new target resource map suite and the previous target resource map suite.
[0012] In an embodiment of the present application, the configuration method of the dynamic effect resource set further includes: extracting the same elements in the preset dynamic effects under different speed information, where the same elements are static elements; integrating the same elements into a shared resource map suite, and respectively integrating the different elements in the preset dynamic effects under different speed information into exclusive resource map suites; associating the shared resource map suite with global speed information, and associating the exclusive resource map suites with the corresponding speed information to obtain the dynamic effect resource set, so as to always keep the shared resource map suite displayed on the interface during the dynamic effect display.
[0013] Second aspect, the present application provides a dynamic effect display system, the system comprising: an acquisition module, configured to obtain the driving speed of the vehicle and a set of dynamic effect resources in the display mode if the interface is switched to a preset display mode, each set of resource images in the set of dynamic effect resources being associated with speed information, and each set of resource images including all frame images of a preset dynamic effect under the corresponding speed information; a matching module, configured to match a target resource image set from the set of dynamic effect resources according to the driving speed; a calculation module, configured to determine dynamic effect playing parameters of the target resource image set according to the driving speed, the dynamic effect playing parameters including a frame rate and a frame interval time; and a display module, configured to circularly play all frame images in the target resource image set according to the dynamic effect playing parameters to perform dynamic effect display.
[0014] Third aspect, the present application provides a vehicle-mounted terminal, the vehicle-mounted terminal comprising: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the vehicle-mounted terminal to implement the dynamic effect display method as described in the first aspect.
[0015] As described above, a dynamic effect display method, system and vehicle-mounted terminal provided by the embodiments of the present application have the following beneficial effects: First, when the interface is switched to a preset display mode, the driving speed of the vehicle and the set of dynamic effect resources in this display mode are obtained. There are multiple sets of resource images in the set of dynamic effect resources, each set of resource images being associated with speed information and including all frame images of a preset dynamic effect under the corresponding speed information. Then, a target resource image set is matched from the set of dynamic effect resources according to the driving speed. Next, the dynamic effect playing parameters of the target resource image set are determined according to the driving speed, the dynamic effect playing parameters including a frame rate and a frame interval time. Finally, all frame images in the target resource image set are circularly played according to the dynamic effect playing parameters to perform dynamic effect display. By playing the sequence frame images of the preset dynamic effect, an animation effect is generated to achieve dynamic effect display, which reduces the complexity of dynamic effect display. Moreover, based on the dynamic vehicle speed parameter, different dynamic effect styles and corresponding dynamic effect playing parameters are determined, which can allow users to feel the visual feedback in different speed scenarios. While improving the visual effect, the resource consumption during the dynamic effect display is effectively reduced.
[0016] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. Description of the Drawings
[0017] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings: Figure 1 is a schematic diagram of the implementation environment of a dynamic effect display system shown in an exemplary embodiment of the present application; Figure 2 is a flowchart of a dynamic effect display method shown in an exemplary embodiment of the present application; Figure 3 is a low-speed visual diagram of a track mode background dynamic effect shown in an exemplary embodiment of the present application; Figure 4 is a medium-speed visual diagram of a track mode background dynamic effect shown in an exemplary embodiment of the present application; Figure 5 is a high-speed visual diagram of a track mode background dynamic effect shown in an exemplary embodiment of the present application; Figure 6 is a processing flowchart of a vertex shader shown in an exemplary embodiment of the present application; Figure 7 is a processing flowchart of a fragment shader shown in an exemplary embodiment of the present application; Figure 8 is a block diagram of a dynamic effect display system shown in an exemplary embodiment of the present application; Figure 9 is a schematic structural diagram of an in-vehicle terminal provided in an embodiment of the present application. Detailed Embodiments
[0018] The following will illustrate the implementation manners of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for explaining the present application, rather than for limiting the protection scope of the present application.
[0019] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present application in a schematic manner. Therefore, only the components related to the present application are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The types, quantities, and ratios of the components in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0020] In the following description, a large number of details are explored to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0021] Motion effects are various animation effects presented in the interface, giving people rich visual effects. The display of motion effects is usually achieved by using a 3D model plus textures as specific dynamic objects and then adding dynamic motion trajectories to the specific dynamic objects. However, through the research of the inventors of the present application, it is found that a corresponding model source file and texture image need to be configured for a series of motion effects in various display modes. If the motion effects are relatively complex, the number of model source files and texture pictures will also increase. Moreover, during the implementation of motion effects, post-processing needs to be performed on the corresponding model objects to improve the motion effect, resulting in a significant increase in the development difficulty of motion effects, the amount of data processed by the GPU, and the memory space occupied by motion effects, causing the problem of large resource consumption.
[0022] Therefore, please refer to Figure 1 , Figure 1 which is a schematic diagram of the implementation environment of a motion effect display system shown in an exemplary embodiment of the present application. As Figure 1 shown, the implementation environment includes a vehicle 110 and a motion effect display system 120. Among them, the motion effect display system 120 is embedded in the vehicle 110 and is used to implement the motion effect display in the vehicle 110. The motion effect display system 120 includes, but is not limited to, a car machine system, an in-vehicle computer, etc. By playing the sequence frame pictures of preset motion effects, an animation effect is generated to achieve the motion effect display, reducing the complexity of the motion effect display. Moreover, based on the dynamic vehicle speed parameter, a specific motion effect style and corresponding motion effect playback parameters are determined, effectively reducing the resource consumption during the motion effect display while enhancing the visual effect.
[0023] Please refer to Figure 2 , Figure 2 which is a flowchart of a motion effect implementation method shown in an exemplary embodiment of the present application. This method can be applied to the Figure 1 implementation environment shown. It should be understood that this method can also be applicable to other exemplary implementation environments, and the present embodiment does not limit the implementation environment applicable to this method.
[0024] As Figure 2 shown, in an exemplary embodiment, the motion effect display method at least includes steps S210 to S240, which are introduced in detail as follows: Step S210: If the interface switches to a preset display mode, obtain the driving speed of the vehicle and the collection of dynamic effect resources in the display mode. Each set of resource images in the collection of dynamic effect resources is associated with speed information, and each set of resource images includes all the frame images of the preset dynamic effect corresponding to the speed information.
[0025] Step S220: Match the target set of resource images from the collection of dynamic effect resources according to the driving speed.
[0026] Step S230: Determine the dynamic effect playback parameters of the target set of resource images according to the driving speed. The dynamic effect playback parameters include the frame rate and the frame interval time.
[0027] Step S240: According to the dynamic effect playback parameters, loop through and play all the frame images in the target set of resource images to display the dynamic effect.
[0028] Among them, the interface can be a display interface such as the vehicle's central control interface or instrument interface; the preset display mode can be different modes such as a sports mode or a track mode. Each display mode corresponds to a preset dynamic effect. At the same time, based on different speed information of the vehicle, each display mode corresponds to multiple preset dynamic effects under different speed information, and different dynamic effects are associated with different speed information; the preset dynamic effect can be a dynamic effect applied to different levels of the interface, such as a background dynamic effect applied to the bottom layer, a foreground dynamic effect applied to the surface layer, etc.
[0029] In addition, for each preset dynamic effect in various display modes, it is pre-configured into a set of resource images to form a collection of dynamic effect resources for various display modes. All the sets of resource images in each collection of dynamic effect resources are associated with speed information, and each set of resource images includes all the frame images of the preset dynamic effect corresponding to the speed information. All the frame images together form the dynamic effect of the preset dynamic effect, and the complete dynamic effect can be presented by playing all the frame images.
[0030] In step S210, if the interface switches to a preset display mode, obtain the current driving speed of the vehicle and the collection of dynamic effect resources in this display mode to perform dynamic effect display in this display mode and at this driving speed.
[0031] Exemplarily, each set of resource images in the collection of dynamic effect resources is associated with speed information. This speed information can be a speed point value, that is, one speed value corresponds to one set of resource images, or it can be a speed interval value, that is, one speed interval corresponds to one set of resource images. For example, in the track mode, the speed information is divided into a low-speed interval, a medium-speed interval, and a high-speed interval, then the corresponding dynamic effect resource images include three sets of resource images, which are respectively associated with the low-speed interval, the medium-speed interval, and the high-speed interval.
[0032] In step S220, match the driving speed with the speed information associated with each set of resource images in the collection of dynamic effect resources to determine the target set of resource images.
[0033] Exemplarily, if the driving speed falls within the medium-speed range, the target resource map suite is the resource map suite corresponding to the medium-speed range.
[0034] In step S230, the dynamic effect playback parameters of the target resource map suite are determined according to the driving speed. If the speed information associated with each set of resource maps is a speed point value, the dynamic effect playback parameters are different for different resource map suites. If the speed information associated with each set of resource maps is a speed range value, even for the same resource map suite, the dynamic effect playback parameters will also be different for different driving speeds.
[0035] In step S240, according to the frame rate and the frame interval time, all the frame pictures in the target resource map suite are played in a loop. That is, after all the frame pictures complete one round of playback, if the resource map suite is not switched, the next round of playback continues, so as to continuously present a visual dynamic effect.
[0036] In this embodiment, an animation effect is generated by playing the sequence frame pictures of a preset dynamic effect to implement the dynamic effect display, which reduces the complexity of the dynamic effect display. Moreover, based on the dynamic vehicle speed parameters, different dynamic effect styles and corresponding dynamic effect playback parameters are determined, enabling the user to feel the visual feedback in different speed scenarios. While enhancing the visual effect, the resource consumption during the dynamic effect display is effectively reduced.
[0037] In one embodiment, the configuration method of the dynamic effect resource set includes: obtaining the preset dynamic effects, the display frame rate of the interface, and the display resolution of the interface under different speed information. The dynamic effect elements and the element change speeds corresponding to the preset dynamic effects under different speed information are different; playing each preset dynamic effect, and intercepting multiple static pictures according to the display frame rate and the display resolution; integrating the multiple static pictures corresponding to each preset dynamic effect into a resource map suite according to the interception order; associating each resource map suite with the corresponding speed information to obtain the dynamic effect resource set.
[0038] Please refer to Figures 3 - 5 , where Figure 3 is a low-speed visual map of a track mode background dynamic effect shown in an exemplary embodiment of the present application, Figure 4 is a medium-speed visual map of a track mode background dynamic effect shown in an exemplary embodiment of the present application, Figure 5 is a high-speed visual map of a track mode background dynamic effect shown in an exemplary embodiment of the present application. As Figures 3 - 5 shown, it presents the visual maps of the preset dynamic effects at a specific time point under different speed information. The dynamic effect elements corresponding to the preset dynamic effects under different speed information are different, and moreover, the speeds of element changes are also different, and the speed of element change is proportional to the driving speed of the vehicle, adapting to the speed of the vehicle to change accordingly.
[0039] Taking Figures 3 - 5 the dynamic effect visual diagram as an example, if it is implemented by using a 3D model plus textures as specific dynamic objects and then adding dynamic movement trajectories to the specific dynamic objects, then, to achieve the dynamic effect in Figure 3 , two model source files and two texture images are required for the semi-circles on both sides, and six semi-circles need to be generated for display. For the rays on both sides, one ray model source file and the corresponding texture image are required, and a total of twelve rays on both sides need to be generated for display. For the lane line effects on both sides of the lane, one model source file and one texture image are also required to generate two lane line effects. Finally, four model source files and four texture maps are required, and the actual models generated are twenty model objects. Similarly, to achieve the dynamic effect in Figure 4 and Figure 5 , a large number of model source files and texture maps are also required, and a large number of model objects are generated. From the perspective of display, a high model can make the corresponding model display more clearly, otherwise there will be a jagged effect. For the display effect, a series of post-processing of the model data is also required to display it on the screen, which undoubtedly increases the dynamic effect development cycle, GPU computing power, and memory occupancy.
[0040] Therefore, in this embodiment, in order to achieve dynamic effect display by playing a sequence of frame pictures, for the preset dynamic effects under different speed information, the sequence of frame pictures in the entire animation is intercepted and integrated into a resource map suite. In this way, regardless of the complexity of the dynamic effect, the entire dynamic effect only corresponds to a resource map suite containing multiple static pictures, without storing the model source files of various dynamic effect elements and the corresponding texture images, reducing the number of files and the memory occupancy.
[0041] In addition, in this embodiment, during the playback of each preset dynamic effect, multiple static pictures are intercepted according to the display frame rate and display resolution. Among them, the display frame rate determines the number of static pictures, that is, the number of static pictures is equal to the display frame rate, and the display resolution determines the size of the static pictures, that is, the size of the static pictures is equal to the display resolution. For example, if the display frame rate of the interface is 60 frames per second, then 60 static pictures are intercepted based on the same time interval to match the display frame rate of the interface. If the display resolution is 1920×720, then the size of the static pictures is 1920×720, and the pictures can be directly displayed on the interface.
[0042] In a possible embodiment, in the configuration of the dynamic effect resource set, the dynamic effect resource is used as the parent node, and the nodes of the sub-project are dynamically loaded through the URL (Uniform Resource Locator) address, that is, the resource map suites under different speed information, and the driving speed of the data layer is bound at the parent node to receive the driving speed from the data layer for dynamic effect rendering.
[0043] Exemplarily, if the speed information has three levels: high, medium, and low, then render nodes for high, medium, and low speeds are respectively created under the parent node, and each render node corresponds to a set of resource maps.
[0044] In one embodiment, determining the dynamic effect playback parameters of the target resource map suite according to the driving speed includes: matching a target frame rate calculation strategy from a plurality of preset frame rate calculation strategies according to the driving speed, and each calculation strategy in the plurality of frame rate calculation strategies is associated with speed information; calculating the frame rate according to the driving speed and the target frame rate calculation strategy, where the frame rate is directly proportional to the driving speed, and calculating the reciprocal of the frame rate to obtain the frame interval time, thereby obtaining the dynamic effect playback parameters.
[0045] In this embodiment, the driving speed is matched with the speed information associated with each calculation strategy in the plurality of frame rate calculation strategies to determine the target frame rate calculation strategy, then the driving speed is substituted into the target frame rate calculation strategy to calculate the frame rate, and then the frame interval time is determined according to the frame rate.
[0046] In this embodiment, in order to improve the visual effect of the dynamic effect, different calculation strategies are set for the frame rates under different speed information, so that the frame rate and the frame interval parameters are adapted to the dynamic change of the driving speed, and the greater the speed, the greater the frame rate and the shorter the frame interval time, enhancing the visual experience brought by the dynamic effect.
[0047] In a possible embodiment, calculating the frame rate according to the driving speed and the target frame rate calculation strategy includes: calculating the difference between a preset first speed parameter and the driving speed, denoted as the first speed difference; calculating the ratio of a preset first proportionality coefficient to the first speed difference to obtain the frame rate.
[0048] Wherein, the first proportionality coefficient is a value calibrated through experiments or experience, used to ensure that the calculated frame rate is within a reasonable range; the first speed parameter is a speed reference value set according to the speed information.
[0049] As a possible embodiment, the first proportionality coefficient is a fixed constant, such as 600, that is, the proportionality coefficient is the same in various frame rate calculation strategies; while the first speed parameter is a dynamic parameter, that is, the first speed parameter is different in various frame rate calculation strategies. Moreover, if the speed information is a speed point value, that is, one speed value corresponds to one frame rate calculation strategy, at this time, when switching from a smaller speed to a larger speed, the first speed difference between the first speed parameter and the driving speed shows a decreasing trend, that is, as the driving speed increases, the frame rate also increases; if the speed information is a speed interval value, that is, one speed interval corresponds to one frame rate calculation strategy, at this time, if the fluctuation of the driving speed is within a speed interval, then as the driving speed increases, the first speed difference between the first speed parameter and the driving speed shows a decreasing trend, that is, the frame rate increases.
[0050] Exemplarily, if the speed information is a speed point value, the frame rate calculation strategy is: Formula (1) Wherein, represents the frame rate, represents the preset first proportionality coefficient, represents the preset first speed parameter, represents the driving speed.
[0051] For example, take 600, if the speed point value is 90 km / h, take 110, then the frame rate is 30 frames per second, if the speed point value is 100 km / h, take 115, then the frame rate is 40 frames per second.
[0052] Exemplarily, if the speed information is a speed interval value, and the speed information is divided into a low-speed interval, a medium-speed interval, and a high-speed interval, the frame rate calculation strategy associated with the low-speed interval is: Formula (2) Wherein, represents the frame rate at low speed, represents the preset first proportionality coefficient, represents the preset first speed parameter at low speed, represents the driving speed in the low-speed interval.
[0053] The frame rate calculation strategy associated with the medium-speed interval is: Formula (3) Wherein, represents the frame rate at medium speed, represents the preset first proportionality coefficient, represents the preset first speed parameter at medium speed, Indicates the driving speed in the medium-speed range.
[0054] The frame rate calculation strategy associated with the high-speed range is: Formula (4) Wherein, Indicates the frame rate at high speed, Indicates a preset first proportionality coefficient, Indicates the first speed parameter preset at low speed, Indicates the driving speed when in the high-speed range.
[0055] In this exemplary embodiment, , , Are set according to the upper limit values of the low-speed range, medium-speed range, and high-speed range respectively. If the low-speed range is (0, 80] km / h, the medium-speed range is (80, 120] km / h, and the high speed is (120, maximum speed] km / h, then > 80, > 120, > maximum speed. For example, The value is 136. In each speed range, as the driving speed increases, the frame rate also increases.
[0056] In a possible embodiment, in different speed ranges, as the driving speed increases, the frame rate shows a continuous increasing trend, that is, the minimum frame rate in the medium-speed range is greater than the maximum frame rate in the low-speed range, and the minimum frame rate in the high-speed range is greater than the maximum frame rate in the medium-speed range, so as to enhance the visual experience brought by the dynamic effect.
[0057] Exemplarily, the calculation formula for the frame interval time is: Formula (5) Wherein, Indicates the frame interval time, Indicates the frame rate.
[0058] In a possible embodiment, after determining the target frame rate calculation strategy, it further includes: performing a strategy check on the speed information corresponding to the target frame rate calculation strategy and the driving speed to ensure the reliability of the frame rate calculation.
[0059] In a possible embodiment, the dynamic effect resources are used as the parent node, and the nodes of the sub-projects under it include the nodes of multiple sets of resource map suites, and the corresponding frame rate calculation strategies are added to each sub-project node.
[0060] In one embodiment, determining the animation playback parameters of the target resource map suite according to the driving speed further includes: matching a target transparency calculation strategy from a plurality of preset transparency calculation strategies, where each calculation strategy in the plurality of transparency calculation strategies is associated with speed information; calculating a first transparency of the target resource map suite according to the driving speed and the target transparency calculation strategy, and the animation playback parameters further include the first transparency, and the first transparency is directly proportional to the driving speed.
[0061] In this embodiment, the transparency is between 0 and 1, where 0 represents completely transparent (i.e., the animation is completely invisible), and 1 represents completely opaque (i.e., the animation is completely visible).
[0062] In this embodiment, in order to further enhance the visual effect of the animation, the transparency change effect in the animation display is considered, and different calculation strategies are set for the transparency under different speed information, so that the transparency of the animation adapts to the dynamic change of the driving speed, and the greater the speed, the greater the transparency, and the more obvious the animation, enhancing the visual experience brought by the animation.
[0063] In a possible embodiment, if the speed information is a speed point value, calculating the first transparency of the target resource map suite according to the driving speed and the target transparency calculation strategy includes: calculating the ratio of the driving speed to a preset second proportionality coefficient to obtain an initial transparency value; selecting the smaller transparency value from the initial transparency value and the maximum transparency value as the first transparency.
[0064] As a possible embodiment, if the speed information is a speed point value, one speed value corresponds to one transparency calculation strategy. Among various transparency calculation strategies, the second proportionality coefficient can be different, but when switching from a lower speed to a higher speed, it is necessary to ensure that the calculated transparency is directly proportional to the driving speed. At the same time, the maximum value of the first transparency is 1, and when the first transparency reaches 1, the first transparency no longer changes with the change of the driving speed.
[0065] Exemplarily, when the speed information is a speed point value, the transparency calculation strategy is: Formula (6) Wherein, represents the first transparency, represents the driving speed, represents the preset second proportionality coefficient.
[0066] For example, if the speed point value is 80 km / h, taking 160, the first transparency is 0.5. If the speed point value is 120 km / h, taking 150, the first transparency is 0.8.
[0067] In a possible embodiment, if the speed information is a speed interval value, according to the driving speed and the target transparency calculation strategy, calculating the first transparency of the target resource map suite includes: calculating the difference between the driving speed and a preset second speed parameter, denoted as the second speed difference; calculating the product of the second speed difference and a preset transparency gradient to obtain an initial transparency value; and selecting the smaller value between the initial transparency value and the maximum transparency value as the first transparency.
[0068] Wherein, the second speed parameter is a speed reference value set according to the speed information.
[0069] Exemplarily, if the speed information is a speed interval value, and the speed information is divided into a low-speed interval, a medium-speed interval, and a high-speed interval, the transparency calculation strategy associated with the low-speed interval is: Formula (7) Wherein, represents the first transparency at low speed, represents the preset second speed parameter at low speed, represents the driving speed within the low-speed interval.
[0070] The transparency calculation strategy associated with the medium-speed interval is: Formula (8) Wherein, represents the first transparency at medium speed, represents the preset second speed parameter at medium speed, represents the driving speed within the medium-speed interval.
[0071] The transparency calculation strategy associated with the high-speed interval is: Formula (9) Wherein, represents the first transparency at high speed, represents the calculation parameter of the preset second speed parameter at medium speed, represents the driving speed within the high-speed interval.
[0072] In this exemplary embodiment, , , are respectively set according to the lower limit values of the low-speed interval, the medium-speed interval, and the high-speed interval. If the low-speed interval is (0, 80] km / h, the medium-speed interval is (80, 120] km / h, and the high speed is (120, maximum speed] km / h, then = 0, = 80, = 120. In each speed range, as the driving speed increases, the transparency also increases. However, the maximum value of the first transparency is 1, and when the first transparency reaches 1, it no longer changes with the driving speed. Additionally, 0.05 in formulas (7), (8), and (9) is a preset transparency gradient, and this value can be set according to requirements, such as set to 0.1, 0.2, etc.
[0073] In a possible embodiment, after determining the target transparency calculation strategy, it further includes: performing a strategy verification on the speed information corresponding to the target transparency calculation strategy and the driving speed to ensure the reliability of transparency calculation.
[0074] In a possible embodiment, the animation effect resources serve as the parent node, and the nodes of the sub-projects under it include the nodes of multiple sets of resource map suites. The corresponding transparency calculation strategies are added to each sub-project node.
[0075] In an embodiment, according to the animation effect playing parameters, all the frame pictures in the target resource map suite are looped and played, including: integrating all the frame pictures into one resource picture according to the frame sequence; performing a modulo operation on the real-time cumulative playing duration, frame rate, and the total number of frames of the target resource map suite to determine the current frame index; extracting the texture data of the current frame from the resource picture according to the current frame index, and processing the texture data according to the first transparency to obtain the target texture data of the current frame; rendering the target texture data of the current frame onto the interface, and continuously updating the target texture data of the current frame with the target texture data of the next frame based on the frame interval time to complete the looped playing of all the frame pictures.
[0076] In this embodiment, considering that when loop-playing all the frame pictures, it is necessary to continuously load the frame pictures and continuously perform texture conversion, which not only increases the GPU computing power and memory occupancy, but may also affect the animation effect display. Therefore, integrating all the frame pictures into one resource picture facilitates the management of animation effect resources. Moreover, when the animation effect is displayed, only one picture is loaded and one texture conversion is performed, and then the texture data at different positions is directly extracted to achieve the display of all the frames, reducing the complexity and resource consumption of the animation effect display.
[0077] Exemplarily, the calculation formula for the current frame index (i.e., the current frame serial number) is: Formula (10) Where represents the current frame index, represents the frame rate represents the cumulative playing duration, represents the total number of frames.
[0078] In one embodiment, extracting the texture data of the current frame from the resource picture according to the current frame index includes: calculating the texture scaling ratio by calculating the preset single-frame size and the total size of the resource picture, and calculating the number of horizontal frames of the resource picture by calculating the preset single-frame width and the total width of the resource picture; determining the vertical texture offset of the current frame in the resource picture according to the current frame index, the number of horizontal frames, the total height of the resource picture, and the preset single-frame height, and determining the horizontal texture offset of the current frame in the resource picture according to the current frame index, the number of horizontal frames, the total width, and the single-frame width; determining the position coordinates of the texture data of the current frame in the resource picture according to the texture scaling ratio, the vertical texture offset, and the horizontal texture offset; and extracting the texture data of the current frame from the resource picture according to the position coordinates.
[0079] In this embodiment, first, according to the current frame index, the number of horizontal frames, and the width and height relationships between the single-frame picture and the resource picture, the horizontal and vertical texture offsets of the texture data of the current frame in the resource picture are determined. Then, combined with the texture scaling ratio of the current frame relative to the resource picture, the position coordinates of the texture data of the current frame in the resource picture are determined, realizing the precise positioning of the texture data of the current frame in the resource picture and ensuring the display effect of the animation.
[0080] Exemplarily, the calculation formula for the texture scaling ratio of the current frame relative to the resource picture is: Formula (11) Wherein, represents the texture scaling ratio, represents the single-frame size, represents the total size of the resource picture.
[0081] Exemplarily, the calculation formula for the number of horizontal frames of the resource picture is: Formula (12) Wherein, represents the number of horizontal frames, represents the total width of the resource picture, represents the single-frame width.
[0082] Exemplarily, the calculation formula for the vertical texture offset of the current frame in the resource picture is: Formula (13) Wherein, represents the vertical texture offset, represents the current frame index, represents the number of horizontal frames, represents the single-frame height, represents the total height of the resource picture.
[0083] Exemplarily, the calculation formula for the horizontal texture offset of the current frame in the resource picture is: Formula (14) where represents the horizontal texture offset, represents the current frame index, represents the number of horizontal frames, represents the width of a single frame, represents the total width of the resource picture.
[0084] Exemplarily, the calculation formula for the position coordinates of the texture data of the current frame in the resource picture is: Formula (15) where represents the position coordinates of the current frame, represents the global coordinates of the resource picture, represents the texture scaling ratio, represents the texture offset, including the horizontal texture offset and the vertical texture offset.
[0085] In a possible embodiment, after determining the position coordinates of the texture data of the current frame in the resource picture, it further includes: according to a preset coordinate transformation matrix, converting the position coordinates of the texture data of the current frame in the resource picture into coordinates in the interface coordinate system, so as to achieve precise mapping and display of the current frame on the interface.
[0086] In a possible embodiment, considering that the playback speed of all frame pictures is dynamically adjusted according to the driving speed, and the timer in the C++ code cannot meet this requirement because the timer cannot dynamically switch the interval time, and if the valid value range of the driving speed is 0 - 270 km / h, if this effect is to be achieved, 270 timers need to be created and run simultaneously, which seriously wastes the CPU (Central Processing Unit) computing power. Therefore, the shader of OpenGL (Open Graphics Library) is used to implement the dynamic effect display.
[0087] Please refer to Figure 6 , Figure 6 which is a processing flow chart of a vertex shader shown in an exemplary embodiment of the present application. As Figure 6 shown, the inputs of the vertex shader include picture parameters (single frame size, total size of the resource picture, global coordinates of the resource picture, total number of frames of the resource picture), time parameters (cumulative playback duration), dynamic effect playback parameters (frame rate), and coordinate transformation parameters (coordinate transformation matrix). The processing flow of the vertex shader is as follows: Step S610: Calculate the single-frame size and the total size of the resource image to obtain the texture scaling ratio; Step S620: Calculate the single-frame width and the total width of the resource image to obtain the number of horizontal frames of the resource image; Step S630: Perform a modulo operation on the cumulative playback duration, frame rate, and total number of frames to determine the current frame index; Step S640: Determine the vertical texture offset of the current frame in the resource image according to the current frame index, number of horizontal frames, total height of the resource image, and single-frame height, and determine the horizontal texture offset of the current frame in the resource image according to the current frame index, number of horizontal frames, total width of the resource image, and single-frame width; Step S650: Calculate the position coordinates of the texture data of the current frame in the resource image according to the global coordinates of the resource image, texture scaling ratio, vertical texture offset, and horizontal texture offset; Step S660: Convert the position coordinates of the texture data of the current frame in the resource image to the coordinates in the interface coordinate system according to the coordinate transformation matrix and output.
[0088] Please refer to Figure 7 , Figure 7 which is a processing flow chart of a fragment shader shown in an exemplary embodiment of the present application. As Figure 7 shown, the inputs of the fragment shader include the position coordinates of the texture data of the current frame in the resource image and the transparency of the current frame. The processing flow of the fragment shader is as follows: Step S710: Sample the texture color according to the position coordinates of the texture data of the current frame in the resource image; Step S720: Process the texture color according to the transparency to obtain the target texture color of the current frame and output.
[0089] In one embodiment, after the animation effect is displayed, it further includes: if the change in the driving speed causes the target resource map suite to change, then match the new target resource map suite from the animation effect resource set according to the changed driving speed, and determine the second transparency of the new target resource map suite and the third transparency of the previous target resource map suite according to the changed driving speed; loop through all the frame images in the new target resource map suite according to the second transparency, and fade out the previous target resource map suite according to the third transparency to complete the switching between the new target resource map suite and the previous target resource map suite.
[0090] Among them, the new target resource map suite and the previous target resource map suite correspond to consecutive speed intervals or adjacent speed values, including switching from a resource map suite with a larger speed to a resource map suite with a smaller speed, and switching from a resource map suite with a smaller speed to a resource map suite with a larger speed.
[0091] In this embodiment, in order to further enhance the visual effect brought by the animation effect, when switching between different resource map suites, through transparency settings, that is, by fading in and out to switch between resource map suites, sudden visual jumps are avoided, providing a smoother visual experience.
[0092] In addition, in this embodiment, the second transparency of the new target resource map suite can be calculated using one of the formulas (6), (7), (8), and (9) according to the changed driving speed.
[0093] In a possible embodiment, the calculation formula for the third transparency of the previous target resource map suite includes: calculating the difference between the driving speed and the preset third speed parameter, denoted as the third speed difference; calculating the product of the third speed difference and the preset transparency gradient to obtain the transparency reduction amount; calculating the difference between the maximum transparency value and the transparency reduction amount to obtain the third transparency.
[0094] Among them, the third speed parameter is the speed reference value set according to the speed information.
[0095] Exemplarily, the calculation formula for the third transparency of the previous target resource map suite is: Formula (16) Among them, represents the third transparency of the previous target resource map suite, represents the current driving speed, represents the third speed parameter.
[0096] In this exemplary embodiment, if the speed information is divided into a low-speed range, a medium-speed range, and a high-speed range, they are set according to the lower limit values of the low-speed range, the medium-speed range, and the high-speed range respectively. If the low-speed range is (0, 80] km / h, the medium-speed range is (80, 120] km / h, and the high-speed range is (120, maximum speed] km / h, then 0, 80, and 120 are taken respectively. In addition, 0.05 in formula (16) is the preset transparency gradient, and this value can be set according to requirements, for example, set to 0.1, 0.2, etc.
[0097] In a possible embodiment, the animation resources are used as the parent node, and the nodes of its sub-projects below include the nodes of multiple sets of resource map suites. A sequence frame brush is added to each sub-project node, and parameters such as the total size of the resource picture, the frame index, the frame interval time, the total number of frames of the resource picture, and the single-frame size are configured as the input parameters of the shader.
[0098] In a possible embodiment, the animation effect resources serve as the parent node, and the nodes of the sub-projects below it include the nodes of multiple sets of resource map suites. Corresponding transparency calculation strategies for when cutting in and when cutting out are added to each sub-project node.
[0099] In an embodiment, the configuration method of the animation effect resource set further includes: extracting the same elements in the preset animation effects under different speed information, where the same elements are static elements; integrating the same elements into a shared resource map suite, and integrating the different elements in the preset animation effects under different speed information into exclusive resource map suites respectively; associating the shared resource map suite with the global speed information, and associating the exclusive resource map suites with the corresponding speed information to obtain the animation effect resource set, so as to always keep the shared resource map suite displayed on the interface when the animation effect is displayed.
[0100] In this embodiment, considering that when the animation effect is complex, the loading and texture conversion of the integrated resource pictures take a long time. Therefore, the same static elements in the preset animation effects under different speed information are extracted and integrated into a shared resource map suite, and the global speed information is associated, so that the shared resource map suite can be obtained by matching at any driving speed. The different elements in each preset animation effect are integrated into exclusive resource map suites and associated with the corresponding speed information to match the corresponding exclusive resource map suite at a specific driving speed. In this way, the shared resource map suite only needs to be loaded once and can be used in all speed states, and the shared resource map suite can always be kept displayed on the interface. During the animation effect display or animation effect switching process, only the exclusive resource map suite with reduced elements needs to be loaded, which reduces the GPU computing power and improves the efficiency of the animation effect display.
[0101] In a possible embodiment, the animation effect resources serve as the parent node, and the nodes of the sub-projects below it include the node of a shared resource map suite and the nodes of multiple sets of exclusive resource map suites.
[0102] In the above-mentioned dynamic effect display method, first, when the interface switches to a preset display mode, the driving speed of the vehicle and the set of dynamic effect resources in this display mode are obtained. There are multiple sets of resource images in the set of dynamic effect resources. Each set of resource images is associated with speed information and includes all the frame images of the preset dynamic effect under the corresponding speed information. Then, the target set of resource images is matched from the set of dynamic effect resources according to the driving speed. Next, the dynamic effect playback parameters of the target set of resource images are determined according to the driving speed. The dynamic effect playback parameters include the frame rate and the frame interval time. Finally, according to the dynamic effect playback parameters, all the frame images in the target set of resource images are played in a loop to perform dynamic effect display, generating an animation effect by playing the sequence of frame images of the preset dynamic effect, realizing dynamic effect display, reducing the complexity of dynamic effect display, and moreover, based on the dynamic vehicle speed parameter, different dynamic effect styles and corresponding dynamic effect playback parameters are determined, enabling the user to feel the visual feedback in different speed scenarios, effectively reducing the resource consumption during the dynamic effect display while enhancing the visual effect.
[0103] Please refer to Figure 8 , Figure 8 which is a block diagram of a dynamic effect display system shown in an exemplary embodiment of the present application. This system can be applied to Figure 1 the implementation environment shown. It should be understood that this system can also be applicable to other exemplary implementation environments, and this embodiment does not limit the implementation environment applicable to this system.
[0104] As Figure 8 shown, in an exemplary embodiment, the dynamic effect display system 800 at least includes an acquisition module 810, a matching module 820, a calculation module 830, and a display module 840, which are introduced in detail as follows: The acquisition module 810 is configured to, if the interface switches to a preset display mode, obtain the driving speed of the vehicle and the set of dynamic effect resources in the display mode. Each set of resource images in the set of dynamic effect resources is associated with speed information, and each set of resource images includes all the frame images of the preset dynamic effect under the corresponding speed information; The matching module 820 is configured to match the target set of resource images from the set of dynamic effect resources according to the driving speed; The calculation module 830 is configured to determine the dynamic effect playback parameters of the target set of resource images according to the driving speed. The dynamic effect playback parameters include the frame rate and the frame interval time; The display module 840 is configured to, according to the dynamic effect playback parameters, play all the frame images in the target set of resource images in a loop to perform dynamic effect display.
[0105] It should be noted that the dynamic effect display system provided in the above embodiment and the dynamic effect display method provided in the above embodiment belong to the same concept. The content of the operations performed by each module has been described in detail in the method embodiment, and will not be repeated here.
[0106] Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of a vehicle-mounted terminal provided by an embodiment of the present application. Figure 9 It shows a schematic structural diagram of a computer system of a vehicle-mounted terminal suitable for implementing the embodiments of the present application. It should be noted that Figure 9 the computer system 900 of the vehicle-mounted terminal shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0107] As Figure 9 shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage section 908 into the random access memory (RAM) 903, such as executing the method in the above embodiments. In the RAM 903, various programs and data required for system operation are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other through a bus 904. The input / output (I / O) interface 905 is also connected to the bus 904.
[0108] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as required. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as required so that the computer program read from it can be installed into the storage section 908 as required.
[0109] In particular, according to an embodiment of the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 909, and / or installed from the removable medium 911. When the computer program is executed by the CPU 901, various functions defined in the system of the present application are executed.
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for executing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0111] The units involved in the embodiments described in the present application can be implemented in software or in hardware, and the described units can also be provided in the processor. Among them, the names of these units do not constitute a limitation to the unit itself in some cases.
[0112] The above embodiments are only used to exemplarily illustrate the principles and effects of the present application, rather than to limit the present application. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed in the present application should still be covered by the claims of the present application.
Claims
1. A method for displaying a dynamic effect, characterized in that: The method comprises: If the interface is switched to a preset display mode, the vehicle's driving speed and the set of dynamic effect resources in the display mode are obtained, each set of resource graphs in the dynamic effect resource set is associated with speed information, and each set of resource graphs includes all frame images of the preset dynamic effect under the corresponding speed information; Matching a target resource graph suite from the animation resource set according to the driving speed; Determine the dynamic effect playback parameters of the target resource map suite according to the driving speed, wherein the dynamic effect playback parameters include a frame rate and a frame interval time; According to the motion effect playback parameters, all frame images in the target resource image suite are played in a loop to display the motion effect.
2. The method for displaying dynamic effects according to claim 1, characterized in that: The configuration method of the animation resource set includes: Obtaining preset motion effects, display frame rates of interfaces, and display resolutions of interfaces under different speed information, wherein the preset motion effects under different speed information correspond to different motion effect elements and element change speeds; Play each preset motion effect, and capture multiple static pictures according to the display frame rate and the display resolution; Integrate the multiple static images corresponding to each preset motion effect into a resource image suite according to the capture order; Each resource graph suite is associated with corresponding speed information to obtain the animation resource set.
3. The method for displaying dynamic effects according to claim 1, characterized in that: The step of determining the dynamic effect playback parameters of the target resource map suite according to the driving speed includes: According to the driving speed, matching a target frame rate calculation strategy from a plurality of preset frame rate calculation strategies, each of the plurality of frame rate calculation strategies being associated with speed information; According to the driving speed and the target frame rate calculation strategy, the frame rate is calculated, the frame rate is proportional to the driving speed, and the inverse of the frame rate is calculated to obtain the frame interval time, thereby obtaining the motion effect playback parameters.
4. The method for displaying dynamic effects according to claim 1, characterized in that: The step of determining the dynamic effect playback parameters of the target resource map suite according to the driving speed further includes: According to the driving speed, matching a target transparency calculation strategy from a plurality of preset transparency calculation strategies, each of the plurality of transparency calculation strategies being associated with speed information; According to the driving speed and the target transparency calculation strategy, the first transparency of the target resource map suite is calculated, and the animation playback parameters also include the first transparency, and the first transparency is proportional to the driving speed.
5. The method for displaying dynamic effects according to claim 4, characterized in that: The looping of all frame images in the target resource image suite according to the animation playback parameter includes: Integrate all the frame pictures into one resource picture according to the frame sequence; Performing a modulo operation on the real-time cumulative playback time of the target resource map suite, the frame rate, and the total number of frames of the target resource map suite to determine a current frame index; Extracting texture data of the current frame from the resource picture according to the current frame index, and processing the texture data according to the first transparency to obtain target texture data of the current frame; The target texture data of the current frame is rendered onto the interface, and based on the frame interval time, the target texture data of the next frame is continuously used to update the target texture data of the current frame, thereby completing the loop playback of all the frame images.
6. The method for displaying dynamic effects according to claim 5, characterized in that: The extracting the texture data of the current frame from the resource picture according to the current frame index includes: Calculating a preset single frame size and a total size of the resource image to obtain a texture scaling ratio, and calculating a preset single frame width and a total width of the resource image to obtain a horizontal frame number of the resource image; Determine the longitudinal texture offset of the current frame in the resource picture according to the current frame index, the horizontal number of frames, the total height of the resource picture, and the preset single frame height, and determine the horizontal texture offset of the current frame in the resource picture according to the current frame index, the horizontal number of frames, the total width, and the single frame width; Determine the position coordinates of the texture data of the current frame in the resource picture according to the texture scaling ratio, the longitudinal texture offset and the transverse texture offset; The texture data of the current frame is extracted from the resource image according to the position coordinates.
7. The method for displaying dynamic effects according to any one of claims 1 to 6, characterized in that: After the dynamic effect display is performed, the method further includes: If the change in the driving speed causes the target resource map suite to change, a new target resource map suite is matched from the animation resource set according to the changed driving speed, and the second transparency of the new target resource map suite and the third transparency of the previous target resource map suite are determined according to the changed driving speed; According to the second transparency, all frame images in the new target resource map suite are played in a loop, and according to the third transparency, the previous target resource map suite is faded to complete the switching between the new target resource map suite and the previous target resource map suite.
8. The method for displaying dynamic effects according to claim 7, characterized in that: The configuration method of the animation resource set also includes: Extracting the same elements in the preset motion effects under different speed information, wherein the same elements are static elements; Integrate the same elements into a shared resource map suite, and integrate the different elements in the preset motion effects under different speed information into exclusive resource map suites respectively; The shared resource map suite is associated with the global speed information, and the exclusive resource map suite is associated with the corresponding speed information to obtain the dynamic effect resource set, so as to always keep the shared resource map suite displayed on the interface when the dynamic effect is displayed.
9. A dynamic effect display system, characterized in that: The system comprises: An acquisition module, for acquiring the vehicle's driving speed and a set of dynamic effect resources in the display mode if the interface is switched to a preset display mode, wherein each set of resource graphs in the dynamic effect resource set is associated with speed information, and each set of resource graphs includes all frame images of preset dynamic effects under corresponding speed information; A matching module, used for matching a target resource map kit from the animation resource set according to the driving speed; A calculation module, used to determine the dynamic effect playback parameters of the target resource map suite according to the driving speed, wherein the dynamic effect playback parameters include a frame rate and a frame interval time; The display module is used to loop and play all the frame images in the target resource image suite according to the motion effect playback parameters to display the motion effect.
10. A vehicle-mounted terminal, characterized in that: The vehicle-mounted terminal comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the vehicle-mounted terminal to implement the dynamic effect display method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Vehicle instrument interaction method and system, electronic equipment and readable storage medium
CN115107514A
Vehicle control method, vehicle and computer readable storage medium
CN116302247A
Animation playing method and device
CN118283328A
Travel Control Method and Travel Control Device for Vehicle
US20220063669A1
Image processing apparatus, display system, image processing method, and recording medium
US20230083637A1