Weather effect rendering method and device, storage medium and terminal

The image frames obtained by weather particles rendering are superimposed and repeated, which solves the problem of excessive consumption of particle systems in existing technologies, and achieves efficient weather effect rendering.

CN119359875APending Publication Date: 2025-01-24NANJING OPPO SOFTWARE TECH CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310914347.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

When simulating real weather effects, the prior art requires a large number of particle systems to cause excessive processor computing consumption and affect the system operation speed.

Method used

The image frames obtained by weather particles rendering are superimposed and reused, reducing the computing consumption of particle group rendering, and improving the rendering efficiency of the weather effect.

Benefits of technology

It effectively reduces the computational consumption of particle swarm rendering, improves the rendering efficiency of weather effects, and makes the display of weather effects smoother.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359875A_ABST
    Figure CN119359875A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a weather effect rendering method and device, a storage medium and a terminal, and relates to the technical field of image processing. A first image rendering result of a historical image frame obtained by rendering weather particles aiming at the weather effect is obtained, a first operation position of the weather particles in a target image frame is determined based on an operation track of the weather particles indicated by the weather effect, and the target image frame is a next rendering image frame adjacent to the historical image frame in the weather effect; and according to the first operation position, generating a first particle rendering result of the target image frame based on the first image rendering result, and mixing the first image rendering result and the first particle rendering result to obtain a second image rendering result of the target image frame. The image frames obtained through weather particle rendering are superposed and multiplexed, so that the operation consumption of particle swarm rendering is reduced, and the rendering efficiency of the weather effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a weather effect rendering method, device, storage medium and terminal. Background Art

[0002] In some scenes, weather effects solve the problem of lack of changes in pre-rendered animations by using real-time particle systems in preset scenes. However, simply using particle systems to simulate real weather, such as blizzards, rain, wind and sand, requires the presence of tens of thousands of particles in the scene. The movement of each particle during its lifetime requires processor calculations. Too many particles will inevitably bring additional overhead and affect the system's operating speed. Summary of the invention

[0003] The embodiments of the present application provide a weather effect rendering method, device, storage medium and terminal, which can overlay and reuse image frames obtained by weather particle rendering, reduce the computational consumption for particle group rendering, and thus improve the rendering efficiency of weather effects.

[0004] In a first aspect, an embodiment of the present application provides a weather effect rendering method, the method comprising:

[0005] Obtaining a first image rendering result of a historical image frame rendered by weather particles for a weather effect;

[0006] Determine, based on the running track of the weather particle indicated by the weather effect, a first running position of the weather particle in a target image frame, wherein the target image frame is a next rendered image frame in the weather effect that is adjacent to the historical image frame;

[0007] Generating a first particle rendering result of the target image frame according to the first running position and based on the first image rendering result;

[0008] The first image rendering result and the first particle rendering result are mixed to obtain a second image rendering result of the target image frame.

[0009] In a second aspect, an embodiment of the present application provides a weather effect rendering device, the device comprising:

[0010] A first image result obtaining unit, used to obtain a first image rendering result of a historical image frame rendered by weather particles for a weather effect;

[0011] a running position acquisition unit, configured to determine a first running position of the weather particle in a target image frame based on a running track of the weather particle indicated by the weather effect, wherein the target image frame is a next rendered image frame in the weather effect that is adjacent to the historical image frame;

[0012] a particle result acquisition unit, configured to generate a first particle rendering result of the target image frame according to the first running position and based on the first image rendering result;

[0013] The second image result acquisition unit is used to mix the first image rendering result and the first particle rendering result to obtain a second image rendering result of the target image frame.

[0014] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned method.

[0015] In a fourth aspect, an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is suitable for being loaded by the processor and executing the steps of the above-mentioned device configuration method.

[0016] In one or more embodiments of the present application, a first image rendering result of a historical image frame rendered by weather particles for a weather effect is obtained, and based on the running track of the weather particles indicated by the weather effect, a first running position of the weather particles in a target image frame is determined, and the target image frame is the next rendered image frame adjacent to the historical image frame in the weather effect, and a first particle rendering result of the target image frame is generated according to the first running position and based on the first image rendering result, and the first image rendering result and the first particle rendering result are mixed to obtain a second image rendering result of the target image frame. The image frames obtained by weather particle rendering are superimposed and reused, which reduces the computational consumption of particle group rendering, thereby improving the rendering efficiency of weather effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 An exemplary system architecture diagram of a weather effect rendering method provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a flow chart of a weather effect rendering method provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a flow chart of a weather effect rendering method provided in an embodiment of the present application;

[0021] Figure 4 An example schematic diagram of a weather particle trajectory provided in an embodiment of the present application;

[0022] Figure 5 An exemplary schematic diagram of determining a first operating position provided in an embodiment of the present application;

[0023] Figure 6 An example schematic diagram of weather effect rendering provided in an embodiment of the present application;

[0024] Figure 7 An example schematic diagram of a star trail weather effect rendering provided in an embodiment of the present application;

[0025] Figure 8 An example schematic diagram of volumetric cloud weather effect rendering provided in an embodiment of the present application;

[0026] Fig. 9 A schematic diagram of the structure of a weather effect rendering device provided in an embodiment of the present application;

[0027] Fig.10 A schematic diagram of the structure of a weather effect rendering device provided in an embodiment of the present application;

[0028] Fig.11 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the embodiments of the present application.

[0030] The weather effect rendering device can simulate the weather through the weather particle system. For example, when a user opens an application with a weather forecast function on an electronic device, the weather effect rendering device can obtain the weather type displayed by the application, and simulate and display the current weather type using weather particles according to the weather type. The weather effect rendering method provided in the embodiment of the present application can be implemented by a computer program and can be run on a weather effect rendering device based on the von Neumann system. The computer program can be integrated into the application or run as an independent tool application. The weather effect rendering device can be an electronic device such as a mobile phone, a computer, a tablet computer or a wearable device, or it can be a module in an electronic device for implementing the weather effect rendering method.

[0031] Please attend Figure 1 , Figure 1 This is an exemplary system architecture diagram of a weather effect rendering method provided in an embodiment of the present application. Figure 1 As shown, the system architecture may include a terminal 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the terminal 101 and the server 103. The network 102 may include various types of wired communication links or wireless communication links, for example, the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.

