Visual special effect processing method and device, storage medium and terminal
Through partition optimization processing of complex features of particle operation, visual instability and resource waste caused by unbalanced particle count and motion state are solved, and the smoothness and efficiency of visual effects are improved.
Patent Information
- Application Number
- CN202510761561.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-09
AI Technical Summary
In complex special effects scenarios, the unbalanced particle number and motion state lead to unstable visual performance, waste of rendering resources and inefficient processing.
Through the partition optimization processing mechanism based on the complex characteristics of particle operation, fine analysis and dynamic regulation of particle state is carried out, including particle number statistics, angiopterytic frequency evaluation, region division, dynamic and static particle ratio calculation, particle lapse velocity detection, transparency screening and particle resurrection mechanism.
It improves the fluency of visual effects, reduces resource losses, and ensures the stability and processing efficiency of visual performance.
Smart Images

Figure CN120279144A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer graphics and image processing. More specifically, the present invention relates to a visual effect processing method, device, storage medium and terminal. Background Art
[0002] With the development of computer graphics, real-time rendering and visual effect technologies, particle systems have been widely used in scenarios such as movie special effects, game engines, virtual reality, etc. to simulate complex dynamic phenomena such as smoke, fire, water flow, explosion, etc. The basic unit of a particle system is a particle, and each particle has attributes such as position, velocity, transparency, life cycle, etc. Through the collaborative evolution of a large number of particles, the expression of realistic special effects is achieved; The existing technology has the following deficiencies: Currently, in complex special effect scenarios, the number and motion states of particles in different regions show significant differences. Problems such as particle aggregation, state imbalance, and rapid resource dissipation may occur in some regions, resulting in flickering, distortion or delay in the overall visual performance. A visual effect processing method, device, storage medium and terminal are proposed. Summary of the Invention
[0003] In order to overcome the above-mentioned defects of the existing technology, embodiments of the present invention provide a visual effect processing method, device, storage medium and terminal. Through a partition optimization processing mechanism based on the complex characteristics of particle operation, refined analysis and dynamic regulation of the particle state in the special effect area are realized, so as to solve the problems of unstable visual performance, waste of rendering resources and low processing efficiency caused by uneven particle distribution and unbalanced motion states in the existing technology.
[0004] To achieve the above object, the present invention provides the following technical solutions: A visual effect processing method, comprising the following steps: Step S1: Obtain the range of the special effect processing area, count the number of particles within the range of the special effect processing area, summarize the anisotropic frequencies of the particles, and evaluate the complex operation characteristics of the special effect processing area based on the number of particles and the anisotropic frequencies; Step S2: When the evaluation result of the special effect processing area is a high complex characteristic, divide the special effect processing area, obtain the particle states of each divided area and calculate the static-dynamic particle ratio, and detect the particle migration speed in each divided area; Step S3: Process the particle migration speed in the divided area, calculate the total particle operation loss of the divided area in combination with the static-dynamic particle ratio of the corresponding divided area, set a detection time point to screen the transparency of the particles in each divided area and evaluate the transparency change degree of the divided area; Step S4: Comprehensively judge whether to switch the particle displacement process in each divided area to particle resurrection based on the total loss of the divided area operation and the degree of transparency change.
[0005] In a preferred embodiment, in step S1, when counting the number of particles within the special effect processing area, first count the number of particles on the four boundaries of the special effect processing area, and then count the number of particles within the special effect processing area. Integrate the number of particles in these two parts to obtain the number of particles within the special effect processing area. Set particles with the same movement angle as co-directional particles; particles with different movement angles as non-co-directional particles. Set a frequency value when summarizing the non-co-directional frequency of particles. Every time a non-co-directional particle is detected within the special effect processing area, the frequency value is incremented by one. After traversing all particles within the special effect processing area, use the frequency value as the non-co-directional frequency.
[0006] In a preferred embodiment, in step S1, use the geometric mean method to evaluate the operation complexity characteristics of the special effect processing area based on the number of particles and the non-co-directional frequency: , where S is the number of particles in the special effect processing area, P is the non-co-directional frequency of the special effect processing area, and Y is the operation complexity characteristics of the special effect processing area.
[0007] In a preferred embodiment, in step S2, when the particle operation complexity characteristics of the special effect processing area exceed the preset particle complexity threshold, determine that the special effect processing area has high complexity characteristics; otherwise, determine that the special effect processing area has low complexity characteristics.
[0008] In a preferred embodiment, in step S2, the particle state is divided into dynamic particles and static particles. Static particles are particles that do not move in the divided area, and dynamic particles are particles that move in the divided area. Use the ratio of the number of dynamic particles to the number of static particles as the dynamic-static particle ratio of the divided area.
[0009] In a preferred embodiment, in step S3, detect the particle displacement speed in each divided area according to the particle state of each divided area, process the particle displacement speed, and perform smoothing processing on the original particle displacement speed sequence through a sliding mean filtering algorithm to obtain the average displacement speed. Perform standardization processing on the average displacement speed and the dynamic-static particle ratio of the corresponding divided area, and substitute it into the logistic regression formula to calculate the total loss of the divided area operation.
[0010] In a preferred embodiment, in step S3, the transparency values of the particles in each divided area are extracted at two respectively set detection times, which are respectively recorded as the current detection time transparency set and the previous detection time transparency set. The difference calculation is performed one by one on the corresponding particle transparency values in each set to obtain the transparency change degree of the divided area.
[0011] In a preferred embodiment, in step S4, the total operation loss of the divided area and the transparency change degree are standardized; The total operation loss of the divided area and the transparency change degree after the standardization process are substituted into the hyperbolic tangent mapping model to obtain the particle migration coefficient.
[0012] In a preferred embodiment, in step S4, the particle migration coefficient is compared with a preset migration threshold. If the particle migration coefficient is greater than or equal to the migration threshold, the particle migration process in each divided area is switched to particle resurrection. If the particle migration coefficient is less than the migration threshold, the original particle migration process mechanism is maintained.
[0013] A visual special effect processing device for implementing the above-mentioned visual special effect processing method, including a special effect evaluation device, a particle recognition device, an operation evaluation device, and a strategy regulation device; The special effect evaluation device is used to obtain the range of the special effect processing area, count the number of particles in the special effect processing area, summarize the anisotropic frequencies of the particles, and evaluate the operation complexity characteristics of the special effect processing area based on the number of particles and the anisotropic frequencies. The particle recognition device is used to, when the evaluation result of the special effect processing area is a high complexity characteristic, divide the special effect processing area, obtain the particle states of each divided area and calculate the static-dynamic particle ratio, and detect the particle migration speed in each divided area. The operation evaluation device is used to process the particle migration speed in the divided area, calculate the total particle operation loss of the divided area in combination with the static-dynamic particle ratio of the corresponding divided area, set detection time points to perform transparency screening on the particles in each divided area, and evaluate the transparency change degree of the divided area. The strategy regulation device is used to comprehensively judge whether to switch the particle migration process in each divided area to particle resurrection based on the total operation loss of the divided area and the transparency change degree.
[0014] The technical effects and advantages of the visual special effect processing method, device, storage medium, and terminal of the present invention: The present invention evaluates the operation complexity characteristics of the special effect processing area by obtaining the range of the special effect processing area, counting the number of particles and the particle movement directions within the special effect processing area. When the evaluation result of the special effect processing area is a high-complexity characteristic, the special effect processing area is divided, the particle states of each divided area are obtained and the static-dynamic particle ratio is calculated, the particle migration speed in each divided area is detected, the total particle operation loss of the divided area is calculated, a detection time point is set to perform transparency screening on the particles in each divided area and evaluate the degree of transparency change of the divided area, and it is judged whether to switch the particle migration processing in each divided area to particle resurrection based on the total operation loss and the degree of transparency change of the divided area, so as to improve the smoothness of the special effect and reduce the special effect loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of a visual special effect processing method of the present invention.
[0016] Figure 2 It is a flowchart of a visual special effect processing device of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0018] The present invention evaluates the operation complexity characteristics of the special effect processing area by obtaining the range of the special effect processing area, counting the number of particles and the particle movement directions within the special effect processing area. When the evaluation result of the special effect processing area is a high-complexity characteristic, the special effect processing area is divided, the particle states of each divided area are obtained and the static-dynamic particle ratio is calculated, the particle migration speed in each divided area is detected, the total particle operation loss of the divided area is calculated, a detection time point is set to perform transparency screening on the particles in each divided area and evaluate the degree of transparency change of the divided area, and it is judged whether to switch the particle migration processing in each divided area to particle resurrection based on the total operation loss and the degree of transparency change of the divided area, so as to improve the smoothness of the special effect and reduce the special effect loss.
[0019] Embodiment 1, a visual special effect processing method, as Figure 1 shown, includes the following steps: Step S1: Obtain the range of the special effect processing area, count the number of particles within the special effect processing area, summarize the different-direction frequencies of the particles, and evaluate the operation complexity characteristics of the special effect processing area based on the number of particles and the different-direction frequencies; Step S2: When the evaluation result of the special effect processing area is a high-complexity feature, the special effect processing area is divided into regions, the particle state of each divided area is obtained, the dynamic and static particle ratio is calculated, and the particle movement speed in each divided area is detected; Step S3: The particle movement speed in the divided area is processed, and the total particle operation loss of the divided area is calculated in combination with the dynamic and static particle ratio of the corresponding divided area, and the detection time point is set to screen the transparency of the particles in each divided area and evaluate the degree of transparency change of the divided area; Step S4: Comprehensively consider the total operating loss of the divided areas and the degree of transparency change to determine whether to switch the particle shifting process in each divided area to particle resurrection.
[0020] The specific implementation is as follows: In step S1, when obtaining the range of the special effect processing area, the special effect processing area is circled using an axis-aligned bounding box, and the rectangular or square area circled by the axis-aligned bounding box is used as the range of the special effect processing area; An axis-aligned bounding box is a simple geometric shape manipulation tool whose sides are parallel to the coordinate axes and is used to enclose the outer boundaries of a three-dimensional object.
[0021] When counting the number of particles within the special effect processing area, it is necessary to count two parts of particles. First, count the number of particles on the four boundaries of the special effect processing area, and then count the number of particles within the special effect processing area. The number of particles in the two parts is integrated to obtain the number of particles within the special effect processing area. In the two-dimensional coordinates, the movement direction of each different angle is different. The movement angle of each particle is counted within the special effect processing area, and particles with the same movement angle are set as isotropic particles; particles with different movement angles are set as heterotropic particles. When summarizing the anisotropic frequency of particles, the frequency value is set. Each time an anisotropic particle is detected within the special effect processing area, the frequency value is increased by one. After traversing all particles within the special effect processing area, the frequency value is used as the anisotropic frequency. The more particles there are in the special effects processing area or the higher the frequency of anisotropy, the more complex the operation characteristics within the special effects processing area are, and the more special effects optimization is needed.
[0022] The geometric mean method is used to evaluate the running complexity of the special effects processing area based on the number of comprehensive particles and the frequency of anomalies: , where S is the number of particles in the special effect processing area, P is the anisotropic frequency in the special effect processing area, and Y is the operation complexity characteristics of the special effect processing area.
[0023] It should be noted that the geometric mean method is a statistical method used to calculate the geometric mean of a set of values. In this example, it is used to calculate the complex characteristics of particle motion in the reaction special effects processing area.
[0024] By introducing an axis-aligned bounding box to accurately demarcate the special effect processing area, combining the statistical count of the number of particles on the region boundary and inside the region, and introducing an anisotropic frequency index, the motion state and distribution characteristics of the particles are comprehensively reflected. Further, the geometric mean method is used to fuse and evaluate the particle number and anisotropic frequency, effectively quantifying the operational complexity of the special effect processing area, thereby providing a scientific basis for subsequent region division and special effect optimization processing, and improving the processing efficiency and dynamic adaptability of the visual special effect system in high-complexity scenarios.
[0025] In step S2, the particle motion complexity characteristics of the special effect processing area are compared with a preset particle complexity threshold. When the particle motion complexity characteristics of the special effect processing area exceed the particle complexity threshold, it is determined that the special effect processing area has high complexity characteristics; when the particle motion complexity characteristics of the special effect processing area are lower than the particle complexity threshold, it is determined that the special effect processing area has low complexity characteristics.
[0026] When the evaluation result of the special effect processing area is high complexity characteristics, the special effect processing area is divided into regions to obtain the area of the special effect processing area. A division ratio is randomly set to divide the special effect processing area, and the ratio of the area of the special effect processing area to the division ratio is used as the area of each divided region.
[0027] For example, if the area of the special effect processing area is 100 cm² and the randomly set division ratio is 1 / 4, then the area of each divided region is 25 cm².
[0028] The particle state is divided into dynamic particles and static particles. Static particles are particles that do not move in the divided region, and dynamic particles are particles that move in the divided region. The number of dynamic particles and static particles is counted, and the ratio of the number of dynamic particles to the number of static particles is used as the dynamic-to-static particle ratio of the divided region; The larger the dynamic-to-static particle ratio of the divided region, the more dynamic particles there are in the divided region, the higher the cost of maintaining particle displacement in the divided region, and the more special effect optimization is required.
[0029] The optical flow method is used to detect the particle migration speed in each divided region, and the change of the same particle point between adjacent frames is used to estimate the motion speed of the object: , where c is the displacement change of the same particle between adjacent frames, t is the switching time between adjacent frames, and vd is the particle migration speed in the divided region.
[0030] Introduce a complex feature judgment mechanism into the special effect processing method. By comparing the complex features of particle movement with the preset particle complexity threshold, accurate recognition of high-complexity regions is achieved; then, the special effect area is adaptively divided based on the division ratio to improve the pertinence and efficiency of processing; the activity degree of particle movement is evaluated by combining the static-dynamic particle ratio, and the optical flow method is used to accurately measure the particle migration speed, comprehensively capture the changes in particle states, effectively improve the fineness and dynamic perception ability of special effect processing, and ensure the smoothness of visual performance and the optimization of system performance.
[0031] It should be noted that the optical flow method is a technique for calculating the movement of objects in an image sequence. By analyzing the pixel changes between adjacent frames, the movement speed and direction of the object are estimated.
[0032] In step S3, according to the particle states in each divided area, the particle migration speed in each divided area is detected, and the particle migration speed is processed. The original particle migration speed sequence is smoothed by the moving average filtering algorithm to obtain the average migration speed; The specific calculation formula for the smoothed migration speed is expressed as: ; In the formula, is the original particle migration speed, is the width of the moving window, , is the smoothed migration speed of the rd particle after processing, is the sum of the speed values within the window range around the particle ; The specific calculation formula for the average migration speed is expressed as: ; In the formula, is the number of particles in the divided area; The average migration speed and the static-dynamic particle ratio of the corresponding divided area are standardized, and substituted into the logistic regression formula to calculate the total running loss of the divided area; It should be noted that the methods of standardization include but are not limited to standard linear transformation based on interval scaling, Z-Score standardization method based on statistics, or normalization method based on non-linear mapping function. The application methods of standardization are not elaborated here; The specific formula is expressed as follows: ; In the formula, L is the result of logistic regression calculation, that is, the total running loss of the divided area, e is the natural logarithm base, y is the linear combination term of the logistic regression model, and specifically y is set as: ; In the formula, is the bias term, is the moving average speed, is the ratio of dynamic and static particles in the corresponding divided area, and are the regression coefficients of the moving average speed and the ratio of dynamic and static particles in the corresponding divided area respectively; As can be seen from the above, when the moving average speed and the ratio of dynamic and static particles in the corresponding divided area are higher, the total running loss of the divided area is higher, which indicates that the running activity of the particles in this area increases synchronously with the system load level, easily causing the accelerated decay of the particle life cycle, affecting the persistence and stability of the visual effects in the area, and causing violent fluctuations in the particle transparency, etc., which will not be elaborated here; After calculating the running loss of the particles in each divided area, in order to further evaluate the dynamic characteristic evolution of the particle system at the visual performance level, it is necessary to introduce the particle transparency attribute as a supplementary criterion. Since the change of transparency directly affects the persistence and perceptibility of the visual effects in the time domain, it and the running loss together constitute a dual judgment standard for the activity and energy consumption status of the particles in the divided area; Specifically, the degree of transparency change in the divided area refers to the mean difference of the transparency attribute values of all particles in the area at two set detection time points, which is used to quantify the obvious and hidden fluctuations of the area particles at the visual performance level; Furthermore, the acquisition logic of the degree of transparency change in the divided area is to extract the transparency values of the particles in each divided area through two respectively set detection times, which are respectively recorded as the transparency set at the current detection time and the transparency set at the previous detection time, and calculate the difference value of the corresponding particle transparency values in each set one by one to obtain the degree of transparency change in the divided area; It should be noted that the setting of the two detection times is obtained by the experimenters based on the periodic change characteristics of the particle motion state and the requirements of the visual effect system refresh rate and inter-frame stability, which will not be elaborated here; Even further, the calculation formula of the degree of transparency change in the divided area is: ; In the formula, is the degree of transparency change in the divided area, is the total number of particles participating in the transparency calculation in the divided area, represents the th particle at the detection time point of the transparency attribute value, is the th particle at the detection time point of the transparency attribute value, is the The absolute change in transparency of a particle between two detection time points is used to reflect the degree of visibility fluctuation of a single particle; Specifically, the greater the degree of transparency change in the divided area, the more drastic the change in the particle state in the area, and there are problems such as life cycle consumption and visual flicker instability; It should be noted that the transparency value extraction of particles in each divided area is based on the fusion technology of image attribute perception and particle state encoding. The experimenters can change the extraction method according to the actual configuration of the system rendering mechanism, the particle life cycle management strategy, and the GPU buffer transparency parameter reading ability. There is no limitation on the method of extracting the transparency value, which will not be elaborated here. In step S4, the total operating loss and transparency change degree of the divided areas are standardized; It should be noted that the standardization process has been described in the above content and will not be repeated here; Substitute the normalized total operating loss and transparency change of the divided area into the hyperbolic tangent mapping model to obtain the particle displacement coefficient. Among them, the hyperbolic tangent mapping model is based on the smooth S-shaped response characteristics of the hyperbolic tangent function. It can still maintain interval compression and has the ability of nonlinear enhancement when processing two high-amplitude inputs, which is suitable for the current scenario; Specifically, the hyperbolic tangent mapping model is expressed as: ; In the formula, is the particle displacement coefficient, is the total operating loss of the divided area after standardization, is the degree of transparency change after standardization. and The adjustable mapping coefficient of the total loss of the divided area after normalization and the degree of transparency change is used to balance the impact of the two; From the above, it can be seen that when the total loss of the divided area operation and the degree of transparency change are greater, the particle shift coefficient is greater, which means that the instability of the particle state in the current divided area is enhanced, the dissipation speed of particle resources is accelerated, and the existing particle shift processing mechanism is difficult to maintain the continuity and stability of visual effects. Therefore, it is necessary to further determine whether to switch the current particle shift mode to particle resurrection processing to improve the coordination of visual performance and the efficiency of system operation; The particle shift coefficient is compared with the preset shift threshold. If the particle shift coefficient is greater than or equal to the shift threshold, the particle shift processing in each divided area is switched to particle resurrection. If the particle shift coefficient is less than the shift threshold, the original particle shift processing mechanism is maintained. It should be noted that the preset migration threshold is comprehensively set by the experimenter based on the analysis results of historical rendering stability samples, output parameters of the particle life cycle evaluation model, etc., which will not be elaborated here; Among them, particle resurrection refers to the particle reconstruction and regeneration process automatically triggered by the system after the end of the particle life cycle or when the particle state reaches the visual effect tolerance limit. This process includes re-initializing the core parameters such as particle position, velocity, transparency, and life cycle, and re-injecting them into the current special effect scene to restore the particle density and visual consistency in the area, ensuring the continuity and stability of the special effect performance. The particle resurrection mechanism can not only enhance the overall dynamic expressiveness of the picture but also prevent the generation of visual hole effects after a large number of particles decay or disappear.
[0033] Embodiment 2
[0034] Please refer to Figure 2 , a visual effect processing device, including a special effect evaluation device, a particle recognition device, an operation evaluation device, and a strategy control device; The special effect evaluation device is used to obtain the range of the special effect processing area, count the number of particles in the special effect processing area, summarize the abnormal direction frequencies of the particles, and evaluate the operation complex characteristics of the special effect processing area based on the number of particles and the abnormal direction frequencies; The particle recognition device is used to divide the special effect processing area when the evaluation result of the special effect processing area is of high complex characteristics, obtain the particle states of each divided area and calculate the static-dynamic particle ratio, and detect the particle migration speed in each divided area; The operation evaluation device is used to process the particle migration speed in the divided area, calculate the total particle operation loss of the divided area in combination with the static-dynamic particle ratio of the corresponding divided area, set a detection time point to screen the transparency of the particles in each divided area and evaluate the transparency change degree of the divided area; The strategy control device is used to comprehensively judge whether to switch the particle migration processing in each divided area to particle resurrection based on the total operation loss and transparency change degree of the divided area.
[0035] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product.
[0036] Those of ordinary skill in the art will realize that the modules and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application of the technical solution and the inventive constraints. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0037] In addition, the functional modules in each embodiment of this application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
[0038] As described above, this is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0039] Finally: The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A visual effect processing method, characterized in that, It includes the following steps: Step S1: Obtain the range of the special effect processing area, count the number of particles within the special effect processing area, summarize the anisotropic frequencies of the particles, and evaluate the running complexity characteristics of the special effect processing area by integrating the number of particles and the anisotropic frequencies; Step S2: When the evaluation result of the special effect processing area is a high complexity characteristic, divide the special effect processing area, obtain the particle states of each divided area and calculate the ratio of moving particles to static particles, and detect the particle migration speed in each divided area; Step S3: Process the particle migration speed in the divided area, calculate the total particle running loss of the divided area by combining the ratio of moving particles to static particles in the corresponding divided area, set a detection time point to perform transparency screening on the particles in each divided area, and evaluate the degree of transparency change in the divided area; Step S4: Comprehensively judge whether to switch the particle migration processing in each divided area to particle resurrection based on the total particle running loss and the degree of transparency change in the divided area.
2. A visual special effect processing method according to claim 1, characterized in that: In step S1, when counting the number of particles within the special effect processing area, first count the number of particles on the four boundaries of the special effect processing area, and then count the number of particles within the special effect processing area, and integrate the two parts of the particle numbers to obtain the number of particles within the special effect processing area; Particles with the same movement angle are set as co-directional particles; particles with different movement angles are set as anisotropic particles; When summarizing the anisotropic frequencies of the particles, set a frequency value. Each time an anisotropic particle is detected within the special effect processing area, the frequency value is incremented by one. After traversing all the particles within the special effect processing area, the frequency value is used as the anisotropic frequency.
3. A visual special effect processing method according to claim 2, characterized in that: In step S1, the geometric mean method is used to evaluate the running complexity characteristics of the special effect processing area by combining the number of particles and the anisotropic frequency: , where S is the number of particles in the special effect processing area, P is the anisotropic frequency of the special effect processing area, and Y is the running complexity characteristics of the special effect processing area.
4. A visual special effect processing method according to claim 3, characterized in that: In step S2, when the particle running complexity characteristic of the special effect processing area exceeds a preset particle complexity threshold, it is determined that the special effect processing area has a high complexity characteristic; otherwise, it is determined that the special effect processing area has a low complexity characteristic.
5. A visual special effect processing method according to claim 1, characterized in that: In step S2, the particle states are divided into dynamic particles and static particles. Static particles are particles that do not move within the divided area, and dynamic particles are particles that move within the divided area. The ratio of the number of dynamic particles to the number of static particles is used as the ratio of moving particles to static particles in the divided area.
6. A visual special effect processing method according to claim 5, characterized in that: In step S3, according to the particle states of each divided area, detect the particle migration speed in each divided area, process the particle migration speed, and perform smoothing processing on the original particle migration speed sequence through a moving average filtering algorithm to obtain the average migration speed; Perform standardization processing on the average migration speed and the ratio of moving particles to static particles in the corresponding divided area, and substitute them into the logistic regression formula to calculate the total particle running loss of the divided area.
7. A visual special effect processing method according to claim 6, characterized in that: In step S3, the transparency values of the particles in each divided area are extracted at two respectively set detection times, which are respectively recorded as the transparency set at the current detection time and the transparency set at the previous detection time. The difference calculation is performed one by one on the corresponding particle transparency values in each set to obtain the degree of transparency change of the divided area.
8. A visual effect processing method according to claim 7, characterized in that: In step S4, the total running loss of the divided area and the degree of transparency change are subjected to a normalization process; The total running loss of the divided area and the degree of transparency change after the normalization process are substituted into the hyperbolic tangent mapping model to obtain the particle migration coefficient.
9. A visual effect processing method according to claim 8, characterized in that: In step S4, the particle migration coefficient is compared with a preset migration threshold. If the particle migration coefficient is greater than or equal to the migration threshold, the particle migration process in each divided area is switched to particle resurrection. If the particle migration coefficient is less than the migration threshold, the original particle migration processing mechanism is maintained.
10. A visual effect processing device, based on the visual effect processing method according to any one of claims 1-9, characterized in that, It includes a special effect evaluation device, a particle recognition device, a running evaluation device, and a strategy control device; The special effect evaluation device is used to obtain the range of the special effect processing area, count the number of particles in the special effect processing area, summarize the anisotropic frequencies of the particles, and evaluate the running complex characteristics of the special effect processing area based on the number of particles and the anisotropic frequencies; The particle recognition device is used to divide the special effect processing area when the evaluation result of the special effect processing area is a high complex characteristic, obtain the particle states of each divided area and calculate the static-dynamic particle ratio, and detect the particle migration speed in each divided area; The running evaluation device is used to process the particle migration speed in the divided area, calculate the total particle running loss of the divided area in combination with the static-dynamic particle ratio of the corresponding divided area, set detection time points to screen the transparency of the particles in each divided area and evaluate the degree of transparency change of the divided area; The strategy control device is used to comprehensively judge whether to switch the particle migration process in each divided area to particle resurrection based on the total running loss of the divided area and the degree of transparency change.
Citation Information
Patent Citations
Particle effect editing method and system based on Unity3D and NGUI
CN106952329A
Particle system-based global rainfall effect simulation method
CN107886574A
Particle rendering method and device and electronic equipment
CN109949398A
Content-related GPU real-time particle effect method
CN113487474A
WebGL-based three-dimensional wind diagram visualization rendering method
CN114549714A
