A method and device for configuring water mist in a scene, electronic equipment and storage medium

By detecting material information and configuring water mist models in game scenes, generating water mist instances, and adapting them when the scene changes, the problem of poor reusability of water mist effects is solved, and efficient reuse and adaptation of water mist effects are achieved.

CN115937027BActive Publication Date: 2025-12-09WELLINK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211542694.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2025-12-09
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

In game scenarios, existing technologies cannot effectively reuse water mist effects, which means that water mist effects need to be recreated when switching scenes, resulting in poor reusability.

Method used

The water mist material information is determined by detecting the material selection command, and a water mist model is generated by fuzzing. Water mist instances are configured in combination with the scene, and the water mist instances can be applied and modified when the scene changes. Reusability is improved by using a preset configuration library and environmental similarity recognition.

Benefits of technology

It improves the reusability of water mist effects, reduces repetitive production work, and increases production efficiency and adaptability of water mist effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937027B_ABST
    Figure CN115937027B_ABST
Patent Text Reader

Abstract

The application relates to a water mist configuration method and device in a scene, electronic equipment and a storage medium, relates to the field of computer technology, and comprises the following steps: determining material information of water mist in a current scene according to detected material selection instructions; performing blur processing on a specified region in the current scene according to the material information to obtain a water mist model; combining the current scene to configure the water mist model to obtain a water mist instance; when it is detected that the current scene changes, applying the water mist instance in the changed scene; and when a parameter modification instruction triggered by a user is detected, modifying the water mist instance in the changed scene according to the parameter modification instruction triggered by the user. The application has the effect of improving the reusability of water mist.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer technology, and particularly relates to a scene water mist configuration method and device, electronic equipment and storage medium. BACKGROUND

[0002] In the field of game scene production, it is usually necessary to set a water mist effect in a scene to enhance the real visual effect of the scene picture.

[0003] At present, a sequence frame or a fog component is usually used to sequentially produce water mist for each scene in a game scene. If the scene range is large, the corresponding water mist effect of a scene usually needs to be produced for different regional scenes, and when switching to other regional scenes in the scene and producing water mist for the other regional scenes, the previously produced water mist effect is inconvenient to be applied to the other regional scenes again, and the corresponding water mist effect in the other regional scenes also needs to be re-produced, resulting in poor reusability of the already produced water mist. SUMMARY

[0004] In order to improve the reusability of the water mist effect, the present application provides a scene water mist configuration method, device, electronic equipment and storage medium.

[0005] In a first aspect, the present application provides a scene water mist configuration method, which adopts the following technical solution:

[0006] A scene water mist configuration method comprises the following steps:

[0007] According to the detected material quality selection instruction, the material quality information of the water mist in the current scene is determined;

[0008] According to the material quality information, the specified region in the current scene is subjected to blurring processing to obtain a water mist model;

[0009] The water mist model is configured in combination with the current scene to obtain a water mist instance;

[0010] When it is detected that the current scene changes, the water mist instance is applied to the changed scene;

[0011] When it is detected that a user triggers a parameter modification instruction, the water mist instance in the changed scene is modified according to the user triggered parameter modification instruction.

[0012] By adopting the technical scheme, the user first needs to select the material information of the water mist, and thus the material information for making the water mist in the current scene is determined according to the detected material selection instruction, the specified region in the current scene is processed, the effect of approximate fog is formed in combination with the material information, and then the water mist model is obtained. After the water mist effect is obtained, the water mist instance in the current scene is obtained by adjusting and configuring the current scene. When it is detected that the current scene changes, it indicates that the user switches the scene, and the user needs to set the water mist effect for the new scene. Since the new scene and the scene before the change belong to different regions in the same larger scene, the water mist instance before the change can also be applied in the new scene. Therefore, the water mist instance is applied in the changed scene. When the parameter modification instruction triggered by the user is detected, it indicates that the user needs to make targeted adjustment and modification to the water mist instance in the changed scene. Therefore, the water mist instance in the changed scene is modified according to the parameter modification instruction, so that the water mist effect more suitable for the changed scene is obtained. By determining the water mist instance, and then applying the water mist instance in the scenes of different regions and making targeted modification, the reusability of the water mist instance is improved.

[0013] In another possible implementation manner, the processing of the specified region in the current scene according to the material information to obtain the water mist model comprises:

[0014] Determining the coverage range of the water mist in the current scene;

[0015] Determining each pixel point in the coverage range and the adjacent pixel point corresponding to each pixel point, the adjacent pixel point being a pixel point within a preset range around each pixel point;

[0016] Obtaining the RGB value of each pixel point and the RGB value of the adjacent pixel point;

[0017] Calculating the average RGB value of the RGB value of each pixel point and the RGB value of the adjacent pixel point;

[0018] Determining the average RGB value as the target RGB value of each pixel point;

[0019] Determining the water mist model based on the target RGB value of each pixel point and the material information.

[0020] By adopting the technical scheme, firstly, the coverage range of the water mist in the current scene is determined, after the coverage range of the water mist is determined, all pixel points in the coverage range are determined, the corresponding adjacent pixel points of each pixel point are determined, the average RGB value of the adjacent pixel points and each pixel point is calculated, the average RGB value is determined as the target RGB value of each pixel point, thereby realizing the blur processing of the specified region, by determining the adjacent pixel points of each pixel point and calculating the average RGB value of each pixel point and the adjacent pixel points for blur processing, a better blur effect can be obtained, the deviation of the blur processing of the specified region is small, and a more real water mist model is obtained in combination with the material information.

[0021] In another possible implementation manner, the water mist model is configured in combination with the current scene to obtain a water mist instance, including:

[0022] Distance information of each pixel point in the current scene to a preset camera point is determined;

[0023] Transparency of the water mist model at each pixel point is determined based on the distance information;

[0024] A first water mist layer is obtained according to the transparency and the water mist model;

[0025] A normal corresponding to a surface of each entity in the current scene is determined, and an angle value of the normal and a horizontal plane is determined;

[0026] A target surface matched with a set angle value is selected according to the angle value;

[0027] A noise map of the target surface is determined, and a second water mist layer of the target surface is determined based on the noise map and the water mist model;

[0028] The first water mist layer and the second water mist layer are input into a self-luminous channel to obtain a water mist instance.

[0029] By adopting the technical scheme, since the distance information of each pixel point in the scene to the preset camera point is different, that is, the visual distance is different, the water mist rendering effect at each pixel point is different, therefore, the distance information of each pixel point to the preset camera point is determined, the transparency of the water mist model at each pixel point is determined according to the distance information, the first water mist layer is obtained according to the transparency, so that the water mist effect in the current scene is more realistic, the water mist may also float on the surface of some entities, therefore, the normal corresponding to the surface of each entity in the current scene and the angle value of the normal and the horizontal plane are determined, then the surface corresponding to the angle value matched with the angle value set by the user, that is, the target surface, is screened out, the rendering effect of the water mist on the target surface is determined through the noise map and the water mist model, the water mist is improved in reality and is not easy to be distorted, and the second water mist layer of the target surface is obtained, the first water mist layer and the second water mist layer are input into the self-luminous channel, so that the first water mist layer and the second water mist layer are displayed in the current scene, thereby obtaining the water mist instance.