[0032] The terminal 101 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the terminal 101 can interact with the server 103 through the network 102 to receive messages or data sent by other users to the server 103. The terminal 101 can be hardware or software. When the terminal 101 is hardware, it can be various terminals, including but not limited to smart watches, smart phones, tablet computers, laptop portable computers and desktop computers. When the terminal 101 is software, it can be installed in the terminals listed above, which can be implemented as multiple software or software modules (for example: used to provide distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.

[0033] In an embodiment of the present application, terminal 101 obtains a first image rendering result of a historical image frame rendered by weather particles for a weather effect, determines a first running position of the weather particles in a target image frame based on the running trajectory of the weather particles indicated by the weather effect, and the target image frame is the next rendered image frame adjacent to the historical image frame in the weather effect. According to the first running position and based on the first image rendering result, a first particle rendering result of the target image frame is generated, and the first image rendering result and the first particle rendering result are mixed to obtain a second image rendering result of the target image frame.

[0034] The server 103 may be a business server that provides various services. It should be noted that the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or it may be implemented as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or it may be implemented as a single software or software module, which is not specifically limited here.

[0035] Alternatively, the system architecture may not include the server 103. In other words, the server 103 may be an optional device in the embodiments of this specification, that is, the method provided in the embodiments of this specification may be applied to a system structure including only the terminal 101, and the embodiments of this application do not limit this. It should be understood that Figure 1 The number of terminals, networks and servers in the figure is only for illustration and any number of terminals, networks and servers may be used according to implementation requirements.

[0036] The user can open an application with a useful weather forecast function on the electronic device, and the screen of the electronic device can display relevant content of the weather forecast, such as Figure 1 As shown, you can check that the temperature in City A is "28℃" and the weather is "cloudy", and you can even preview the weather forecast for a period of time in the future, for example, the weather will be cloudy at 13:00 and sunny at 14:00. In order to improve the weather display effect of the weather forecast, the weather effect rendering device can display the weather effects corresponding to the weather type on the interface. The weather effect rendering device can emit a group of particles. Each weather particle has its own life cycle, size, position and other motion status information. The weather particles can simulate cloud particles, raindrop particles, snowflake particles, hail particles, etc., and through the movement of weather particles, simulated weather effects such as "cloud movement" and "raindrops falling" are achieved, thereby achieving the purpose of weather particles simulating weather effects. Figure 1As shown, the current weather type in City A is "cloudy", so the weather effect rendering device can simulate the "cloudy" weather effect through weather particles, and obtain the "cloudy" image rendering result by performing image rendering on the weather particles, and display the image rendering result on the screen of the electronic device.

[0037] It can be understood that when the weather effect rendering device simulates weather effects, it does not display a motionless, static image on the electronic device screen, but continuously displays multiple frames of image rendering results to achieve the purpose of simulating weather effects. For example, when the weather type is "cloudy", what is displayed on the electronic device screen may be floating clouds and the sun behind the clouds. When the weather type is "light rain", what is displayed on the electronic device screen may be raindrops falling downwards, etc. If the weather rendering device re-emits weather particles for each frame of image rendering results displayed to keep the weather particles moving on the screen according to the motion status information, the processor of the weather rendering device will need to continuously update the calculation, and the computing resources consumed will be huge.

[0038] When a user opens an application with a weather forecast function, or when a user wants to view the weather display effect, a weather effect display instruction can be sent to the electronic device. When the weather effect rendering device receives the weather effect display instruction and needs to display the weather effect, the weather effect rendering device can add and place a new particle system. In order to create a rainy or snowy weather effect, a new particle system object can be created and placed in the sky so that its particles are emitted from the sky to the ground; then the main module properties in the particle system need to be configured, where a particle system is controlled by a series of different modules, each of which controls different aspects of the particle system. In a certain weather particle system, the first module is the main module, which is the first module to be edited. It contains the most important particle properties such as size, speed and life cycle; finally, other modules in the particle system can be configured to allow weather particles to move downward in the same direction. After determining the weather particle system, at least one weather effect can be realized in the weather particle system, wherein the weather particle system controls different weather particles for preset rendering through different rendering channels for each weather effect. Then, after rendering different weather particles, rendering textures corresponding to different weather particles will be obtained. The weather effect rendering device can obtain the rendering texture data obtained by rendering the target weather effect through each rendering channel in the weather particle system based on a preset image interface.

[0039] The weather effect rendering device can generate an initial image rendering result of an initial image frame based on the rendering texture data, and display the initial image rendering result on the display screen of the electronic device, wherein the initial image frame is the first image frame that the weather effect rendering device needs to display on the display screen after receiving the weather effect display instruction, and the initial image rendering result is the image rendering result of the initial image frame, that is, the data finally used to be displayed on the display screen. After obtaining the initial image frame and the initial image rendering result, the weather effect rendering device can move the initial image rendering effect according to the running trajectory of the weather particles to obtain the image rendering effect of the next image frame of the initial image frame, without using the weather particle system to launch weather particles again to obtain the image rendering effect of the next image frame. It can be understood that the subsequent weather effect rendering device can continue to move based on the image rendering result of the previous image frame to obtain the image rendering result of the next adjacent image frame, and the image frames obtained by weather particle rendering are superimposed and reused, thereby reducing the computational consumption of particle group rendering.

[0040] The weather effect rendering method provided by the present application is described in detail below in conjunction with specific embodiments.

[0041] See also Figure 2 , is a flow chart of a method for rendering weather effects provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps S101-S104.

[0042] S101, obtaining a first image rendering result of a historical image frame rendered by weather particles for a weather effect.

[0043] Specifically, the weather effect rendering device can obtain the first image rendering result of the historical image frame rendered by the weather particles for the weather effect, the target image frame is the image frame that the weather effect rendering device currently wants to render and display on the display screen of the electronic device, the historical image frame is the previous rendered image frame adjacent to the target image frame, that is, the rendered image frame required to refer to for generating the second image rendering result of the target image frame, and the first image rendering result is the image rendering result of the historical image frame. It can be understood that the historical image frame and the first image rendering result have been generated and displayed on the display screen, so the weather rendering device can obtain the rendering texture data on the rendering channel of the historical image frame through the image result, thereby generating the first image rendering result of the historical image frame based on the rendering texture data.

[0044] S102, determining a first running position of the weather particle in the target image frame based on the running track of the weather particle indicated by the weather effect.

[0045] Specifically, the movement of weather particles in the weather particle system forms a weather effect, and the running track of the weather particles in each weather effect is fixed, and the running tracks of the weather particles in different weather effects are also different. For example, weather particles in rainy and snowy weather can move along a straight line, and weather particles in sunny weather can move around a circle. Therefore, different weather effects correspond to different effect types, and the weather effect rendering device can determine the running track of the weather particles based on the effect type of the weather effect. Then, based on the running track of the weather particles indicated by the weather effect, the first running position of the weather particles in the target image frame is determined.

[0046] For example, the weather effect rendering device can determine the first running position reached by the weather particles on the historical image frame after moving along the running trajectory and passing the time interval based on the time interval between the target image frame and the historical image frame, using the time interval and the running trajectory. The first running position is also the position of the weather particles in the target image frame.

[0047] S103: Generate a first particle rendering result of a target image frame according to the first running position and based on the first image rendering result.

[0048] Specifically, the first running position determines the position of the weather particles on the target image frame. The weather effect rendering device can generate the first particle rendering result of the target image frame according to the first running position and the first image rendering result. The first particle rendering result is the weather particle rendering effect corresponding to the target image frame. However, it is not based on the weather system emitting weather particles for rendering, but is obtained by moving the weather particles in the historical image frame according to the running trajectory of the weather particles on the basis of the first image rendering result.

[0049] S104: Mix the first image rendering result and the first particle rendering result to obtain a second image rendering result of the target image frame.

[0050] Specifically, if the first particle rendering result is displayed directly on the display screen, the user will see that the weather particles jump directly from the position in the historical image frame to the position in the target image frame, resulting in incoherent weather effect display. Therefore, it is necessary to mix the first image rendering result and the first particle rendering result to obtain the second image rendering result of the target image, and then display the second image rendering result.

[0051] The hybrid processing can be a weighted summation of the image rendering results and the particle rendering results based on the image rendering weight and the particle rendering weight, wherein the sum of the image rendering weight and the particle rendering weight is 1, which can be the initial setting of the weather effect rendering device, or can be set by the user or relevant staff. For example, the weather effect rendering device can use the product of the image rendering weight and the first image rendering result, plus the product of the particle rendering weight and the first particle rendering result, to obtain the second image rendering result of the target image, so that in addition to displaying the first particle rendering result, the second image rendering result can also display the first image rendering result with a lower grayscale, thereby producing a trailing visual effect during the movement of the weather particles, thereby improving the smoothness of the weather effect display.

[0052] In an embodiment of the present application, a first image rendering result of a historical image frame rendered by weather particles for a weather effect is obtained, and based on the running track of the weather particles indicated by the weather effect, a first running position of the weather particles in a target image frame is determined, and the target image frame is the next rendered image frame adjacent to the historical image frame in the weather effect, and a first particle rendering result of the target image frame is generated according to the first running position and based on the first image rendering result, and the first image rendering result and the first particle rendering result are mixed to obtain a second image rendering result of the target image frame. The image frames obtained by weather particle rendering are superimposed and reused, which reduces the computational consumption for particle group rendering, thereby improving the rendering efficiency of weather effects.

[0053] See also Figure 3 , is a flow chart of a method for rendering weather effects provided in an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps S201-S208.

[0054] S201, obtaining the effect type of the weather effect, and determining the running track of the weather particles based on the effect type.

[0055] Specifically, the movement of weather particles in the weather particle system forms a weather effect, and the running track of the weather particles in each weather effect is fixed, and the running tracks of the weather particles in different weather effects are also different. For example, weather particles in rainy and snowy weather can move along a straight line, and weather particles in sunny weather can move around a circle. Therefore, different weather effects correspond to different effect types, and the weather effect rendering device can determine the running track of the weather particles based on the effect type of the weather effect. Among them, the running track can be a straight line, a circle, and a preset path. The running track is related to the weather effect, and can be the initial setting of the weather effect rendering device, or it can be set by the user or relevant staff.

[0056] Please also see Figure 4 , provides an example schematic diagram of the trajectory of weather particles in the embodiment of the present application. It can be understood that different weather effects have different effect types. For example, the effect type of rainy weather is to simulate raindrops falling, and the effect type of thunder and lightning weather is to simulate lightning striking from the sky. Therefore, weather particles in different effect types can have the same or different trajectory. Figure 4 As shown, the effect type of rainy weather needs to simulate raindrops falling, so the trajectory of the weather particles corresponding to the effect type of rainy weather can be moving diagonally downward, so that the rendering result of falling raindrops can be achieved on the display screen. The effect type of thunder and lightning weather needs to simulate lightning striking from the sky, so the trajectory of the weather particles corresponding to the effect type of thunder and lightning weather can be moving downward in a broken line, so that the rendering result of lightning zigzagging downward can be achieved on the display screen. It can be understood that the trajectory of the weather particles corresponding to the effect type of rainy weather is different from the trajectory of the weather particles corresponding to the effect type of thunder and lightning weather, but for example, the effect type of snowy weather needs to simulate snowflakes falling, so the trajectory of the weather particles corresponding to the effect type of snowy weather can also be moving diagonally downward, so as to model the rendering effect of falling snowflakes.

[0057] S202, obtaining rendering texture data of weather particles for weather effects on a rendering channel of a historical image frame, and generating a first image rendering result of the historical image frame based on the rendering texture data.

[0058] Specifically, the weather effect rendering device can obtain the first image rendering result of the historical image frame rendered by the weather particles for the weather effect, the target image frame is the image frame that the weather effect rendering device currently wants to render and display on the display screen of the electronic device, the historical image frame is the previous rendered image frame adjacent to the target image frame, that is, the rendered image frame required to refer to for generating the second image rendering result of the target image frame, and the first image rendering result is the image rendering result of the historical image frame. It can be understood that the historical image frame and the first image rendering result have been generated and displayed on the display screen, so the weather rendering device can obtain the rendering texture data on the rendering channel of the historical image frame through the image interface, thereby generating the first image rendering result of the historical image frame based on the rendering texture data.

[0059] S203, determining a first running position of the weather particle in the target image frame based on the running track of the weather particle indicated by the weather effect.

[0060] Specifically, the weather effect rendering device can determine the first running position of the weather particles in the target image frame based on the running trajectory of the weather particles indicated by the weather effect. The weather effect rendering device can determine the first running position reached by the weather particles on the historical image frame after moving along the running trajectory and passing the time interval based on the first time interval between the target image frame and the historical image frame, using the first time interval and the running trajectory. The first running position is that the position of the weather particles in the target image frame.

[0061] Please also see Figure 5 , an example schematic diagram of determining a first running position is provided for an embodiment of the present application. The weather effect rendering device can obtain the running trajectory of the weather particles. For example, the running trajectory can be a straight line motion to the lower right at a preset speed. The first time interval between the historical image frame and the target image frame can be obtained. According to the first time interval and the preset speed, it can be calculated that the weather particles can move from the position in the historical image frame to the first running position on the running trajectory after the first interval time. The first running position is also the position of the weather particles on the target image frame.

[0062] S204: Generate a first particle rendering result of a target image frame according to the first running position and based on the first image rendering result.

[0063] Specifically, the first running position determines the position of the weather particles on the target image frame. The weather effect rendering device can generate the first particle rendering result of the target image frame according to the first running position and the first image rendering result. The first particle rendering result is the weather particle rendering effect corresponding to the target image frame. However, it is not based on the weather particle rendering emitted by the weather system, but is obtained by moving the weather particles in the historical image frame according to the running trajectory of the weather particles on the basis of the first image rendering result.

[0064] S205, obtaining a first time interval between the historical image frame and the target image frame and the number of inserted image frames.

[0065] Specifically, if the first particle rendering result is displayed directly on the display screen, the user will see that the weather particles jump directly from the position in the historical image frame to the position in the target image frame, resulting in an incoherent display of the weather effect. Therefore, the weather effect rendering device can add an inserted image frame between the historical image frame and the target image frame, and display the inserted image frame and the target image frame in sequence, so that the jump from the historical image frame to the target image frame is more coherent and smooth. The weather effect rendering device can obtain the first time interval between the historical image frame and the target image frame, and confirm the number of frames of the inserted image frame based on the first time interval.

[0066] Optionally, the weather effect rendering device may confirm the number of inserted image frames based on the first time interval and the preset insertion frame interval, wherein the preset insertion frame interval may be an initial setting of the weather effect rendering device, or may be set by a user or relevant staff. The first time interval may be divided by the preset insertion frame interval to obtain a quotient, and then the quotient minus one may be used to obtain the number of inserted image frames. For example, if the first time interval is 30ms and the preset insertion frame interval is 6ms, the quotient of 5 may be obtained by dividing the first time interval by the preset insertion frame interval, and the number of inserted image frames may be 4, and 4 inserted image frames need to be inserted between the historical image frame and the target image frame.

[0067] S206: Determine a second time interval between adjacent inserted image frames in the inserted image frame set based on the first time interval and the number of frames.

[0068] Specifically, the weather effect rendering device can determine the second time interval between adjacent inserted image frames in the inserted image frame set according to the first time interval and the number of frames, and the inserted image frame set includes the inserted image frames between the historical image frame and the target image frame. For example, if the first time interval is 30ms and the number of frames is 4, the second time interval can be 6ms.

[0069] Optionally, if the weather effect rendering device determines the number of frames based on a preset insertion frame interval, the second time interval may be the preset insertion frame interval.

[0070] S207: Obtain a third image rendering result of each inserted image frame in the inserted image frame set based on the second time interval, the running trajectory, and the first image rendering result.

[0071] Specifically, the weather effect rendering device can obtain the third image rendering result of each inserted image frame in the inserted image frame set based on the second time interval, the running trajectory and the first image rendering result. It can be understood that the third image rendering result of each inserted frame image is also obtained based on the image rendering result of the previous adjacent rendered image frame.

[0072] Optionally, the weather effect rendering device can determine the second running position of the weather particles in the first inserted image frame based on the second time interval and the running trajectory, wherein the first inserted image frame is any inserted image frame in the inserted image frame set. The weather effect rendering device can determine the second running position reached by the weather particles on an adjacent rendered image frame on the first inserted image frame after moving according to the running trajectory and passing through the second time interval, and the second running position is the position of the weather particles in the first inserted image frame. Since the second running position determines the position of the weather particles on the target image frame, the weather effect rendering device can generate a second particle rendering result for the first inserted image frame based on the first image rendering result according to the second running position, and the second particle rendering result is the weather particle rendering effect corresponding to the first inserted image frame.

[0073] If the first inserted image frame is the first inserted image frame in the inserted image frame set, and the previous adjacent rendered image frame of the first inserted image frame is a historical image frame, the weather effect rendering device can mix the first image rendering result and the second particle rendering result to obtain a third image rendering result of the first inserted image frame.

[0074] If the first inserted image frame is not the first inserted image frame in the inserted image frame set, the previous inserted image frame adjacent to the first inserted image frame is an inserted image frame in the inserted image frame set, that is, the second inserted image frame, and the second inserted image frame is the previous inserted image frame adjacent to the first inserted image frame. The weather effect rendering device can obtain an interpolated image rendering result, which is an image rendering result of the second inserted image frame, that is, an image rendering result used when the second inserted image frame is displayed on the display screen, and mix the interpolated image rendering result with the second particle rendering result to obtain a third image rendering result of the first inserted image frame.

[0075] Optionally, the weather effect rendering device may continue to obtain the next inserted image frame adjacent to the first inserted image frame in the inserted image frame set, use the first inserted image frame as the second inserted image frame, use the next inserted image frame as the first inserted image frame, and proceed to execute the step of determining the second running position of the weather particle in the first inserted image frame based on the second time interval and the running trajectory, until the third image rendering results of all inserted image frames are obtained. It can be understood that the weather effect rendering device will display the third image rendering results of the inserted image frames on the display screen in sequence according to the order in which the third image rendering results of the inserted image frames are obtained, that is, after displaying the first image rendering results of the historical image frames, the third image rendering results of the inserted image frames are displayed in sequence, and after all the third image rendering results of the inserted image frames are displayed, the second image rendering results of the target image frame are displayed.

[0076] S208 , mixing the third image rendering result of the third inserted image frame with the first particle rendering result to obtain the second image rendering result of the target image frame, wherein the third inserted image frame is the last inserted image frame in the inserted image frame set.

[0077] Specifically, if an inserted image frame is added between the historical image frame and the target image frame, the previous rendered image frame adjacent to the target image frame is no longer a historical image frame. If the first particle rendering result is still mixed with the first image rendering result to obtain the second image rendering result of the target image frame, the target image frame will be discontinuous with the third inserted image frame, and the third inserted image frame is the last inserted image frame in the inserted image frame set. Therefore, the weather effect rendering device can mix the third image rendering result of the third inserted image frame with the first particle rendering result to obtain the second image rendering result of the target image frame.

[0078] Optionally, the hybrid processing can be a weighted summation of the image rendering results and the particle rendering results based on the image rendering weight and the particle rendering weight, wherein the sum of the image rendering weight and the particle rendering weight is 1. This can be the initial setting of the weather effect rendering device, or it can be set by the user or relevant staff. For example, the weather effect rendering device can use the product of the image rendering weight and the third image rendering result, plus the product of the particle rendering weight and the first particle rendering result, to obtain the second image rendering result of the target image, so that in addition to displaying the first particle rendering result, the second image rendering result can also display the third image rendering result with a lower grayscale, thereby producing a trailing visual effect during the movement of the weather particles, thereby improving the smoothness of the weather effect display.

[0079] Please also see Figure 6, an example schematic diagram of weather effect rendering is provided for an embodiment of the present application. If the second particle rendering result A is the second particle rendering result of the first inserted image frame in the inserted image frame set, the weather effect rendering device can mix the first image rendering result and the second particle rendering result a to obtain the third image rendering result A of the first inserted image frame, and then the first inserted image frame in the inserted image frame set can be used as the second inserted image frame, and the third image rendering result A is the interpolated image rendering result of the second inserted image frame. The second particle rendering result B is the second particle rendering result of the first inserted image frame, so the third image rendering result A and the second particle rendering result B can be mixed to obtain the third image rendering result B. Similarly, the third image rendering result N is the third image rendering result of the third inserted image frame, and the third image rendering result N and the first particle rendering result can be mixed to obtain the second image rendering result of the target image. Therefore, the coherence of the particle display can be guaranteed while reducing the processor's computational consumption on the particle group, and the mixed processing can also achieve the trailing effect of the particle movement.

[0080] The weather effect rendering device can achieve the trailing effect of particle movement during the weather effect rendering process. Therefore, in addition to using the particle system to simulate weather effects such as rain, snow, and lightning, the weather effect rendering device can also use the particle system to simulate the star trail weather effect in the sky. It is understandable that the weather effect rendering device can add an inserted image frame set between the historical image frame and the target image frame, and can perform mixed processing on the particle rendering results, which can be used to simulate the movement of stars in the sky and produce a trailing star trail weather effect. Please refer to Figure 7 , which is an example schematic diagram of a star trail weather effect rendering provided by the embodiment of the present application, wherein the weather effect rendering device can gradually reduce the image rendering weight of the image rendering result of the previous image frame during the mixing process, so that the effect of the previous weather particles gradually fades until it disappears, thereby producing a trailing effect. Figure 7 As shown, a trailing effect can be achieved in which the light at the tail of a star gradually fades as it moves, thereby simulating the star trail weather effect.

[0081] The weather effect rendering device can also be used to simulate the weather effect of volumetric clouds, that is, to simulate the semi-transparent and irregular performance of real clouds. Volumetric clouds often appear opaque in the middle and semi-transparent at the edges. The weather effect rendering device can use a particle system to simulate the weather effect of volumetric clouds. Please refer to Figure 8, an example schematic diagram of volumetric cloud weather effect rendering is provided for an embodiment of the present application. For example, the trajectory of weather particles can be moving from the upper right to the lower left, thereby simulating the effect of moving clouds. In order to make the clouds have the effect of volumetric clouds, the weather effect device can determine the middle area of ​​the clouds. It can be understood that the middle area of ​​the clouds is the area that presents an opaque effect, and the non-middle area is the area that presents a translucent effect, thereby achieving the effect of volumetric clouds. Therefore, the weather effect device can make the weather particles move according to the running trajectory. If the weather particles have not reached the middle area, they will move according to the first volume cloud movement speed. If the weather particles reach the middle area, they will slow down to the second volume cloud movement speed until the weather particles reach the non-middle area again. The weather particles can be accelerated to the first volume cloud running speed again to move, wherein the second volume cloud movement speed is less than the first volume cloud movement speed. It can be understood that since the weather particles in the middle area move slowly and the weather particles stay in the middle area for a long time, there are more weather particles in the middle area, thereby presenting an opaque effect, while the weather particles in the non-middle area move faster and the weather particles stay in the non-middle area for a short time, there are fewer weather particles in the non-middle area, thereby presenting a translucent effect at the edge of the cloud, simulating the volume cloud weather effect.

[0082] In an embodiment of the present application, the effect type of the weather effect is obtained, the running trajectory of the weather particles is determined based on the effect type, and based on the image interface, the rendering texture data of the weather particles for the weather effect on the rendering channel of the historical image frame is obtained, and the first image rendering result of the historical image frame is generated based on the rendering texture data. Based on the running trajectory of the weather particles indicated by the weather effect, the first running position of the weather particles in the target image frame is determined, and the first particle rendering result of the target image frame is generated according to the first running position and based on the first image rendering result. The image rendering result of the previous rendered image frame can be reused to obtain the particle rendering result of the target image frame, thereby reducing the computational consumption for particle group rendering. The first time interval between the historical image frame and the target image frame and the number of inserted image frames are obtained. Based on the first time interval and the number of frames, the second time interval between adjacent inserted image frames is determined in the inserted image frame set. Based on the second time interval, the running trajectory and the first image rendering result, the third image rendering result of each inserted image frame in the inserted image frame set is obtained. The third image rendering result can be displayed on the display screen in sequence according to the order in which the third image rendering result of the inserted image frame is obtained, that is, after the first image rendering result of the historical image frame is displayed, the third image rendering result of the inserted image frame is displayed in sequence, so as to avoid the weather particles directly jumping from the position in the historical image frame to the position in the target image frame, resulting in incoherent weather effect display. The third image rendering result of the last inserted image frame in the inserted image frame set is mixed with the first particle rendering result to obtain the second image rendering result of the target image frame. The image frames obtained by weather particle rendering are superimposed and reused, which reduces the computational consumption of particle group rendering, thereby improving the rendering efficiency of weather effects, and mixed with the previous image rendering result, the trailing effect of particle motion can be achieved, further improving the coherence of weather effect display.

[0083] The following will be combined with the attached Fig. 9 -Attached Fig.10 , the weather effect rendering device provided in the embodiment of the present application is introduced in detail. It should be noted that the attached Fig. 9 -Attached Fig.10 The weather effect rendering device in the present invention is used to execute the present invention. Figure 2 and Figure 3 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2 and Figure 3 The embodiment shown.

[0084] See also Fig. 9, which shows a schematic diagram of the structure of a weather effect rendering device provided by an exemplary embodiment of the present application. The weather effect rendering device can be implemented as all or part of the device through software, hardware or a combination of both. The device 1 includes a first image result acquisition unit 11, an operation position acquisition unit 12, a particle result acquisition unit 13 and a second image result acquisition unit 14.

[0085] A first image result obtaining unit 11 is used to obtain a first image rendering result of a historical image frame rendered by weather particles for a weather effect;

[0086] A running position acquisition unit 12, used to determine a first running position of the weather particle in a target image frame based on the running track of the weather particle indicated by the weather effect, wherein the target image frame is a next rendered image frame in the weather effect that is adjacent to the historical image frame;

[0087] A particle result acquisition unit 13, configured to generate a first particle rendering result of the target image frame according to the first running position and based on the first image rendering result;

[0088] The second image result obtaining unit 14 is used to mix the first image rendering result and the first particle rendering result to obtain a second image rendering result of the target image frame.

[0089] In this embodiment, the first image rendering result of the historical image frame rendered by the weather particles for the weather effect is obtained, and based on the running track of the weather particles indicated by the weather effect, the first running position of the weather particles in the target image frame is determined, and the target image frame is the next rendered image frame adjacent to the historical image frame in the weather effect, and the first particle rendering result of the target image frame is generated according to the first running position and based on the first image rendering result, and the first image rendering result and the first particle rendering result are mixed to obtain the second image rendering result of the target image frame. The image frames obtained by weather particle rendering are superimposed and reused, which reduces the computational consumption of particle group rendering, thereby improving the rendering efficiency of weather effects.

[0090] See also Fig.10 , which shows a schematic diagram of the structure of a weather effect rendering device provided by an exemplary embodiment of the present application. The weather effect rendering device can be implemented as all or part of the device through software, hardware or a combination of both. The device 1 includes a running track acquisition unit 15, a first image result acquisition unit 11, a running position acquisition unit 12, a particle result acquisition unit 13, an insertion frame rendering unit 16 and a second image result acquisition unit 14.

[0091] A running track acquisition unit 15 is used to acquire the effect type of the weather effect, and determine the running track of the weather particle based on the effect type;

[0092] A first image result obtaining unit 11 is used to obtain a first image rendering result of a historical image frame rendered by weather particles for a weather effect;

[0093] Optionally, the first image result acquisition unit 11 is specifically used to acquire rendering texture data of weather particles for weather effects on a rendering channel of a historical image frame;

[0094] A first image rendering result of the historical image frame is generated based on the rendering texture data.

[0095] A running position acquisition unit 12, used to determine a first running position of the weather particle in a target image frame based on the running track of the weather particle indicated by the weather effect, wherein the target image frame is a next rendered image frame in the weather effect that is adjacent to the historical image frame;

[0096] A particle result acquisition unit 13, configured to generate a first particle rendering result of the target image frame according to the first running position and based on the first image rendering result;

[0097] The insertion frame rendering unit 16 is used to obtain a first time interval between the historical image frame and the target image frame and the number of inserted image frames;

[0098] Determining a second time interval between adjacent inserted image frames in the inserted image frame set based on the first time interval and the number of frames;

[0099] Based on the second time interval, the running trajectory and the first image rendering result, a third image rendering result of each of the inserted image frames in the inserted image frame set is obtained.

[0100] Optionally, the insertion frame rendering unit 16 is specifically used to determine the second running position of the weather particle in the first insertion image frame based on the second time interval and the running trajectory; the first insertion image frame is any insertion image frame in the insertion image frame set;

[0101] generating a second particle rendering result of the first inserted image frame according to the second running position and based on the first image rendering result;

[0102] If the first inserted image frame is the first inserted image frame in the inserted image frame set, the first image rendering result and the second particle rendering result are mixed to obtain a third image rendering result of the first inserted image frame;

[0103] If the first inserted image frame is not the first inserted image frame in the inserted image frame set, the interpolated image rendering result and the second particle rendering result are mixed to obtain a third image rendering result of the first inserted image frame, the interpolated image rendering result is the third image rendering result of the second inserted image frame in the inserted image frame set, and the second inserted image frame is a previous inserted image frame adjacent to the first inserted image frame.

[0104] The second image result obtaining unit 14 is used to mix the first image rendering result and the first particle rendering result to obtain a second image rendering result of the target image frame.

[0105] Optionally, the second image result acquisition unit 14 is specifically used to mix the third image rendering result of the third inserted image frame with the first particle rendering result to obtain the second image rendering result of the target image frame;

[0106] The third inserted image frame is the last inserted image frame in the inserted image frame set.

[0107] The mixing process is to perform weighted summation of the image rendering result and the particle rendering result based on the image rendering weight and the particle rendering weight.

[0108] In an embodiment of the present application, the effect type of the weather effect is obtained, the running trajectory of the weather particles is determined based on the effect type, and based on the image interface, the rendering texture data of the weather particles for the weather effect on the rendering channel of the historical image frame is obtained, and the first image rendering result of the historical image frame is generated based on the rendering texture data. Based on the running trajectory of the weather particles indicated by the weather effect, the first running position of the weather particles in the target image frame is determined, and the first particle rendering result of the target image frame is generated according to the first running position and based on the first image rendering result. The image rendering result of the previous rendered image frame can be reused to obtain the particle rendering result of the target image frame, thereby reducing the computational consumption for particle group rendering. The first time interval between the historical image frame and the target image frame and the number of inserted image frames are obtained. Based on the first time interval and the number of frames, the second time interval between adjacent inserted image frames is determined in the inserted image frame set. Based on the second time interval, the running trajectory and the first image rendering result, the third image rendering result of each inserted image frame in the inserted image frame set is obtained. The third image rendering result can be displayed on the display screen in sequence according to the order in which the third image rendering result of the inserted image frame is obtained, that is, after the first image rendering result of the historical image frame is displayed, the third image rendering result of the inserted image frame is displayed in sequence, so as to avoid the weather particles directly jumping from the position in the historical image frame to the position in the target image frame, resulting in incoherent weather effect display. The third image rendering result of the last inserted image frame in the inserted image frame set is mixed with the first particle rendering result to obtain the second image rendering result of the target image frame. The image frames obtained by weather particle rendering are superimposed and reused, which reduces the computational consumption of particle group rendering, thereby improving the rendering efficiency of weather effects, and mixed with the previous image rendering result, the trailing effect of particle motion can be achieved, further improving the coherence of weather effect display.

[0109] One or more embodiments of the present specification further provide a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of any of the methods in the above embodiments.

[0110] One or more embodiments of the present specification also provide a computer program product including instructions, and when the computer program product is executed on a computer or a processor, the computer or the processor executes the steps of any one of the methods in the above embodiments.

[0111] For further information, see Fig.11 , Fig.11 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. Fig. 9As shown, the terminal 600 may include: at least one processor 601 , at least one network interface 604 , a user interface 603 , a memory 606 , and at least one communication bus 602 .

[0112] The communication bus 602 is used to realize the connection and communication between these components.

[0113] The user interface 603 may include a display screen (Display) and a camera (Camera), and the optional user interface 603 may also include a standard wired interface and a wireless interface.

[0114] The network interface 604 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0115] Among them, the processor 601 may include one or more processing cores. The processor 601 uses various interfaces and lines to connect various parts in the entire terminal 600, and executes various functions and processes data of the terminal 600 by running or executing instructions, programs, code sets or instruction sets stored in the memory 606, and calling data stored in the memory 606. Optionally, the processor 601 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 601 can integrate one or more combinations of processors (Central Processing Unit, CPU), image processors (Graphics Processing Unit, GPU) and modems. Among them, the CPU mainly processes operating systems, user interfaces, and applications; the GPU is responsible for rendering and drawing the content that needs to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 601, and it can be implemented separately through a chip.

[0116] Among them, the memory 606 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 606 includes a non-transitory computer-readable storage medium. The memory 606 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 606 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 606 may also be optionally at least one storage device located away from the aforementioned processor 601. As Fig. 9 As shown, the memory 606 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a weather effect rendering program.

[0117] exist Fig.11 In the terminal 600 shown, the user interface 603 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 601 can be used to call the weather effect rendering program stored in the memory 606 and specifically perform the following operations:

[0118] Obtaining a first image rendering result of a historical image frame rendered by weather particles for a weather effect;

[0119] Determine, based on the running track of the weather particle indicated by the weather effect, a first running position of the weather particle in a target image frame, wherein the target image frame is a next rendered image frame in the weather effect that is adjacent to the historical image frame;

[0120] Generating a first particle rendering result of the target image frame according to the first running position and based on the first image rendering result;

[0121] The first image rendering result and the first particle rendering result are mixed to obtain a second image rendering result of the target image frame.

[0122] In one embodiment, before executing the acquisition of the first image rendering result of the historical image frame rendered by the weather particles for the weather effect, the processor 601 further performs the following operations:

[0123] The effect type of the weather effect is obtained, and the running track of the weather particle is determined based on the effect type.

[0124] In one embodiment, when the processor 601 executes the acquisition of the first image rendering result of the historical image frame rendered by the weather particles for the weather effect, the processor 601 specifically performs the following operations:

[0125] Based on the image interface, the rendering texture data of the weather particles for the weather effect on the rendering channel of the historical image frame is obtained;

[0126] A first image rendering result of the historical image frame is generated based on the rendering texture data.

[0127] In one embodiment, before performing the mixing process of the first image rendering result and the particle motion rendering result to obtain the second image rendering result of the target image frame, the processor 601 further performs the following operations:

[0128] Acquire a first time interval between the historical image frame and the target image frame and the number of inserted image frames;

[0129] Determining a second time interval between adjacent inserted image frames in the inserted image frame set based on the first time interval and the number of frames;

[0130] Based on the second time interval, the running trajectory and the first image rendering result, a third image rendering result of each of the inserted image frames in the inserted image frame set is obtained.

[0131] In one embodiment, when the processor 601 obtains the third image rendering result of each of the inserted image frames in the inserted image frame set based on the second time interval, the running trajectory and the first image rendering result, the processor 601 specifically performs the following operations:

[0132] Based on the second time interval and the running track, determining a second running position of the weather particle in a first inserted image frame; the first inserted image frame is any inserted image frame in the set of inserted image frames;

[0133] generating a second particle rendering result of the first inserted image frame according to the second running position and based on the first image rendering result;

[0134] If the first inserted image frame is the first inserted image frame in the inserted image frame set, the first image rendering result and the second particle rendering result are mixed to obtain a third image rendering result of the first inserted image frame;

