A particle special effect rendering method for simulating extreme working conditions in a virtual engine
By adopting a decoupled particle system architecture and a self-developed physical calculation model, the problems of insufficient physical characteristics, rendering accuracy and visual effects in particle effects rendering under fire conditions have been solved. Particle effects rendering with high physical realism and high real-time performance has been achieved, which is suitable for industrial simulation, power operation and maintenance and emergency drills.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING JINYU INFORMATION TECH CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-02
AI Technical Summary
Existing particle effects rendering technology for fire scenarios is inadequate in terms of physical property reproduction, rendering accuracy and real-time performance, and visual effect reproduction. Furthermore, domestic engines have failed to leverage their customization advantages.
It adopts a decoupled particle system architecture, constructs particle initialization results by acquiring fire scene parameters, calculates dynamic trajectories and generates dynamic light and shadow fusion results, and combines a self-developed physical calculation model and a lightweight rendering algorithm to achieve high physical realism and high real-time rendering.
It improves the physical fidelity and real-time performance of fire particle effects, meets the high standards of industrial simulation, and fully leverages the advantages of domestically produced engines in terms of independent control and deep customization.
Smart Images

Figure CN121904253B_ABST
Abstract
Description
Technical Field
[0001] This disclosure belongs to the field of particle rendering technology, and more specifically, relates to a method for rendering particle effects in a virtual engine to simulate extreme working conditions. Background Technology
[0002] Particle effects rendering is one of the core functions of a 3D virtual engine, widely used in industrial simulation, power system operation and maintenance, building safety simulation, emergency drills, and other fields. Among them, particle effects simulation of extreme conditions such as fires is a key technical requirement for industrial-grade simulation scenarios. Its core objective is to realistically reproduce the physical characteristics and visual effects under extreme conditions through particle generation, movement, and rendering.
[0003] Currently, the technical solutions for rendering particle effects in fire scenarios in the industry are mainly divided into two categories: one is the implementation based on general particle systems of commercial 3D engines (such as Unity and Unreal Engine). This type of solution simulates fire effects by presetting initial particle parameters, texture mapping, and basic physical collision algorithms. For example, particle color gradients and linear drifting animations are used to represent the burning effect of flames. The other type is the implementation solution from 3D engine vendors. This solution usually directly transplants the particle rendering logic of commercial engines and has not yet been customized and optimized for the actual needs of industrial simulation. Only simple adjustments are made to the interface and basic parameters.
[0004] Therefore, while existing particle effects rendering solutions for fire scenarios can achieve basic visual simulation, they still have the following shortcomings in terms of technology and performance when combined with the actual application requirements of industrial simulation:
[0005] (1) Low physical property reproduction: The general particle system of commercial engines is not designed for the specific physical laws of fire, and lacks simulation of key physical processes such as flame turbulence diffusion, heat convection, and heat exchange between the fire source and the surrounding environment, resulting in a large deviation between the simulation effect and the actual fire conditions.
[0006] (2) Difficulty in balancing rendering accuracy and real-time performance: When existing solutions increase the number of particles to ensure rendering accuracy, a significant drop in frame rate occurs. When the number of particles reaches 50,000, the rendering frame rate of commercial engines is generally below 30fps, which is difficult to meet the stringent requirements of industrial simulation for real-time interaction;
[0007] (3) Insufficient visual effect reproduction: Existing fire rendering schemes lack realistic representation of light and shadow effects such as flame glow and thermal smoke volume diffusion, making it difficult to meet the high standards of visualization quality required by industrial simulation.
[0008] (4) Domestic engines have the disadvantage of technology transfer: Most domestic 3D engines directly reuse the particle rendering logic of commercial engines, failing to give full play to the customization advantages of domestic engines, and the core algorithms are limited by the technical barriers of commercial engines. Summary of the Invention
[0009] To address the shortcomings of existing technologies, the present invention aims to overcome the aforementioned deficiencies and propose a particle effects rendering method for simulating extreme working conditions in a virtual engine.
[0010] The present invention adopts the following technical solution.
[0011] The first aspect of this invention discloses a method for rendering particle effects in a virtual engine to simulate extreme working conditions, the method comprising:
[0012] Obtain fire scene parameters and construct a decoupled particle system architecture within the virtual engine based on the fire scene parameters to generate particle initialization results;
[0013] The particle quota for the fire source area is determined by the particle initialization results, and fire particles are generated based on the particle quota for the fire source area to construct different types of initial particle states.
[0014] Based on the different types of initial particle states, the dynamic trajectory of the fire particles is calculated, and the first particle state after the particle trajectory update is determined according to the dynamic trajectory.
[0015] The interaction behavior between fire particles and scene materials is determined by the first particle state, and a second particle state with updated particle behavior is generated based on the interaction behavior.
[0016] Particle rendering is performed based on the second particle state to generate dynamic light and shadow fusion results, and fire particle effect frames are drawn based on the dynamic light and shadow fusion results.
[0017] The fire scene parameters include fire source power, ambient wind speed, ambient temperature, and gravitational acceleration; the decoupled particle system architecture includes a physical calculation layer, a particle behavior layer, and a rendering output layer.
[0018] Furthermore, the step of acquiring fire scene parameters and constructing a decoupled particle system architecture within the virtual engine based on the fire scene parameters to generate particle initialization results includes:
[0019] The fire source power, ambient wind speed, ambient temperature and gravitational acceleration are time aligned to obtain aligned fire scene parameters, and the aligned fire scene parameters are mapped to the data slots of the physical computing layer within a preset sampling period and time window.
[0020] Within a time window, the fire source power and ambient wind speed are weighted and smoothed to obtain the equivalent fire source power and equivalent wind speed, and the equivalent fire source power and equivalent wind speed are sent to the physical computing layer.
[0021] The physical calculation layer constructs a thermal buoyancy correction factor based on the equivalent fire source power, equivalent wind speed, and ambient temperature, and integrates the thermal buoyancy correction factor, equivalent fire source power, equivalent wind speed, and ambient temperature into fire physical characteristic parameters.
[0022] Furthermore, the step of acquiring fire scene parameters and constructing a decoupled particle system architecture within the virtual engine based on the fire scene parameters to generate particle initialization results also includes:
[0023] In the physical calculation layer, the initial particle generation density of the fire source area is calculated based on the equivalent fire source power, equivalent wind speed and thermal buoyancy correction factor, and the initial particle quantity of various fire particles is determined based on the initial particle generation density.
[0024] Based on the initial particle generation density and the initial particle quantity of various types of fire particles, initial particle generation control parameters are constructed to generate the particle initialization result according to the initial particle quantity of various types of fire particles and the initial particle generation control parameters.
[0025] Furthermore, the step of determining the particle quota for the fire source area based on the particle initialization result, and generating fire particles based on the fire source area particle quota to construct different types of initial particle states includes:
[0026] The initial particle generation density is read from the particle initialization result through the particle behavior layer, and a generation window for fire particles in the current frame is established in the fire source area to calculate the total number of fire particles generated in the current frame within the generation window.
[0027] Different target weights are set for various types of fire particles, and the total number of particles generated is normalized and allocated according to the target weights to obtain the fire source area particle quotas corresponding to various types of fire particles.
[0028] Furthermore, the step of determining the particle quota for the fire source area based on the particle initialization result, and generating fire particles based on the fire source area particle quota to construct different types of initial particle states, also includes:
[0029] Based on the particle quota of the fire source area, the initial positions of various fire particles are determined in the fire source area, so that the fire source area is equivalent to a two-dimensional circular area based on the initial positions, and the spatial initialization distribution of various fire particles is generated by layered radius sampling.
[0030] Based on the spatial initialization distribution of the various types of fire particles, initial velocity and life cycle parameters are assigned to each fire particle, and the initial velocity and life cycle parameters are integrated into the initial dynamic parameters of the corresponding type of fire particle.
[0031] The initial dynamic parameters are classified and encapsulated according to the type of fire particles, and the encapsulated fire particles are screened to remove fire particles whose initial velocity or life cycle parameters do not meet the set requirements, so as to obtain the initial particle state corresponding to each type of fire particle.
[0032] Furthermore, the step of calculating the dynamic trajectory of the fire particles based on the different types of initial particle states, and determining the first particle state after the particle trajectory update based on the dynamic trajectory, includes:
[0033] The particle behavior layer reads the real-time position, real-time velocity, real-time lifespan, and real-time particle size of each fire particle from the initial particle state, and maps various types of fire particles into a unified dynamic solution format to calculate the thermal convection buoyancy coefficient, local wind field coupling coefficient, and equivalent mass of each fire particle based on the real-time position, real-time velocity, real-time lifespan, and real-time particle size.
[0034] The thermal convection buoyancy, turbulent disturbance force, and wind field force are calculated based on the thermal convection buoyancy coefficient, local wind field coupling coefficient, and equivalent mass corresponding to each fire particle. The combined acceleration of each fire particle is then determined based on the thermal convection buoyancy, turbulent disturbance force, and wind field force.
[0035] Discrete-time integration is performed on the real-time velocity and real-time position of various fire particles based on the synthetic acceleration to obtain particle trajectory update results, and the first particle state is generated based on the particle trajectory update results.
[0036] Furthermore, the step of determining the interaction behavior between the fire particles and the scene material through the first particle state, and generating a second particle state updated based on the interaction behavior, includes:
[0037] The particle behavior layer matches the real-time position of each fire particle with the spatial index of the scene material to determine whether the fire particle has entered the interaction distance threshold of the scene material, and obtains the equivalent contact area and contact determination coefficient corresponding to the fire particle that has entered the interaction distance threshold.
[0038] The material combustion response coefficient, local heat exchange amount, and material response energy factor are calculated based on the equivalent contact area and contact determination coefficient. The particle behavior of various fire particles is dynamically adjusted based on the material combustion response coefficient, local heat exchange amount, and material response energy factor to obtain particle behavior adjustment parameters.
[0039] Based on the particle behavior adjustment parameters, the first particle state is updated to obtain the second particle state.
[0040] Furthermore, the step of performing particle rendering based on the second particle state to generate a dynamic light and shadow fusion result, and drawing fire particle effect frames based on the dynamic light and shadow fusion result, includes:
[0041] The rendering output layer sends various fire particles to their respective rendering channels, and extracts particle energy state parameters from the second particle state to convert the particle energy state parameters into particle rendering attribute parameters.
[0042] Based on the particle rendering attribute parameters, gradient texture mapping is performed on various fire particles to obtain gradient texture mapping results. Then, a dynamic light and shadow fusion algorithm is called to process the gradient texture mapping results to obtain dynamic light and shadow fusion results corresponding to various fire particles.
[0043] The dynamic light and shadow fusion result is written into the drawing buffer, and various fire particles are drawn according to the preset drawing constraints of each frame through the drawing buffer to output the fire particle effect frame.
[0044] A second aspect of the present invention discloses a particle effect rendering apparatus for simulating extreme working conditions in a virtual engine, used to implement the particle effect rendering method for simulating extreme working conditions in a virtual engine as described in any one of the first aspects, the apparatus comprising:
[0045] The particle initialization module is used to acquire fire scene parameters and construct a decoupled particle system architecture within the virtual engine based on the fire scene parameters to generate particle initialization results.
[0046] The particle state construction module is used to determine the particle quota of the fire source area through the particle initialization result, and generate fire particles based on the particle quota of the fire source area to construct different types of initial particle states.
[0047] The particle trajectory update module is used to calculate the dynamic trajectory of the fire particles based on the different types of initial particle states, and determine the first particle state after the particle trajectory update based on the dynamic trajectory.
[0048] The particle behavior update module is used to determine the interaction behavior between fire particles and scene materials through the first particle state, and generate a second particle state after particle behavior update based on the interaction behavior.
[0049] The particle rendering module is used to perform particle rendering based on the second particle state to generate dynamic light and shadow fusion results, and to draw fire particle effect frames based on the dynamic light and shadow fusion results.
[0050] The fire scene parameters include fire source power, ambient wind speed, ambient temperature, and gravitational acceleration; the decoupled particle system architecture includes a physical calculation layer, a particle behavior layer, and a rendering output layer.
[0051] A third aspect of the present invention discloses a terminal, including a processor and a storage medium;
[0052] The storage medium is used to store instructions;
[0053] The processor is configured to operate according to the instructions to perform the steps of the method described in the first aspect.
[0054] A fourth aspect of the present invention discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0055] The beneficial effects of the present invention are as follows: Compared with the prior art, the present invention has the following advantages:
[0056] (1) This invention obtains fire scene parameters and constructs a decoupled particle system architecture within the virtual engine based on these parameters to generate particle initialization results. Then, it determines the particle quota for the fire source area based on the particle initialization results and generates fire particles based on this quota to construct different types of initial particle states. Based on these different types of initial particle states, it calculates the dynamic trajectory of the fire particles and determines the updated particle state based on the dynamic trajectory. It also determines the interaction behavior between the fire particles and the scene materials based on the updated particle state, and generates the updated particle state based on the interaction behavior. This effectively overcomes the technical defects of existing technologies, such as low physical fidelity, poor real-time performance, and unsatisfactory visual effects.
[0057] (2) This invention performs particle rendering based on the particle state after particle behavior is updated to generate dynamic light and shadow fusion results, and draws fire particle effect frames based on the dynamic light and shadow fusion results. It designs a customized particle system for the exclusive physical laws of fire, integrates self-developed physical calculation model and lightweight rendering algorithm, and realizes high physical realism and high real-time rendering of fire particle effects. It gives full play to the advantages of the domestic self-developed engine being independent, controllable and deeply customized, and has a high degree of adaptability to actual application scenarios such as industrial simulation, power operation and maintenance and emergency drills. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating a particle effects rendering method for simulating extreme working conditions in a virtual engine, provided by the present invention.
[0059] Figure 2 This is a schematic diagram of the structure of a particle effect rendering device for simulating extreme working conditions in a virtual engine, provided by the present invention. Detailed Implementation
[0060] The present application will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, and should not be construed as limiting the scope of protection of the present application.
[0061] like Figure 1 As shown in one embodiment, a particle effects rendering method for simulating extreme conditions in a virtual engine includes the following steps:
[0062] Step S110: Obtain fire scene parameters and construct a decoupled particle system architecture within the virtual engine based on the fire scene parameters to generate particle initialization results.
[0063] The fire scene parameters include fire source power, ambient wind speed, ambient temperature, and gravitational acceleration; the decoupled particle system architecture includes a physical calculation layer, a particle behavior layer, and a rendering output layer.
[0064] In some embodiments, the particle effect rendering method for simulating extreme working conditions in a virtual engine provided by the present invention includes the following steps in step S110:
[0065] Step S111: Time alignment processing is performed on the fire source power, ambient wind speed, ambient temperature and gravitational acceleration to obtain aligned fire scene parameters, and the aligned fire scene parameters are mapped to the data slots of the physical computing layer within the preset sampling period and time window.
[0066] Step S112: Within the time window, perform weighted smoothing on the fire source power and ambient wind speed to obtain the equivalent fire source power and equivalent wind speed, and send the equivalent fire source power and equivalent wind speed to the physical calculation layer.
[0067] Step S113: The physical calculation layer constructs a thermal buoyancy correction factor based on the equivalent fire source power, equivalent wind speed and ambient temperature, and integrates the thermal buoyancy correction factor, equivalent fire source power, equivalent wind speed and ambient temperature into fire physical characteristic parameters.
[0068] In some embodiments, the particle effect rendering method for simulating extreme working conditions in a virtual engine provided by the present invention further includes the following steps in step S110:
[0069] Step S114: In the physical calculation layer, calculate the initial particle generation density of the fire source area based on the equivalent fire source power, equivalent wind speed and thermal buoyancy correction factor, and determine the initial particle quantity of various types of fire particles based on the initial particle generation density.
[0070] Step S115: Based on the initial particle generation density and the initial particle quantity of various types of fire particles, construct initial particle generation control parameters to generate particle initialization results according to the initial particle quantity of various types of fire particles and the initial particle generation control parameters.
[0071] The initial particle generation control parameters include equivalent fire source power, equivalent wind speed, and thermal buoyancy correction factor.
[0072] In a specific embodiment, the present invention provides a particle effect rendering method for simulating extreme working conditions in a virtual engine, comprising steps 1 to 5:
[0073] Step 1: Construct a three-layer architecture for the decoupled particle system and initialize the fire physics calculation parameters.
[0074] Includes the following sub-steps:
[0075] Sub-step 1.1: Construct a three-layer architecture for the decoupled particle system and generate a unified set of sampling parameters.
[0076] Specifically, a decoupled three-layer particle system architecture is first constructed within the virtual engine, including a physics calculation layer, a particle behavior layer, and a rendering output layer. Then, raw fire environment parameters are acquired, and the fire source power, ambient wind speed, ambient temperature, and gravitational acceleration are aligned to a unified time base. The sampling period, statistical time window, and number of sampling points within the time window are set, and the raw environment parameters are mapped to the data slots in the physics calculation layer. Furthermore, to avoid transient jitter interference in subsequent particle generation, time-window weighted smoothing is performed on the fire source power and ambient wind speed to obtain equivalent fire source power and equivalent wind speed. Time-window weighted smoothing is used for time-weighted averaging and root mean square equivalent representation, ensuring that the physics calculation layer outputs stable input parameters that can be used for subsequent density calculation.
[0077] Sub-step 1.2: Calculate the physical characteristic parameters of the fire.
[0078] Specifically, the equivalent fire source power and equivalent wind speed are fed into the physics calculation layer, and a thermal buoyancy correction factor is constructed in conjunction with the ambient temperature. This thermal buoyancy correction factor is used to describe the relative strength between the fire source's thermal drive and the environment's inhibition, and its expression is:
[0079] ;
[0080] In the formula, This is a thermal buoyancy correction factor; This represents the wind speed suppression coefficient, with a value range of 0.08-0.25 s / m. This represents the temperature difference suppression coefficient, with a value range of 0.002-0.01 and a unit of 1 / K. This indicates a reference temperature, ranging from 293 to 298 K. The ambient temperature is expressed in Kelvin (K); the gravitational acceleration is taken as 9.8-9.81 m / s². 2 The core essence of this formula is to use the denominator to constrain environmental disturbances, and then use the cube root to weaken the nonlinear burst when the fire source power increases extremely, so that the initial density of subsequent particles will not show a distorted sudden increase.
[0081] Sub-step 1.3 generates the initial particle generation control parameter set.
[0082] Specifically, in the physical calculation layer, the initial particle generation density in the fire source region is calculated based on the equivalent fire source power, equivalent wind speed, and thermal buoyancy correction factor, and the initial number of core flame particles, hot smoke particles, and spark particles is further calculated.
[0083] The expression for the initial particle generation density is:
[0084] ;
[0085] In the formula, This represents the initial particle generation density, expressed in particles / (m²). 3 ·s); This represents the influence coefficient of fire source power, with a value range of 0.3-0.8; This represents the wind speed influence coefficient, with a value range of 0.1-0.4 s / m; This indicates the characteristic temperature inside the fire source, with a value range of 900-1500K; This indicates the ambient temperature after time window processing, in Kelvin (K).
[0086] Then, based on the effective area of the fire source region, the initial number of core flame particles, hot smoke particles and spark particles are calculated according to the preset ratio coefficient.
[0087] Sub-step 1.4 outputs the particle initialization results.
[0088] Specifically, based on the initial quantities of core flame particles, hot smoke particles, and spark particles, the particle behavior layer initializes the core flame particle set, hot smoke particle set, and spark particle set respectively, and writes the initial position, initial velocity, initial lifespan, and category identifier for each particle. The initial velocity is assigned using a categorized method: the initial velocity of core flame particles is 0.8-2.5 m / s in the opposite direction of gravity; the initial velocity of hot smoke particles is 0.3-1.5 m / s with a wind speed offset; and the initial velocity of spark particles is 2-8 m / s with a random launch angle. These are then integrated into a unified particle initial state set, which is written back to the rendering output layer's rendering queue entry as the particle initialization result.
[0089] Step S120: Determine the particle quota for the fire source area based on the particle initialization results, and generate fire particles based on the particle quota for the fire source area to construct different types of initial particle states.
[0090] In some embodiments, the particle effect rendering method for simulating extreme working conditions in a virtual engine provided by the present invention includes the following steps in step S120:
[0091] Step S121: Read the initial particle generation density from the particle initialization result through the particle behavior layer, and establish the generation window of the fire particles in the current frame within the fire source area, so as to calculate the total number of fire particles generated in the current frame within the generation window.
[0092] Step S122: Set different target weights for various types of fire particles, and normalize and allocate the total number of particles generated according to the target weights to obtain the fire source area particle quotas corresponding to various types of fire particles.
[0093] In some embodiments, the particle effect rendering method for simulating extreme working conditions in a virtual engine provided by the present invention further includes the following steps in step S120:
[0094] Step S123: Determine the initial positions of various fire particles in the fire source area according to the particle quota of the fire source area, so as to convert the fire source area into a two-dimensional circular area based on the initial positions, and generate the spatial initial distribution of various fire particles through layered radius sampling.
[0095] Step S124: Based on the spatial initialization distribution of various types of fire particles, assign initial velocity and lifetime parameters to each fire particle, and integrate the initial velocity and lifetime parameters into the initial dynamic parameters of the corresponding type of fire particle.
[0096] Step S125: Classify and encapsulate the initial dynamic parameters according to the type of fire particles, and screen the encapsulated fire particles to remove fire particles whose initial velocity or life cycle parameters do not meet the set requirements, so as to obtain the initial particle state corresponding to each type of fire particle.
[0097] In a specific embodiment, the present invention provides a particle effect rendering method for simulating extreme working conditions in a virtual engine. Step 2, performing a fire particle generation stage and constructing a multi-type particle set, includes the following sub-steps:
[0098] In sub-step 2.1, the particle behavior layer first reads the initial particle generation density given by the physics calculation layer in step 1, and establishes a particle generation window for this frame within the fire source region. To avoid local congestion or inter-frame spikes caused by directly generating particles at a fixed ratio, a fire source area and channel correction coefficient are introduced in this sub-step to constrain the total number of particles allowed to be generated in this frame. Therefore, the expression for the total particle generation is:
[0099] ;
[0100] In the formula, This indicates the total number of particles generated in this frame, expressed in units of particles. This represents the initial particle generation density output from step 1, in units of particles / (m²). 2 ·s); This indicates the area of the fire source region, in meters (m²). 2 It can be obtained from the projected area of the fire source enclosure or the effective combustion area of the fire source; This indicates the duration of the current simulation frame, with a value ranging from 0.01 to 0.05 seconds. This represents the congestion suppression coefficient, with a value ranging from 0.2 to 0.8. This represents the occupancy rate of the particle behavior layer's queue to be updated, with a value ranging from 0 to 1.
[0101] After obtaining the total number of particles generated in this frame, a normalized allocation is performed according to the preset target weights of the three types of particles to obtain the particle quotas for the fire source area corresponding to each of the three types of fire particles. That is, the target weights are jointly set based on the fire source type, fire source area area, equivalent fire source power, and equivalent wind speed. When the fire source area is a point source fire scenario with concentrated release and small lateral expansion, the target weights of the three types of fire particles can be set to 0.60 for core flame particles, 0.30 for hot smoke particles, and 0.10 for spark particles; when the fire source area is a continuous area fire scenario with a large lateral coverage, the target weights of the three types of fire particles can be set to 0.45 for core flame particles, 0.40 for hot smoke particles, and 0.15 for spark particles; when the fire source area has local explosions, splashes, or strong disturbance projection phenomena, the target weights of the three types of fire particles can be set to 0.50 for core flame particles, 0.30 for hot smoke particles, and 0.20 for spark particles.
[0102] Sub-step 2.2: Construct the spatial initialization distribution of the three types of particles.
[0103] Specifically, the particle behavior layer generates the initial positions of core flame particles, hot smoke particles, and spark particles within the fire source region based on the three types of particle quotas obtained in sub-step 2.1. Since the three types of particles have different physical origins, separate position sampling rules need to be constructed. For core flame particles, the positions should be concentrated in the effective combustion core area of the fire source; for hot smoke particles, the positions should cover the diffusion initiation area above the fire source; and for spark particles, the positions should be biased towards the high-energy ejection area at the edge of the fire source. Therefore, the fire source region is equivalent to a two-dimensional circular generation domain with a fixed radius, and a layered radius sampling method is used to generate the initial polar radius of each particle. Essentially, this utilizes the square root distribution to achieve uniform sampling of the surface region, and then uses a core contraction coefficient to compress the core flame particles to a position closer to the center of the fire source. The sampling radii for hot smoke particles and spark particles are similarly calculated. Finally, the polar coordinates of each type of fire particle are converted into corresponding position coordinates to obtain the spatial initialization distribution of the three types of particles.
[0104] Sub-step 2.3: Calculate the initial dynamic parameters of the three types of particles.
[0105] Specifically, after determining the initial position, the particle behavior layer continues to assign initial velocity and lifecycle parameters to each particle. Since the current step is still in the particle generation stage, a complete motion integration is not performed here; only the initial dynamic conditions before entering the next stage are given. Among them, the initial velocity of the core flame particles is mainly vertically upward, the initial velocity of the hot smoke particles is mainly slow ascent and lateral diffusion, and the initial velocity of the Martian particles is mainly high-speed ejection.
[0106] In this embodiment, to ensure that the life cycle is consistent with the fire source intensity, environmental suppression, and particle size, the first... The expression for the initial lifetime of a particle is:
[0107] ;
[0108] In the formula, Indicates the first The first in the particle class The lifetime of a particle, measured in seconds; These correspond to three types of particles; Indicates the first The baseline lifetimes of the particles are as follows: the baseline lifetime of core flame particles ranges from 0.3 to 1.0 s, the baseline lifetime of hot smoke particles ranges from 1.5 to 4.0 s, and the baseline lifetime of Martian particles ranges from 0.2 to 0.8 s. This represents the smoothed equivalent fire source power in step 1; This indicates the reference heat source power, with a value range of 100-1000kW; Indicates the fire source enhancement coefficient; Indicates the wind speed attenuation coefficient; This represents the equivalent wind speed obtained in step 1; Indicates the particle size sensitivity coefficient; Indicates the first The equivalent particle size, in meters.
[0109] In terms of velocity settings, the initial velocity scalar of the core flame particles is set to 0.8-2.5 m / s, the initial velocity scalar of the hot smoke particles is set to 0.3-1.5 m / s, and the initial velocity scalar of the spark particles is set to 2-8 m / s. Then, different azimuth and elevation angles are assigned according to the region where each particle is located to form three types of velocity sets.
[0110] Sub-step 2.4: Initial particle state generation.
[0111] Specifically, based on the velocity and lifecycle sets output from sub-step 2.3, the particle behavior layer encapsulates the core flame particles, hot smoke particles, and spark particles into three types of particle object sets. Each particle object contains at least five attributes: unique ID, initial position, initial velocity, lifecycle, particle size, and category ID. To ensure the batch processing efficiency of particle motion calculations in the next stage, a validity screening is performed on the three types of particle sets after encapsulation to remove abnormal particles with lifecycles less than the minimum threshold or initial velocities exceeding the category upper limit.
[0112] Step S130: Calculate the dynamic trajectory of the fire particles based on different types of initial particle states, and determine the first particle state after the particle trajectory update based on the dynamic trajectory.
[0113] In some embodiments, the particle effect rendering method for simulating extreme working conditions in a virtual engine provided by the present invention includes the following steps in step S130:
[0114] Step S131: Read the real-time position, real-time velocity, real-time lifespan, and real-time particle size of each fire particle from the initial particle state through the particle behavior layer, and map all types of fire particles into a unified dynamic solution format to calculate the thermal convection buoyancy coefficient, local wind field coupling coefficient, and equivalent mass of each fire particle based on the real-time position, real-time velocity, real-time lifespan, and real-time particle size.
[0115] Step S132: Calculate the thermal convection buoyancy, turbulent disturbance force, and wind field force according to the thermal convection buoyancy coefficient, local wind field coupling coefficient, and equivalent mass corresponding to each fire particle, and determine the composite acceleration of each fire particle based on the thermal convection buoyancy, turbulent disturbance force, and wind field force.
[0116] Step S133: Perform discrete-time integration on the real-time velocity and real-time position of various fire particles based on the synthetic acceleration to obtain the particle trajectory update result, and generate the first particle state based on the particle trajectory update result.
[0117] The first particle state includes the real-time spatial distribution of particles, the real-time velocity of particles, and the remaining lifetime of particles, used to characterize the motion of various fire particles after completing the dynamic trajectory update. Understandably, it first determines the resultant acceleration based on thermal convection buoyancy, turbulent disturbance force, and wind field force by the particle behavior layer, then performs discrete-time integration on the real-time velocity and real-time position, and updates the remaining lifetime simultaneously. After that, it is filtered by lifetime threshold, scene boundary threshold, and ultimate velocity threshold to finally form the first particle state.
[0118] In a specific embodiment, the present invention provides a particle effects rendering method for simulating extreme working conditions in a virtual engine. Step 3, executing the particle motion phase and calculating the dynamic trajectory of fire particles, includes the following sub-steps:
[0119] Sub-step 3.1: Calculate intermediate parameters for particle dynamics solution.
[0120] Specifically, the particle behavior layer first receives the particle state set output from step 2, and then reads the current position, initial velocity, current lifespan, and particle size of each particle from the core flame particle set, hot smoke particle set, and spark particle set. In order to enter the particle motion stage, it is necessary to map different types of particles to a unified dynamic solution format, that is, to calculate the thermal convection buoyancy coefficient, local wind field coupling coefficient, and equivalent mass for each particle.
[0121] The expression for the thermal convection buoyancy coefficient is:
[0122] ;
[0123] In the formula, Indicates the first The thermal convection buoyancy coefficient of an individual particle, in m / s 2 ; This represents the acceleration due to gravity, taken as 9.8-9.81 m / s². 2 ; Indicates the first The characteristic temperatures of each particle are as follows: core flame particles are 900-1500K, hot smoke particles are 450-900K, and spark particles are 700-1300K. This indicates the ambient temperature, expressed in Kelvin (K). This represents the stable term in the floating denominator, with a value range of 1-5K.
[0124] The expression for the local wind field coupling coefficient is:
[0125] ;
[0126] In the formula, Indicates the first The response weights of each particle to the local wind field; This represents the wind field response steepness coefficient, with a value ranging from 0.4 to 1.5. This represents the current ambient wind speed scalar, in m / s. The reference wind speed thresholds for particle types are: 1.0-2.5 m / s for core flame particles, 0.5-1.5 m / s for hot smoke particles, and 2.0-4.0 m / s for spark particles.
[0127] Sub-step 3.2: The particle force calculation results are generated.
[0128] Specifically, after obtaining the thermal convection buoyancy coefficient, wind field coupling coefficient, and equivalent mass, the particle behavior layer begins to calculate the thermal convection buoyancy, turbulent disturbance force, and wind field force, and further obtains the resultant acceleration of the particles.
[0129] The expression for thermal convection buoyancy is:
[0130] ;
[0131] In the formula, Indicates the first The thermal convection buoyancy of a single particle, measured in N; This represents the convection enhancement factor, with a value ranging from 0.2 to 1.0. Indicates the first The current height coordinates of each particle, in meters; This indicates the characteristic height of the thermal plume, with a value ranging from 2 to 20 m.
[0132] The expression for the turbulent disturbance force is:
[0133] ;
[0134] In the formula, Indicates the first The turbulent disturbance force of a single particle, expressed in N; This represents the turbulence coupling coefficient, ranging from 0.05 to 0.30. This represents the local turbulent dissipation rate, in meters. 2 / s 3 The value is given in real time by sampling the flow field near the fire source or by the turbulent diffusion model, and the value ranges from 0.01 to 5. This represents the numerically stable particle size term, with a value range of 0.001-0.005 m; This represents the time decay coefficient, with a value ranging from 0.05 to 0.30 / s; This indicates the survival time of a particle since its creation, measured in seconds (s).
[0135] The expression for the wind field force is:
[0136] ;
[0137] In the formula, Indicates the first The wind force on each particle, measured in N; The drag coefficient is represented as follows: 0.4-0.9 for core flame particles, 0.6-1.2 for hot smoke particles, and 0.3-0.8 for spark particles. This represents air density, with a value ranging from 1.0 to 1.3 kg / m³. 3 ; The frontal area of a particle is expressed in meters (m²). 2 ; This represents the particle's current velocity component along the wind direction, in m / s. This represents the current ambient wind speed scalar, in m / s.
[0138] Finally, the expression for the resultant acceleration is:
[0139] ;
[0140] In the formula, For the first The equivalent mass of a particle, in kg; For the first The resultant acceleration of each particle.
[0141] Sub-step 3.3, particle trajectory update.
[0142] Specifically, the particle behavior layer performs discrete-time integration on the velocities and positions of the three types of particles based on the obtained resultant acceleration. To ensure that the trajectory update of fire particles takes into account both numerical stability and real-time performance, a first-order semi-implicit integration algorithm is used to determine the updated particle velocity. That is, an exponential damping factor is introduced in addition to the conventional velocity integration term to prevent numerical detonation of flame and spark particles due to continuous force.
[0143] Subsequently, by compensating for the quadratic term of acceleration based on velocity propulsion, sufficient geometric trajectory curvature characteristics are maintained for thermal convection buoyancy and Martian ejection within a short time step to obtain the corresponding updated particle positions. Finally, particles subjected to more intense forces and exhibiting stronger trajectory changes dissipate energy more rapidly; therefore, the rate of decline in lifetime should increase with the increase of the resultant acceleration, thereby determining the particle's remaining lifetime at the next moment.
[0144] Sub-step 3.4: Output the updated particle state.
[0145] Specifically, the particle behavior layer uniformly writes back the updated trajectory results of core flame particles, hot smoke particles, and spark particles in sub-step 3.3, forming a particle state set that can be called upon in the next stage. Before writing back, a motion stage validity check is performed based on the lifetime threshold, scene boundary threshold, and limit velocity threshold. If the remaining lifetime of a particle in the next moment is less than or equal to 0, the particle is determined to be invalid after the current frame ends; if the particle position exceeds the current fire scene spatial bounding box, the particle is marked as an out-of-bounds particle; if the particle's velocity scalar or corresponding direction component in the next moment exceeds the maximum allowable velocity of the corresponding type, it is subject to amplitude limiting correction. After completing the filtering and correction, the updated positions, velocities, and lifetimes of all valid particles are reorganized according to particle type into an updated particle state set, so that the updated particle state set includes the real-time spatial distribution of particles, the real-time motion velocity of particles, and the remaining lifetime of particles.
[0146] Step S140: Determine the interaction behavior between the fire particles and the scene materials through the first particle state, and generate the second particle state after particle behavior update based on the interaction behavior.
[0147] The second particle state includes the particle's real-time spatial position at the end of the current frame, its velocity after the material interaction effect has been superimposed, and a comprehensive visual control quantity that includes brightness, temperature mapping, and energy intensity. This is used to directly input the rendering output layer. It first completes the contact determination by the particle behavior layer, then calculates the material combustion response coefficient, local heat exchange amount, and material response energy factor. Subsequently, it updates the first particle state according to the particle behavior adjustment parameters and uniformly writes back the position, velocity, color, and energy state parameters to generate the second particle state.
[0148] In some embodiments, the particle effect rendering method for simulating extreme working conditions in a virtual engine provided by the present invention includes the following steps in step S140:
[0149] Step S141: The real-time position of each fire particle is matched with the spatial index of the scene material through the particle behavior layer to determine whether the fire particle has entered the interaction distance threshold of the scene material, and the equivalent contact area and contact determination coefficient corresponding to the fire particle that has entered the interaction distance threshold are obtained.
[0150] The interaction distance threshold is determined jointly based on the particle equivalent particle size, the geometric accuracy of the scene object surface, and the duration of the current simulation frame. It should generally be greater than the surface missed detection distance corresponding to the maximum displacement in a single frame, while being smaller than the detail scale of the scene surface, in order to balance the accuracy of contact determination and computational stability.
[0151] Step S142: Calculate the material combustion response coefficient, local heat exchange amount, and material response energy factor based on the equivalent contact area and contact determination coefficient. Then, dynamically adjust the particle behavior of various fire particles based on the material combustion response coefficient, local heat exchange amount, and material response energy factor to obtain particle behavior adjustment parameters.
[0152] Step S143: Based on the particle behavior adjustment parameters, update the state of the first particle to obtain the state of the second particle.
[0153] In a specific embodiment, the present invention provides a particle effect rendering method for simulating extreme working conditions in a virtual engine. Step 4, executing the particle interaction stage and calculating the interaction behavior between particles and scene materials, includes the following sub-steps:
[0154] Sub-step 4.1: Determine the contact between fire particles and scene materials.
[0155] Specifically, the particle behavior layer first receives the particle state set output from step 3, and then reads the current position, velocity, and remaining lifespan of the core flame particle, hot smoke particle, and spark particle one by one. Subsequently, within the current simulation frame, the spatial position of each particle is matched with the spatial index unit on the surface of the scene object to determine whether the particle has entered the material interaction distance threshold. To improve the computational efficiency of the particle interaction stage, a coarse screening can be performed first using the scene bounding volume, followed by a fine screening using triangular facets or voxel surfaces. For particles that have entered the interaction distance threshold, their equivalent contact area is further calculated, and the ignition temperature and thermal conductivity correction coefficient of the corresponding contact material are read from the scene material attribute table.
[0156] For particles whose contact area has been calculated, the contact determination coefficient is calculated using the following expression:
[0157] ;
[0158] In the formula, Indicates the first Contact determination coefficient of individual particles; This represents the contact criterion steepness coefficient, with a value range of 8-30; Indicates the first The shortest distance from a particle to the surface of an object in the scene, expressed in meters; This represents the contact distance threshold, with a value range of 0.001-0.020m.
[0159] Sub-step 4.2: Calculate the material combustion response parameters.
[0160] Specifically, the particle behavior layer calculates the material combustion response coefficient, local heat exchange rate, and material response energy factor for all particles that meet the contact conditions, based on their category and contact material properties. The expression for the material combustion response coefficient is as follows:
[0161] ;
[0162] In the formula, Indicates the first The material combustion response coefficient corresponding to each particle; Indicates the first The characteristic flame temperature of each particle is as follows: core flame particles are 900-1500K, hot smoke particles are 450-900K, and spark particles are 700-1300K. This indicates the ignition temperature of the material in contact with the object: 420-680K for plastics, 500-800K for wood, 550-900K for coated materials, and 1000-1800K for metal surfaces. This represents the stable term in the denominator, taking values from 1 to 10K; This represents the thermal conductivity correction factor for the material, with a value ranging from 0.0 to 2.50. This represents the contact determination coefficient.
[0163] To further reflect the instantaneous heat input from particles to the material surface, the expression for the local heat exchange rate is:
[0164] ;
[0165] In the formula, Indicates the first The amount of heat exchanged by each particle on the material surface in the current frame, in J; This represents the particle-material heat transfer coefficient, with the core flame particles taking a value of 20-120 W / (m²). 2 ·K), thermal smoke particles are taken as 5-40W / (m 2 ·K), Martian particles are taken as 30-180W / (m 2 ·K); Indicates the equivalent contact area; This indicates the current surface temperature of the contact surface, in Kelvin (K), and is read from the scene material thermal state cache. Indicates the current simulation step size; This represents the surface barrier correction factor, with a value ranging from 0.1 to 1.5. This indicates the thickness of the surface protective layer or the contamination layer, in meters (m), with a range of 0-0.005m.
[0166] Finally, the expression for the material response energy factor is:
[0167] ;
[0168] In the formula, Indicates the first Material response energy factor caused by individual particles; This indicates the specific heat capacity of the material in contact, expressed in J / (kg·K). This represents the equivalent thermal mass of the current contact surface element, in kg. This represents the temperature difference stability term, with a value range of 1-10K.
[0169] Sub-step 4.3: Generating particle behavior adjustment parameters.
[0170] Specifically, the particle behavior layer dynamically adjusts the subsequent behavior of core flame particles, hot smoke particles, and spark particles based on the material combustion response parameters obtained in sub-step 4.2. First, the local particle generation density after interaction is calculated to describe the ability of the contact area to induce new particles in the next frame. After obtaining the local particle generation density, the particle velocity and lifespan are interactively corrected. The velocity correction amount is obtained by comprehensively modeling material adhesion and recoil to obtain the scalar after velocity correction and the remaining lifespan after lifespan correction. For core flame particles, if they come into contact with low ignition point materials, their local rising velocity can be slightly increased and their lifespan extended; for hot smoke particles, if the material surface absorbs heat significantly, their thermal drive is weakened and their diffusion rate decreases; for spark particles, if they collide with a hard, high-temperature surface, they may experience short-term recoil and extend their high-brightness lifespan.
[0171] In this embodiment, a particle behavior gain factor is also introduced to provide a unified interaction result for sub-step 4.4. The expression for the particle behavior gain factor is:
[0172] ;
[0173] In the formula, Indicates the first Gain factor for the interaction behavior of individual particles. This represents the dissipation weight of the particle's category: 0.2-0.8 for core flame particles, 0.3-1.0 for hot smoke particles, and 0.1-0.6 for spark particles.
[0174] Sub-step 4.4 generates the updated particle state.
[0175] Specifically, the particle behavior layer updates the color and energy state of particles uniformly based on the local particle generation density, correction speed, correction lifetime, and interaction behavior gain factor output in sub-step 4.3, and encapsulates this update into the final output. The color and energy state parameters are directly accessible to the rendering output layer; they reflect both particle temperature and brightness, as well as the visual enhancement or attenuation characteristics after material interaction. The expressions for the color and energy state parameters are defined as follows:
[0176] ;
[0177] In the formula, Indicates the first The color and energy state parameters of each particle; Indicates the first The current energy level of each particle is obtained by combining the particle energy cache of the previous frame and the material response energy factor of the current frame. This represents the color response steepness coefficient, with a value range of 0.005-0.050 / K; Indicates the characteristic temperature of the particle; The reference temperature for color transition is 900-1100K for core flame particles, 500-700K for hot smoke particles, and 800-1000K for spark particles.
[0178] After solving for the color and energy state parameters of the particles, the particle behavior layer writes back the current position, the velocity after interaction correction, and the color and energy state parameters of all valid particles, and forms an updated particle state set. This set includes the real-time spatial position of the particles at the end of the current frame, the velocity after the material interaction effect has been superimposed, and a comprehensive visual control quantity that includes brightness, temperature mapping and energy intensity.
[0179] Step S150: Perform particle rendering based on the second particle state to generate dynamic light and shadow fusion results, and draw fire particle effect frames based on the dynamic light and shadow fusion results.
[0180] In some embodiments, the particle effect rendering method for simulating extreme working conditions in a virtual engine provided by the present invention includes the following steps in step S150:
[0181] Step S151: Send various fire particles to their respective rendering channels through the rendering output layer, and extract the energy state parameters of the particles from the second particle state, so as to convert the energy state parameters of the particles into particle rendering attribute parameters.
[0182] Step S152: Perform gradient texture mapping on various fire particles according to particle rendering attribute parameters to obtain gradient texture mapping results, and call dynamic light and shadow fusion algorithm to process the gradient texture mapping results to obtain dynamic light and shadow fusion results corresponding to various fire particles.
[0183] Understandably, particle rendering attribute parameters are the result of parameter reconstruction before rendering, used to drive texture sampling and lighting calculation; gradient texture mapping results are the visual expression results after texture sampling, used to directly participate in subsequent light and shadow fusion and frame rendering.
[0184] Step S153: Write the dynamic light and shadow fusion result into the drawing buffer, and draw various fire particles according to the preset drawing constraints of each frame through the drawing buffer to output fire particle effect frames.
[0185] In a specific embodiment, the present invention provides a particle effect rendering method for simulating extreme working conditions in a virtual engine. Step 5, executing the particle rendering stage and outputting a fire particle effect image, includes the following sub-steps:
[0186] Sub-step 5.1: Read particle rendering properties.
[0187] Specifically, the rendering output layer first receives the particle state set output in step 4, and then sends the core flame particles, hot smoke particles, and spark particles into the corresponding rendering channels according to particle categories. For each particle, its spatial position, velocity, color, and energy state parameters are read, and the energy state parameters are decomposed into rendering temperature, texture coordinates, transparency, and base brightness. Simultaneously, to ensure consistency between gradient texture mapping and the temperature field, the particle rendering temperature must first be determined based on the particle's minimum rendering temperature (400-700K for hot smoke particles, 800-1000K for core flame particles, and 700-900K for spark particles), maximum rendering temperature (1400-1600K for core flame particles, 800-1000K for hot smoke particles, and 1000-1500K for spark particles), energy-to-temperature mapping coefficient (range 0.4-2.0), velocity suppression coefficient (range 0.02-0.20s / m), and particle velocity scalar. That is, the color and energy state parameters output in step 4 are converted into thermal state quantities that can be directly used for gradient texture mapping, and the velocity term is used to suppress overexposure of high-speed particles. Subsequently, temperature ranges are divided according to the rendering temperature: core flame corresponds to 1300-1500K, middle flame corresponds to 1000-1300K, and outer flame corresponds to 800-1000K.
[0188] Sub-step 5.2 outputs the gradient texture mapping result.
[0189] Specifically, the rendering output layer performs gradient texture mapping on the core flame particles, hot smoke particles, and spark particles. For the core flame particles, a one-dimensional temperature gradient texture is used; for the hot smoke particles, a low-saturation gray-black gradient texture is used; and for the spark particles, a bright short-tailed texture is used. Then, the rendering color intensity of the particles is determined based on the color enhancement index (1.2-2.0 for core flame particles, 0.8-1.4 for hot smoke particles, and 1.5-2.5 for spark particles) and the transition center (range 0.35-0.75). That is, a power function is used to create color differences between different temperature zones, and an S-curve function is used to control the transition speed from dark to light, making the core flame brighter, the hot smoke transition more smoothly, and the sparks sharper and more sparkling.
[0190] Finally, the final transparency of the particles is further determined based on the initial transparency of the particles (0.6-0.95 for core flame particles, 0.2-0.7 for hot smoke particles, and 0.7-1.0 for spark particles), the height attenuation coefficient (ranging from 0.02-0.30m), and the transparency correction coefficients for the height and velocity of the particles from the center of the fire source (ranging from 0.01-0.10s / m).
[0191] Sub-step 5.3 generates dynamic light and shadow fusion results.
[0192] Specifically, after completing the gradient texture mapping, the rendering output layer continues to execute the dynamic lighting and shadow blending algorithm, performing unified calculations on flame glow, smoke occlusion, and Martian highlights. First, the lighting contribution of a single particle is calculated, expressed as:
[0193] ;
[0194] In the formula, Indicates the first The light contribution of each particle makes the high-temperature and highly transparent particles provide a stronger illumination effect on the surrounding environment. This represents the illuminance coefficient, with a value ranging from 0.5 to 2.5. This represents the temperature enhancement coefficient, with a value ranging from 0.1 to 0.8. This indicates the reference temperature, with a value range of 1000-1200K.
[0195] Next, for thermal smoke particles, the volumetric shielding coefficient is calculated, expressed as follows:
[0196] ;
[0197] In the formula, Indicates the first Volumetric shielding coefficient of each thermal smoke particle; This represents the smoke extinction coefficient, with a value ranging from 0.2 to 3.0 m. 2 / kg; This indicates the local smoke density, expressed in kg / m³. 3 ; This represents the equivalent path length through the smoke cloud in the direction of the line of sight, expressed in meters (m). This formula is based on the concept of volumetric extinction, which creates a semi-transparent obstruction and light attenuation in the smoke diffusion area.
[0198] Finally, for the core flame particles and Martian particles, the glow intensity is calculated, and the expression is:
[0199] ;
[0200] In the formula, Indicates the first The glow intensity of each particle; This represents the distance from the current screen pixel to the center of the particle projection, in pixels or normalized screen distance. This represents the glow radius, with a value ranging from 3 to 25. This represents the flicker enhancement factor, with a value ranging from 0.1 to 1.0; This represents the particle scintillation frequency factor, which is generated by particle age and energy perturbation.
[0201] Sub-step 5.4: Draw the final fire particle effect frame.
[0202] Specifically, the rendering output layer writes the lighting contribution, glow intensity, and volumetric occlusion coefficient obtained in sub-step 5.3 into the GPU instantiated rendering buffer, and performs batch rendering of core flame particles, hot smoke particles, and spark particles. During rendering, core flame particles are rendered using a billboard with faces facing the camera, hot smoke particles are rendered using volumetric slicing or screen-space fog blending, and spark particles are rendered using point sprites with trailing effects. Simultaneously, to control real-time performance, the total rendering overhead for each frame needs to be constrained to measure the effective utilization of batch rendering, which is used to adjust the upper limit of instantiated particles and the number of smoke volumetric layers in real time. After rendering is complete, the final fire particle effect frame sequence is output, where each effect frame contains the core flame particle color layer, hot smoke particle volumetric layer, spark particle highlight layer, and their blended result with the scene environment.
[0203] The following describes a particle effect rendering device for simulating extreme working conditions in a virtual engine, provided by the present invention. The particle effect rendering device for simulating extreme working conditions in a virtual engine described below can be referred to in correspondence with the particle effect rendering method for simulating extreme working conditions in a virtual engine described above.
[0204] like Figure 2 As shown, in one embodiment, a particle effects rendering device for simulating extreme working conditions in a virtual engine includes a particle initialization module, a particle state construction module, a particle trajectory update module, a particle behavior update module, and a particle rendering module.
[0205] The particle initialization module is used to acquire fire scene parameters and construct a decoupled particle system architecture within the virtual engine based on the fire scene parameters to generate particle initialization results.
[0206] The particle state construction module is used to determine the particle quota of the fire source area through the particle initialization results, and generate fire particles based on the particle quota of the fire source area to construct different types of initial particle states.
[0207] The particle trajectory update module is used to calculate the dynamic trajectory of fire particles based on different types of initial particle states, and to determine the first particle state after the particle trajectory update based on the dynamic trajectory.
[0208] The particle behavior update module is used to determine the interaction behavior between fire particles and scene materials through the first particle state, and generate the second particle state after particle behavior update based on the interaction behavior.
[0209] The particle rendering module is used to perform particle rendering based on the second particle state to generate dynamic light and shadow fusion results, and to draw fire particle effect frames based on the dynamic light and shadow fusion results.
[0210] The fire scene parameters include fire source power, ambient wind speed, ambient temperature, and gravitational acceleration; the decoupled particle system architecture includes a physical calculation layer, a particle behavior layer, and a rendering output layer.
[0211] The applicant of this invention has provided a detailed description of the embodiments of the invention in conjunction with the accompanying drawings. However, those skilled in the art should understand that the above embodiments are merely preferred embodiments of the invention. The detailed description is only intended to help readers better understand the spirit of the invention and is not intended to limit the scope of protection of the invention. On the contrary, any improvements or modifications made based on the inventive spirit of the invention should fall within the scope of protection of the invention.
Claims
1. A method for rendering particle effects in a virtual engine to simulate extreme working conditions, characterized in that, The method includes: Obtain fire scene parameters and construct a decoupled particle system architecture within the virtual engine based on the fire scene parameters to generate particle initialization results; The particle quota for the fire source area is determined by the particle initialization results, and fire particles are generated based on the particle quota for the fire source area to construct different types of initial particle states. Based on the different types of initial particle states, the dynamic trajectory of the fire particles is calculated, and the first particle state after the particle trajectory update is determined according to the dynamic trajectory; specifically including: The particle behavior layer reads the real-time position, real-time velocity, real-time lifespan, and real-time particle size of each fire particle from the initial particle state, and maps various types of fire particles into a unified dynamic solution format to calculate the thermal convection buoyancy coefficient, local wind field coupling coefficient, and equivalent mass of each fire particle based on the real-time position, real-time velocity, real-time lifespan, and real-time particle size. The thermal convection buoyancy, turbulent disturbance force, and wind field force are calculated based on the thermal convection buoyancy coefficient, local wind field coupling coefficient, and equivalent mass corresponding to each fire particle. The combined acceleration of each fire particle is then determined based on the thermal convection buoyancy, turbulent disturbance force, and wind field force. Discrete-time integration is performed on the real-time velocity and real-time position of various fire particles based on the synthetic acceleration to obtain particle trajectory update results, and the first particle state is generated based on the particle trajectory update results. The interaction behavior between fire particles and scene materials is determined by the first particle state, and a second particle state with updated particle behavior is generated based on the interaction behavior. Particle rendering is performed based on the second particle state to generate dynamic light and shadow fusion results, and fire particle effect frames are drawn based on the dynamic light and shadow fusion results. The fire scene parameters include fire source power, ambient wind speed, ambient temperature, and gravitational acceleration; the decoupled particle system architecture includes a physical calculation layer, a particle behavior layer, and a rendering output layer.
2. The particle effect rendering method for simulating extreme working conditions in a virtual engine according to claim 1, characterized in that, The process of acquiring fire scene parameters and constructing a decoupled particle system architecture within the virtual engine based on these parameters to generate particle initialization results includes: The fire source power, ambient wind speed, ambient temperature and gravitational acceleration are time aligned to obtain aligned fire scene parameters, and the aligned fire scene parameters are mapped to the data slots of the physical computing layer within a preset sampling period and time window. Within a time window, the fire source power and ambient wind speed are weighted and smoothed to obtain the equivalent fire source power and equivalent wind speed, and the equivalent fire source power and equivalent wind speed are sent to the physical computing layer. The physical calculation layer constructs a thermal buoyancy correction factor based on the equivalent fire source power, equivalent wind speed, and ambient temperature, and integrates the thermal buoyancy correction factor, equivalent fire source power, equivalent wind speed, and ambient temperature into fire physical characteristic parameters.
3. The particle effect rendering method for simulating extreme working conditions in a virtual engine according to claim 2, characterized in that, The step of acquiring fire scene parameters and constructing a decoupled particle system architecture within the virtual engine based on the fire scene parameters to generate particle initialization results also includes: In the physical calculation layer, the initial particle generation density of the fire source area is calculated based on the equivalent fire source power, equivalent wind speed and thermal buoyancy correction factor, and the initial particle quantity of various fire particles is determined based on the initial particle generation density. Based on the initial particle generation density and the initial particle quantity of various types of fire particles, initial particle generation control parameters are constructed to generate the particle initialization result according to the initial particle quantity of various types of fire particles and the initial particle generation control parameters.
4. The particle effect rendering method for simulating extreme working conditions in a virtual engine according to claim 3, characterized in that, The process of determining the particle quota for the fire source area based on the particle initialization result, and generating fire particles based on the fire source area particle quota to construct different types of initial particle states includes: The initial particle generation density is read from the particle initialization result through the particle behavior layer, and a generation window for fire particles in the current frame is established in the fire source area to calculate the total number of fire particles generated in the current frame within the generation window. Different target weights are set for various types of fire particles, and the total number of particles generated is normalized and allocated according to the target weights to obtain the fire source area particle quotas corresponding to various types of fire particles.
5. The particle effect rendering method for simulating extreme working conditions in a virtual engine according to claim 4, characterized in that, The step of determining the particle quota for the fire source area based on the particle initialization result, and generating fire particles based on the fire source area particle quota to construct different types of initial particle states, further includes: Based on the particle quota of the fire source area, the initial positions of various fire particles are determined in the fire source area, so that the fire source area is equivalent to a two-dimensional circular area based on the initial positions, and the spatial initialization distribution of various fire particles is generated by layered radius sampling. Based on the spatial initialization distribution of the various types of fire particles, initial velocity and life cycle parameters are assigned to each fire particle, and the initial velocity and life cycle parameters are integrated into the initial dynamic parameters of the corresponding type of fire particle. The initial dynamic parameters are classified and encapsulated according to the type of fire particles, and the encapsulated fire particles are screened to remove fire particles whose initial velocity or life cycle parameters do not meet the set requirements, so as to obtain the initial particle state corresponding to each type of fire particle.
6. The particle effect rendering method for simulating extreme working conditions in a virtual engine according to claim 1, characterized in that, The step of determining the interaction behavior between fire particles and scene materials through the first particle state, and generating a second particle state updated based on the interaction behavior, includes: The particle behavior layer matches the real-time position of each fire particle with the spatial index of the scene material to determine whether the fire particle has entered the interaction distance threshold of the scene material, and obtains the equivalent contact area and contact determination coefficient corresponding to the fire particle that has entered the interaction distance threshold. The material combustion response coefficient, local heat exchange amount, and material response energy factor are calculated based on the equivalent contact area and contact determination coefficient. The particle behavior of various fire particles is dynamically adjusted based on the material combustion response coefficient, local heat exchange amount, and material response energy factor to obtain particle behavior adjustment parameters. Based on the particle behavior adjustment parameters, the first particle state is updated to obtain the second particle state.
7. The particle effect rendering method for simulating extreme working conditions in a virtual engine according to claim 1, characterized in that, The step of performing particle rendering based on the second particle state to generate a dynamic light and shadow fusion result, and drawing fire particle effect frames based on the dynamic light and shadow fusion result, includes: The rendering output layer sends various fire particles to their respective rendering channels, and extracts particle energy state parameters from the second particle state to convert the particle energy state parameters into particle rendering attribute parameters. The particle rendering attribute parameters are used to perform gradient texture mapping on various fire particles to obtain gradient texture mapping results. The dynamic light and shadow fusion algorithm is then called to process the gradient texture mapping results to obtain the dynamic light and shadow fusion results corresponding to various fire particles. The dynamic light and shadow fusion result is written into the drawing buffer, and various fire particles are drawn according to the preset drawing constraints of each frame through the drawing buffer to output the fire particle effect frame.
8. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-7.