[0030] In another possible implementation manner, the method further includes:

[0031] Comparing the current scene with the changed scene to determine the same region;

[0032] Applying the water mist instance at the same region in the current scene to the same region in the changed scene;

[0033] Highlighting the region other than the same region in the changed scene;

[0034] Applying the first water mist layer of the water mist instance to the region;

[0035] When detecting the parameter modification instruction triggered by the user, modifying the first water mist layer in the region according to the parameter modification instruction triggered by the user.

[0036] By adopting the technical scheme, the changed scene may include the same region as in the scene before the change, therefore, the changed scene and the scene before the change are compared to determine the same region, the water mist instance of the same region in the scene before the change is applied to the same region in the changed scene, thereby saving manpower and improving production efficiency, the region other than the same region in the changed scene is highlighted, thereby facilitating the user to know the region in which the water mist instance parameter needs to be modified, the first water mist layer of the water mist instance is applied to the highlighted region, and when detecting the parameter modification instruction triggered by the user, the first water mist layer in the highlighted region is modified according to the parameter modification instruction.

[0037] In another possible implementation manner, the method further includes:

[0038] obtain a name of at least one entity in the changed scene and position information of each entity;

[0039] if there is an entity with the same name in the current scene, apply a second water mist layer corresponding to the entity with the same name in the changed scene based on the position information.

[0040] By adopting the technical solution, the same entity as in the changed scene may exist in the changed scene, so the name of at least one entity in the changed scene and the position information of each entity are obtained. If the same entity as in the changed scene exists in the changed scene, the entity with the same name is determined from the changed scene according to the name, the second water mist layer of the entity with the same name in the changed scene can be applied to the entity in the changed scene, and the second water mist layer of the entity with the same name is applied to the changed scene according to the position information, so that the entity with the same name in the changed scene is configured with water mist, the workload of the user is saved, and the efficiency is improved.

[0041] In another possible implementation manner, the method further includes:

[0042] determining whether the at least one entity is located in a preset configuration library based on the name of the entity, wherein the name of the entity in the preset configuration library corresponds to a preset noise map and a preset surface on which a water mist layer needs to be generated;

[0043] if yes, generating a second water mist layer according to the water mist model, the preset noise map corresponding to each entity, and the preset surface.

[0044] By adopting the technical solution, the preset noise map corresponding to the entity and the preset surface on which the water mist layer needs to be generated are stored in the preset configuration library, so that after the name of the at least one entity is obtained, it is determined whether the at least one entity is located in the preset configuration library. If yes, the second water mist layer of the entity can be generated directly according to the preset noise map and the preset surface in the preset configuration library. The second water mist layer of the entity is generated more conveniently through the preset configuration library.

[0045] In another possible implementation manner, the method further includes:

[0046] obtaining first environment information of a whole scene graph corresponding to the current scene;

[0047] determining a corresponding relationship between the water mist instance and the first environment information;

[0048] when it is detected that a new whole scene graph is imported, obtaining second environment information of the new whole scene graph;

[0049] input the first environment information and the second environment information into the trained network model for similarity recognition to obtain a similarity between the first environment information and the second environment information;

[0050] if the similarity reaches a preset similarity threshold, the water mist instance is applied in the new overall scene graph.

[0051] By adopting the technical solution, the first environment information of the overall scene graph corresponding to the current scene is obtained, and after the water mist instance is obtained, the corresponding relationship between the water mist instance and the first environment information is determined. When a new overall scene graph is detected, the second environment information of the new scene is obtained, and it is judged whether the water mist instance can be applied in the new overall scene graph. Therefore, the similarity between the first environment information and the second environment information is calculated according to the network model. When the similarity reaches the preset similarity threshold, it is indicated that the environment of the new overall scene graph is similar to the environment of the overall scene graph of the current scene, and the water mist instance in the previous scene graph can be applied in the new overall scene graph. Therefore, the water mist instance is applied in the new overall scene graph, thereby further improving the reusability of the water mist instance.

[0052] In a second aspect, the application provides a water mist configuration device in a scene, which adopts the following technical solution:

[0053] A water mist configuration device in a scene comprises:

[0054] A material determination module is configured to determine material information of water mist in a current scene according to a detected material selection instruction.

[0055] A blur processing module is configured to perform blur processing on a specified region in the current scene according to the material information to obtain a water mist model.

[0056] A configuration module is configured to configure the water mist model in combination with the current scene to obtain a water mist instance.

[0057] A first instance application module is configured to apply the water mist instance in a changed scene when a change in the current scene is detected.

[0058] A first parameter modification module is configured to modify the water mist instance in the changed scene according to a user-triggered parameter modification instruction when the user-triggered parameter modification instruction is detected.

[0059] By adopting the technical scheme, the user first needs to select the material information of the water mist, so that the material determination module determines the material information of the water mist to be made in the current scene according to the detected material selection instruction, the fuzzy processing module performs fuzzy processing on the specified region in the current scene, and then combines the material information to form the effect of approximate fog, and then obtains the water mist model. After obtaining the water mist effect, the configuration module also needs to adjust and configure the current scene to obtain the water mist instance in the current scene. When it is detected that the current scene changes, it indicates that the user switches the scene, and the user needs to set the water mist effect for the new scene. Since the new scene and the scene before the change belong to different regions in the same larger scene, the water mist instance before the change can also be applied in the new scene, so that the first instance application module can apply the water mist instance in the changed scene. When the parameter modification instruction triggered by the user is detected, it indicates that the user needs to make targeted adjustment and modification to the water mist instance in the changed scene, so that the first parameter modification module can modify the water mist instance in the changed scene according to the parameter modification instruction, so as to obtain the water mist effect more suitable for the changed scene. By determining the water mist instance, then applying the water mist instance in the scene of different regions and making targeted modification, the reusability of the water mist instance is improved.

[0060] In another possible implementation, when the fuzzy processing module performs fuzzy processing on the specified region in the current scene according to the material information to obtain the water mist model, the fuzzy processing module is specifically configured to:

[0061] determine the coverage range of the water mist in the current scene;

[0062] determine each pixel point in the coverage range and a corresponding adjacent pixel point of each pixel point, the adjacent pixel point being a pixel point within a preset range around the each pixel point;

[0063] obtain the RGB value of each pixel point and the RGB value of the adjacent pixel point;

[0064] calculate the average RGB value of the RGB value of each pixel point and the RGB value of the adjacent pixel point;

[0065] determine the average RGB value as the target RGB value of each pixel point;

[0066] determine the water mist model based on the target RGB value of each pixel point and the material information.

[0067] In another possible implementation, when the configuration module configures the water mist model in combination with the current scene to obtain the water mist instance, the configuration module is specifically configured to:

[0068] determine distance information of each pixel point in the current scene to a preset camera point.

[0069] determine transparency of the water mist model at each pixel point based on the distance information;

[0070] obtain a first water mist layer according to the transparency and the water mist model;

[0071] determine a normal corresponding to a surface of each entity in the current scene, and an angle value between the normal and a horizontal plane;

[0072] filter out a target surface matching a set angle value according to the angle value;

[0073] determine a noise map of the target surface, and determine a second water mist layer of the target surface based on the noise map and the water mist model;

[0074] input the first water mist layer and the second water mist layer into a self-luminous channel to obtain a water mist instance.

[0075] In another possible implementation manner, the apparatus further includes:

[0076] a comparison module, configured to compare the current scene with the changed scene to determine a same region;

[0077] a second instance application module, configured to apply a water mist instance at the same region in the current scene to the same region in the changed scene;

[0078] a highlight display module, configured to highlight a region other than the same region in the changed scene;

[0079] a third instance application module, configured to apply a first water mist layer of the water mist instance to the region;

[0080] a second parameter modification module, configured to modify the first water mist layer in the region according to a parameter modification instruction triggered by a user when the parameter modification instruction triggered by the user is detected.

[0081] In another possible implementation manner, the apparatus further includes:

[0082] a first acquisition module, configured to acquire a name of at least one entity in a changed scene and position information of each entity;

[0083] a fourth instance application module, configured to apply a second water mist layer corresponding to an entity with the same name to the changed scene based on the position information when the entity with the same name exists in the current scene.

[0084] In another possible implementation manner, the apparatus further includes:

[0085] a judging module, configured to judge whether the at least one entity is located in a preset configuration library based on the name of the entity, wherein in the preset configuration library, the name of the entity corresponds to a preset noise map and a preset surface on which a water mist layer needs to be generated;

[0086] a generating module, configured to generate a second water mist layer according to the water mist model, the preset noise map corresponding to each entity and the preset surface when the result of the judging is yes.

[0087] In another possible implementation, the apparatus further includes:

[0088] a second obtaining module, configured to obtain first environmental information of an overall scene graph corresponding to the current scene;

[0089] a relationship determining module, configured to determine a corresponding relationship between the water mist instance and the first environmental information;

[0090] a third obtaining module, configured to obtain second environmental information of a new overall scene graph when it is detected that the new overall scene graph is imported;

[0091] a recognizing module, configured to input the first environmental information and the second environmental information into a trained network model to perform similarity recognition, to obtain a similarity between the first environmental information and the second environmental information;

[0092] a fifth instance applying module, configured to apply the water mist instance in the new overall scene graph when the similarity reaches a preset similarity threshold.

[0093] In a third aspect, a kind of electronic equipment is provided, and the technical scheme is as follows:

[0094] An electronic device includes:

[0095] at least one processor;

[0096] a memory;

[0097] at least one application program, wherein the at least one application program is stored in the memory and is configured to be executed by the at least one processor, and the at least one application program is configured to execute a water mist configuration method in a scene according to any one of the possible implementation manners of the first aspect.

[0098] In a fourth aspect, a kind of computer readable storage medium is provided, and the technical scheme is as follows:

[0099] A computer readable storage medium, when the computer program is executed in the computer, makes the computer execute the scene water mist configuration method of any one of the first aspect.

[0100] In summary, the present application includes at least one of the following beneficial technical effects:

[0101] 1. The user first needs to select the material information of the water mist, so the material information for making water mist in the current scene is determined according to the detected material selection instruction, the specified area in the current scene is blurred, and then the material information is combined to form an approximate fog effect, and then a water mist model is obtained. After obtaining the water mist effect, it is still necessary to adjust and configure the current scene to obtain the water mist instance in the current scene. When it is detected that the current scene has changed, it means that the user has switched the scene, and the user needs to set the water mist effect for the new scene. Since the new scene and the scene before the change belong to different areas in the same larger scene, the water mist instance before the change can also be applied in the new scene, so the water mist instance is applied in the changed scene. When a parameter modification instruction triggered by the user is detected, it means that the user needs to make targeted adjustments and modifications to the water mist instance in the changed scene, so the water mist instance in the changed scene is modified according to the parameter modification instruction, thereby obtaining a water mist effect that is more adapted to the changed scene. By determining the water mist instance, then applying the water mist instance in the scene of different areas and making targeted modifications, the reusability of the water mist instance is improved.

[0102] 2. The first environment information of the overall scene graph corresponding to the current scene is obtained, and after obtaining the water mist instance, the correspondence between the water mist instance and the first environment information is determined. When a new overall scene graph is imported, the second environment information of the new scene is obtained, and it is judged whether the water mist instance can be applied in the new overall scene graph. Therefore, the similarity between the first environment information and the second environment information is calculated according to the network model. When the similarity reaches a preset similarity threshold, it means that the environment of the new overall scene graph is similar to the environment of the overall scene graph of the current scene, and the water mist instance in the previous scene graph can be applied in the new overall scene graph. Therefore, the water mist instance is applied in the new overall scene graph, thereby further improving the reusability of the water mist instance. BRIEF DESCRIPTION OF DRAWINGS

[0103] Figure 1 is a flow diagram of a water mist configuration method in a scene according to an embodiment of the present application.

[0104] Figure 2 is a structural diagram of a water mist configuration device according to an embodiment of the present application.

[0105] Figure 3 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0106] The present application will be further described in detail below with reference to the accompanying drawings.

[0107] Those skilled in the art can make modifications to the present embodiment without creative contribution after reading the present specification, but as long as it is within the scope of the claims of the present application, it is protected by the patent law.

[0108] To make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0109] In addition, the term "and / or" herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " herein, unless otherwise specified, generally represents an "or" relationship between the associated objects before and after it.

[0110] The embodiments of the present application will be described in further detail below with reference to the drawings of the specification.

[0111] The embodiments of the present application provide a water mist configuration method in a scene, which is executed by an electronic device. The electronic device can be a server or a terminal device. The server can be a physical server, a server cluster composed of multiple physical servers, or a distributed system, and can also be a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected through wired or wireless communication, and the embodiments of the present application do not limit this. As shown in the figure, the method comprises steps S101, S102, S103, S104 and S105, wherein, Figure 1

[0112] Step S101, according to the detected material selection instruction, determining the material information of the water mist in the current scene.

[0113] Before making the water mist, the user needs to import the overall scene graph in which the water mist is located into the electronic device. After importing the overall scene graph into the electronic device, the electronic device controls the display screen and other display devices to display the overall scene graph. The user can zoom in on the overall scene graph, and the display device displays a local area of the scene as the current scene, and then makes a water mist instance of the current scene.