[0135] If the first inserted image frame is not the first inserted image frame in the inserted image frame set, the interpolated image rendering result and the second particle rendering result are mixed to obtain a third image rendering result of the first inserted image frame, the interpolated image rendering result is the third image rendering result of the second inserted image frame in the inserted image frame set, and the second inserted image frame is a previous inserted image frame adjacent to the first inserted image frame.

[0136] In one embodiment, when the processor 601 performs a mixing process on the first image rendering result and the first particle rendering result to obtain a second image rendering result of the target image frame, the processor 601 specifically performs the following operations:

[0137] Mixing the third image rendering result of the third inserted image frame with the first particle rendering result to obtain a second image rendering result of the target image frame;

[0138] The third inserted image frame is the last inserted image frame in the inserted image frame set.

[0139] In one embodiment, the mixing process is to perform a weighted summation of the image rendering result and the particle rendering result based on the image rendering weight and the particle rendering weight.

[0140] In an embodiment of the present application, the effect type of the weather effect is obtained, the running trajectory of the weather particles is determined based on the effect type, and based on the image interface, the rendering texture data of the weather particles for the weather effect on the rendering channel of the historical image frame is obtained, and the first image rendering result of the historical image frame is generated based on the rendering texture data. Based on the running trajectory of the weather particles indicated by the weather effect, the first running position of the weather particles in the target image frame is determined, and the first particle rendering result of the target image frame is generated according to the first running position and based on the first image rendering result. The image rendering result of the previous rendered image frame can be reused to obtain the particle rendering result of the target image frame, thereby reducing the computational consumption for particle group rendering. The first time interval between the historical image frame and the target image frame and the number of inserted image frames are obtained. Based on the first time interval and the number of frames, the second time interval between adjacent inserted image frames is determined in the inserted image frame set. Based on the second time interval, the running trajectory and the first image rendering result, the third image rendering result of each inserted image frame in the inserted image frame set is obtained. The third image rendering result can be displayed on the display screen in sequence according to the order in which the third image rendering result of the inserted image frame is obtained, that is, after the first image rendering result of the historical image frame is displayed, the third image rendering result of the inserted image frame is displayed in sequence, so as to avoid the weather particles directly jumping from the position in the historical image frame to the position in the target image frame, resulting in incoherent weather effect display. The third image rendering result of the last inserted image frame in the inserted image frame set is mixed with the first particle rendering result to obtain the second image rendering result of the target image frame. The image frames obtained by weather particle rendering are superimposed and reused, which reduces the computational consumption of particle group rendering, thereby improving the rendering efficiency of weather effects, and mixed with the previous image rendering result, the trailing effect of particle motion can be achieved, further improving the coherence of weather effect display.

