CN112116689B - Real-time rain and snow special effect rendering method and device - Google Patents

Real-time rain and snow special effect rendering method and device Download PDF

Info

Publication number
CN112116689B
CN112116689B CN202011001256.6A CN202011001256A CN112116689B CN 112116689 B CN112116689 B CN 112116689B CN 202011001256 A CN202011001256 A CN 202011001256A CN 112116689 B CN112116689 B CN 112116689B
Authority
CN
China
Prior art keywords
layer area
upper layer
raindrops
snowflakes
particle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011001256.6A
Other languages
Chinese (zh)
Other versions
CN112116689A (en
Inventor
杨永康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vtron Group Co Ltd
Original Assignee
Vtron Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vtron Group Co Ltd filed Critical Vtron Group Co Ltd
Priority to CN202011001256.6A priority Critical patent/CN112116689B/en
Publication of CN112116689A publication Critical patent/CN112116689A/en
Priority to PCT/CN2020/141345 priority patent/WO2022062254A1/en
Application granted granted Critical
Publication of CN112116689B publication Critical patent/CN112116689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/603D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/56Particle system, point based geometry or rendering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a method and a device for rendering a rain and snow special effect in real time, wherein the method comprises the following steps: establishing a circular particle generation area by taking the camera position as the center to obtain a bottom layer area, and superposing a normal map after configuring at least one single raindrop or snowflake picture for each particle in the bottom layer area; establishing an upper layer area in front of the bottom layer area along the sight direction of the camera, and attaching a picture of raindrops or snowflakes to the upper layer area; respectively configuring a bottom layer area and an upper layer area according to the real-time rain condition information or the snow condition information; the bottom layer region and the upper layer region are rendered simultaneously according to the configuration result of the bottom layer region and the upper layer region, so that the technical problems of thinness, lack of layers and fidelity of a finally presented picture caused by performance consumption caused by sharp increase of the particle number are solved by reducing the particle number and the visual field distance covered by the particle special effect in the large visual distance facing a large scene in the prior art.

Description

Real-time rain and snow special effect rendering method and device
Technical Field
The application relates to the technical field of computer simulation, in particular to a method and a device for rendering a rain and snow special effect in real time.
Background
The simulation of natural scenes such as rain, snow, etc. has wide application in the field of computer simulation, which can improve the fidelity of three-dimensional scenes. In the next city-level simulation scheme, the weather parameters (rainfall, rainfall range, wind direction, wind speed and other parameters) in the real environment are required to be obtained in real time, the relevant parameters of the special effects of rain and snow in the three-dimensional scene are dynamically adjusted, and the weather conditions of the real environment are restored as far as possible through the special effects of rain and snow.
In the prior art, a particle system is generally adopted to simulate raindrops and snowflakes to represent weather in a scene, and usually the particle system takes a camera as a center and takes the visual field distance of the camera as a radius to generate a picture with the raindrops or the snowflakes so as to simulate the raindrops and snowflakes. However, when the visual distance between the scene and the camera is very large, for example, more than 1 km, if the filling is continued by the above method, a large amount of particles are required, and as the visual range increases, the required amount of particles and the requirement for the performance of the computer increase exponentially, the performance of the computer is seriously consumed, and the program is blocked and even down. Under the condition of large visual distance of large scene, the prior art reduces the performance consumption caused by the sharp increase of the particle quantity by reducing the particle quantity and reducing the visual field distance covered by the particle special effect, so that the finally presented picture is thin, lacks layers and fidelity.
Disclosure of Invention
The application provides a real-time rain and snow special effect rendering method and device, which are used for solving the technical problems of thinness, lack of layers and fidelity of a finally presented picture caused by performance consumption caused by sharp increase of the number of particles by reducing the number of particles and reducing the visual field distance covered by the special effect of the particles under the condition of facing a large visual distance of a large scene in the prior art.
In view of this, the first aspect of the present application provides a real-time rain and snow special effect rendering method, including:
Establishing a circular particle generation area by taking the camera position as the center to obtain a bottom layer area, and superposing a normal map after configuring at least one single raindrop or snowflake picture for each particle in the bottom layer area;
Establishing an upper layer area in front of the bottom layer area along the direction of the camera sight, and attaching a picture of raindrops or snowflakes to the upper layer area;
respectively configuring the bottom layer region and the upper layer region according to real-time rain condition information or snow condition information;
and rendering the bottom layer region and the upper layer region simultaneously according to configuration results of the bottom layer region and the upper layer region.
Optionally, the establishing an upper layer area in front of the bottom layer area along the camera line of sight direction, and attaching a picture of raindrops or snowflakes to the upper layer area includes:
establishing a particle generation area in front of the bottom layer area along the direction of the camera sight to obtain an upper layer area;
Configuring at least one picture of raindrops or snowflakes for each particle in the upper layer area, and then superposing a normal map;
correspondingly, the configuring the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information respectively includes:
And configuring the particle quantity, particle size, particle movement speed and direction in the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information.
Optionally, the shape of the particle generating region comprises at least a circle or a rectangle.
Optionally, the establishing an upper layer area in front of the bottom layer area along the camera line of sight direction, and attaching a picture of raindrops or snowflakes to the upper layer area includes:
Establishing an upper layer area in front of the bottom layer area along the direction of the camera sight, wherein the upper layer area is a cylindrical model;
attaching a picture of raindrops or snowflakes to the cylindrical model;
correspondingly, the configuring the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information respectively includes:
According to the real-time rain condition information or the snow condition information, the particle number, particle size, particle movement speed and direction in the bottom layer area are configured, and the movement speed, movement direction and picture number of the pictures of the raindrops or the snowflakes in the upper layer area are configured.
Optionally, the upper layer region includes one layer region, two layer regions, or multiple layer regions.
Optionally, when the upper layer region is a two-layer region, the upper layer region includes a first upper layer region and a second upper layer region;
correspondingly, the step of establishing an upper layer area in front of the bottom layer area along the camera sight direction and attaching a picture of raindrops or snowflakes to the upper layer area comprises the following steps:
establishing the first upper layer area in front of the bottom layer area along the direction of the camera sight, and establishing the second upper layer area in front of the first upper layer area;
And attaching pictures of raindrops or snowflakes to the first upper layer area and the second upper layer area.
Optionally, the pictures of the raindrops or the snowflakes in the upper layer area are pictures of a plurality of parallel raindrops and raindrops with transparent channels or pictures of a plurality of parallel snowflakes with transparent channels, and the number of the raindrops or the snowflakes in the pictures of the raindrops or the snowflakes in the second upper layer area is larger than the number of the raindrops or the snowflakes in the pictures of the raindrops or the snowflakes in the first upper layer area.
The second aspect of the present application provides a real-time rain and snow special effect rendering device, comprising:
the first establishing unit is used for establishing a circular particle generation area by taking the camera position as the center to obtain a bottom layer area, and superposing a normal map after configuring at least one single raindrop or snowflake picture for each particle in the bottom layer area;
the second establishing unit is used for establishing an upper layer area in front of the bottom layer area along the sight direction of the camera and attaching pictures of raindrops or snowflakes to the upper layer area;
The configuration unit is used for respectively configuring the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information;
And the rendering unit is used for simultaneously rendering the bottom layer region and the upper layer region according to the configuration result of the bottom layer region and the upper layer region.
Optionally, the second establishing unit is specifically configured to:
establishing a particle generation area in front of the bottom layer area along the direction of the camera sight to obtain an upper layer area;
Configuring at least one picture of raindrops or snowflakes for each particle in the upper layer area, and then superposing a normal map;
Correspondingly, the configuration unit is specifically configured to:
And configuring the particle quantity, particle size, particle movement speed and direction in the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information.
Optionally, the second establishing unit is further configured to:
Establishing an upper layer area in front of the bottom layer area along the direction of the camera sight, wherein the upper layer area is a cylindrical model;
attaching a picture of raindrops or snowflakes to the cylindrical model;
Correspondingly, the configuration unit is specifically configured to:
According to the real-time rain condition information or the snow condition information, the particle number, particle size, particle movement speed and direction in the bottom layer area are configured, and the movement speed, movement direction and picture number of the pictures of the raindrops or the snowflakes in the upper layer area are configured.
From the above technical scheme, the application has the following advantages:
The application provides a real-time rain and snow special effect rendering method, which comprises the following steps: establishing a circular particle generation area by taking the camera position as the center to obtain a bottom layer area, and superposing a normal map after configuring at least one single raindrop or snowflake picture for each particle in the bottom layer area; establishing an upper layer area in front of the bottom layer area along the sight direction of the camera, and attaching a picture of raindrops or snowflakes to the upper layer area; respectively configuring a bottom layer area and an upper layer area according to the real-time rain condition information or the snow condition information; and rendering the bottom layer region and the upper layer region simultaneously according to the configuration result of the bottom layer region and the upper layer region.
According to the real-time rain and snow special effect rendering method, a new rendering structure is designed, an upper layer area is added on the basis that the existing rendering structure only has a bottom layer area, and the number of simulation particles under a large visual distance of a large scene is reduced through cooperation between the two layers of areas, so that a computer can realize vivid, dynamic and real-time rain and snow special effects under the large visual distance of the large scene with less performance cost, and the technical problems of thinness, lack of layers and fidelity of a finally presented picture caused by the fact that the number of particles is reduced and the visual field distance covered by the special effects of the particles is reduced under the large visual distance of the large scene in the prior art are solved, so that performance consumption caused by sharp increase of the number of the particles is reduced.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic flow chart of a first embodiment of a real-time rain and snow special effect rendering method provided by the application;
Fig. 2 is a schematic flow chart of a second embodiment of a real-time rain and snow special effect rendering method provided by the application;
Fig. 3 is a schematic flow chart of a third embodiment of a real-time rain and snow special effect rendering method provided by the application;
FIG. 4 is a schematic diagram of a first rendering structure according to the present application;
FIG. 5 is a schematic diagram of a second rendering structure according to the present application;
FIG. 6 is a schematic diagram of a third rendering structure according to the present application;
Fig. 7 is a schematic structural diagram of a real-time rain and snow special effect rendering device provided by the application.
Detailed Description
The application provides a real-time rain and snow special effect rendering method and device, which are used for solving the technical problems of thinness, lack of layers and fidelity of a finally presented picture caused by performance consumption caused by sharp increase of the number of particles by reducing the number of particles and reducing the visual field distance covered by the special effect of the particles under the condition of facing a large visual distance of a large scene in the prior art.
In order to make the present application better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
When the conventional method is applied to a large visual distance of a large scene, for example, rain and snow special effect simulation is carried out on a city, a circular particle generation area is established by taking the position of a camera as the center, the particle generation area covers the whole city area, then a large number of particles are generated in the particle generation area to carry out rain and snow special effect rendering, and for the large visual distance of the large scene of the city, the large number of particles generated by adopting the method can seriously consume the performance of a computer, so that a program is blocked and even down. In the face of this, it is common practice to reduce the performance consumption caused by the sharp increase of the particle count by reducing the particle count and the visual field distance covered by the particle effect, but this results in the technical problems of thinness, lack of gradation and fidelity of the finally presented picture. In order to solve the problem, the application provides a real-time rain and snow special effect rendering method.
For easy understanding, please refer to fig. 1, a first embodiment of a real-time rain and snow special effect rendering method provided by the present application includes:
And 101, establishing a circular particle generation area by taking the camera position as the center to obtain a bottom layer area, and superposing a normal map after configuring at least one single raindrop or snowflake picture for each particle in the bottom layer area.
And establishing a circular particle generation area by taking the camera position as the center to obtain a bottom layer area, wherein the radius of the circular particle generation area can be the camera visual field distance or can be set according to actual conditions. As the bottom layer area is the layer nearest to the camera, the particles are simulated by adopting an independent raindrop picture. The pictures of the raindrops or the snowflakes are particle rendering materials, when the same picture materials are adopted, repeated effects can not be avoided when a large number of the pictures are generated, and in order to avoid the situation, the pictures of the raindrops or the snowflakes can be configured for each particle, so that the repeated effects are eliminated, and the simulation picture is more natural and real. Therefore, in the embodiment of the present application, at least one picture of a single raindrop or snowflake is configured for each particle in the bottom layer area, and a normal map is superimposed, where the normal map belongs to the prior art, and details thereof are not repeated here.
And 102, establishing an upper layer area in front of the bottom layer area along the sight direction of the camera, and attaching a picture of raindrops or snowflakes to the upper layer area.
Referring to the schematic diagram of a rendering structure provided in fig. 4, a bottom circle in the diagram represents a range of a bottom region, a mark in the middle of the circle is a camera, a triangle wire frame above the camera represents a viewing angle range of the camera, an upper region is established in front of the bottom region along a viewing direction of the camera, i.e. a direction from the camera to the viewing angle range, and a picture of raindrops or snowflakes is attached to the upper region, wherein the upper region may be in any shape such as a circle or a matrix. The distance between the upper layer region and the bottom layer region can be adjusted according to the performance and scene effect of the computer, the larger the distance is, the larger the range of the upper layer region is, when the upper layer region is also a particle generation region, the larger the range of the upper layer region is, the larger the number of particles to be rendered in the region is, and the higher the performance requirement on the computer is.
And 103, respectively configuring the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information.
The bottom layer region and the upper layer region are respectively configured according to real-time rain condition information or snow condition information in an actual large scene, for example, the number of configuration examples, particle size, particle movement speed, direction and the like.
And 104, rendering the bottom layer region and the upper layer region simultaneously according to configuration results of the bottom layer region and the upper layer region.
After the bottom layer region and the upper layer region are configured, the corresponding bottom layer region and upper layer region are rendered at the same time according to the configuration result, and rain and snow special effect simulation is performed, so that the obtained rendering effect can see the rendering effect diagram on the display.
According to the real-time rain and snow special effect rendering method in the embodiment of the application, a new rendering structure is designed, an upper layer area is added on the basis that the existing rendering structure only has a bottom layer area, and the number of simulation particles under a large visual distance of a large scene is reduced through cooperation between the two layer areas, so that a computer can realize a vivid, dynamic and real-time rain and snow special effect under the large visual distance of the large scene with less performance cost, and the technical problems of thinness, lack of layers and fidelity of a finally presented picture caused by the fact that the number of particles is reduced and the visual field distance covered by the special effect of the particles is reduced under the large visual distance of the large scene in the prior art are solved, so that the performance consumption caused by the sharp increase of the number of the particles is reduced.
The first embodiment of the real-time rain and snow special effect rendering method provided by the application is provided above, and the second embodiment of the real-time rain and snow special effect rendering method provided by the application is provided below.
For easy understanding, please refer to fig. 2, a second embodiment of a real-time rain and snow special effect rendering method provided by the present application includes:
Step 201, a circular particle generation area is established by taking the camera position as the center, a bottom layer area is obtained, at least one picture of single raindrops or snowflakes is configured for each particle in the bottom layer area, and then a normal map is superimposed.
Preferably, at least one picture of a single raindrop or snowflake with a transparent channel is configured for each particle in the bottom layer region, so that the raindrop and snowflake special effects are conveniently overlapped, and the display picture is more vivid.
And 202, establishing a particle generation area in front of the bottom layer area along the sight line direction of the camera to obtain an upper layer area.
And establishing a particle generation area in front of the bottom layer area along the sight line direction of the camera to obtain an upper layer area, wherein the shape of the particle generation area can be circular, rectangular or other shapes.
Further, one, two or more layers of particle generation regions may be established in front of the underlying region along the camera line of sight, and the resulting overlying region may include one, two or more layers of regions, respectively. In the embodiment of the application, two layers of particle generation areas are preferably established in front of the bottom layer area, the obtained upper layer area comprises a first upper layer area and a second upper layer area, namely, the rendering structure constructed in the embodiment of the application is preferably three layers of particles, namely, one layer of particle generation area is established in front of the bottom layer area along the direction of the camera sight line, so as to obtain a first upper layer area, and one layer of particle generation area is established in front of the first upper layer area, so as to obtain a second upper layer area. Referring to fig. 5, the first layer corresponds to the bottom layer region, the particle generating region has a circular shape, the second layer corresponds to the first upper layer region, the particle generating region has a rectangular shape, or may have a circular shape or other shapes, the third layer corresponds to the second upper layer region, and the particle generating region has a matrix shape, or may have a circular shape or other shapes.
Step 203, after configuring at least one picture of raindrops or snowflakes for each particle in the upper layer area, overlaying a normal map.
After the upper layer region is established, at least one picture of raindrops or snowflakes is configured for each particle in the upper layer region, and then a normal map is superimposed. When the upper layer area is a two-layer area, pictures of raindrops or snowflakes are attached to the first upper layer area and the second upper layer area. Specifically, at least one picture of a plurality of parallel raindrops and fine rain mist with transparent channels or a picture of a plurality of parallel snowflakes with transparent channels is configured for each particle in the first upper layer area, and normal line mapping is overlapped; at least one picture of a plurality of parallel raindrops and fine rain mist with transparent channels or a picture of a plurality of parallel snowflakes with transparent channels is allocated to each particle in the second upper layer area, and normal line mapping is overlapped, wherein the number of raindrops or snowflakes in the picture of the raindrops or snowflakes of the second upper layer area is far more than that in the picture of the raindrops or snowflakes of the first upper layer area.
The first upper region is located behind the lower region, farther from the camera than the lower region. The layer is designed to form a spatial layering sense compared with the bottom layer area, and the visual field distance of the rain and snow special effect is visually increased. As the rendering range increases, a raindrop picture is rendered with each particle of the first layer still resulting in a huge performance consumption. Therefore, a plurality of parallel raindrops or a plurality of parallel snowflakes are contained in each particle picture in the first upper layer region, so that the effect of simulating a large number of raindrops with a small particle number is realized.
The second upper layer region is located furthest from the camera after the first upper layer region. The purpose of this layer is to provide a dynamic and hierarchical background for the first two layers. The processing mode of the particle elements in the layer is similar to that of the first upper layer region, except that each particle picture of the layer contains more raindrop elements or snowflake elements, and the number and density of the raindrops or snowflakes can be tens of times or more than that of the first upper layer region.
And 204, configuring the particle quantity, particle size, particle movement speed and direction in the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information.
As the bottom layer area is the layer nearest to the camera, the particles are simulated by adopting an independent raindrop picture. Thus by setting the size, direction of movement and speed of each particle within the layer, the size direction and speed of each raindrop or snowflake can be simulated. The particle quantity can be set according to real-time rain condition information or snow condition information, the particle size can be approximately simulated according to rainfall or snowfall, the particle movement direction can be obtained through current wind power wind direction approximate simulation or calculation, and the particle movement speed can be obtained through the rain drop or snowflake size approximate simulation or calculation, so that the change of the rain drop or snowflake due to factors such as wind speed, resistance and the like can be realized, in the layer, the rain and snow visual effect under a short distance is mainly represented, and the change and the influence of real-time parameters can be finely represented. The configuration of the upper layer region is similar to the configuration process of the bottom layer region, and the particle quantity, particle size, particle movement speed and direction in the bottom layer region and the upper layer region are configured according to the real-time rain condition information or the snow condition information, so that configuration results of the bottom layer region and the upper layer region are respectively obtained.
And 205, rendering the bottom layer region and the upper layer region simultaneously according to configuration results of the bottom layer region and the upper layer region.
And simultaneously rendering the particles in the three-layer particle region according to the configuration results of the particles in the bottom layer region and the upper layer region, and performing rain and snow special effect simulation, wherein the obtained rendering effect can be displayed through a display.
In the embodiment of the application, a three-layer particle structure is preferably adopted to conduct rain and snow special effect rendering, a single rain drop or snow flake picture is adopted to conduct simulation on particles in a layer nearest to a camera, the size, the direction and the speed of each rain drop or snow flake can be simulated by setting the size, the moving direction and the speed of the particles, the change of the rain drops or snow flakes caused by factors such as wind speed, resistance and the like can be realized, the layer can realize the rain and snow visual effect in a short distance, and the change and the influence of real-time parameters can be finely shown; the second layer is compared with the first layer to form a layering sense in space, so that the visual field distance of the special effect of rain and snow is increased visually, and each particle picture in the second layer comprises a plurality of parallel raindrops or snowflakes, so that the effect of simulating a large number of raindrops or snowflakes by using a small number of particles can be realized, and the fidelity of a presented picture is enhanced; the third layer provides a dynamic and hierarchical background for the first two layers, and because the rendering range of the third layer is further increased compared with the first two layers, in order not to increase the performance consumption of the computer, each particle picture in the third layer contains more raindrops or snowflake elements, and the number and density of the raindrops or snowflakes can be tens of times or more than that of the second layer.
According to the embodiment of the application, a new rendering structure is designed, three layers of particle generation areas are constructed, the particle number of a first layer is reduced through layering, layering sense is increased, and a picture has more depth; through the cooperation among the three layers, the computer realizes vivid, dynamic and real-time rain and snow special effects under large visual distances of large scenes with lower performance cost.
The embodiment II of the real-time rain and snow special effect rendering method provided by the application is provided above, and the embodiment III of the real-time rain and snow special effect rendering method provided by the application is provided below.
For easy understanding, please refer to fig. 3, a third embodiment of the present application provides a real-time rain and snow special effect rendering method, which includes:
Step 301, a circular particle generation area is established by taking a camera position as a center, a bottom layer area is obtained, at least one picture of single raindrops or snowflakes is configured for each particle in the bottom layer area, and then a normal map is superimposed.
Step 301 corresponds to the specific content of step 201, and will not be described in detail herein.
And 302, establishing an upper layer area in front of the bottom layer area along the sight line direction of the camera, wherein the upper layer area is a cylindrical model.
In the second embodiment, the upper layer region is a particle generation region in which particles are generated, and there is no actual vertex model. In the embodiment of the present application, a cylindrical model is adopted, and the implementation is based on a true vertex mesh model, and no particles are generated, please refer to fig. 6, wherein the first layer is a bottom layer region, i.e. a circular particle generation region, and the second layer is an upper layer region, i.e. a cylindrical model. The upper layer area is not limited to the particle form, and the reduction of the particle quantity of the bottom layer area is mainly realized through layering, and the layering sense is increased to enable the picture to have depth.
And 303, attaching a picture of raindrops or snowflakes to the cylindrical model.
A plurality of pictures of parallel raindrops and fine rain mist with transparent channels or a plurality of pictures of parallel snowflakes with transparent channels are stuck on a cylindrical model, and the pictures are moved, so that the effect of falling raindrops or snowflakes is caused.
Step 304, according to the real-time rain condition information or the snow condition information, the number of particles, the particle size, the particle movement speed and the particle direction in the bottom layer area are configured, and the movement speed, the movement direction and the picture number of the pictures of the raindrops or the snowflakes in the upper layer area are configured.
According to the real-time rain condition information or the snow condition information, the particle number, particle size, particle movement speed and direction in the bottom layer area are configured, and the movement speed, movement direction and picture number of the pictures of the raindrops or the snowflakes in the upper layer area are configured. The size, the direction and the speed of each raindrop or snowflake can be simulated by configuring the particle size, the movement direction and the speed in the bottom layer area and configuring the movement speed, the movement direction and the number of pictures of the raindrops or the snowflakes in the upper layer area, so that the change of the wind speed, the resistance and other factors of the raindrops or the snowflakes can be realized.
And 305, rendering the bottom layer region and the upper layer region simultaneously according to the configuration result of the bottom layer region and the upper layer region.
And simultaneously rendering the bottom layer region and the upper layer region according to configuration results of the bottom layer region and the upper layer region, and performing rain and snow special effect simulation, wherein the obtained rendering effect can be displayed through a display.
According to the embodiment of the application, a new rendering structure is designed, a layer of particle generation area and a layer of cylindrical model are constructed, pictures of raindrops or snowflakes are pasted on the cylindrical model, the pictures move, the effect of falling the raindrops or the snowflakes is caused, the particle quantity of a first layer is reduced through layering, layering sense is increased, and the picture has depth; through the cooperation between the two layers, the computer realizes vivid, dynamic and real-time rain and snow special effects under large visual distance of a large scene with lower performance cost.
The third embodiment of the real-time rain and snow special effect rendering method provided by the application is the first embodiment of the real-time rain and snow special effect rendering device provided by the application.
For easy understanding, please refer to fig. 7, a first embodiment of a real-time rain and snow special effect rendering device provided by the present application includes:
the first establishing unit 401 is configured to establish a circular particle generating area with the camera position as the center, obtain a bottom layer area, and superimpose a normal map after configuring at least one picture of a single raindrop or snowflake on each particle in the bottom layer area.
The second setting-up unit 402 is configured to set up an upper layer area in front of the bottom layer area along the camera viewing direction, and attach a picture of raindrops or snowflakes to the upper layer area.
The configuration unit 403 is configured to configure the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information, respectively.
And a rendering unit 404, configured to render the bottom layer region and the upper layer region simultaneously according to the configuration results of the bottom layer region and the upper layer region.
The first embodiment of the real-time rain and snow special effect rendering device provided by the application is provided above, and the second embodiment of the real-time rain and snow special effect rendering device provided by the application is provided below.
The second embodiment of the application provides a real-time rain and snow special effect rendering device, which comprises:
the first establishing unit 401 is configured to establish a circular particle generating area with the camera position as the center, obtain a bottom layer area, and superimpose a normal map after configuring at least one picture of a single raindrop or snowflake on each particle in the bottom layer area.
The second setting-up unit 402 is configured to set up an upper layer area in front of the bottom layer area along the camera viewing direction, and attach a picture of raindrops or snowflakes to the upper layer area.
The configuration unit 403 is configured to configure the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information, respectively.
And a rendering unit 404, configured to render the bottom layer region and the upper layer region simultaneously according to the configuration results of the bottom layer region and the upper layer region.
As a further refinement, the second establishing unit 402 is specifically configured to:
establishing a particle generation area in front of the bottom layer area along the direction of the camera sight to obtain an upper layer area;
After configuring at least one picture of raindrops or snowflakes for each particle in the upper layer area, superposing a normal map;
accordingly, the configuration unit 403 is specifically configured to:
And configuring the particle quantity, particle size, particle movement speed and direction in the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information.
As a further refinement, the second setup unit 402 is also configured to:
An upper layer area is established in front of the bottom layer area along the direction of the camera sight, wherein the upper layer area is a cylindrical model;
Attaching a picture of raindrops or snowflakes to the cylindrical model;
accordingly, the configuration unit 403 is specifically configured to:
According to the real-time rain condition information or the snow condition information, the particle number, particle size, particle movement speed and direction in the bottom layer area are configured, and the movement speed, movement direction and picture number of the pictures of the raindrops or the snowflakes in the upper layer area are configured.
As a further improvement, the upper layer region includes one layer region, two layer regions, or a multi layer region.
As a further improvement, when the upper layer region is a two-layer region, the upper layer region includes a first upper layer region and a second upper layer region;
Accordingly, the second establishing unit 402 is specifically configured to:
establishing a first upper layer area in front of the bottom layer area along the direction of the camera sight, and establishing a second upper layer area in front of the first upper layer area;
and attaching pictures of raindrops or snowflakes to the first upper layer area and the second upper layer area.
As a further improvement, the pictures of the raindrops or the snowflakes of the upper layer region are pictures of a plurality of parallel raindrops and raindrops with transparent channels or pictures of a plurality of parallel snowflakes with transparent channels, and the number of raindrops or the number of snowflakes in the pictures of the raindrops or the snowflakes of the second upper layer region is larger than the number of raindrops or the number of snowflakes in the pictures of the raindrops or the snowflakes of the first upper layer region.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and units described above may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (7)

1. The real-time rain and snow special effect rendering method is characterized by comprising the following steps of:
Establishing a circular particle generation area by taking the camera position as the center to obtain a bottom layer area, and superposing a normal map after configuring at least one single raindrop or snowflake picture for each particle in the bottom layer area;
Establishing an upper layer area in front of the bottom layer area along the direction of the camera sight, and attaching a picture of raindrops or snowflakes to the upper layer area;
respectively configuring the bottom layer region and the upper layer region according to real-time rain condition information or snow condition information;
rendering the bottom layer region and the upper layer region simultaneously according to configuration results of the bottom layer region and the upper layer region;
Wherein the upper layer region comprises a layer region, two layers of regions or multiple layers of regions;
when the upper layer area is a two-layer area, the upper layer area comprises a first upper layer area and a second upper layer area;
correspondingly, the step of establishing an upper layer area in front of the bottom layer area along the camera sight direction and attaching a picture of raindrops or snowflakes to the upper layer area comprises the following steps:
establishing the first upper layer area in front of the bottom layer area along the direction of the camera sight, and establishing the second upper layer area in front of the first upper layer area;
Attaching pictures of raindrops or snowflakes to the first upper layer area and the second upper layer area;
The pictures of the raindrops or the snowflakes in the upper layer area are pictures of a plurality of parallel raindrops and raindrops with transparent channels or pictures of a plurality of parallel snowflakes with transparent channels, and the number of the raindrops or the snowflakes in the pictures of the raindrops or the snowflakes in the second upper layer area is larger than that in the pictures of the raindrops or the snowflakes in the first upper layer area.
2. The method for rendering the special effects of rain and snow in real time according to claim 1, wherein the steps of establishing an upper layer area in front of the bottom layer area along the direction of the camera sight, and attaching a picture of rain drops or snow on the upper layer area include:
establishing a particle generation area in front of the bottom layer area along the direction of the camera sight to obtain an upper layer area;
Configuring at least one picture of raindrops or snowflakes for each particle in the upper layer area, and then superposing a normal map;
correspondingly, the configuring the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information respectively includes:
And configuring the particle quantity, particle size, particle movement speed and direction in the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information.
3. The real-time rain and snow special effect rendering method according to claim 2, wherein the shape of the particle generating region includes at least a circle or a rectangle.
4. The method for rendering the special effects of rain and snow in real time according to claim 1, wherein the steps of establishing an upper layer area in front of the bottom layer area along the direction of the camera sight, and attaching a picture of rain drops or snow on the upper layer area include:
Establishing an upper layer area in front of the bottom layer area along the direction of the camera sight, wherein the upper layer area is a cylindrical model;
attaching a picture of raindrops or snowflakes to the cylindrical model;
correspondingly, the configuring the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information respectively includes:
According to the real-time rain condition information or the snow condition information, the particle number, particle size, particle movement speed and direction in the bottom layer area are configured, and the movement speed, movement direction and picture number of the pictures of the raindrops or the snowflakes in the upper layer area are configured.
5. The utility model provides a real-time rain and snow special effect rendering device which characterized in that includes:
the first establishing unit is used for establishing a circular particle generation area by taking the camera position as the center to obtain a bottom layer area, and superposing a normal map after configuring at least one single raindrop or snowflake picture for each particle in the bottom layer area;
the second establishing unit is used for establishing an upper layer area in front of the bottom layer area along the sight direction of the camera and attaching pictures of raindrops or snowflakes to the upper layer area;
The configuration unit is used for respectively configuring the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information;
the rendering unit is used for simultaneously rendering the bottom layer region and the upper layer region according to configuration results of the bottom layer region and the upper layer region;
Wherein the upper layer region comprises a layer region, two layers of regions or multiple layers of regions;
when the upper layer area is a two-layer area, the upper layer area comprises a first upper layer area and a second upper layer area;
correspondingly, the step of establishing an upper layer area in front of the bottom layer area along the camera sight direction and attaching a picture of raindrops or snowflakes to the upper layer area comprises the following steps:
establishing the first upper layer area in front of the bottom layer area along the direction of the camera sight, and establishing the second upper layer area in front of the first upper layer area;
Attaching pictures of raindrops or snowflakes to the first upper layer area and the second upper layer area;
The pictures of the raindrops or the snowflakes in the upper layer area are pictures of a plurality of parallel raindrops and raindrops with transparent channels or pictures of a plurality of parallel snowflakes with transparent channels, and the number of the raindrops or the snowflakes in the pictures of the raindrops or the snowflakes in the second upper layer area is larger than that in the pictures of the raindrops or the snowflakes in the first upper layer area.
6. The real-time rain and snow special effect rendering device according to claim 5, wherein the second establishing unit is specifically configured to:
establishing a particle generation area in front of the bottom layer area along the direction of the camera sight to obtain an upper layer area;
Configuring at least one picture of raindrops or snowflakes for each particle in the upper layer area, and then superposing a normal map;
Correspondingly, the configuration unit is specifically configured to:
And configuring the particle quantity, particle size, particle movement speed and direction in the bottom layer area and the upper layer area according to the real-time rain condition information or the snow condition information.
7. The real-time rain and snow special effect rendering device according to claim 5, wherein the second establishing unit is further configured to:
Establishing an upper layer area in front of the bottom layer area along the direction of the camera sight, wherein the upper layer area is a cylindrical model;
attaching a picture of raindrops or snowflakes to the cylindrical model;
Correspondingly, the configuration unit is specifically configured to:
According to the real-time rain condition information or the snow condition information, the particle number, particle size, particle movement speed and direction in the bottom layer area are configured, and the movement speed, movement direction and picture number of the pictures of the raindrops or the snowflakes in the upper layer area are configured.
CN202011001256.6A 2020-09-22 2020-09-22 Real-time rain and snow special effect rendering method and device Active CN112116689B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011001256.6A CN112116689B (en) 2020-09-22 2020-09-22 Real-time rain and snow special effect rendering method and device
PCT/CN2020/141345 WO2022062254A1 (en) 2020-09-22 2020-12-30 Method and apparatus for rendering rain and snow special effects in real time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011001256.6A CN112116689B (en) 2020-09-22 2020-09-22 Real-time rain and snow special effect rendering method and device

Publications (2)

Publication Number Publication Date
CN112116689A CN112116689A (en) 2020-12-22
CN112116689B true CN112116689B (en) 2024-05-14

Family

ID=73801461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011001256.6A Active CN112116689B (en) 2020-09-22 2020-09-22 Real-time rain and snow special effect rendering method and device

Country Status (2)

Country Link
CN (1) CN112116689B (en)
WO (1) WO2022062254A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116689B (en) * 2020-09-22 2024-05-14 威创集团股份有限公司 Real-time rain and snow special effect rendering method and device
CN116109800A (en) * 2022-10-26 2023-05-12 润芯微科技(江苏)有限公司 Real-time 3D weather system based on illusion engine and implementation method thereof
CN117875147B (en) * 2024-03-11 2024-06-07 杭州经纬信息技术股份有限公司 Method and system for simulating rain and fog phenomena in real time and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473802A (en) * 2013-08-30 2013-12-25 福建天晴数码有限公司 Global weather simulation method based on particle system
CN107886574A (en) * 2017-09-19 2018-04-06 浙江科澜信息技术有限公司 A kind of global rain effect emulation mode based on particIe system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11373356B2 (en) * 2018-03-28 2022-06-28 Robert Bosch Gmbh Method and system for efficient rendering of 3D particle systems for weather effects
CN112116689B (en) * 2020-09-22 2024-05-14 威创集团股份有限公司 Real-time rain and snow special effect rendering method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473802A (en) * 2013-08-30 2013-12-25 福建天晴数码有限公司 Global weather simulation method based on particle system
CN107886574A (en) * 2017-09-19 2018-04-06 浙江科澜信息技术有限公司 A kind of global rain effect emulation mode based on particIe system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于汽车驾驶模拟器的实时雨雪效果模拟;余春暄 等;计算机工程与设计;第32卷(第1期);324-327 *
基于粒子系统和纹理滚动的实时雨雪模拟;周凯波 等;微计算机信息;第25卷(第12-3期);177-179 *

Also Published As

Publication number Publication date
WO2022062254A1 (en) 2022-03-31
CN112116689A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN112116689B (en) Real-time rain and snow special effect rendering method and device
CN107452048B (en) The calculation method and device of global illumination
CN102323996B (en) Three-dimensional GIS (Geographic Information System) technology based visual state monitoring system for power transmission lines
CN111275802B (en) PBR material rendering method and system based on VRAY
JP2019175457A (en) Method and system for efficiently rendering cloudy weather effect graphics in three-dimensional map
US9582929B2 (en) Dynamic skydome system
CN116012557B (en) Weather natural scene data docking system and docking method based on three-dimensional system
CN106570926B (en) Efficient particle cloud layer method for drafting in a kind of Flight Scene Simulation
CN110827391A (en) Image rendering method, device and equipment and storage medium
US11893081B2 (en) Map display method and apparatus
CN115690344A (en) Sponge city sand table and weather simulation system
CN107590280A (en) A kind of emulation mode of the true cloud layer in the three-dimensional geographic information system whole world
CN112233214B (en) Snow scene rendering method, device and equipment for large scene and storage medium
GB2622666A (en) Three-dimensional virtual ecological environmental visualization integration and optimization system for large region
CN103530901A (en) Method and system for visualizing dynamic water area by matching with real three-dimensional environment
CN103426199A (en) Low-noise real-time global illumination drawing method for three-dimensional geometric scene
CN110400366B (en) Real-time flood disaster visualization simulation method based on OpenGL
CN111445563A (en) Image generation method and related device
CN111221514B (en) OsgEarth-based three-dimensional visualization component implementation method and system
US20090073165A1 (en) Method and aircraft display system for generating three dimensional image
CN116560746A (en) Dynamic loading system and dynamic loading method for real-time weather under virtual engine platform
CA2525719A1 (en) Systems and methods for presenting descriptions of conditions with respect to a surface
CN114138265B (en) Visualization method based on digital twinning
CN117555426B (en) Virtual reality interaction system based on digital twin technology
CN113032072B (en) Weather state display method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant