Rain ripple method and system based on mobile platform

By generating and processing ripple data textures on mobile devices, calculating and applying normal perturbations, the problem of insufficient computing resources on mobile devices is solved, and an efficient rain ripples effect is achieved.

CN119559273APending Publication Date: 2025-03-04FUJIAN TQ DIGITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311126939.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-04
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

Existing fluid simulation methods require a large amount of computing resources when creating ripples, resulting in poor performance on mobile devices and difficult to achieve efficient and realistic results.

Method used

By generating a ripple data texture, sampling and remapping it in a digit shader, the time coefficient, extinction coefficient and final impact factor of the ripple are calculated, and normal perturbations are applied to achieve the ripple effect.

Benefits of technology

This method greatly reduces the computing burden, allowing mobile devices to achieve realistic rain ripples at a lower cost, suitable for resource-constrained mobile platforms, with high real-time and performance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559273A_ABST
    Figure CN119559273A_ABST
Patent Text Reader

Abstract

A rain ripple method based on a mobile platform comprises the steps that ripple data textures are generated, the ripple data textures comprise an r.x channel, an r.y channel, an r.z channel and an r.w channel, the r.x channel and the r.y channel store normal data of ripples, the r.z channel stores central values of the ripples, the value range of the central values of the ripples is 0-1, and the r.w channel stores time offset values; carrying out data texture sampling on the ripple data texture in a fragment shader, and carrying out remapping on normal data of the ripple data texture to obtain a remapped ripple data texture; a ripple time coefficient tfrac is obtained by remapping the ripple data texture, and then a ripple fading coefficient dfade is obtained according to the ripple time coefficient; obtaining a final influence factor ffactor of the ripple according to the ripple fading coefficient; calculating normal disturbance; and the ripple effect is realized by applying normal disturbance, so that the method is more suitable for resource-limited scenes such as mobile equipment and the like, and has higher real-time performance and performance efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to computer technology, in particular to a rain ripple method based on a mobile platform and a system thereof. Background Art

[0002] Traditional fluid simulation methods use physical methods to simulate the ripples produced by liquid on the surface to achieve realistic effects. However, these methods usually require a lot of computing resources and complex numerical solutions, and are not suitable for resource-limited environments such as mobile devices. At the same time, fluid simulation methods often require a lot of real-time calculations, which may lead to performance bottlenecks, especially on mobile platforms. Summary of the invention

[0003] To overcome the problem that existing fluid simulation methods require a lot of calculations to create ripples, occupy high resources, and are not suitable for mobile devices.

[0004] The present invention is implemented by the following scheme:

[0005] A rain ripple method based on a mobile platform, the method steps are as follows:

[0006] Step 1: Generate a ripple data texture, the ripple data texture includes: an rx channel, a ry channel, an rz channel and an rw channel, the rx channel and the ry channel store the normal data of the ripple, the rz channel stores the center value of the ripple, the value range of the center value of the ripple is 0 to 1, and the rw channel stores the time offset value;

[0007] Step 2: Sample the ripple data texture in the fragment shader, remap the normal data of the ripple data texture, and obtain the remapped ripple data texture;

[0008] Step 3: Obtain the ripple time coefficient t_frac by remapping the ripple data texture, and then obtain the ripple fade coefficient d_fade according to the ripple time coefficient;

[0009] Step 4: Obtain the final impact factor f_factor of the ripple according to the ripple decay coefficient;

[0010] Step 5: Calculate normal perturbation;

[0011] Step 6: Create a ripple effect by applying a normal perturbation.

[0012] Furthermore, step 2 is further specifically as follows: data texture sampling is performed on the ripple data texture in the fragment shader, that is, the normal data rx channel and ry channel of the ripple data texture are mapped to the range [-1, 1], as follows:

[0013] r_map.x = ry * 2.0 - 1.0;

[0014] r_map.y=rz*2.0-1.0;

[0015] r_map.z = rz;

[0016] r_map.w = rw;

[0017] Where rx represents the x-direction component of the ripple's normal in the object's local coordinate system;

[0018] r_map.x: maps to rx in the range [-1,1];

[0019] ry represents the y-direction component of the ripple's normal in the object's local coordinate system;

[0020] r_map.y represents ry mapped to the range [-1,1];

[0021] r_map.z represents the center value of the ripple;

[0022] r_map.w represents the time offset value.

[0023] Get the remap ripple data texture r_map.

[0024] Furthermore, step 3 is further specific as follows: the ripple time coefficient is calculated as follows:

[0025] t_frac=frac(r_map.w+t)-1.0+r_map.z;

[0026] Among them, t_frac represents the ripple time coefficient, t represents the current elapsed time, and frac takes the value after the decimal point;

[0027] The ripple decay coefficient is calculated as follows:

[0028] d_fade=saturate(1.0-frac(r_map.w+t));

[0029] Among them, d_fade represents the ripple fade coefficient, t represents the current elapsed time, saturate represents the value range of 0-1, and frac represents the value after the decimal point.

[0030] Furthermore, step 4 is further specified as follows: using the cosine function and the ripple decay coefficient to calculate the final impact factor f_factor of the ripple:

[0031] f_factor=d_fade*r_map.z*cos((0.5-abs(clamp(t_frac*9.0,0.0,3.0)))*3.1415926);

[0032] Among them, d_fade represents the ripple fading coefficient, abs represents taking the absolute value, and clamp represents limiting the attribute value between the maximum and minimum values. When the value is between the maximum and minimum values, the given preferred value is used.

[0033] Furthermore, step 5 is further specified as follows: the normal perturbation calculation formula is: normal perturbation = r_map.xy*f_factor*s;

[0034] Among them, s represents the disturbance strength, r.xy represents the component of the ripple's normal between the x and y directions in the object's local coordinate system, and f_factor represents the final impact factor of the ripple.

[0035] Furthermore, step 6 is further specified as follows: the normal of the final object = the normal perturbation of the original object + the normal perturbation, and the normal of the final object is affected by changing the normal perturbation to achieve a ripple effect.

[0036] A rain ripple system based on a mobile platform, the system comprising a texture generation module, a sampling module, a coefficient calculation module, a final influence factor calculation module, a normal perturbation calculation module, and an application module;

[0037] The texture generation module is used to generate a ripple data texture, and the ripple data texture includes: an rx channel, a ry channel, an rz channel and an rw channel, the rx channel and the ry channel store the normal data of the ripple, the rz channel stores the center value of the ripple, and the value range of the center value of the ripple is 0 to 1, and the rw channel stores specific information to control the time offset value;

[0038] The sampling module is used to perform data texture sampling on the ripple data texture in the fragment shader, remap the normal data of the ripple data texture, and obtain the remapped ripple data texture;

[0039] The coefficient calculation module is used to obtain the ripple time coefficient t_frac by remapping the ripple data texture, and then obtain the ripple fade coefficient d_fade according to the ripple time coefficient;

[0040] The final impact factor calculation module is used to obtain the final impact factor f_factor of the ripple according to the ripple decay coefficient;

[0041] The normal disturbance calculation module is used to calculate the normal disturbance;

[0042] The application module is used to achieve the ripple effect by applying normal disturbance.

[0043] Furthermore, the sampling module is further specifically as follows: data texture sampling is performed on the ripple data texture in the fragment shader, that is, the normal data rx channel and ry channel of the ripple data texture are mapped to the range [-1, 1], as follows:

[0044] r_map.x = rx*2.0-1.0;

[0045] r_map.y=ry*2.0-1.0;

[0046] r_map.z = rz;

[0047] r_map.w = rw;

[0048] Where rx represents the x-direction component of the ripple's normal in the object's local coordinate system;

[0049] r_map.x: maps to rx in the range [-1,1];

[0050] ry represents the y-direction component of the ripple's normal in the object's local coordinate system;

[0051] r_map.y represents ry mapped to the range [-1,1];

[0052] r_map.z represents the center value of the ripple;

[0053] r_map.w represents the time offset value.

[0054] Get the remap ripple data texture r_map;

[0055] Furthermore, the coefficient calculation module is further specific as follows: the ripple time coefficient calculation is specific as follows:

[0056] t_frac=frac(r_map.w+t)-1.0+r_map.z;

[0057] Among them, t_frac represents the ripple time coefficient, t represents the current elapsed time, and frac takes the value after the decimal point;

[0058] The ripple decay coefficient is calculated as follows:

[0059] d_fade=saturate(1.0-frac(r_map.w+t));

[0060] Among them, d_fade represents the ripple fade coefficient, t represents the current elapsed time, saturate represents the value range of 0-1, and frac represents the value after the decimal point.

[0061] Furthermore, the final impact factor calculation module is further specifically: using the cosine function and the ripple decay coefficient to calculate the final impact factor f_factor of the ripple, as follows:

[0062] f_factor=d_fade*r_map.z*cos((0.5-abs(clamp(t_frac*9.0,0.0,3.0)))*3.1415926);

[0063] Among them, d_fade represents the ripple fading coefficient, abs represents taking the absolute value, and clamp represents limiting the attribute value between the maximum and minimum values. When the value is between the maximum and minimum values, the given preferred value is used.

[0064] Furthermore, the normal perturbation calculation module is further specified as follows: the normal perturbation calculation formula is: normal perturbation = r_map.xy*f_factor*s; wherein s represents the perturbation intensity, r.xy represents the component of the ripple's normal between the x and y directions in the object's local coordinate system, and f_factor represents the final impact factor of the ripple.

[0065] Furthermore, the application module is further specified as follows: the normal of the final object = the normal perturbation of the original object + the normal perturbation, and the normal of the final object is affected by changing the normal perturbation to achieve a ripple effect.

[0066] The beneficial effects of the present invention are:

[0067] The present invention bypasses the complex calculations of traditional fluid simulations by pre-calculating ripple data and applying it in the shading stage, thereby achieving efficient rain ripple effects on mobile platforms, greatly reducing the computational burden, and enabling mobile devices to achieve realistic rain ripple effects at a lower cost. Therefore, compared with traditional fluid simulation methods, the present invention is more suitable for resource-constrained scenarios such as mobile devices, and has higher real-time performance and performance efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 is a flow chart of the method of the present invention;

[0069] Figure 2 It is a structural block diagram of the system of the present invention. DETAILED DESCRIPTION

[0070] The present invention will be further described below in conjunction with the accompanying drawings.

[0071] See also Figure 1 , a rain ripple method based on a mobile platform, the method steps are as follows:

[0072] Step 1: Generate a ripple data texture, the ripple data texture includes: an rx channel, a ry channel, an rz channel and an rw channel, the rx channel and the ry channel store the normal data of the ripple, the rz channel stores the center value of the ripple, the value range of the center value of the ripple is 0 to 1, and the rw channel stores the time offset value;

[0073] Step 2: Sample the ripple data texture in the fragment shader, remap the normal data of the ripple data texture, and obtain the remapped ripple data texture;

[0074] Step 3: Obtain the ripple time coefficient t_frac by remapping the ripple data texture, and then obtain the ripple fade coefficient d_fade according to the ripple time coefficient;

[0075] Step 4: Obtain the final impact factor f_factor of the ripple according to the ripple decay coefficient;

[0076] Step 5: Calculate normal perturbation;

[0077] Step 6: Create a ripple effect by applying a normal perturbation.

[0078] The present invention will be further described below in conjunction with a specific embodiment:

[0079] A rain ripple method based on a mobile platform, this embodiment is described in conjunction with the rain ground ripple effect in the game:

[0080] Step 1: Prepare ground ripple data texture during game development;

[0081] Create a texture: First, create an empty texture that will be used to store the ripple data. Use the tools provided by Unity or your graphics library to create a texture.

[0082] Loop Over Pixels: Loop over each pixel of the texture to generate ripple data for each pixel.

[0083] Generate ripple center value (rz): Use a random number generator to generate the ripple center value rz for each pixel. Usually, this value is between 0 and 1 and can be obtained using a random function.

[0084] Generate normal data (rx and ry) for ripples: Normal data is often used to control the shape of ripples. You can use a noise generation algorithm, such as Perlin noise or Simplex noise, to generate values ​​for the rx channel and the ry channel. These values ​​will represent the normal direction of the ripples, usually in the range [-1,1].

[0085] Generate specific information to control the time offset value (rw): In order to control the time offset value, a random number generator is used to generate the rw value of each pixel, which can be a small number to simulate the time offset value between different ripples.

[0086] Write data to texture: Once the ripple data is generated for each pixel, write this data to the corresponding channels of the texture (rx channel, ry channel, rz channel, and rw channel).

[0087] Apply texture filters (optional): If needed, apply some texture filters, such as Gaussian Blur, to smooth out the ripple data and make it look more natural.

[0088] Apply the texture to the ground or other objects: Finally, apply the generated ripple data texture to the material of the ground or other objects in the game to achieve the ripple effect.

[0089] The rx channel and the ry channel store the normal data of the ripples, the rz channel stores the center value of the ripples, the center value of the ripples ranges from 0 to 1, and the rw channel stores the time offset value;

[0090] Step 2: In the game scene, create a model representing the ground. The ground model will be the target for applying the rain ground ripple effect.

[0091] Step 3: In the fragment shader stage, sample the ripple data texture for each fragment of the ground in the fragment shader, and map the normal data rx channel and ry channel of the ripple data texture to the range [-1,1], as follows:

[0092] r_map.x = rx*2.0-1.0;

[0093] r_map.y=ry*2.0-1.0;

[0094] r_map.z = rz;

[0095] r_map.w = rw;

[0096] Where rx represents the x-direction component of the ripple's normal in the object's local coordinate system;

[0097] r_map.x: maps to rx in the range [-1,1];

[0098] ry represents the y-direction component of the ripple's normal in the object's local coordinate system;

[0099] r_map.y represents ry mapped to the range [-1,1];

[0100] r_map.z represents the center value of the ripple;

[0101] r_map.w represents the time offset value.

[0102] Get the remap ripple data texture r_map.

[0103] Step 4: In the fragment shader, calculate the ripple time coefficient, ripple decay coefficient and final impact factor based on the normal information, center value and time control data of the ripple data.

[0104] The ripple time coefficient is calculated as follows:

[0105] t_frac=frac(r_map.w+t)-1.0+r_map.z;

[0106] Among them, t_frac represents the ripple time coefficient, t represents the current elapsed time, and frac takes the value after the decimal point;

[0107] The ripple decay coefficient is calculated as follows:

[0108] d_fade=saturate(1.0-frac(r_map.w+t));

[0109] Among them, d_fade represents the ripple fade coefficient, t represents the current elapsed time, saturate represents the value range of 0-1, and frac represents the value after the decimal point.

[0110] Use the cosine function and the ripple decay coefficient to calculate the final impact factor f_factor of the ripples:

[0111] f_factor=d_fade*r_map.z*cos((0.5-abs(clamp(t_frac*9.0,0.0,3.0)))*3.1415926);

[0112] Among them, d_fade represents the ripple fading coefficient, abs represents taking the absolute value, and clamp represents limiting the attribute value between the maximum and minimum values. When the value is between the maximum and minimum values, the given preferred value is used.

[0113] Step 5: Calculate the normal perturbation value based on the remapped ripple data, time coefficient, decay coefficient and influence factor.

[0114] The normal perturbation calculation formula is: normal perturbation = r_map.xy*f_factor*s;

[0115] Among them, s represents the disturbance strength. The greater the disturbance strength, the stronger the ripple effect. r.xy represents the component of the ripple normal between the x and y directions in the local coordinate system of the object.

[0116] Step 6: Add the normal disturbance value to the normal of the ground fragment, which will disturb the normal and simulate the ripple effect caused by raindrops on the ground;

[0117] The final object normal = the original object normal perturbation + normal perturbation. By changing the normal perturbation, the final object normal is affected to achieve a ripple effect. By adjusting the time control data, a dynamic rain ground ripple effect can be achieved. The ripples will gradually spread, merge and fade over time, adding a sense of dynamism to the game scene.

[0118] Suppose we have a ripple with the center at coordinate (0.5,0.5) and the initial time t is 0.