[0141] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0142] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0143] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.

[0144] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0145] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present application.

[0146] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0147] The above is a description of a weather effect rendering method, device, storage medium and terminal provided in an embodiment of the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.

Claims

1. A weather effect rendering method, characterized in that: The method comprises: Obtaining a first image rendering result of a historical image frame rendered by weather particles for a weather effect; Determine, based on the running track of the weather particle indicated by the weather effect, a first running position of the weather particle in a target image frame, wherein the target image frame is a next rendered image frame in the weather effect that is adjacent to the historical image frame; Generating a first particle rendering result of the target image frame according to the first running position and based on the first image rendering result; The first image rendering result and the first particle rendering result are mixed to obtain a second image rendering result of the target image frame.

2. The method according to claim 1, characterized in that: Before obtaining the first image rendering result of the historical image frame rendered by the weather particles for the weather effect, the method further includes: The effect type of the weather effect is obtained, and the running track of the weather particle is determined based on the effect type.

3. The method according to claim 1, characterized in that The obtaining of the first image rendering result of the historical image frame rendered by the weather particles for the weather effect includes: Obtain the rendering texture data of weather particles for weather effects on the rendering channel of the historical image frame; A first image rendering result of the historical image frame is generated based on the rendering texture data.

4. The method according to claim 1, characterized in that Before the first image rendering result and the particle motion rendering result are mixed to obtain the second image rendering result of the target image frame, the method further includes: Acquire a first time interval between the historical image frame and the target image frame and the number of inserted image frames; Determining a second time interval between adjacent inserted image frames in the inserted image frame set based on the first time interval and the number of frames; Based on the second time interval, the running trajectory and the first image rendering result, a third image rendering result of each of the inserted image frames in the inserted image frame set is obtained.

