Method, device and equipment for processing dynamic weather particle special effect and storage medium
Patent Information
- Application Number
- CN202211698700.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-12-28
AI Technical Summary
[0003]在制作天气粒子特效的相关技术中,主要是针对固定静态场景进行固定开发,天气资产的制作和使用流程较为不可变,例如根据不同关卡的美术需求调整特效参数,分别配置到对应的关卡,这种不可变的制作方式不能满足当下开放世界大地图,以及实时动态变化的天气需求
[0016]在本发明实施例中,通过获取虚拟场景的场景信息,根据所获取的风场信息关联天气基础粒子进行受力计算,得到天气基础粒子的动态参数,并将天气基础粒子的动态参数实时覆盖天气基础粒子的原有参数,以获得与虚拟场景的场景信息相匹配的粒子运动。通过进行动态关联计算,使得在场景信息的属性改变时,能够基于对天气粒子的原有参数的实时覆盖,实现对粒子运动的自动匹配,满足实时动态变化的天气需求,适用于开放世界大地图,达到实现项目特殊的风格化需求的目的。
Smart Images

Figure CN116258802B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of special effects production technology, and in particular to a method for processing dynamic weather particle effects, a device for processing dynamic weather particle effects, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Technology
[0002] With the continuous technological innovation of next-generation AAA games, more and more games are paying more attention to the implementation of visual effects and real-time interaction, such as the implementation of weather particle effects.
[0003] In the technology related to creating weather particle effects, the development is mainly for fixed static scenes. The process of creating and using weather assets is relatively immutable. For example, the effect parameters are adjusted according to the art requirements of different levels and configured for the corresponding levels. This immutable production method cannot meet the current needs of open-world maps and real-time dynamic weather changes. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a method for processing dynamic weather particle effects, an apparatus for processing dynamic weather particle effects, a corresponding electronic device, and a corresponding computer-readable storage medium to overcome or at least partially solve the above problems.
[0005] This invention discloses a method for processing dynamic weather particle effects, the method comprising:
[0006] Obtain scene information of the virtual scene; the scene information includes wind field information;
[0007] Obtain basic weather particles, perform force calculations based on the wind field information associated with the basic weather particles, and obtain the dynamic parameters of the basic weather particles;
[0008] The dynamic parameters of the weather basic particles are overwritten in real time to obtain particle motion that matches the scene information of the virtual scene.
[0009] This invention also discloses a processing device for dynamic weather particle effects, the device comprising:
[0010] The scene information acquisition module is used to acquire scene information of the virtual scene; the scene information includes wind field information.
[0011] The force calculation module is used to acquire weather basic particles, perform force calculations based on the wind field information and the weather basic particles, and obtain the dynamic parameters of the weather basic particles.
[0012] The particle motion matching module is used to overwrite the original parameters of the weather basic particles with the dynamic parameters of the weather basic particles in real time, so as to obtain particle motion that matches the scene information of the virtual scene.
[0013] This invention also discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements any of the aforementioned methods for processing dynamic weather particle effects.
[0014] This invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the aforementioned methods for processing dynamic weather particle effects.
[0015] The embodiments of the present invention have the following advantages:
[0016] In this embodiment of the invention, scene information of a virtual scene is acquired, and force calculations are performed on weather basic particles based on the acquired wind field information to obtain dynamic parameters of the weather basic particles. These dynamic parameters are then overridden in real-time with the original parameters of the weather basic particles to achieve particle motion that matches the scene information of the virtual scene. By performing dynamic correlation calculations, when the attributes of the scene information change, automatic matching of particle motion can be achieved based on the real-time overriding of the original parameters of the weather particles, meeting the needs of real-time dynamic weather changes. This method is suitable for open-world maps and can achieve the purpose of realizing the project's specific stylistic requirements. Attached Figure Description
[0017] Figure 1 This is a schematic diagram illustrating the processing method of basic particle effects for weather in related technologies;
[0018] Figure 2 This is a schematic diagram of the procedural weather effects development process proposed in an embodiment of the present invention;
[0019] Figure 3 This is a flowchart illustrating the steps of an embodiment of a method for processing dynamic weather particle effects according to the present invention.
[0020] Figure 4 This is a schematic diagram of the processing procedure for dynamic weather particle effects provided in an embodiment of the present invention;
[0021] Figure 5 This is a schematic diagram of the force calculation proposed in an embodiment of the present invention;
[0022] Figures 6A to 6B This is a schematic diagram of timing control of sequence mapping provided in an embodiment of the present invention;
[0023] Figures 7A to 7C This is an example diagram of the sequence mapping provided in the embodiments of the present invention;
[0024] Figures 8A to 8C This is an example diagram of time control provided in an embodiment of the present invention;
[0025] Figure 9 This is a schematic diagram illustrating an application scenario for processing basic particle effects for dynamic weather, provided in an embodiment of the present invention.
[0026] Figure 10 This is a structural block diagram of an embodiment of a dynamic weather particle effect processing device according to the present invention. Detailed Implementation
[0027] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0028] To facilitate understanding of the present invention by those skilled in the art, the terms or nouns involved in the following embodiments of the present invention are explained below:
[0029] Procedural: refers to a programmatic development process.
[0030] Cascade: The previous generation particle effects system in Unreal Engine, a tool for creating modular particle-based effects using emitters in Unreal Engine.
[0031] Niagara: The primary tool for creating and adjusting next-generation visual effects (VFX) in Unreal Engine.
[0032] NMS: NiagaraModuleScript, refers to the Niagara script module.
[0033] NPC: NiagaraParameterCollection, refers to the Niagara parameter collection.
[0034] UE: Unreal Engine.
[0035] BP: Blueprint, which is a type of resource content.
[0036] Flipbook: A common name for shaders, primarily used to refer to sequence playback.
[0037] With the continuous technological innovation of next-generation AAA games, more and more games are paying more attention to the implementation of visual effects and real-time interaction, such as the implementation of weather particle effects.
[0038] In the creation of weather particles, the common technique involves using Unreal Engine's Cascade or Niagra to create different types of weather effects, such as rain, snow, and sandstorms, as individual effect assets. These assets are then configured into corresponding level scenes. Specifically, fixed individual effect assets can be created using particle systems. Taking rain effects as an example, the emitter size is set, and raindrop particle effect assets moving at a fixed speed are created. These rain effect assets are then configured into the corresponding level scenes. Similarly, snow effects can be configured into the corresponding level scenes. In other words, multiple effect assets are created, and the effect parameters are adjusted according to the art requirements of different levels, then configured into the corresponding levels. For example,... Figure 1 As shown, the special effects assets obtained after adjusting based on the art requirements of different levels can include rain effect asset 00 that meets the art requirements of rain level 00, rain effect asset 01 that meets the art requirements of rain level 01, snow effect asset 00 that meets the art requirements of snow level 00, snow effect asset 01 that meets the art requirements of snow level 01, and other special effects assets that meet the preset weather requirements of different levels. Then, the corresponding adjusted special effects assets are configured into the corresponding level scenes.
[0039] As mentioned above, the special effects assets produced / generated by these technologies have weak interactivity with different level scenes, do not support custom functional modules, and cannot achieve effective real-time interaction with elements in level scenes. In other words, they are mainly designed for fixed static scenes and cannot meet the needs of real-time dynamic weather changes. Furthermore, since the Cascade particle system is suitable for creating fixed particle effects, its production method of adjusting effect parameters according to the art requirements of different levels and configuring them separately for the corresponding levels is problematic. In open-world maps with a large number and variety of terrains (such as grasslands, snow-capped mountains, deserts, forests, etc.), if special effects assets are created separately for each map and each level scene, it will not only be labor-intensive and inefficient, but will also lead to cumbersome asset management, which cannot meet the needs of current open-world maps. In addition, because the asset creation process of Cascade is relatively closed, it is not convenient for subsequent optimization and iteration, resulting in poor iterability. At the same time, it is impossible to achieve the special stylistic requirements of the project through customization. The usage process of asset effects in related technologies is relatively closed. For specific level scenes, separate assets are required. The same asset has low reusability in different scenes, that is, low reusability.
[0040] To achieve the creation of dynamic special effects assets that meet the needs of real-time dynamic weather changes, the core idea of this invention is to propose a procedural weather effects development process. This process emphasizes interactivity with different level scenes, acquiring scene information and performing dynamic correlation calculations. When external information, such as changes in scene attributes, changes occur, particle motion is automatically matched based on real-time overlay / changes of various particle parameters. This satisfies the needs of real-time dynamic weather changes, improves interactivity and iterability to adapt to the effect requirements of next-generation AAA projects, increases work efficiency to adapt to the development of weather systems for open-world maps, and achieves stylized performance requirements through special customization.
[0041] Reference Figure 2 The diagram illustrates a programmed weather effects development process proposed in an embodiment of the present invention. It can achieve automatic matching of particle motion by performing dynamic correlation calculations, based on real-time overlay of the original parameters of weather particles, when the attributes of scene information change.
[0042] In practical applications, dynamic correlation calculation can be mainly achieved through external information blueprints. External information blueprints are used to acquire external information, which includes some scene information, such as wind field information, etc. This embodiment of the invention does not limit this.
[0043] In this embodiment of the invention, the procedural development process of weather effects involves the next-generation particle system NiagaraSystem. The particles used for weather effect development can be Niagara particles. This embodiment of the invention focuses on generating dynamic weather effects and can use Niagara particles as the basic particles for weather. That is, using the same Niagara particle, various parameters of the particle can be covered / changed in real time through external information blueprints and information channels to achieve automatic matching of particle motion.
[0044] Specifically, the next-generation particle system NiagaraSystem typically allows for the creation of customized functional modules and motion simulations through system script modules, such as NiagaraModuleScript, including but not limited to the NM_EmitterRateControl module, NiagaraParameterCollection module, and NM_WindControl module. Among these, the NM_EmitterRateControl module is primarily used to lock the spatial density of particles, the NiagaraParameterCollection module is primarily used to receive scene information from the virtual scene, and the NM_WindControl module is primarily used to perform force calculations based on wind-related particles.
[0045] After creating customized functional modules and motion simulations using NiagaraModuleScript, the NiagaraParameterCollection module can be used in Blueprint to receive scene information from the virtual scene. Force calculations can be performed by associating Niagara particles with external information blueprints. For example, the emission range of the particle emitter can be adjusted using the NM_EmitterRateControl module to lock the spatial density of the particles, and the force calculations can be performed on wind-related particles using the NM_WindControl module. Then, all functional modules and information are integrated in NiagaraSystem, and dynamic parameters are created to complete the interaction with scene information by performing force calculations.
[0046] In practical applications, after creating dynamic parameters based on the external information blueprint, the particle motion matched by the above dynamic parameters can be encapsulated using tools through the external information blueprint and associated with the console. This allows the external information blueprint and information channel to automatically perform dynamic correlation calculations based on the adjusted parameters when configuring the corresponding level scene in the game, so as to automatically match the particle motion of weather particles and realize the setting of weather effects.
[0047] In this embodiment of the invention, based on the proposed procedural weather effects development process, emphasis is placed on interactivity with different level scenes. Based on the external information blueprint, scene information of the level scene is acquired and dynamically correlated and calculated. When the attributes of external information change, the particle motion is automatically matched based on the real-time coverage / change of various parameters of the particles, which meets the real-time dynamic weather requirements, improves interactivity and iterability to adapt to the effect requirements of next-generation 3A projects, improves work efficiency to adapt to the development of weather systems for open-world maps, and achieves stylized performance requirements through special customization.
[0048] Reference Figure 3 The diagram illustrates a flowchart of an embodiment of a method for processing dynamic weather particle effects according to the present invention, which may specifically include the following steps:
[0049] Step 301: Obtain scene information for the virtual scene;
[0050] In this embodiment of the invention, in order to realize the production of dynamic special effects assets and meet the needs of real-time dynamic weather changes, the weather special effects development process based on procedural programming proposed in this embodiment of the invention focuses on the interactivity with different level scenes, and performs force calculation based on scene interaction and related particles to meet the needs of real-time dynamic weather changes.
[0051] In one embodiment of the present invention, in order to achieve interactivity with the level scene, virtual scene information, such as the scene information of the level scene, can be obtained. The obtained scene information can refer to the factors that may affect weather particles in the level scene. In this embodiment of the present invention, the factors that affect weather particles by wind force are taken as an example. Then the obtained scene information can be expressed as wind field information, which includes but is not limited to wind direction information, intensity information, etc.
[0052] In practical applications, scene information can be obtained through the set external information blueprint based on the information channel.
[0053] Step 302: Obtain the basic weather particles, perform force calculations based on the wind field information and the associated weather particles, and obtain the dynamic parameters of the weather particles.
[0054] In such Figure 2 In the procedural weather effects development process shown, its application typically involves creating customized functional modules and setting unique parameters for different level scenarios, such as... Figure 4 As shown, based on the dynamic weather system, parameters are configured to meet the weather requirements of different levels, such as rainy day level 00, rainy day level 01, snowy day level 00, and snowy day level 01. Thus, by creating a single weather system asset, it is possible to correspond to a large number and variety of level scenarios in the open world map, thereby greatly improving work efficiency.
[0055] Therefore, in order to set up unique scenarios, we can perform force calculations based on the acquired wind field information and the weather basic particles to obtain the dynamic parameters of the weather basic particles.
[0056] Specifically, the external driving force corresponding to the direction vector of the wind field information can be determined based on the wind field information. The external driving force represents the wind force on the outside of the weather basic particle. Then, the internal driving force of the weather basic particle can be obtained. After superimposing the internal driving force and the wind force represented by the external driving force, the force calculation is performed to obtain the dynamic parameters of the weather basic particle.
[0057] The acquired wind field information can include at least wind direction and intensity information. During force calculation, the vertical axis angle information of the external wind force can be obtained from the wind direction information and converted into a vertical axis vector. Specifically, this is achieved by creating the NM_WindControl module using NiagaraModuleScript, which converts the received wind Z-axis angle information into a vector using the DegreetoVector module and transmits it to the particles. The vertical axis vector is then associated with the motion trajectory of the weather basic particles, and force calculations are performed on the weather basic particles to obtain dynamic parameters. Furthermore, the intensity information can be correlated with the particle velocity of the weather basic particles to perform force calculations and obtain dynamic parameters for the weather basic particles.
[0058] Reference Figure 5 The diagram illustrates the force calculation proposed in this embodiment of the invention. First, the particle has its own internal driving force, such as gravity, initial velocity, initial acceleration, etc. At this time, the external driving force applied by the acquired wind field information, that is, the influence of wind force in different directions on the basic particles of the weather, can be obtained.
[0059] In specific implementations, the calculated dynamic parameters may include parameters used to determine whether the system is affected by wind, such as... Figure 5 As shown, the mass of the basic weather particles can be obtained first. The mass of the basic weather particles can be a physical property of the particles, which can be a factor that determines the ease with which the motion state of an object changes when it is subjected to force. That is, when the basic weather particles are affected by wind, the mass of the particles themselves must also be considered. For example, for the same wind force, the basic weather particles with smaller mass are usually more easily affected by the wind and their motion state changes, i.e., the particle's trajectory changes, compared to the basic weather particles with larger mass.
[0060] Therefore, based on the mass of the weather basic particle itself, we can determine whether the vertical axis vector affects the motion angle of the weather basic particle due to wind force, and obtain the parameters used to determine whether it is affected by wind force. These parameters mainly characterize whether the motion angle of the particle changes due to the vertical axis vector during the particle's motion. Typically, weather basic particles will be affected by the vertical axis vector wind force in different directions, changing their motion trajectory in real time.
[0061] The calculated dynamic parameters may also include parameters used to determine the degree of influence from wind, such as... Figure 5As shown, the degree to which wind affects the particle velocity of weather fundamental particles can be determined based on the particle's own mass, resulting in parameters used to determine the degree of wind influence. These parameters primarily characterize changes in particle velocity during particle motion and whether smoke is generated. For example, this parameter can be used to determine whether the degree to which raindrops are affected by wind is weaker than the degree to which raindrops are affected by smoke. Since weather fundamental particles move faster with stronger winds, for example, a wind force of 0-1 can be set to not generate smoke, while a wind force greater than 1 generates smoke, and the stronger the wind, the more smoke is generated, to simulate the effect of strong winds blowing dust / snow.
[0062] In some embodiments of the present invention, the calculated dynamic parameters may also include the emitter range of the weather basic particles, which may specifically be the number of weather basic particles set within a preset space, so that the spatial density of the weather basic particles can be locked based on the number of particles during the force calculation process by adjusting the emitter range of the weather basic particles.
[0063] Since the number of particles generated per frame is fixed, if the planar emission range is expanded from 50 square meters to 100 square meters, its density will become 1 / 2, which will lead to differences in visual presentation. However, when the spatial density is fixed, no matter how the emitter size is changed, the number of particles per unit space can be guaranteed to be constant, thus ensuring the uniformity of visual presentation.
[0064] Therefore, the emitter size can typically be adjusted in real time according to different weather conditions and scenarios. In practical applications, this can be achieved by creating an NM_EmitterRateControl module using NiagaraModuleScript. This module correlates the particle count with the emitter's location size to lock the spatial density of the particles. The emitter's range and density parameters can be externally adjusted, allowing the emitter's emission range to expand or shrink while maintaining a constant particle density. The emitter's size can refer to the X, Y, and Z dimensions of a cubic emitter shape; in other words, the spatial range of particle generation is determined by the emitter size.
[0065] It should be noted that, in addition to the parameters mentioned above, the parameters used for force calculation may also include density parameters calculated using constant density, horizontal wind direction, and various weather condition parameters with different settings. This embodiment of the invention does not impose any limitations on these parameters.
[0066] Step 303: The dynamic parameters of the weather basic particles are overwritten with the original parameters of the weather basic particles in real time to obtain particle motion that matches the scene information of the virtual scene.
[0067] In this embodiment of the invention, based on the acquisition of scene information of the level scene and the dynamic correlation calculation, when the attributes of external information change, the particle movement can be automatically matched based on the real-time coverage / change of various parameters of the particles to meet the real-time dynamic weather requirements.
[0068] In one embodiment of the present invention, the dynamic parameters of the weather base particles can be overridden in real time to obtain particle motion that matches the scene information of the virtual scene. The particles used for weather effects development can be Niagara particles, which can be used as the weather base particles. Niagara particles have original parameters defining their gravity, initial velocity, initial acceleration, etc. By overriding the dynamic parameters, the Niagara particles can be adaptively adjusted to obtain the weather base particles under the current scene information. Since the dynamic parameters are generated based on the current scene information, such as wind field information, and are matched to the weather base particles, the particle motion trajectory of the weather base particles generated after adjustment based on these dynamic parameters is the particle motion that matches the scene information of the virtual scene.
[0069] Specifically, firstly, the NiagaraSystem can be used to create the basic particle effects required for the special effects. Then, the original parameters can be overridden by the emitter and velocity dynamic parameters associated with the wind information created in NMS, and an externally adjustable parameter interface can be created. Then, the tool is encapsulated in the external information blueprint (BP), and the completed assets are integrated together to create a dynamic parameter list, so that various weather effects can be configured in the scene by simply selecting and adjusting the parameters.
[0070] In some embodiments of the present invention, it is also possible to achieve time-pause and reverse processing effects on the generated particle motion other than forward motion.
[0071] Specifically, this can be manifested in the process of force calculation, obtaining time control information for controlling the motion direction of weather fundamental particles, so as to control the direction of particle motion of weather fundamental particles according to the time control information.
[0072] Specifically, the time control information can include particle pause control information, reverse control information, and forward control information. Particle pause control information refers to information used to control the pause of particle motion; that is, this control information can cause weather-based particles to tend towards a hovering state during particle motion. Reverse control information refers to information used to control the reverse motion of particles; that is, assuming a force in a preset direction is positive relative to the particle's motion direction, this control information can cause the weather-based particles to experience a force opposite to the preset direction and move in the corresponding direction. Forward control information refers to information used to control the forward motion of particles; that is, assuming a force in a preset direction is positive relative to the particle's motion direction, this control information can cause the weather-based particles to experience a force in the same direction as the preset direction and move in the corresponding direction.
[0073] Time control information can be implemented based on the setting of the TimeControl parameter. For example, when the TimeControl parameter is 0, it means that a particle pause control information has been received, and the resistance can be increased to make the particles tend to pause. When the TimeControl parameter is -1, it means that a reverse control information has been received, and the particle motion of the weather basic particles can be exerted in the opposite direction. When the TimeControl parameter is 1, it means that a positive control information has been received, and the particle motion of the weather basic particles can be exerted in the positive direction.
[0074] In its implementation, the different time-based controls on particle motion can be achieved based on the corresponding sequence maps of particle motion.
[0075] Specifically, a sequence of textures corresponding to the particle motion of the weather-based particles can be acquired. This sequence of textures is displayed as a scrolling animation. The acquired sequence of textures has a turning point during playback. The playback of the sequence of textures can be controlled according to specific time control information. For example, if the time control information is a particle pause control, the sequence of textures can be paused, achieving an effect such as increasing resistance to make the particles tend to pause. If the time control information is a reverse control, the sequence of textures can be played from the turning point in a first direction, achieving the effect of applying a force in the opposite direction to the particle motion of the weather-based particles. If the time control information is a forward control, the sequence of textures can be played from the turning point in a second direction, achieving the effect of applying a force in the forward direction to the particle motion of the weather-based particles. It should be noted that the playback direction in the second direction is opposite to the playback direction in the first direction.
[0076] Sequence mapping, in particular, represents a scrolling animation. It's a commonly used texture format in special effects production, where a segment of animation is arranged frame-by-frame onto a single 2D texture. The engine sets the corresponding horizontal and vertical divisions, and a Flipbook Shader plays the textures sequentially to recreate the animation. It's frequently used to create animation-based particles such as flames and smoke. It should be noted that sequence mapping can be implemented using appropriate software or by arranging and combining textures frame-by-frame in After Effects using code. This embodiment of the invention does not impose any limitations on this approach.
[0077] When controlling the playback of a sequence map, taking a 9th-order sequence map as an example, it can be divided into a 3x3 grid. The result after segmentation can be as follows: Figure 6A As shown, the textures are divided into nine images arranged in a standard nine-square grid, and these nine images are numbered from 0 to 8. 0 to 8 can also represent the playback sequence of these nine images, resulting in textures 0 to 8. These textures can then be sorted according to their UV coordinates. Furthermore, assuming the length of a certain sequence of textures is 1.0, after dividing the sequence of textures according to the nine-square grid, a UV coordinate system can be established with the lower left corner of texture 6 (number 6) as the origin, and the coordinate interval between any two textures is 0.333.
[0078] The playback direction of the sequence maps is determined based on the direction of movement of the sequence maps in normal Flipbook calculations. Sequence maps are typically encapsulated based on UV folding, in which case they can be played in sequence numbers 0-8, while the playback order is from number 2 to number 3. Figure 2 With Post Figure 3 During the march, for example Figure 6A Regarding the textures in the nine-square grid shown, referring to the arrow direction (i.e., the direction of movement), the movement direction of textures from number 2 to number 3 is different from the movement direction of textures from number 0 to number 1 and from number 1 to number 2, meaning a reversal has occurred. Similarly, when textures are applied in the order of number 5 to number 6... Figure 5 The direction of travel when playing the video in image 6 also reversed.
[0079] To more clearly illustrate the sequence's progression, the backtracking can be disabled at this point, meaning it can be represented as follows: Figure 6A The nine-square grid shown is arranged as follows: Figure 6B As shown, horizontal stitching is performed to allow movement based on this Wrap image. In... Figure 6A In the nine-grid cutting example shown, assuming the length of a certain sequence texture can be 1.0, then according to... Figure 6B After the images shown are horizontally stitched, the UV values typically exceed 1.0 (i.e., the boundary), allowing for the application of the aforementioned stickers. Figure 2 To Post Figure 3 During the journey, a turnback will occur; exceeding 2.0 represents another boundary, which can be addressed by applying the aforementioned tags. Figure 5 When the program reaches texture 6, it will play texture 6. When it exceeds 8.0, which is another boundary, it will return to 0.0, that is, play texture 0.
[0080] Generally, sequential textures have the same aspect ratio, for example... Figure 7A The image shown is a 36-segment texture sequence with an aspect ratio of 6*6, as follows: Figure 7B The 64-segment texture sequence shown, with an aspect ratio of 8*8, can also have special cases, such as... Figure 7C The 24-segment sequence shown has an aspect ratio of 6*4. In this case, only the calculation is slightly modified, but the principle is the same.
[0081] In practical applications, the row and column folding calculations, and their folding positions, can typically be used to create an animation of the Pattern's 0-8 looping after blending the Pattern, through Timer calculations. It should be noted that the Timer in the UE is a floating-point value, and errors can occur during longer calculations, leading to offsets. The methods for eliminating these error offsets are not elaborated in this embodiment of the invention.
[0082] Here, Timer is a positively increasing floating-point parameter within the engine. While Timer represents the input value, in this embodiment of the invention, a custom TimeControl defined in the BP is used instead of Time to achieve the effects of forward playback, reverse playback, and paused playback of the sequence textures.
[0083] Specifically, a Float parameter node TimeControl is created to replace Timer. This parameter is then used for permutation and folding calculations similar to those used for sequence maps. Taking an 8x8 sequence map with 64 segments as an example, the TimeControl parameter is dynamically calculated in Backpropagation (BP). Under normal conditions, it scrolls from 0.0f to 64.0f, returning to 0.0f when the value is greater than 64.0f. When moving in reverse, it scrolls from 0.0f to -64.0f, returning to 0.0f when the value is less than -64.0f. Playback stops when paused, thus achieving the effects of forward playback, reverse playback, and paused playback of the sequence map.
[0084] For example, taking snowflakes as an example, the pause, reverse, and forward playback effects of the presented sequence textures are as follows: when the corresponding control parameter of the time control information is 0, playback is paused, which will make the snowflakes appear to be hovering in the air in the game scene; when the corresponding control parameter of the time control information is -1, playback is reversed, which will make the snowflakes appear to be moving diagonally upward to the left in the game scene; when the corresponding control parameter of the time control information is 1, playback is normal, which will make the snowflakes appear to be moving diagonally downward to the right in the game scene. Similarly, taking smoke as an example, the pause, reverse, and forward playback effects of the presented sequence textures can be respectively as follows: Figures 8A to 8C As shown, these represent the effects of paused playback of the smoke sequence, reverse playback of the smoke sequence, and forward playback of the smoke sequence, respectively.
[0085] Furthermore, referring to Figure 9 This illustration shows an application scenario diagram of the dynamic weather basic particle effects provided by the embodiments of the present invention. It can generally be represented as the configuration process of the corresponding parameters for the movement of different particles of the weather basic particles in the corresponding level.
[0086] In practical applications, the configuration process can be based on a procedural weather effects development workflow, allowing for customized parameter configuration for different level scenarios, such as... Figure 4 As shown, based on the dynamic weather system, parameters can be configured separately for different weather requirements such as rainy day level 00, rainy day level 01, snowy day level 00, and snowy day level 01. Thus, by creating a single weather system asset, it can correspond to a large number and variety of level scenarios in the open world map, thereby greatly improving work efficiency.
[0087] Among them, such as Figure 9As shown, fixed weather combinations can be created using a variety of controllable dynamic parameters. The complex parameter controls are then hidden within the blueprint, while the integrated, highly readable weather option switches are made available to designers. Selecting these options releases the corresponding weather effects. When configuring weather effects through simple selection and parameter adjustment, almost any controllable parameter can be adjusted, including but not limited to selecting a weather type in the Weather option, setting the spatial particle density in the Emitter Rate option, setting the emitter size in the EmitterSize option, setting the wind force in the WindStrength option, setting the wind angle in the WindRoatation option, setting the playback speed / forward / reverse playback in the TimeControl option, setting the initial particle speed in the Speed option, and setting the default particle size in the ParticleSize option. This embodiment of the invention does not impose any limitations on these aspects.
[0088] In practical applications, it can automatically generate the motion trajectory of weather-based particles in a certain level based on the selected parameters by responding to the designer's adjustments to various parameters on the parameter control panel.
[0089] In some embodiments of this invention, procedurally built special effects assets can be configured with a variety of weather effects in a scene simply by selecting and adjusting parameters. Simultaneously, the same asset can be reused in different levels and is easily portable, allowing for flexible reuse in other subsequent projects with special customization modifications. For example, for gameplay centered on life, farming, survival, and exploration, to realize the impact of realistic and diverse weather changes on gameplay, weather particle effects need to be highly flexible. Different weather options can be created that can be triggered based on conditions. In life-farming gameplay, weather is matched according to the weather forecast. In exploration, to meet the need for randomly triggering extreme weather, basic weather options such as wind, rain, and snow are created. In addition to basic wind, rain, and snow, real-time intensity changes are supported, and these can be randomly and freely combined, such as typhoons, wind + rain combinations, and wind + snow combinations, allowing for the configuration of a variety of weather effects in a scene through simple selection and parameter adjustment.
[0090] In some embodiments of the present invention, based on the procedural weather effects development process provided by the embodiments of the present invention, next-generation weather effects can also be created by realizing real-time dynamic interaction between information in the scene and particle systems. That is, real-time changing and interactive weather effects can be created with dynamic information such as climate change, weather conditions, landforms, and day and night.
[0091] For example, in the prior art, the use of fixed special effects assets does not involve environmental interaction. In terrains with changing airflow, such as canyons, particles still exhibit fixed movements. For instance, in caves, airflow should move from areas of high pressure to areas of low pressure, resulting in incorrect trajectory for the fixed special effects. This invention can improve the problem of particle movement not interacting with the scene environment. For example, particle trajectories are affected by wind. In this case, the wind direction and force can be determined based on the terrain where the character is located, and the trajectory of weather effects can be changed in real time according to airflow. In the prior art, when switching special effects assets at map junctions, particles disappear somewhat abruptly, and the effects exhibit reverse trajectories after rotating the view. For example, the effect facing the cave entrance moves from left to right, while the effect facing away from the cave entrance changes back to moving from left to right after rotating the view. This invention can solve the problem of inconsistent visual presentation. It can trigger special effects through a complete weather system, eliminating the problem of inconsistent visual presentation caused by the movement trajectory of special effects changing with the viewpoint when switching special effects assets according to different level scenes.
[0092] In this embodiment of the invention, scene information of a virtual scene is acquired, and force calculations are performed on weather basic particles based on the acquired wind field information to obtain dynamic parameters of the weather basic particles. These dynamic parameters are then used to overwrite the original parameters of the weather basic particles in real time, resulting in particle motion that matches the scene information of the virtual scene. By performing dynamic correlation calculations, when the attributes of the scene information change, automatic matching of particle motion can be achieved based on the real-time overwriting of the original parameters of the weather particles. This meets the needs of real-time dynamic weather changes, is suitable for open-world maps, and achieves the purpose of realizing the project's specific stylistic requirements.
[0093] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0094] Reference Figure 10 The diagram shows a structural block diagram of an embodiment of a dynamic weather particle effect processing device according to the present invention, which may specifically include the following modules:
[0095] The scene information acquisition module 1001 is used to acquire scene information of the virtual scene; the scene information includes wind field information.
[0096] The force calculation module 1002 is used to acquire weather basic particles, perform force calculations based on wind field information and the weather basic particles, and obtain the dynamic parameters of the weather basic particles.
[0097] The particle motion matching module 1003 is used to overwrite the original parameters of the weather basic particles with the dynamic parameters of the weather basic particles in real time, so as to obtain particle motion that matches the scene information of the virtual scene.
[0098] In one embodiment of the present invention, the force calculation module 1002 may include the following sub-modules:
[0099] The external driving force determination submodule is used to determine the external driving force corresponding to the direction vector of the wind field information based on the wind field information; the external driving force represents the wind force that the weather fundamental particles experience.
[0100] The force calculation submodule is used to obtain the internal driving force of the weather basic particles. It performs force calculation by superimposing the internal driving force and the wind force represented by the external driving force to obtain the dynamic parameters of the weather basic particles.
[0101] In one embodiment of the present invention, the wind field information includes at least wind direction information and intensity information; the force calculation submodule may include the following units:
[0102] The vertical axis vector conversion unit is used to obtain the vertical axis angle information of the external wind force from the wind direction information and convert the vertical axis angle information into a vertical axis vector.
[0103] The dynamic parameter calculation unit is used to associate the vertical axis vector with the motion trajectory of the weather basic particles, and to associate it with the particle velocity of the weather basic particles based on the intensity information, so as to calculate the dynamic parameters of the weather basic particles by force calculation.
[0104] In one embodiment of the present invention, the dynamic parameters include parameters for determining whether the system is affected by wind, and parameters for determining the degree of wind influence; the dynamic parameter calculation unit may include the following sub-units:
[0105] The first parameter calculation subunit is used to obtain the mass of the weather basic particle itself, determine whether the vertical axis vector of the weather basic particle's motion angle is affected by wind force based on the mass of the weather basic particle itself, and obtain the parameter used to determine whether it is affected by wind force; the parameter used to determine whether it is affected by wind force characterizes whether the motion angle changes during the particle's motion process.
[0106] The second parameter calculation subunit is used to determine the degree to which the wind affects the particle velocity of the weather basic particles based on the mass of the particles themselves, and to obtain parameters for determining the degree of wind influence. The parameters for determining the degree of wind influence characterize the changes in particle velocity during particle motion and whether smoke is generated.
[0107] In one embodiment of the present invention, the dynamic parameters further include the emitter range of the weather fundamental particles, and the dynamic parameter calculation unit may further include the following sub-units:
[0108] The particle quantity setting subunit is used to set the particle quantity for weather-related basic particles within a preset space.
[0109] The emitter range adjustment subunit is used to lock the spatial density of weather basic particles by adjusting the emitter range of weather basic particles based on the number of particles during the force calculation process.
[0110] In one embodiment of the present invention, the processing device for dynamic weather particle effects proposed in this embodiment may further include the following modules:
[0111] The time control information acquisition module is used to acquire time control information for controlling the motion direction of weather-based particles during the force calculation process; the time control information includes particle pause control information, reverse control information, and forward control information.
[0112] The particle motion direction control module is used to control the direction of particle motion of weather basic particles based on time control information.
[0113] In one embodiment of the present invention, the particle motion direction control module may include the following sub-modules:
[0114] The sequence map acquisition submodule is used to acquire sequence maps corresponding to the particle motion of the weather base particles; the sequence map has the return position during the sequence map playback process;
[0115] The pause control submodule is used to pause the playback of the sequence map when the time control information is particle pause control information;
[0116] The reverse control submodule is used to control the sequence map to play the sequence map from the foldback position in the first direction when the time control information is reverse control information;
[0117] The forward control submodule is used to control the sequence map to play in the second direction from the foldback position when the time control information is positive control information; wherein, the playback direction of the second direction is opposite to the playback direction of the first direction.
[0118] In this embodiment of the invention, the dynamic weather particle effect processing device acquires scene information of a virtual scene, performs force calculations on weather basic particles based on the acquired wind field information, obtains the dynamic parameters of the weather basic particles, and then overwrites the original parameters of the weather basic particles with the dynamic parameters in real time to obtain particle motion that matches the scene information of the virtual scene. Through dynamic correlation calculation, when the attributes of the scene information change, automatic matching of particle motion can be achieved based on the real-time overwriting of the original parameters of the weather particles, meeting the needs of real-time dynamic weather changes. This is suitable for open-world maps and achieves the purpose of realizing the special stylistic requirements of the project.
[0119] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0120] This invention also provides an electronic device, comprising:
[0121] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described embodiment of the dynamic weather particle effect processing method and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0122] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described dynamic weather particle effect processing method embodiment and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0123] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0124] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0125] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0126] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0128] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0129] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element.
[0130] The present invention has provided a detailed description of a method for processing dynamic weather particle effects, a device for processing dynamic weather particle effects, a corresponding electronic device, and a corresponding computer-readable storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for processing dynamic weather particle effects, characterized in that, The method includes: Obtain scene information of the virtual scene; the scene information includes wind field information; Obtain basic weather particles, perform force calculations based on the wind field information associated with the basic weather particles, and obtain the dynamic parameters of the basic weather particles; The dynamic parameters of the weather basic particles are overwritten with the original parameters of the weather basic particles in real time to obtain particle motion that matches the scene information of the virtual scene. The method further includes: by performing dynamic correlation calculations, when the attributes of the scene information change, the particle motion can be automatically matched based on the real-time overlay of the original parameters of the weather basic particles; wherein, the dynamic correlation calculations are implemented through an external information blueprint, the external information blueprint is used to acquire external information, the external information including the scene information; The wind field information includes at least wind direction and intensity information; the step of performing force calculations based on the wind field information and associating it with the weather fundamental particles to obtain the dynamic parameters of the weather fundamental particles includes: The vertical axis angle information of the external wind force is obtained from the wind direction information, and the vertical axis angle information is converted into a vertical axis vector; The vertical axis vector is associated with the trajectory of the weather basic particle, and the intensity information is associated with the particle velocity of the weather basic particle to calculate the dynamic parameters of the weather basic particle by performing force calculation. The dynamic parameters include the emitter range of weather fundamental particles, and the method further includes: The number of weather basic particles and the emission size of the transmitter are correlated and calculated to lock the spatial density of the weather basic particles. The transmitter range and density parameters can be adjusted externally to expand or shrink the emission range of the transmitter while keeping the particle density constant. The method further includes: using an external information blueprint tool to encapsulate the particle motion matched by the dynamic parameters and associating it with a console so that when it is subsequently configured into the corresponding level scene of the game, the external information blueprint and information channel can automatically perform dynamic association calculations based on the adjusted parameters to automatically match the particle motion of weather particles.
2. The method according to claim 1, characterized in that, The step of performing force calculations based on the wind field information and associating it with the weather fundamental particles to obtain the dynamic parameters of the weather fundamental particles includes: Based on the wind field information, an external driving force corresponding to the direction vector of the wind field information is determined; the external driving force represents the wind force experienced by the weather fundamental particle. The internal driving force of the weather fundamental particle is obtained, and the wind force represented by the internal driving force and the external driving force is superimposed to perform force calculation to obtain the dynamic parameters of the weather fundamental particle.
3. The method according to claim 1, characterized in that, The dynamic parameters include parameters for determining whether the system is affected by wind, and parameters for determining the degree of wind influence; the dynamic parameters obtained by performing force calculations on the weather basic particles include: The mass of the weather fundamental particle is obtained, and based on the mass of the weather fundamental particle, it is determined whether the vertical axis vector's motion angle of the weather fundamental particle is affected by wind force, and a parameter for determining whether it is affected by wind force is obtained; the parameter for determining whether it is affected by wind force characterizes whether the motion angle changes during the particle's motion process. Based on the mass of the weather fundamental particles themselves, the degree to which the wind affects the particle velocity of the weather fundamental particles is determined, and parameters for determining the degree of wind influence are obtained; the parameters for determining the degree of wind influence characterize the change in particle velocity during particle motion and whether smoke is generated.
4. The method according to claim 1 or 2, characterized in that, The method further includes: The number of particles for the weather basic particles is set within a preset space; During the force calculation process, based on the number of particles, the spatial density of the weather basic particles is locked by adjusting the emitter range of the weather basic particles.
5. The method according to claim 1, characterized in that, The method further includes: During the force calculation process, time control information is acquired to control the motion direction of the weather-based particles; wherein, the time control information includes particle pause control information, reverse control information, and forward control information; The direction of particle motion of the weather basic particles is controlled according to the time control information.
6. The method according to claim 5, characterized in that, The control of the direction of particle motion of the weather basic particles based on the time control information includes: Obtain a sequence map corresponding to the particle motion of the weather base particles; the sequence map has a return position during the sequence map playback process; If the time control information is particle pause control information, then the sequence texture is paused during playback; And / or, if the time control information is reverse control information, then the sequence map is controlled to play from the return position in the first direction; And / or, if the timing control information is positive control information, then the sequence map is controlled to play from the return position in the second direction; wherein the playback direction of the second direction is opposite to the playback direction of the first direction.
7. A processing device for dynamic weather particle effects, characterized in that, The device includes: The scene information acquisition module is used to acquire scene information of the virtual scene; the scene information includes wind field information. The force calculation module is used to acquire weather basic particles, perform force calculations based on the wind field information and the weather basic particles, and obtain the dynamic parameters of the weather basic particles. A particle motion matching module is used to overwrite the original parameters of the weather basic particles with the dynamic parameters in real time to obtain particle motion that matches the scene information of the virtual scene. The device is also used to: perform dynamic correlation calculations so that when the attributes of the scene information change, the particle motion can be automatically matched based on the real-time overwriting of the original parameters of the weather basic particles. The dynamic correlation calculation is implemented through an external information blueprint, which is used to acquire external information, including the scene information. The device further includes: The vertical axis vector conversion unit is used to obtain the vertical axis angle information of the external wind force from the wind direction information and convert the vertical axis angle information into a vertical axis vector. The dynamic parameter calculation unit is used to associate the vertical axis vector with the motion trajectory of the weather basic particles, and to associate it with the particle velocity of the weather basic particles based on the intensity information, so as to calculate the dynamic parameters of the weather basic particles by force calculation. The dynamic parameters include the emitter range of weather fundamental particles, and the device is also used for: The number of weather basic particles and the emission size of the transmitter are correlated and calculated to lock the spatial density of the weather basic particles. The transmitter range and density parameters can be adjusted externally to expand or shrink the emission range of the transmitter while keeping the particle density constant. The device is also used to: encapsulate the particle motion matched by the dynamic parameters using tools via an external information blueprint, and associate it with a console so that when it is subsequently configured into the corresponding level scene of the game, the external information blueprint and information channel can automatically perform dynamic association calculations based on the adjusted parameters to automatically match the particle motion of weather particles.
8. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the processing method for dynamic weather particle effects as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the processing method for dynamic weather particle effects as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Dynamic weather simulation method, map display method and related devices
CN114998492A
Method and device for generating weather effect in virtual scene and electronic equipment
CN115382215A