[0114] ​Before the water mist instance is made, the user also needs to select material information of the water mist through the electronic device, such as physical material mask, mixing mode, decal mixing mode, and coloring mode, etc. The user can trigger the material selection instruction through the visual operation interface by using a mouse, a keyboard, a touch screen, and other input devices. After the electronic device detects the material selection instruction, the material information of the water mist in the current scene can be determined.

[0115] In step S102, the specified region in the current scene is blurred according to the material information, and a water mist model is obtained.

[0116] Specifically, the specified region can be a region in the current scene where the user sets to display the water mist. The user can select the specified region of the water mist in the visual operation interface through a mouse and other input devices. The entire display range of the current scene can also be the specified region. After the specified region is determined, the scene in the specified region is blurred, and then the water mist model is obtained by combining the material information set by the user.

[0117] In step S103, the water mist model is configured in combination with the current scene to obtain a water mist instance.

[0118] Because the features of different positions in the current scene are different, and the details of different positions are also different, after the water mist model is obtained, the water mist model needs to be configured in combination with the current scene, so that a water mist instance that is more suitable for the current scene is obtained. After the water mist model is configured, the display effect of the water mist is improved.

[0119] In step S104, when it is detected that the current scene changes, the water mist instance is applied to the changed scene.

[0120] For the embodiment of the application, after the user makes the water mist instance in the current scene, the user needs to make the water mist in other scenes in the entire scene. Because the other scenes belong to the same overall scene as the current scene, the environment of the other scenes is similar to the environment of the current scene, for example, the weather environment is the same. Therefore, the water mist in the other scenes is similar to the water mist in the current scene, and the water mist instance in the current scene can be applied to the other scenes. When the electronic device detects that the current scene changes, it means that the user switches the currently displayed scene to another scene. Therefore, the electronic device can apply the water mist instance before the change to the scene after the change.

[0121] In step S105, when it is detected that the user triggers a parameter modification instruction, the water mist instance in the changed scene is modified according to the user-triggered parameter modification instruction.

[0122] Specifically, the user can modify the related parameters of the water mist instance on the visual operation interface through a mouse, a keyboard, a touch screen and the like, thereby triggering a parameter modification instruction. After the electronic device detects the parameter modification instruction, it is indicated that the user modifies the parameter instance. Therefore, the water mist instance in the changed scene can be modified according to the parameter modification instruction, so that the water mist effect more suitable for the changed scene is achieved. Compared with the user re-creating the water mist in the changed scene, it is more convenient, saves manpower, and improves the reusability of the created water mist instance.

[0123] In order to obtain a more realistic water mist model, in a possible implementation manner of the embodiment of the present application, the step S102 of performing blurring processing on the specified region in the current scene according to the material information to obtain the water mist model specifically includes the steps S1021 (not shown in the figure), S1022 (not shown in the figure), S1023 (not shown in the figure), S1024 (not shown in the figure), S1025 (not shown in the figure) and S1026 (not shown in the figure), wherein,

[0124] In the step S1021, the coverage range of the water mist in the current scene is determined.

[0125] For the embodiment of the present application, the coverage range can be the range of the entire current scene, that is, the entire range displayed by the display device, or the coverage range selected by the user on the visual operation interface according to the demand through a mouse and the like. For example, the coordinate axis is set on the display screen, and the coverage range is selected according to the coordinates.

[0126] In the step S1022, each pixel point in the coverage range and the corresponding adjacent pixel point of each pixel point are determined.

[0127] The adjacent pixel point is a pixel point within a preset range around each pixel point.

[0128] For the embodiment of the present application, after the coverage range of the water mist is determined, each pixel point in the coverage range can be determined. It is assumed that there are 10,000 pixel points in the coverage range. The electronic device needs to determine the adjacent pixel point of each pixel point. It is assumed that the preset range is the pixel point in the eight-neighborhood around each pixel point. If the pixel point is on the edge of the coverage range, the adjacent pixel point of the pixel point on the edge can be determined according to a preset rule. For example, a nine-pixel grid including the pixel point on the edge is determined, and the pixel points in the nine-pixel grid except the pixel point on the edge are determined as the adjacent pixel points. In other embodiments, the adjacent pixel point can also be the pixel point in the four-neighborhood around each pixel point, or the pixel point in other neighborhoods around each pixel point.

[0129] In the step S1023, the RGB value of each pixel point and the RGB value of the adjacent pixel point are obtained.

[0130] For the embodiment of the present application, the neighboring pixel points are taken as an example of the eight neighboring pixels around each pixel point. The electronic device obtains the RGB value of each pixel point and the RGB value of each neighboring pixel point. It is assumed that the RGB value of a certain pixel point is "Red: 150, Green: 120, Blue: 50". After the electronic device obtains the RGB values of the eight surrounding pixels, it is convenient to subsequently blur the specified area in the scene, that is, the coverage range of the water mist.

[0131] In step S1024, the average RGB value of the RGB value of each pixel point and the RGB value of the neighboring pixel point is calculated.

[0132] For the embodiment of the present application, after the electronic device obtains the RGB value of a single pixel point and the corresponding RGB value of the eight neighboring pixels around the single pixel point, the sum of each RGB value component of the nine pixels is calculated, and then the sum is divided by the total number of the single pixel point and the neighboring pixel points, that is, divided by 9 to obtain the average value of each component. It is assumed that the calculated three RGB value components are Red: 200, Green: 130, and Blue: 90. Therefore, the average RGB value is "Red: 200, Green: 130, Blue: 90". The corresponding average RGB value of other pixels in the coverage area is also calculated in this way. Further, the arrangement order of each pixel point can be pre-set, and the average RGB value corresponding to each pixel point is calculated in turn according to the arrangement order of all the pixel points.

[0133] In step S1025, the average RGB value is determined as the target RGB value of each pixel point.

[0134] For the embodiment of the present application, taking steps S1023 and S1024 as an example, the electronic device replaces the RGB value of the pixel point according to the calculated average RGB value "Red: 200, Green: 130, Blue: 90", that is, determines the average RGB value as the target RGB value of the pixel point. After the electronic device calculates the average RGB value corresponding to each pixel point, the average RGB value is replaced with the original RGB value of the corresponding pixel point, thereby completing the blurring processing of the coverage area.

[0135] In step S1026, the water mist model is determined based on the target RGB value of each pixel point and the material information.

[0136] For the embodiment of the present application, after the coverage range is blurred, only a relatively simple water mist model is obtained, and the water mist needs to be made more realistic. Therefore, the water mist model after the blurring processing is optimized and adjusted according to the material information, thereby determining a more realistic water mist model and improving the quality of the water mist model.

[0137] In order to obtain a water mist instance that is more consistent with the current scene and more realistic, in a possible implementation manner of the embodiment of the present application, the water mist model is configured in combination with the current scene to obtain the water mist instance in step S103, specifically including step S1031 (not shown in the figure), step S1032 (not shown in the figure), step S1033 (not shown in the figure), step S1034 (not shown in the figure), step S1035 (not shown in the figure), step S1036 (not shown in the figure), and step S1037 (not shown in the figure), wherein,

[0138] In step S1031, distance information of each pixel point in the current scene to a preset camera point is determined.

[0139] For the embodiment of the present application, because the distances of different features in different regions in the current scene to the preset camera point are different, the display effects of the water mist in different regions in the current scene are different. Therefore, the distance information of each pixel point to the preset camera point is obtained, thereby facilitating subsequent adjustment of the water mist model according to the distance information.

[0140] In step S1032, the transparency of the water mist model at each pixel point is determined based on the distance information.

[0141] For example, the water mist in a region far from the preset camera point is thicker, and the transparency is lower; the water mist in a region close to the preset camera point is thinner, and the transparency is higher. Therefore, the user can pre-set a corresponding relationship between the distance information and the transparency of the water mist in the electronic device, or set a relationship formula for calculating the transparency according to the distance information.

[0142] After the electronic device obtains the distance information of each pixel, the transparency of the water mist model at each pixel point can be calculated according to the preset corresponding relationship or the relationship formula for calculating the transparency.

[0143] In step S1033, a first water mist layer is obtained according to the transparency and the water mist model.

[0144] For the embodiment of the present application, after the transparency of the water mist model is determined, the first water mist layer in the current scene can be obtained, and the first water mist layer is the overall fog effect of the specified region in the current scene.

[0145] In step S1034, the normal corresponding to the surface of each entity in the current scene and the angle value of the normal and the horizontal plane are determined.

[0146] For the embodiment of the present application, when the position of the water mist overlaps with the position of the entity in the current scene, the display effect of the water mist will be distorted, but in fact, when the overlap occurs, the water mist will float on the surface of the entity, so the surface of the entity for supporting the water mist needs to be determined.

[0147] Assuming that there is a cube in the current scene, the electronic device determines the normal corresponding to each surface of each entity in the current scene, the normal is perpendicular to the surface, and determines the angle value of the normal with the horizontal plane. After determining the angle value of each surface, the angle value represents the inclination state of the surface, thereby facilitating subsequent selection of the surface supporting the water mist according to the angle value.

[0148] Further, if the entity has two parallel surfaces, and the extension directions of the normals extending from the surfaces are opposite, and the angle values of the normals are the same at this time, the reference plane can be set to retain the direction of the specified direction of the reference plane, filter out the normals in the opposite direction, or distinguish the normals with opposite extension directions but the same angle value according to the reference plane, thereby improving the accuracy of determining the required surface.

[0149] Step S1035, filtering out the target surface matching the set angle value according to the angle value.

[0150] For the embodiments of the present application, the user selects the entity surface corresponding to the water mist according to the display of the entity in the current scene, that is, determines the angle value of the normal, and then the user can input the normal angle value of the required surface into the electronic device through the visual operation interface. The electronic device can find the consistent normal angle value according to the angle value input by the user, and then match the surface required by the user, that is, the target surface. Specifically, the set angle value can be one or at least two, and the set angle value can also be a range value, which is not limited here.

[0151] Step S1036, determining the noise map of the target surface, and determining the second water mist layer of the target surface based on the noise map and the water mist model.

[0152] For the embodiments of the present application, in fact, the water mist will also have a flowing effect under the action of air flow. Therefore, in order to make the water mist on the entity surface more realistic, the user needs to select a suitable noise map according to the display effect, and the noise map is combined with the water mist model, thereby realizing the required display effect. The noise map has different shapes, and the shape of the noise map is the shape of the water mist on the entity surface. Different noise types in the noise map combined with the water mist model can determine the required display effect, such as forming the flowing effect of the water mist on the entity surface.

[0153] The noise map can be stored in a preset map library, and the user can select the required noise map from the preset map library through the visual operation interface, and then combine the water mist model to obtain the water mist effect of the entity surface, that is, the second water mist layer.

[0154] Step S1037, inputting the first water mist layer and the second water mist layer into the self-luminous channel to obtain the water mist instance.

[0155] For the embodiment of the present application, the self-luminous channel is used to make the water mist have a certain brightness, so as to be displayed in the current scene, therefore, after obtaining the first water mist layer and the second water mist layer, the electronic device inputs the first water mist layer and the second water mist layer into the self-luminous channel, and the first water mist layer and the second water mist layer are displayed according to the brightness of the self-luminous channel, so as to obtain the water mist instance in the current scene.

[0156] When the user makes the water mist for the new scene, there may be some areas in the new scene that are the same as the last scene before the change, therefore, in order to reduce the workload of the user and improve the production efficiency, one possible implementation manner of the embodiment of the present application, the method further includes steps S106 (not shown in the figure), step S107 (not shown in the figure), step S108 (not shown in the figure), step S109 (not shown in the figure) and step S110 (not shown in the figure), wherein step S106 can be executed after step S104,

[0157] Step S106 compares the current scene with the changed scene to determine the same area.

[0158] For the embodiment of the present application, after the electronic device detects that the current scene has changed, the changed scene is compared with the scene before the change, so as to determine whether there is a same area, and if there is a same area, the electronic device determines the same area from the changed scene.

[0159] Step S107 applies the water mist instance at the same area in the current scene to the same area in the changed scene.

[0160] For the embodiment of the present application, the changed scene has the same area as the scene before the change, therefore, the water mist instance of the same area in the scene before the change can be applied to the same area in the changed scene, the electronic device segments the water mist instance of the scene before the change to obtain the water mist instance of the same area, and then applies the water mist instance of the same area to the same area in the changed scene, so as to reduce the workload of the user and improve the production efficiency of the water mist.

[0161] Step S108 highlights the area in the changed scene except the same area.

[0162] For the embodiment of the present application, after the electronic device applies the water mist instance to the same area in the changed scene, the remaining area is the new scene, therefore, the remaining area is highlighted, for example, the remaining area is framed, so as to facilitate the staff to more intuitively view the new scene.

[0163] Step S109 applies the first water mist layer of the water mist instance to the area.

[0164] For the embodiment of the present application, since the changed scene and the unchanged scene belong to the same overall scene, the water mist effect is relatively close, and the electronic device applies the first water mist layer in the remaining area, thereby realizing reuse of the previously made water mist instance.

[0165] In step S110, when detecting the user triggered parameter modification instruction, the first water mist layer in the region is modified according to the user triggered parameter modification instruction.

[0166] For the embodiment of the present application, in order to make the first water mist layer more suitable for the changed scene, it may be necessary to fine-tune the first water mist layer in the remaining area, and therefore the user can modify the parameters of the first water mist layer in the remaining area on the visual operation interface through input devices such as a mouse, a keyboard, and a touch screen, for example, modify the color, transparency, and other parameters, so that the first water mist layer is more suitable for the changed scene.