[0119] The ripple time coefficient t_frac is calculated as frac(r_map.w+t)-1.0+r_map.z; as time t passes, the ripple time coefficient t_frac gradually increases, which causes the appearance and spread of ripples.

[0120] The ripple fading coefficient d_fade is calculated as saturate(1.0-frac(r_map.w+t)). As time t passes, the ripple fading coefficient d_fade gradually decreases but is still greater than 0.

[0121] When frac(r_map.w+t) approaches 1, the ripple time coefficient t_frac continues to increase, but the ripple fade coefficient d_fade begins to decrease rapidly and approaches 0, causing the ripples to gradually merge and fade away. Ultimately, the value of the influencing factor f_factor decreases under the influence of the cosine function and the ripple fade coefficient d_fade, and the ripple effect becomes weaker and weaker.

[0122] So, as time goes by, the ripples spread from the center, then gradually merge and fade away, a process that is controlled by the time factor t_frac and the fade factor d_fade.

[0123] See also Figure 2, a rain ripple system based on a mobile platform, the system comprising a texture generation module, a sampling module, a coefficient calculation module, a final influence factor calculation module, a normal perturbation calculation module, and an application module;

[0124] The texture generation module is used to generate a ripple data texture, and the ripple data texture includes: an rx channel, a ry channel, an rz channel and an rw channel, the rx channel and the ry channel store the normal data of the ripple, the rz channel stores the center value of the ripple, and the value range of the center value of the ripple is 0 to 1, and the rw channel stores specific information to control the time offset value;

[0125] The sampling module is used to perform data texture sampling on the ripple data texture in the fragment shader, remap the normal data of the ripple data texture, and obtain the remapped ripple data texture;

[0126] The coefficient calculation module is used to obtain the ripple time coefficient t_frac by remapping the ripple data texture, and then obtain the ripple fade coefficient d_fade according to the ripple time coefficient;

[0127] The final impact factor calculation module is used to obtain the final impact factor f_factor of the ripple according to the ripple decay coefficient;

[0128] The normal disturbance calculation module is used to calculate the normal disturbance;

[0129] The application module is used to achieve the ripple effect by applying normal disturbance.

[0130] In an embodiment of the present invention, the sampling module is further specifically: performing data texture sampling on the ripple data texture in the fragment shader, that is, mapping the normal data rx channel and ry channel of the ripple data texture to the range [-1, 1], as follows:

[0131] r_map.x = rx*2.0-1.0;

[0132] r_map.y=ry*2.0-1.0;

[0133] r_map.z = rz;

[0134] r_map.w = rw;

[0135] Where rx represents the x-direction component of the ripple's normal in the object's local coordinate system;

[0136] r_map.x: maps to rx in the range [-1,1];

[0137] ry represents the y-direction component of the ripple's normal in the object's local coordinate system;

[0138] r_map.y represents ry mapped to the range [-1,1];

[0139] r_map.z represents the center value of the ripple;

[0140] r_map.w represents the time offset value.

[0141] Get the remap ripple data texture r_map;

[0142] In the embodiment of the present invention, the coefficient calculation module is further specifically: the ripple time coefficient calculation is specifically as follows:

[0143] t_frac=frac(r_map.w+t)-1.0+r_map.z;

[0144] Among them, t_frac represents the ripple time coefficient, t represents the current elapsed time, and frac takes the value after the decimal point;

[0145] The ripple decay coefficient is calculated as follows:

[0146] d_fade=saturate(1.0-frac(r_map.w+t));

[0147] Among them, d_fade represents the ripple fade coefficient, t represents the current elapsed time, saturate represents the value range of 0-1, and frac represents the value after the decimal point.

[0148] In the embodiment of the present invention, the final impact factor calculation module is further specifically: using the cosine function and the ripple decay coefficient to calculate the final impact factor f_factor of the ripple, as follows:

[0149] f_factor=d_fade*r_map.z*cos((0.5-abs(clamp(t_frac*9.0,0.0,3.0)))*3.1415926);

[0150] Among them, d_fade represents the ripple fading coefficient, abs represents taking the absolute value, and clamp represents limiting the attribute value between the maximum and minimum values. When the value is between the maximum and minimum values, the given preferred value is used.

[0151] In an embodiment of the present invention, the normal perturbation calculation module is further specified as follows: the normal perturbation calculation formula is: normal perturbation = r_map.xy*f_factor*s; wherein s represents the perturbation intensity, r.xy represents the component of the ripple's normal between the x and y directions in the object's local coordinate system, and f_factor represents the final influencing factor of the ripple.

[0152] In the embodiment of the present invention, the application module is further specified as follows: the final object normal = the original object normal disturbance + the normal disturbance, and the ripple effect is achieved by changing the normal disturbance to affect the normal of the final object.

[0153] In summary, the present invention bypasses the complex calculations of traditional fluid simulations by pre-calculating ripple data and applying it in the shading stage, thereby achieving efficient rain ripple effects on mobile platforms, greatly reducing the computational burden, and enabling mobile devices to achieve realistic rain ripple effects at a lower cost. Therefore, compared with traditional fluid simulation methods, the present invention is more suitable for resource-constrained scenarios such as mobile devices, and has higher real-time performance and performance efficiency.

[0154] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A rain ripple method based on a mobile platform, characterized in that: The method steps are as follows: Step 1: Generate a ripple data texture, the ripple data texture includes: an rx channel, a ry channel, an rz channel and an rw channel, the rx channel and the ry channel store the normal data of the ripple, the rz channel stores the center value of the ripple, the value range of the center value of the ripple is 0 to 1, and the rw channel stores the control time offset value; Step 2: Sample the ripple data texture in the fragment shader, remap the normal data of the ripple data texture, and obtain the remapped ripple data texture; Step 3: Obtain the ripple time coefficient t_frac by remapping the ripple data texture, and then obtain the ripple fade coefficient d_fade according to the ripple time coefficient; Step 4: Obtain the final impact factor f_factor of the ripple according to the ripple decay coefficient; Step 5: Calculate normal perturbation; Step 6: Create a ripple effect by applying a normal perturbation.

2. The mobile platform-based rain ripple method according to claim 1, characterized in that: Step 2 is further specifically as follows: sampling the ripple data texture in the fragment shader, that is, mapping the normal data rx channel and ry channel of the ripple data texture to the range [-1, 1], as follows: r_map.x = rx*2.0-1.0; r_map.y=ry*2.0-1.0; r_map.z = rz; r_map.w = rw; Where rx represents the x-direction component of the ripple's normal in the object's local coordinate system; r_map.x: maps to rx in the range [-1,1]; ry represents the y-direction component of the ripple's normal in the object's local coordinate system; r_map.y represents ry mapped to the range [-1,1]; r_map.z represents the center value of the ripple; r_map.w represents the time offset value. Get the remap ripple data texture r_map.

3. The mobile platform-based rain ripple method according to claim 2, characterized in that: Step 3 is further specified as follows: The ripple time coefficient is calculated as follows: t_frac=frac(r_map.w+t)-1.0+r_map.z; Among them, t_frac represents the ripple time coefficient, t represents the current elapsed time, and frac takes the value after the decimal point; The ripple decay coefficient is calculated as follows: d_fade=saturate(1.0-frac(r_map.w+t)); Among them, d_fade represents the ripple fade coefficient, t represents the current elapsed time, saturate represents the value range of 0-1, and frac represents the value after the decimal point.

4. The mobile platform-based rain ripple method according to claim 2, characterized in that: Step 4 is further specified as follows: using the cosine function and the ripple decay coefficient to calculate the final impact factor f_factor of the ripple: f_factor=d_fade*r_map.z*cos((0.5-abs(clamp(t_frac*9.0,0.0,3.0)))*3.1415926); Among them, d_fade represents the ripple fading coefficient, abs represents taking the absolute value, and clamp represents limiting the attribute value between the maximum and minimum values. When the value is between the maximum and minimum values, the given preferred value is used.

5. The mobile platform-based rain ripple method according to claim 2, characterized in that: Step 5 is further specifically as follows: the normal disturbance calculation formula is: normal disturbance = r.xy*f_factor*s; Among them, s represents the disturbance strength, r.xy represents the component of the ripple's normal between the x and y directions in the object's local coordinate system, and f_factor represents the final impact factor of the ripple.

6. The rain ripple method based on a mobile platform according to claim 1, characterized in that: Step 6 is further specified as follows: the normal of the final object = the normal perturbation of the original object + the normal perturbation. Then, the normal of the final object is affected by changing the normal perturbation to achieve a ripple effect.

7. A rain ripple system based on a mobile platform, characterized in that: The system includes a texture generation module, a sampling module, a coefficient calculation module, a final impact factor calculation module, a normal perturbation calculation module, and an application module; The texture generation module is used to generate ripple data texture, and the ripple data texture includes: rx channel, ry channel, rz channel and rw channel, the rx channel and ry channel store the normal data of the ripples, the rz channel stores the center value of the ripples, the value range of the center value of the ripples is 0 to 1, and the rw channel stores the time offset value; The sampling module is used to perform data texture sampling on the ripple data texture in the fragment shader, remap the normal data of the ripple data texture, and obtain the remapped ripple data texture; The coefficient calculation module is used to obtain the ripple time coefficient t_frac by remapping the ripple data texture, and then obtain the ripple fade coefficient d_fade according to the ripple time coefficient; The final impact factor calculation module is used to obtain the final impact factor f_factor of the ripple according to the ripple decay coefficient; The normal disturbance calculation module is used to calculate the normal disturbance; The application module is used to achieve the ripple effect by applying normal disturbance.

8. The rain ripple system based on a mobile platform according to claim 7, characterized in that: The sampling module is further specifically as follows: data texture sampling is performed on the ripple data texture in the fragment shader, that is, the normal data rx channel and ry channel of the ripple data texture are mapped to the range [-1,1], as follows: r_map.x = rx*2.0-1.0; r_map.y=ry*2.0-1.0; r_map.z = rz; r_map.w = rw; Where rx represents the x-direction component of the ripple's normal in the object's local coordinate system; r_map.x: maps to rx in the range [-1,1]; ry represents the y-direction component of the ripple's normal in the object's local coordinate system; r_map.y represents ry mapped to the range [-1,1]; r_map.z represents the center value of the ripple; r_map.w represents the time offset value; Get the remap ripple data texture r_map.

9. The rain ripple system based on a mobile platform according to claim 8, characterized in that: The coefficient calculation module is further specific as follows: the ripple time coefficient calculation is specific as follows: t_frac=frac(r_map.w+t)-1.0+r_map.z; Among them, t_frac represents the ripple time coefficient, t represents the current elapsed time, and frac takes the value after the decimal point; The ripple decay coefficient is calculated as follows: d_fade=saturate(1.0-frac(r_map.w+t)); Among them, d_fade represents the ripple fade coefficient, t represents the current elapsed time, saturate represents the value range of 0-1, and frac represents the value after the decimal point.

10. The rain ripple system based on a mobile platform according to claim 8, characterized in that: The final impact factor calculation module is further specified as follows: using the cosine function and the ripple decay coefficient to calculate the final impact factor f_factor of the ripple, as follows: f_factor=d_fade*r_map.z*cos((0.5-abs(clamp(t_frac*9.0,0.0,3.0)))*3.1415926); Among them, d_fade represents the ripple fading coefficient, abs represents taking the absolute value, and clamp represents limiting the attribute value between the maximum and minimum values. When the value is between the maximum and minimum values, the given preferred value is used.

11. The rain ripple system based on a mobile platform according to claim 8, characterized in that: The normal perturbation calculation module is further specified as follows: the normal perturbation calculation formula is: normal perturbation = r_map.xy*f_factor*s; wherein s represents the perturbation intensity, r.xy represents the component of the ripple's normal between the x and y directions in the object's local coordinate system, and f_factor represents the final impact factor of the ripple.

12. The rain ripple system based on a mobile platform according to claim 7, characterized in that: The application module is further specified as follows: the final object normal = the original object normal perturbation + the normal perturbation, and the ripple effect is achieved by changing the normal perturbation to affect the normal of the final object.