5. The method according to claim 4, characterized in that The acquiring, based on the second time interval, the running trajectory and the first image rendering result, a third image rendering result of each of the inserted image frames in the inserted image frame set comprises: Based on the second time interval and the running track, determining a second running position of the weather particle in a first inserted image frame; the first inserted image frame is any inserted image frame in the set of inserted image frames; generating a second particle rendering result of the first inserted image frame according to the second running position and based on the first image rendering result; If the first inserted image frame is the first inserted image frame in the inserted image frame set, the first image rendering result and the second particle rendering result are mixed to obtain a third image rendering result of the first inserted image frame; If the first inserted image frame is not the first inserted image frame in the inserted image frame set, the interpolated image rendering result and the second particle rendering result are mixed to obtain a third image rendering result of the first inserted image frame, the interpolated image rendering result is the third image rendering result of the second inserted image frame in the inserted image frame set, and the second inserted image frame is a previous inserted image frame adjacent to the first inserted image frame.

6. The method according to claim 4, characterized in that The mixing of the first image rendering result and the first particle rendering result to obtain a second image rendering result of the target image frame includes: Mixing the third image rendering result of the third inserted image frame with the first particle rendering result to obtain a second image rendering result of the target image frame; The third inserted image frame is the last inserted image frame in the inserted image frame set.

7. The method according to any one of claims 1 to 6, characterized in that: The mixing process is to perform weighted summation of the image rendering result and the particle rendering result based on the image rendering weight and the particle rendering weight.

8. A weather effect rendering device, characterized in that: The device comprises: A first image result obtaining unit, used to obtain a first image rendering result of a historical image frame rendered by weather particles for a weather effect; a running position acquisition unit, configured to determine a first running position of the weather particle in a target image frame based on a running track of the weather particle indicated by the weather effect, wherein the target image frame is a next rendered image frame in the weather effect that is adjacent to the historical image frame; a particle result acquisition unit, configured to generate a first particle rendering result of the target image frame according to the first running position and based on the first image rendering result; The second image result acquisition unit is used to mix the first image rendering result and the first particle rendering result to obtain a second image rendering result of the target image frame.

9. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 7.

10. A terminal, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the program.