[0167] The entities existing in the changed scene may also appear in the unchanged scene, and therefore in order to obtain the water mist layer of the entity in the changed scene, one possible implementation manner of the embodiment of the present application, the method further includes step S111 (not shown in the figure) and step S112 (not shown in the figure), wherein step S111 can be executed after step S104, wherein,

[0168] In step S111, the name of at least one entity in the changed scene and the position information of each entity are obtained.

[0169] The entities in the changed scene may also appear in the unchanged scene, and therefore the electronic device obtains the name of at least one entity in the changed scene and the position information of each entity. Further, the electronic device can perform entity recognition on the changed scene, input the changed scene into the trained network model for entity recognition, thereby obtaining an entity recognition result, to identify the entity in the changed scene, and further obtain the name of the entity in the changed scene.

[0170] In step S112, if there is an entity with the same name in the current scene, the second water mist layer corresponding to the entity with the same name is applied in the changed scene based on the position information.

[0171] For the embodiment of the present application, the electronic device can also input the unchanged scene into the trained network model for entity recognition, obtain the entity in the unchanged scene, and further obtain the name of the entity in the unchanged scene. The electronic device determines the second water mist layer of the entity with the same name, and then determines the position of the second water mist layer in the changed scene according to the position information of the entity with the same name in the changed scene. Finally, the electronic device applies the second water mist layer to the same entity in the changed scene, thereby saving the workload of the user and improving the efficiency.

[0172] In order to improve the production efficiency of the water mist on the entity surface and reduce the workload of the user, in a possible implementation manner of the embodiment of the present application, the method further includes steps Sa (not shown in the figure) and step Sb (not shown in the figure), wherein the step Sa can be executed after the step S1033 or can be executed after the step S104, wherein

[0173] In the step Sa, it is determined whether the entity is located in the preset configuration library according to the name of the entity.

[0174] In the preset configuration library, the name of the entity corresponds to the preset noise map and the preset surface on which the water mist layer needs to be generated.

[0175] In the embodiment of the present application, the preset configuration library stores the names of multiple entities and the preset noise map and the preset surface corresponding to each entity, that is, the preset configuration library stores the preset scheme corresponding to the generation of the water mist layer of each entity. After the electronic device identifies the name of the entity, it can search the preset configuration library to determine whether the preset noise map and the preset surface corresponding to the name of the entity exist.

[0176] In the step Sb, if yes, the second water mist layer is generated according to the water mist model, the preset noise map corresponding to each entity and the preset surface.

[0177] In the embodiment of the present application, after the electronic device searches the preset configuration library and finds the same entity name, the electronic device generates the second water mist layer of each preset surface according to the preset noise map and the preset surface corresponding to the name of the entity in combination with the water mist model, so that the production of the water mist layer on the entity surface is more convenient.

[0178] In order to further improve the reusability of the water mist instance, in a possible implementation manner of the embodiment of the present application, the method further includes steps S113 (not shown in the figure), S114 (not shown in the figure), S115 (not shown in the figure), S116 (not shown in the figure) and S117 (not shown in the figure), wherein the step S113 can be executed after the step S105, wherein

[0179] In the step S113, the first environment information of the overall scene graph corresponding to the current scene is acquired.

[0180] In the embodiment of the present application, the electronic device acquires the first environment information in the overall scene graph by calling the attribute information of the overall scene graph of the current scene, and the first environment information is, for example, environment brightness information, weather information and terrain information.

[0181] In the step S114, the corresponding relationship between the water mist instance and the first environment information is determined.

[0182] For the embodiments of the present application, after obtaining the water mist instance, it is indicated that the water mist instance is applicable to the overall graph under the first environment information, and thus the corresponding relationship between the water mist instance and the first environment information is determined, and the corresponding relationship between the water mist instance and the first environment information can also be stored, thereby facilitating subsequent reuse of the water mist instance.

[0183] In step S115, when a new overall scene graph is detected to be imported, second environment information of the new overall scene graph is acquired.

[0184] For the embodiments of the present application, when a user imports a new overall scene graph into an electronic device, the electronic device can detect the import operation and further detect the imported new overall scene graph. The electronic device acquires second environment information of the new overall scene graph by calling attribute information of the new overall scene graph, and the second environment information includes environment brightness information, weather information, and terrain information in the new overall scene graph. The second environment information is acquired to facilitate subsequent judgment of whether the water mist instance is applicable to the new overall scene graph.

[0185] In step S116, the first environment information and the second environment information are input into the trained network model for similarity recognition, and a similarity between the first environment information and the second environment information is obtained.

[0186] Specifically, the network model can be a neural network model, which can be a convolutional neural network model, a recurrent neural network model, or other types of neural network models, which are not limited again. Taking the convolutional neural network model as an example, the electronic device inputs the first environment information and the second environment information into the trained convolutional neural network model, the trained convolutional neural network model identifies and calculates the similarity of the first environment information and the second environment information, and finally outputs the similarity of the first environment information and the second environment information. It is assumed that the obtained similarity is 80%.

[0187] In step S117, if the similarity reaches a preset similarity threshold, the water mist instance is applied in the new overall scene graph.

[0188] For the embodiments of the present application, it is assumed that the preset similarity threshold is 75%, and taking step S116 as an example, the electronic device judges whether the obtained similarity reaches 75%. 80%>75%, which indicates that the environment of the new overall scene graph is relatively close to the environment of the overall scene graph corresponding to the water mist instance, and the water mist instance is relatively applicable to the new overall scene graph. Therefore, the electronic device calls the water mist instance and applies the water mist instance in the new overall scene graph, thereby further improving the reusability of the water mist instance. If the obtained similarity is less than the preset similarity threshold, it indicates that the environment of the new overall scene graph is greatly different from the environment of the overall scene graph corresponding to the water mist instance, and the water mist instance is not suitable for being applied in the new overall scene graph.

[0189] The above embodiment introduces a water mist configuration method in a scene from the perspective of a method flow. The following embodiment introduces a water mist configuration device in a scene from the perspective of a virtual module or a virtual unit. Details are shown in the following embodiment.

[0190] The embodiment of the present application provides a water mist configuration device 20 in a scene, as shown in the figure, the water mist configuration device 20 in the scene can specifically include: Figure 2

[0191] The material determination module 201 is configured to determine the material information of the water mist in the current scene according to the detected material selection instruction.

[0192] The blur processing module 202 is configured to perform blur processing on the specified region in the current scene according to the material information to obtain a water mist model.

[0193] The configuration module 203 is configured to configure the water mist model to obtain a water mist instance in combination with the current scene.

[0194] The first instance application module 204 is configured to apply the water mist instance in the changed scene when detecting that the current scene has changed.

[0195] The first parameter modification module 205 is configured to modify the water mist instance in the changed scene according to the user-triggered parameter modification instruction when detecting the user-triggered parameter modification instruction.

[0196] By using the above technical solution, the user first needs to select the material information of the water mist, so that the material determination module 201 determines the material information of the water mist in the current scene according to the detected material selection instruction, the blur processing module 202 performs blur processing on the specified region in the current scene, and then combines the material information to form the effect of approximate fog, and further obtains a water mist model. After obtaining the water mist effect, the configuration module 203 needs to adjust and configure the current scene to obtain a water mist instance in the current scene. When detecting that the current scene has changed, it indicates that the user has switched the scene, and the user needs to set the water mist effect for the new scene. Since the new scene and the scene before the change belong to different regions in the same larger scene, the water mist instance before the change can also be applied in the new scene, so that the first instance application module 204 applies the water mist instance in the changed scene. When detecting the user-triggered parameter modification instruction, it indicates that the user needs to make targeted adjustment and modification to the water mist instance in the changed scene, so that the first parameter modification module 205 modifies the water mist instance in the changed scene according to the parameter modification instruction, so as to obtain a water mist effect that is more suitable for the changed scene. By determining the water mist instance, then applying the water mist instance in the scene of different regions and making targeted modification, the reusability of the water mist instance is improved. ​

[0197] In a possible implementation of the present application, the blurring processing module 202, when blurring processing the specified region in the current scene according to the material information to obtain the water mist model, is specifically configured to:

[0198] determine the coverage range of the water mist in the current scene;

[0199] determine each pixel point in the coverage range and the corresponding adjacent pixel points of each pixel point, the adjacent pixel points being the pixel points within a preset range around each pixel point;

[0200] obtain the RGB value of each pixel point and the RGB value of the adjacent pixel points;

[0201] calculate the average RGB value of the RGB value of each pixel point and the RGB value of the adjacent pixel points;

[0202] determine the average RGB value as the target RGB value of each pixel point;

[0203] determine the water mist model based on the target RGB value of each pixel point and the material information.

[0204] In a possible implementation of the present application, the configuration module 203, when configuring the water mist model in combination with the current scene to obtain the water mist instance, is specifically configured to:

[0205] determine the distance information of each pixel point in the current scene to a preset camera point;

[0206] determine the transparency of the water mist model at each pixel point based on the distance information;

[0207] obtain a first water mist layer according to the transparency and the water mist model;

[0208] determine the normal corresponding to the surface of each entity in the current scene and the angle value of the normal and the horizontal plane;

[0209] select a target surface matching the set angle value according to the angle value;

[0210] determine the noise map of the target surface, and determine a second water mist layer of the target surface based on the noise map and the water mist model;

[0211] input the first water mist layer and the second water mist layer into a self-luminous channel to obtain the water mist instance.

[0212] In a possible implementation of the present application, the device 20 further includes:

[0213] a comparison module configured to compare the current scene with the changed scene to determine the same region;

[0214] a second instance application module, configured to apply the water mist instance at the same region in the current scene to the same region in the changed scene;

[0215] a highlighting module, configured to highlight the region other than the same region in the changed scene;

[0216] a third instance application module, configured to apply the first water mist layer of the water mist instance to the region;

[0217] a second parameter modification module, configured to modify the first water mist layer in the region according to the user-triggered parameter modification instruction when the user-triggered parameter modification instruction is detected.

[0218] In a possible implementation of the embodiment of the application, the apparatus 20 further includes:

[0219] a first acquisition module, configured to acquire the name of at least one entity in the changed scene and the position information of each entity;

[0220] a fourth instance application module, configured to apply the second water mist layer corresponding to the entity with the same name to the changed scene based on the position information when the entity with the same name exists in the current scene.

[0221] In a possible implementation of the embodiment of the application, the apparatus 20 further includes:

[0222] a judgment module, configured to judge whether the at least one entity is located in a preset configuration library based on the name of the entity, wherein the name of the entity in the preset configuration library corresponds to a preset noise map and a preset surface on which the water mist layer needs to be generated;

[0223] a generation module, configured to generate the second water mist layer according to the water mist model, the preset noise map corresponding to each entity, and the preset surface when the at least one entity is located in the preset configuration library.

[0224] In a possible implementation of the embodiment of the application, the apparatus further includes:

[0225] a second acquisition module, configured to acquire first environmental information of an overall scene graph corresponding to the current scene;

[0226] a relationship determination module, configured to determine a corresponding relationship between the water mist instance and the first environmental information;

[0227] a third acquisition module, configured to acquire second environmental information of a new overall scene graph when the new overall scene graph is detected to be imported;

[0228] a recognition module, configured to input the first environmental information and the second environmental information into a trained network model for similarity recognition to obtain a similarity between the first environmental information and the second environmental information;

[0229] The fifth instance application module is configured to apply the water mist instance to the new overall scene graph when the similarity reaches a preset similarity threshold.

[0230] In the embodiments of the present application, the first instance application module 204, the second instance application module, the third instance application module, the fourth instance application module and the second instance application module can be the same instance application module, or can be different instance application modules, or can be partially same instance application modules. The first parameter modification module 205 and the second parameter modification module 206 can be the same parameter modification module, or can be different parameter modification modules. The first acquisition module, the second acquisition module and the third acquisition module can be the same acquisition module, or can be different acquisition modules, or can be partially same acquisition modules.

[0231] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the water mist configuration device 20 in the above-described scene can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0232] The embodiments of the present application provide an electronic device, as shown in Figure 3 Figure 3 The electronic device 30 shown in the figure includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 30 can also include a transceiver 304. It should be noted that in actual application, the transceiver 304 is not limited to one, and the structure of the electronic device 30 does not constitute a limitation on the embodiments of the present application.

[0233] The processor 301 can be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can realize or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure content of the present application. The processor 301 can also be a combination of computing functions, such as a combination of at least one microprocessor, a combination of DSP and microprocessor, etc.

[0234] ​The bus 302 can include a path that transmits information between the above-described components. The bus 302 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 302 can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 3 Only one thick line is used in the middle, but it does not mean that there is only one bus or one type of bus.

[0235] The memory 303 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical storage, a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.

[0236] The memory 303 is used to store application program codes for implementing the scheme of the present application, and is controlled by the processor 301 to perform. The processor 301 is used to execute the application program codes stored in the memory 303 to realize the content shown in the foregoing method embodiments.

[0237] The electronic device includes, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a PMP (Portable Multimedia Player), a car terminal (for example, a car navigation terminal), etc., and a fixed terminal such as a digital TV, a desktop computer, etc. It can also be a server, etc. Figure 3 The electronic device shown is only an example, and should not bring any limitation to the function and use range of the embodiments of the present application.

[0238] The computer readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is run on a computer, the computer can execute the corresponding content in the foregoing method embodiment. Compared with the related art, in the embodiment of the present application, the user first needs to select the material information of the water mist, and thus the material information for making the water mist in the current scene is determined according to the detected material selection instruction, the specified region in the current scene is processed, the effect of the approximate mist is formed in combination with the material information, and then the water mist model is obtained. After the water mist effect is obtained, the water mist instance in the current scene is obtained by adjusting and configuring the current scene. When it is detected that the current scene changes, it indicates that the user switches the scene, and the user needs to set the water mist effect for the new scene. Since the new scene and the scene before the change belong to different regions in the same larger scene, the water mist instance before the change can also be applied in the new scene, and thus the water mist instance is applied in the changed scene. When the parameter modification instruction triggered by the user is detected, it indicates that the user needs to make targeted adjustment and modification on the water mist instance in the changed scene, and thus the water mist instance in the changed scene is modified according to the parameter modification instruction, so that the water mist effect more suitable for the changed scene is obtained. By determining the water mist instance, and then applying the water mist instance in the scenes of different regions and making targeted modification, the reusability of the water mist instance is improved.

[0239] It should be understood that, although each step in the flowchart of the accompanying drawings is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other sequences. Moreover, at least part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or sub-steps or stages of other steps.

[0240] The above only describes some embodiments of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, some improvements and refinements can be made, which should also be considered as the protection scope of the present application.

Claims

1. A method for configuring water mist in a scene, characterized in that, The method comprises the following steps: According to the detected material selection instruction, the material information of the water mist in the current scene is determined; According to the material information, the specified area in the current scene is blurred to obtain a water mist model; The water mist model is configured in combination with the current scene to obtain a water mist instance; When it is detected that the current scene changes, the water mist instance is applied in the changed scene; When a user-triggered parameter modification instruction is detected, the water mist instance in the changed scene is modified according to the user-triggered parameter modification instruction; Wherein, according to the material information, the specified area in the current scene is blurred to obtain a water mist model, which comprises: Determine the coverage range of the water mist in the current scene; Determine each pixel point in the coverage range and the corresponding adjacent pixel points of each pixel point, the adjacent pixel points being the pixel points within a predetermined range around each pixel point; Obtain the RGB value of each pixel point and the RGB value of the adjacent pixel points; Calculate the average RGB value of the RGB value of each pixel point and the RGB value of the adjacent pixel points; The average RGB value is determined as the target RGB value of each pixel point; Based on the target RGB value of each pixel point and the material information, the water mist model is determined; Wherein, the water mist model is configured in combination with the current scene to obtain a water mist instance, which comprises: Determine the distance information of each pixel point in the current scene to the preset camera point; Based on the distance information, the transparency of the water mist model at each pixel point is determined; According to the transparency and the water mist model, a first water mist layer is obtained; Determine the normal of the surface of each entity in the current scene and the angle value of the normal and the horizontal plane; According to the angle value, the target surface matching the set angle value is screened out; Determine the noise map of the target surface, and determine the second water mist layer of the target surface based on the noise map and the water mist model; The first water mist layer and the second water mist layer are input into the self-luminous channel to obtain a water mist instance.

2. The method of claim 1, wherein, The method further comprises: Comparing the current scene with the changed scene to determine the same area; Apply the water mist instance in the same area of the current scene to the same area in the changed scene; Highlight the area in the changed scene except the same area; Apply the first water mist layer of the water mist instance in the area; When a user-triggered parameter modification instruction is detected, modify the first water mist layer in the area according to the user-triggered parameter modification instruction.

3. The method of claim 1, wherein, The method further comprises: Obtain the name of at least one entity in the changed scene and the position information of each entity; If there is an entity with the same name in the current scene, apply the second water mist layer corresponding to the entity with the same name in the changed scene based on the position information.

4. The method of claim 3, wherein, The method further comprises: Determine whether the at least one entity is located in a preset configuration library based on the name of the entity, wherein the name of the entity in the preset configuration library corresponds to a preset noise map and a preset surface on which the water mist layer needs to be generated. If yes, a second water mist layer is generated according to the water mist model, a preset noise map corresponding to each entity, and a preset surface.

5. The method of claim 1, wherein, The method further comprises: obtaining first environment information of an overall scene graph corresponding to the current scene; determining a correspondence between the water mist instance and the first environment information; when a new overall scene graph is detected, obtaining second environment information of the new overall scene graph; inputting the first environment information and the second environment information into a trained network model for similarity recognition to obtain a similarity between the first environment information and the second environment information; if the similarity reaches a preset similarity threshold, applying the water mist instance in the new overall scene graph.

6. A device for configuring water mist in a scene, characterized by comprises: a material determination module configured to determine material information of water mist in a current scene according to a detected material selection instruction; a blur processing module configured to perform blur processing on a specified region in the current scene according to the material information to obtain a water mist model; a configuration module configured to configure the water mist model in combination with the current scene to obtain a water mist instance; a first instance application module configured to apply the water mist instance in a changed scene when a change in the current scene is detected; a first parameter modification module configured to modify the water mist instance in the changed scene according to a user-triggered parameter modification instruction when the user-triggered parameter modification instruction is detected; wherein, when the blur processing module performs blur processing on the specified region in the current scene according to the material information to obtain the water mist model, the blur processing module is specifically configured to: determine a coverage range of water mist in the current scene; determine each pixel point in the coverage range and a corresponding adjacent pixel point of each pixel point, the adjacent pixel point being a pixel point within a preset range around each pixel point; obtain an RGB value of each pixel point and an RGB value of the adjacent pixel point; calculate an average RGB value of the RGB value of each pixel point and the RGB value of the adjacent pixel point; determine the average RGB value as a target RGB value of each pixel point; determine the water mist model based on the target RGB value of each pixel point and the material information; when the configuration module configures the water mist model in combination with the current scene to obtain the water mist instance, the configuration module is specifically configured to: determine distance information of each pixel point in the current scene to a preset camera point; determine a transparency of the water mist model at each pixel point based on the distance information; obtain a first water mist layer according to the transparency and the water mist model; determine a normal corresponding to a surface of each entity in the current scene and an angle value of the normal and a horizontal plane; select a target surface matching a set angle value according to the angle value; determine a noise map of the target surface and determine a second water mist layer of the target surface based on the noise map and the water mist model; 7. An electronic device, comprising: input the first water mist layer and the second water mist layer into a self-luminous channel to obtain the water mist instance. comprises: at least one processor; a memory; At least one application, wherein the at least one application is stored in the memory and configured to be executed by the at least one processor, the at least one application being configured to execute a method for configuring water mist in a scene according to any one of claims 1-5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program product, when executed in the computer, causes the computer to execute a method for configuring water mist in a scene according to any one of claims 1-5.

Citation Information

Patent Citations

  • Model multiplexing method and system in three-dimensional scene

    CN113421322A

  • Image processing method and device

    CN113570613A