Texture processing method and device, storage medium, and electronic device
Through the mixing and adjustment of the first map and the fog effect material, the problem of unreal sandstorm effects in the existing technology is solved, and high-quality fog effect performance is achieved, which is suitable for a variety of game art styles.
Patent Information
- Application Number
- CN202111290319.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-11-02
AI Technical Summary
When simulating the sandstorm effect, the existing technology cannot achieve real lighting edge effects, dynamic volume and delicate sand and dust expression, resulting in poor fog production effect.
By obtaining the first map and the fog material for mixing, floc fog effect is generated, and texture movement, light offset and light and dark hierarchy adjustments are performed, including mixing, overlay and light offset processing. Using the characteristics and material maps of the UE4 engine, the volume and layering of the fog effect are increased.
Under low performance consumption, more realistic fog performance is achieved, enriching the application scenarios of fog effect and applicable art styles, and meeting the project needs of more exquisite art performance.
Smart Images

Figure CN114022605B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer graphics technology, and in particular, to a texture processing method, a texture processing device, a computer-readable storage medium, and an electronic device. Background Art
[0002] When creating fog effect scenes such as virtual deserts, it is usually necessary to create very large and realistic special effects such as sandstorms. Analyzing the requirements in the game scene, it can be seen that the sandstorm needs to be able to receive light, and be dynamic, and have a strong sense of volume. However, the current games on the market do not have an effect solution that can achieve the required quality. Most of them use special effect emission textures to achieve such effects in order to save performance.
[0003] By emitting a transparent special effect texture with perturbation and movement through a particle special effect system to simulate the sandstorm effect, although the consumption is low, it cannot meet the requirements of some projects with more delicate artistic expressions. Specifically, since the production material algorithm itself has nothing to do with the light source information, the edge light generated by the light irradiating on the sand and dust cannot be seen. Secondly, due to the need to consider the dynamic effect of the sand and dust, most of the emitted textures rotate randomly and irregularly, so there will be a lack of a sense of volume or the "sense of volume" cannot be accurately expressed. More importantly, since the sandstorm effect is simulated with a texture, there is no internal scene of the sand and dust inside the sandstorm, and the expression of the sand and dust is not delicate enough, and it cannot be integrated into the terrain, and can only create "false" shadows.
[0004] In view of this, there is an urgent need in the art to develop a new texture processing method and device.
[0005] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0006] The purpose of the present disclosure is to provide a texture processing method, a texture processing device, a computer-readable storage medium, and an electronic device, so as to at least to some extent overcome the technical problem of poor fog effect production caused by the limitations of related technologies.
[0007] Other features and advantages of the present disclosure will become apparent through the following detailed description, or be learned in part through the practice of the present disclosure.
[0008] According to the first aspect of the embodiments of the present invention, a texture processing method is provided, and the method includes:
[0009] Obtain a first texture and a fog effect material, and perform a mixing process on the first texture and the fog effect material to generate a flocculent fog effect;
[0010] Perform texture movement processing on the flocculent fog effect to obtain a floating fog effect, and perform blending processing on the floating fog effect and the first texture map to obtain a wire-drawing state fog effect;
[0011] Perform light offset processing on the wire-drawing state fog effect to obtain a scattering fog effect, and perform light and shade level adjustment on the scattering fog effect to obtain the target fog effect.
[0012] In an exemplary embodiment of the present invention, the obtaining of the first texture map and the fog effect material includes:
[0013] Obtain a single patch model, and obtain the material texture map of the single patch model;
[0014] Perform synthesis processing on the material texture map to obtain the first texture map, and obtain the fog effect material.
[0015] In an exemplary embodiment of the present invention, the performing of blending processing on the first texture map and the fog effect material to generate a flocculent fog effect includes:
[0016] Perform blending processing on the first texture map and the fog effect material to obtain the original fog effect, and obtain the second texture map;
[0017] Perform overlay processing on the second texture map and the original fog effect to obtain a blocky fog effect, and obtain the third texture map;
[0018] Perform overlay processing on the third texture map and the blocky fog effect to obtain a flocculent fog effect.
[0019] In an exemplary embodiment of the present invention, the method further includes:
[0020] Perform blending processing on the floating fog effect and the second texture map to obtain a wire-drawing state fog effect.
[0021] In an exemplary embodiment of the present invention, the performing of light and shade level adjustment on the scattering fog effect to obtain the target fog effect includes:
[0022] Perform blending processing on the scattering fog effect and the second texture map to obtain a blended fog effect, and obtain a self-illuminating texture map;
[0023] Perform light and shade level adjustment on the blended fog effect and the self-illuminating texture map to obtain the target fog effect.
[0024] In an exemplary embodiment of the present invention, the method further includes:
[0025] Perform blending processing on the floating fog effect and the third texture map to obtain a wire-drawing state fog effect.
[0026] In an exemplary embodiment of the present invention, the adjustment of the light and shade levels of the scattering fog effect to obtain a target fog effect includes:
[0027] Mix the scattering fog effect and the third texture map to obtain a mixed fog effect, and obtain a self-illuminating texture map;
[0028] Adjust the light and shade levels of the mixed fog effect and the self-illuminating texture map to obtain a target fog effect.
[0029] In an exemplary embodiment of the present invention, the light offset processing of the wire-drawing state fog effect to obtain a scattering fog effect includes:
[0030] Determine the light direction corresponding to the wire-drawing state fog effect, and copy the wire-drawing state fog effect to obtain a backup fog effect;
[0031] Perform offset processing on the backup fog effect according to the light direction to obtain an offset fog effect, and perform brightness adjustment processing on the offset fog effect to obtain a brightness fog effect, so as to determine that the wire-drawing state fog effect and the brightness fog effect are the scattering fog effect.
[0032] In an exemplary embodiment of the present invention, the performing offset processing on the backup fog effect according to the light direction to obtain an offset fog effect, and performing brightness adjustment processing on the offset fog effect to obtain a brightness fog effect includes:
[0033] Perform offset processing on the backup fog effect according to the light direction to obtain an offset fog effect, and perform brightness increasing processing on the offset fog effect to obtain a brightness fog effect; or
[0034] Perform offset processing on the backup fog effect according to the opposite direction of the light direction to obtain an offset fog effect, and perform brightness decreasing processing on the offset fog effect to obtain a brightness fog effect.
[0035] In an exemplary embodiment of the present invention, the adjustment of the light and shade levels of the scattering fog effect to obtain a target fog effect includes:
[0036] Mix the scattering fog effect and the first texture map to obtain a mixed fog effect, and obtain a self-illuminating texture map;
[0037] Adjust the light and shade levels of the mixed fog effect and the self-illuminating texture map to obtain a target fog effect.
[0038] According to the second aspect of the embodiments of the present invention, there is provided a texture map processing device, including:
[0039] A mixing processing module, configured to obtain a first texture map and a fog effect material, and perform mixing processing on the first texture map and the fog effect material to generate a flocculent fog effect;
[0040] The mobile processing module is configured to perform texture movement processing on the flocculent fog effect to obtain a floating fog effect, and perform blending processing on the floating fog effect and the first texture map to obtain a wire-drawing state fog effect;
[0041] The fog effect adjustment module is configured to perform light offset processing on the wire-drawing state fog effect to obtain a scattered fog effect, and perform light and shade level adjustment on the scattered fog effect to obtain a target fog effect.
[0042] According to the third aspect of the embodiments of the present invention, there is provided an electronic device, including: a processor and a memory; wherein, computer-readable instructions are stored on the memory, and when the computer-readable instructions are executed by the processor, the texture map processing method in any of the above exemplary embodiments is implemented.
[0043] According to the fourth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the texture map processing method in any of the above exemplary embodiments is implemented.
[0044] As can be seen from the above technical solutions, the texture map processing method, texture map processing device, computer storage medium and electronic device in the exemplary embodiments of the present disclosure at least have the following advantages and positive effects:
[0045] In the method and device provided in the exemplary embodiments of the present disclosure, the blending processing of the first texture map and the fog effect material and the subsequent blending processing all give full play to the characteristics of the dot matrix, making the texture performance of the fog effect more three-dimensional and hierarchical, and bringing a more realistic fog effect on the premise of lower performance consumption. Further, when performing texture movement processing, light offset processing and light and shade level adjustment on the fog effect, parameter adjustments in multiple new directions are added, giving more performance possibilities to the fog effect, enriching the application scenarios of the fog effect, and also being applicable to more game art style projects.
[0046] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0048] Figure 1 Fig. schematically shows an effect diagram of a particle special effect system in the related art simulating a sandstorm effect;
[0049] Figure 2 Another schematic diagram showing the effect of simulating a sandstorm effect by a particle special effect system in the related art;
[0050] Figure 3 A schematic flowchart showing a method for texture processing in an exemplary embodiment of the present disclosure;
[0051] Figure 4 A schematic flowchart showing a method for obtaining a first texture and a fog effect material in an exemplary embodiment of the present disclosure;
[0052] Figure 5 A schematic flowchart showing a method for blending processing in an exemplary embodiment of the present disclosure;
[0053] Figure 6 A schematic flowchart showing a method for light offset processing in an exemplary embodiment of the present disclosure;
[0054] Figure 7 A schematic flowchart showing a method for brightness adjustment processing in an exemplary embodiment of the present disclosure;
[0055] Figure 8 A schematic flowchart showing a method for adjusting light and shade levels in an exemplary embodiment of the present disclosure;
[0056] Figure 9 A schematic flowchart showing another method for adjusting light and shade levels in an exemplary embodiment of the present disclosure;
[0057] Figure 10 A schematic flowchart showing yet another method for adjusting light and shade levels in an exemplary embodiment of the present disclosure;
[0058] Figure 11 A schematic interface diagram showing a method for obtaining a first texture in an application scenario in an exemplary embodiment of the present disclosure;
[0059] Figure 12 A schematic diagram showing the effect of the original fog effect generated in an application scenario in an exemplary embodiment of the present disclosure;
[0060] Figure 13 A schematic diagram showing the effect of a block fog effect in an application scenario in an exemplary embodiment of the present disclosure;
[0061] Figure 14 A schematic diagram showing the effect of a flocculent fog effect obtained by superimposing a third texture in an application scenario in an exemplary embodiment of the present disclosure;
[0062] Figure 15 A schematic diagram showing the effect of a wire-drawing state fog effect in an application scenario in an exemplary embodiment of the present disclosure;
[0063] Figure 16 Schematic diagram showing the effect of the scattering fog effect in the application scenario in an exemplary embodiment of the present disclosure;
[0064] Figure 17 Schematic diagram showing the effect of the target fog effect in the application scenario in an exemplary embodiment of the present disclosure;
[0065] Figure 18 Schematic diagram showing the effect of the sandstorm effect generated in the application scenario in an exemplary embodiment of the present disclosure;
[0066] Figure 19 Schematic comparison diagram of the sand effect generated according to the particle special effect emission map and the sand effect generated by the method of the present disclosure in the application scenario in an exemplary embodiment of the present disclosure;
[0067] Figure 20 Schematic diagram showing the interface of the texture processing method of the present disclosure in the application scenario in an exemplary embodiment of the present disclosure;
[0068] Figure 21 Schematic diagram showing the interface for adjusting parameters in the application scenario in an exemplary embodiment of the present disclosure;
[0069] Figure 22 Schematic diagram showing the structure of a texture processing device in an exemplary embodiment of the present disclosure;
[0070] Figure 23 Schematic diagram showing an electronic device for implementing the texture processing method in an exemplary embodiment of the present disclosure;
[0071] Figure 24 Schematic diagram showing a computer-readable storage medium for implementing the texture processing method in an exemplary embodiment of the present disclosure. Detailed implementation manners
[0072] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be used. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0073] As used in this specification, the terms "a", "an", "the", and "said" are used to indicate the presence of one or more elements / components / etc.; the terms "comprising" and "having" are used to mean an open inclusion and mean that there may be additional elements / components / etc. in addition to the listed elements / components / etc.; the terms "first", "second", etc. are only used as labels and are not a limitation on the quantity of their objects.
[0074] In addition, the drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0075] When making fog effect scenes such as virtual deserts, it is usually necessary to produce very large and realistic special effects such as sandstorms. Analyzing the requirements in the game scene, it can be known that the sandstorm needs to be able to receive light and be dynamic, and needs to have a strong sense of volume. However, the current games on the market do not have an effect solution that can achieve the required quality. Most of them use special effect emission textures to achieve such effects in order to save performance.
[0076] By emitting a transparent special effect texture with perturbation and movement through the particle special effect system to simulate the sandstorm effect, although the consumption is low, it cannot meet the requirements of some projects with more delicate art performances.
[0077] Figure 1 Fig. shows a schematic diagram of an effect of simulating a sandstorm effect by a particle special effect system in the related art, as Figure 1 shown. Since the production material algorithm itself has nothing to do with the light source information, the edge light generated by the light irradiating on the sand and dust cannot be seen.
[0078] Figure 2 Fig. shows another schematic diagram of an effect of simulating a sandstorm effect by a particle special effect system in the related art, as Figure 1 shown. Since the sandstorm effect is simulated by a texture, there is no internal scene of the sand and dust inside the sandstorm, and the expression of the sand and dust is not delicate enough, and it cannot blend into the terrain, and only "false" shadows can be made.
[0079] In addition, due to the need to consider the dynamic effect of the wind and sand, most of the emitted textures rotate randomly and irregularly, so there will be a lack of a sense of volume or an inaccurate "sense of volume" cannot be expressed.
[0080] Therefore, when creating fog effect scenes such as virtual deserts and requiring the production of very large and realistic special effects such as sandstorms, the sandstorm needs to be able to receive light and be dynamic, with a strong sense of volume. However, the current games on the market do not have an effect solution that can achieve the required quality. Most of them use special effect emission textures to achieve such effects in order to save performance.
[0081] By emitting transparent special effect textures with perturbation and movement through the particle special effect system to simulate the sandstorm effect, although the consumption is low, it cannot meet the requirements of some projects with more delicate art performances. Specifically, since the production material algorithm itself has nothing to do with the light source information, the edge light generated by light irradiating on the sand and dust cannot be seen. Secondly, due to the need to consider the dynamic effect of the sand and dust, most of the emitted textures rotate randomly and irregularly, so it will cause the lack of a sense of volume or cannot accurately express the "sense of volume". More importantly, since the sandstorm effect is simulated with textures, there is no internal scene of the sand and dust inside the sandstorm, and the expression of the sand and dust is not delicate enough, and it cannot blend into the terrain, and can only create "false" shadows.
[0082] In view of the problems existing in the related technologies, the present disclosure proposes a texture processing method. Figure 3 The flowchart of the texture processing method is shown, as Figure 3 shown, the texture processing method at least includes the following steps:
[0083] Step S310. Obtain a first texture and a fog effect material, and perform a blending process on the first texture and the fog effect material to generate a flocculent fog effect.
[0084] Step S320. Perform a texture movement process on the flocculent fog effect to obtain a floating fog effect, and perform a blending process on the floating fog effect and the first texture to obtain a wire-drawing state fog effect.
[0085] Step S330. Perform a light offset process on the wire-drawing state fog effect to obtain a scattered fog effect, and perform a light and shade level adjustment on the scattered fog effect to obtain a target fog effect.
[0086] In an exemplary embodiment of the present disclosure, the blending process on the first texture and the fog effect material and the subsequent blending processes all give full play to the characteristics of the dot matrix, making the texture performance of the fog effect more three-dimensional and hierarchical, and bringing a more realistic fog effect on the premise of low performance consumption. Further, when performing the texture movement process, light offset process and light and shade level adjustment on the fog effect, parameter adjustments in multiple new directions are added, giving more performance possibilities to the fog effect, enriching the application scenarios of the fog effect, and also being applicable to more game art style projects.
[0087] The following will explain each step of the texture processing method in detail.
[0088] In step S310, a first texture and a fog effect material are obtained, and the first texture and the fog effect material are mixed to generate a flocculent fog effect.
[0089] In an exemplary embodiment of the present disclosure, the first map and the fog effect material may be acquired first.
[0090] In an alternative embodiment, Figure 4 A schematic diagram of the process of obtaining the first texture and fog effect material is shown, Figure 4 As shown, the method at least includes the following steps: In step S410, a single patch model is obtained, and a material map of the single patch model is obtained.
[0091] Among them, a single patch model can be particles emitted and generated by a UE4 engine (Unreal Engine 4).
[0092] It is worth noting that only one particle needs to be emitted instead of multiple particles, so as to solve the performance problem of too many particles under the premise of complex materials.
[0093] Furthermore, the UE4 engine can also be used to obtain the material map of the single particle, that is, a single patch model.
[0094] In step S420, the material map is synthesized to obtain a first map, and a fog effect material is obtained.
[0095] The UE4 engine is used to synthesize multiple small-volume material maps to obtain a 3D (3-dimension) map, that is, the first map.
[0096] Furthermore, the volume material that comes with the UE4 engine is obtained as the fog effect material.
[0097] The volume material is the material type used by volumetric fog, which can be used to create effects on the dot matrix (voxels) that covers the entire scene. In addition, it can also increase the volume of texture clouds and texture fog in the game, so that when light passes through clouds and fog, it can get a more natural scattering picture.
[0098] In this exemplary embodiment, the corresponding first map can be obtained through a single patch model. The acquisition method is simple and accurate, and provides a map basis for subsequent invalid generation.
[0099] After the first texture and the fog effect material are obtained, the first texture and the fog effect material may be mixed.
[0100] In an alternative embodiment, Figure 5 A schematic flow chart of the method of mixing processing is shown, asFigure 5 As shown, the method at least includes the following steps: in step S510, the first texture and the fog effect material are mixed to obtain the original fog effect, and the second texture is obtained.
[0101] Specifically, the spatial coordinate relationship stored in the first map can be used to generate a dot matrix in the world space coordinate system to identify the transparent and opaque range of the clouds in the world space to obtain the original fog effect.
[0102] Furthermore, in order to perform superposition processing on the original fog effect, a second map may be obtained, which is a map different from the first map.
[0103] In step S520, the second map and the original fog effect are superimposed to obtain a block fog effect, and a third map is obtained.
[0104] After obtaining the world space coordinate system, the first map can be tiled multiple times, for example 256 times, in the world space coordinate system, and then the first map after tiling multiple times is randomly offset according to a constant. Then, the second map is reduced by 16 times or other multiples to increase the repetition. Furthermore, the first map after random offset and the reduced second map are input into the dot matrix information of the fog effect material, so that the material function is processed to obtain a block fog effect.
[0105] Although the block fog effect has been mixed twice, it does not solve the problem of excessive repetition, that is, the light and dark performance is like the performance effect divided by the grid. Therefore, the third map can be further obtained to continue the superposition processing using the third map.
[0106] It is worth noting that the third map has more texture details.
[0107] In step S530, the third map and the block fog effect are superimposed to obtain the flocculent fog effect.
[0108] Specifically, the spatial coordinate relationship stored in the third map may be used to represent the dot matrix generated by the fog effect material in the world space coordinate system, so as to further identify the transparent and opaque ranges of the clouds in the world space to obtain the flocculent fog effect.
[0109] Furthermore, since the processing methods of the superimposition processing and the mixing processing are the same, the superimposition processing is also the same as the process of the superimposition processing in step S520, and will not be repeated here.
[0110] In this exemplary embodiment, the flocculent fog effect is obtained by performing three consecutive blending processes on the fog effect material using the first texture map, the second texture map, and the third texture map, which enhances the detail expressiveness from the perspective of light and shade division. Compared with the original fog effect and the blocky fog effect, a flocculent effect similar to the fog effect in reality also appears, and the fog effect performance is better.
[0111] In step S320, the flocculent fog effect is subjected to texture movement processing to obtain a floating fog effect, and the floating fog effect and the first texture map are blended to obtain a wire-drawing state fog effect.
[0112] In an exemplary embodiment of the present disclosure, after obtaining the flocculent fog effect, texture movement processing can be performed on the flocculent fog effect.
[0113] Specifically, the time attribute in the UE4 engine that is captured is used to move the world coordinate position captured during the previous blending operation, so that the flocculent fog effect moves to obtain a floating fog effect. This time attribute is an in-built attribute of the UE4 engine and is a value that continuously increases as the game time progresses.
[0114] Among them, three attributes can be defined and integrated into the texture movement. These three attributes are timeoffset, DensityTextureA_moving, and winDRI respectively. Timeoffset represents the time offset control, DensityTextureA_moving defines the speed of the cloud layer floating, and winDRI represents the floating direction.
[0115] However, clouds or dust in real life are not in blocks but slightly in a wire-drawing state. Therefore, in order to achieve a realistic state of clouds and fog, a displacement effect, that is, a sense of time stagger, can also be added to the floating fog effect using the previous first texture map to obtain a wire-drawing state fog effect.
[0116] Specifically, it can be to use the spatial coordinate relationship stored in the first texture map to represent the floating fog effect in the world space coordinate system in the form of a dot matrix generated by the fog effect material, and stagger it with the previous fog effect to obtain a wire-drawing state fog effect.
[0117] Moreover, since the blending process here is equivalent to performing another overlay process using the first texture map, the process of this blending process is the same as that of the overlay process in step S520 and will not be elaborated here.
[0118] In addition, blending processing can also be performed using the second texture map or the third texture map.
[0119] In an alternative embodiment, the floating fog effect and the second texture map are blended to obtain a wire-drawing state fog effect.
[0120] Specifically, it is possible to utilize the spatial coordinate relationship stored in the second texture map and represent the floating fog effect in the world space coordinate system in the form of a dot matrix generated by a fog effect material, and stagger it from the previous fog effect to obtain a wire-drawing state fog effect.
[0121] Moreover, since the blending process here is equivalent to performing another overlay process using the second texture map, the blending process is the same as the overlay process in step S520 and will not be elaborated here.
[0122] In an optional embodiment, the floating fog effect and the third texture map are blended to obtain a wire-drawing state fog effect.
[0123] Specifically, it is possible to utilize the spatial coordinate relationship stored in the third texture map and represent the floating fog effect in the world space coordinate system in the form of a dot matrix generated by a fog effect material, and stagger it from the previous fog effect to obtain a wire-drawing state fog effect.
[0124] Moreover, since the blending process here is equivalent to performing another overlay process using the third texture map, the blending process is the same as the overlay process in step S520 and will not be elaborated here.
[0125] In this exemplary embodiment, to obtain a wire-drawing state fog effect, it is possible to blend the first texture map, the second texture map, or the third texture map with the floating fog effect. The texture map for the blending process is a previously used texture map, so there will be no performance consumption. Additionally, it is possible to select any one of the three previously used texture maps according to the desired wire-drawing state effect, providing multiple options and generation effects for the blending process.
[0126] In step S330, the wire-drawing state fog effect is subjected to a light offset process to obtain a scattered fog effect, and the scattered fog effect is adjusted in terms of light and shade levels to obtain the target fog effect.
[0127] In the exemplary embodiment of the present disclosure, after obtaining the wire-drawing state fog effect, the wire-drawing state fog effect can be subjected to a light offset process.
[0128] In an optional embodiment, Figure 6 shows a flowchart of the method for the light offset process, as Figure 6 shown, the method at least includes the following steps: In step S610, determine the light direction corresponding to the wire-drawing state fog effect, and copy the wire-drawing state fog effect to obtain a backup fog effect.
[0129] This light direction can be the light direction of the directional light captured in the UE4 engine, or other light directions can be set according to the actual situation. This exemplary embodiment does not make special limitations on this.
[0130] Furthermore, copy the already obtained wire-drawing state fog effect as the backup fog effect.
[0131] In step S620, the backup fog effect is offset according to the light direction to obtain an offset fog effect, and the offset fog effect is adjusted in lightness to obtain a lightness fog effect, so as to determine that the wire-drawing state fog effect and the lightness fog effect are scattering fog effects.
[0132] In an alternative embodiment, Figure 7 A flowchart showing a method for adjusting lightness is shown, as Figure 7 shown. This method at least includes the following steps: In step S710, the backup fog effect is offset according to the light direction to obtain an offset fog effect, and the offset fog effect is adjusted to increase its lightness to obtain a lightness fog effect.
[0133] The copied backup fog effect is offset to a certain extent in the direction of the light to obtain an offset fog effect. Specifically, the offset fog effect can be moved above the wire-drawing state fog effect.
[0134] Furthermore, the lightness of the offset fog effect is adjusted so that the lightness of the offset fog effect increases to obtain a lightness fog effect.
[0135] In step S720, the backup fog effect is offset according to the opposite direction of the light direction to obtain an offset fog effect, and the offset fog effect is adjusted to decrease its lightness to obtain a lightness fog effect.
[0136] The copied backup fog effect is offset to a certain extent in the opposite direction of the light direction to obtain an offset fog effect. Specifically, the offset fog effect can be moved below the wire-drawing state fog effect.
[0137] Furthermore, the lightness of the offset fog effect is adjusted so that the lightness of the offset fog effect decreases to obtain a lightness fog effect.
[0138] In this exemplary embodiment, the backup fog effect is differentially offset and adjusted in lightness according to the light direction to obtain the corresponding lightness fog effect. The processing method is simple and accurate, enabling the display of the fog effect to be related to the light source information and conform to the real scene, obtaining the effect of edge light generated by light irradiating on the fog effect, and increasing the realism and sense of reality of the lightness fog effect.
[0139] After obtaining the lightness fog effect, the lightness fog effect and the wire-drawing state fog effect can be used as scattering fog effects to present a scattering state.
[0140] After obtaining the scattering fog effect, the scattering fog effect can be adjusted in light and dark levels.
[0141] In an alternative embodiment, Figure 8 A flowchart showing a method for adjusting light and dark levels is shown, as Figure 8As shown, the method at least includes the following steps: In step S810, the scattered fog effect and the first texture map are mixed to obtain a mixed fog effect, and an emissive texture map is acquired.
[0142] Specifically, the space coordinate relationship stored in the first texture map can be utilized to present the scattered fog effect in the form of a dot matrix generated by the fog effect material in the world space coordinate system to obtain the mixed fog effect.
[0143] Furthermore, an emissive texture map can also be acquired.
[0144] This emissive texture map (Emissive) can control the color and brightness of the surface-emitted light. When the emissive texture map is used in the scene, it will look like a visible light, and the surface of the object will also present an effect of self-emission.
[0145] In step S820, the light and dark levels of the mixed fog effect and the emissive texture map are adjusted to obtain the target fog effect.
[0146] Specifically, a position on the world space coordinate system that is lower than the mixed fog effect is acquired, and all spaces at the lower position are brightened through the emissive texture map. This brightening effect can be an effect where some areas are brightened and some areas are not. That is, the transparent part of the mixed fog effect can be brightened through the underlying emissive texture map, while the part with low transparency cannot or will not be brightened through the emissive texture map to a certain extent, thereby achieving a visually brightened effect to obtain the target fog effect.
[0147] In this exemplary embodiment, the light and dark levels of the scattered fog effect are adjusted through the first texture map and the emissive texture map to obtain the corresponding target fog effect, making the presentation of the target fog effect more volumetric and hierarchical, and being able to more realistically display the effects of clouds or dust. Moreover, this target fog effect can have more performance possibilities, providing a basis for the display of more subsequent game art styles.
[0148] In addition, the adjustment of the light and dark levels of the scattered fog effect can also be achieved through the second texture map and the third texture map.
[0149] In an alternative embodiment, Figure 9 shows a flowchart of another method for adjusting light and dark levels, as Figure 9 shown, the method at least includes the following steps: In step S910, the scattered fog effect and the second texture map are mixed to obtain a mixed fog effect, and an emissive texture map is acquired.
[0150] Specifically, the space coordinate relationship stored in the second texture map can be utilized to present the scattered fog effect in the form of a dot matrix generated by the fog effect material in the world space coordinate system to obtain the mixed fog effect.
[0151] Further, a self-illumination map can also be obtained. This self-illumination map can control the color and brightness of the surface-emitted light. When the self-illumination map is used in the scene, it will look like a visible light, and the surface of the object will also present a self-illuminating effect.
[0152] In step S920, the mixed fog effect and the self-illumination map are adjusted in light and shade levels to obtain the target fog effect.
[0153] Specifically, a position lower than the mixed fog effect in the world space coordinate system is obtained, and all spaces in the lower position are brightened through the self-illumination map. This brightening effect can be an effect where some areas are brightened and some areas are not. That is, the transparent part of the mixed fog effect can be brightened through the underlying self-illumination map, while the part with low transparency cannot or will not be brightened through the self-illumination map to a certain extent, thereby achieving a visually brightening effect to obtain the target fog effect.
[0154] In this exemplary embodiment, the scattered fog effect is adjusted in light and shade levels through the second map and the self-illumination map to obtain the corresponding target fog effect, making the presentation of the target fog effect more volumetric and hierarchical, and being able to more realistically display the effects of clouds or dust. Moreover, this target fog effect can have more performance possibilities, providing a basis for the display of more subsequent game art styles.
[0155] In an alternative embodiment, Figure 10 shows a schematic flowchart of another method for adjusting light and shade levels, as Figure 10 shown. This method at least includes the following steps: In step S1010, the scattered fog effect and the third map are mixed to obtain a mixed fog effect, and a self-illumination map is obtained.
[0156] Specifically, it can be to use the spatial coordinate relationship stored in the third map to represent the scattered fog effect in the world space coordinate system in the form of a dot matrix generated by the fog effect material to obtain the mixed fog effect.
[0157] Further, a self-illumination map can also be obtained. This self-illumination map can control the color and brightness of the surface-emitted light. When the self-illumination map is used in the scene, it will look like a visible light, and the surface of the object will also present a self-illuminating effect.
[0158] In step S1020, the mixed fog effect and the self-illumination map are adjusted in light and shade levels to obtain the target fog effect.
[0159] Specifically, the position below the mixed fog effect in the world space coordinate system is obtained, and the self-luminous map is used to control the brightening of all the spaces below the position. The brightening effect can be that some areas are brightened and some areas are dark. That is, the transparent part of the mixed fog effect can be brightened through the self-luminous map of the lower layer, while the part with low transparency cannot or will not be brightened to a certain extent through the self-luminous map, thereby achieving a visual brightening effect to obtain the target fog effect.
[0160] In this exemplary embodiment, the third map and the self-luminous map are used to adjust the light and dark levels of the diffuse fog effect to obtain the corresponding target fog effect, so that the target fog effect has a stronger sense of volume and layering, and can more realistically show the effect of clouds or dust. In addition, the target fog effect can have more expression possibilities, providing a basis for the subsequent display of more game art styles.
[0161] The following is a detailed description of the mapping method in the embodiment of the present disclosure in conjunction with an application scenario.
[0162] Figure 11 The schematic diagram of the interface of the method for obtaining the first map in the application scenario is shown as follows: Figure 11 As shown, a single patch model is obtained, and a material map of the single patch model is obtained.
[0163] Among them, a single patch model can be a particle emitted and generated by the UE4 engine.
[0164] It is worth noting that only one particle needs to be emitted instead of multiple particles, so as to solve the performance problem of too many particles under the premise of complex materials.
[0165] Furthermore, the UE4 engine can also be used to obtain the material map of the single particle, that is, a single patch model.
[0166] The material map is synthesized to obtain a first map.
[0167] The UE4 engine is used to synthesize multiple smaller material maps to obtain a 3D map, which is the first map.
[0168] Figure 12 The schematic diagram of the original fog effect generated in the application scenario is shown in FIG. Figure 12 As shown, further, the volume material that comes with the UE4 engine is obtained as the fog effect material.
[0169] The volume material is the material type used by volumetric fog, which can be used to create effects on the dot matrix (voxels) that covers the entire scene. In addition, it can also increase the volume of texture clouds and texture fog in the game, so that when light passes through clouds and fog, it can get a more natural scattering picture.
[0170] After obtaining the first texture map and the fog effect material, the first texture map and the fog effect material can be blended.
[0171] Specifically, the spatial coordinate relationship stored in the first texture map can be used to represent, in the form of a dot matrix generated by the fog effect material, within the world space coordinate system, marking the transparent and opaque ranges of the clouds and fog in the world space to obtain the original fog effect.
[0172] Obviously, there is no light and dark division on the surface of the fog effect material itself, while the original fog effect can present a more obvious light and dark division after being blended with the first texture map.
[0173] However, the repetition degree of the current original fog effect, that is, the light and dark division is as if divided by a grid, and the effect is still too obvious. Therefore, a 3D texture map can be superimposed to eliminate the excessive repetition degree.
[0174] To perform a superimposing process on the original fog effect, a second texture map can also be obtained. This second texture map is different from the first texture map.
[0175] Moreover, the second texture map and the original fog effect are superimposed to obtain a blocky fog effect.
[0176] Specifically, after obtaining the world space coordinate system, the first texture map can be tiled multiple times, for example, 256 times, within the world space coordinate system, and then the tiled first texture map is randomly offset according to a constant. Then, the second texture map is reduced by 16 times or other multiples to increase the repetition degree. Further, the randomly offset first texture map and the reduced second texture map are input into the dot matrix information of the fog effect material so that the material function processes to obtain a blocky fog effect.
[0177] Figure 13 Shows a schematic diagram of the effect of the blocky fog effect in the application scenario, as Figure 13 shown. Although the blocky fog effect has been blended 2 times, the problem of excessive repetition degree has not been solved. Therefore, a third texture map can be further obtained to continue the superimposing process using the third texture map.
[0178] Figure 14 Shows a schematic diagram of the effect of the flocculent fog effect obtained by superimposing the third texture map in the application scenario, as Figure 14 shown. This third texture map is a texture map with more texture details.
[0179] The third texture map and the blocky fog effect are superimposed to obtain a flocculent fog effect.
[0180] Specifically, it can be represented in the world space coordinate system in the form of a dot matrix generated by a fog effect material using the spatial coordinate relationship stored in the third texture map, so as to further identify the transparent and opaque ranges of the clouds and fog in the world space to obtain a flocculent fog effect.
[0181] Compared with the blocky fog effect, the flocculent fog effect can present a flocculent effect closer to reality.
[0182] Furthermore, more parameters in the UE4 engine can be used to control the basic information of the flocculent fog effect.
[0183] In the application scenario, the way to control the parameters of the flocculent fog effect can be that two parameters specify the overlay repetition degree and the light and dark degree of the flocculent fog effect. And 2 more parameters are added for each layer. Therefore, 6 more parameters will be added after three times of mixing.
[0184] Among them, the control of the repetition degree can be achieved through the tilling parameter, and the light and dark degree can be achieved through the parameter of the texture fineness. And since the light and dark degree is related to the height of the fog effect, therefore, the parameter of the height of the fog effect can also be added for control.
[0185] Since the flocculent fog effect is more like white clouds and fog at the present stage, therefore, in order to make the flocculent fog effect "move", the flocculent fog effect can be further processed for texture movement.
[0186] In the application scenario, the method for texture movement processing can be to use the time attribute captured in the UE4 engine to move the world coordinate position captured during the previous mixing operation, so that the flocculent fog effect moves to obtain a floating fog effect. This time attribute is a built-in attribute of the UE4 engine and is a value that can continuously increase as the game time increases.
[0187] Among them, 3 attributes can be defined and integrated into the texture movement. These three attributes are timeoffset, DensityTextureA_moving, and winDRI respectively. Timeoffset represents the time offset control, DensityTextureA_moving defines the speed of the cloud layer floating, and winDRI represents the floating direction.
[0188] Of course, the clouds and fog or sand and dust in real life are not in blocks, but slightly in a drawn state. Therefore, in order to achieve the clouds and fog in a real state, the previous texture map can also be used to add a displacement effect, that is, a time interleaving feeling, to the floating fog effect to obtain a drawn state fog effect.
[0189] Since it is unrealistic that all clouds and fog move at the same speed, the moving speed of each layer of the floating fog effect needs to capture the original world coordinate position, and then blend a 3D texture to set different times, staggering with the previous fog effect to form a wire drawing state of the wire drawing fog effect.
[0190] It should be noted that the blended 3D texture can be any one of the first texture, the second texture, or the third texture used previously, which can be determined according to the desired wire drawing state. Moreover, since the previously used texture is employed, there will be no performance consumption.
[0191] Specifically, it can be to utilize the spatial coordinate relationship stored in the first texture, and present the floating fog effect in the world space coordinate system in the form of a dot matrix generated by the fog effect material, staggering with the previous fog effect to obtain the wire drawing fog effect.
[0192] Or it can be to utilize the spatial coordinate relationship stored in the second texture, and present the floating fog effect in the world space coordinate system in the form of a dot matrix generated by the fog effect material, staggering with the previous fog effect to obtain the wire drawing fog effect.
[0193] It can also be to utilize the spatial coordinate relationship stored in the third texture, and present the floating fog effect in the world space coordinate system in the form of a dot matrix generated by the fog effect material, staggering with the previous fog effect to obtain the wire drawing fog effect.
[0194] Figure 15 The effect schematic diagram of the wire drawing fog effect in the application scenario is shown, such as Figure 15 As shown, through the blending process of the floating fog effect and the first texture, a displacement effect is added, making the originally "fake" floating fog effect present a wire drawing state.
[0195] Furthermore, in order to overcome the most difficult problem of the volume feeling of clouds, fog, or dust, it can be overcome from two aspects: light performance and hierarchical performance.
[0196] The method of determining the light direction in the application scenario can be to utilize the UE4 engine to capture the light direction of the directional light in the engine.
[0197] The method of obtaining the brightness fog effect corresponding to the wire drawing fog effect in the application scenario can be to first copy the already obtained wire drawing fog effect as a backup fog effect.
[0198] Then, perform an offset process on the backup fog effect according to the light direction to obtain an offset fog effect, and perform a brightness adjustment process on the offset fog effect to obtain the brightness fog effect.
[0199] First, perform an offset process on the backup fog effect according to the light direction to obtain an offset fog effect, and perform a process of increasing the brightness of the offset fog effect to obtain the brightness fog effect.
[0200] The copied backup fog effect is offset to a certain extent in the direction of the light to obtain an offset fog effect. Specifically, the offset fog effect can be moved above the wire-drawing fog effect.
[0201] Furthermore, adjust the brightness of the offset fog effect so that the brightness of the offset fog effect increases to obtain a brightness fog effect.
[0202] Second, offset the backup fog effect in the opposite direction of the light direction to obtain an offset fog effect, and perform a brightness reduction process on the offset fog effect to obtain a brightness fog effect.
[0203] The copied backup fog effect is offset to a certain extent in the opposite direction of the light direction to obtain an offset fog effect. Specifically, the offset fog effect can be moved below the wire-drawing fog effect.
[0204] Furthermore, adjust the brightness of the offset fog effect so that the brightness of the offset fog effect decreases to obtain a brightness fog effect.
[0205] After obtaining the brightness fog effect, the brightness fog effect and the wire-drawing fog effect can be used as the scattering fog effect.
[0206] Figure 16 The effect diagram of the scattering fog effect in the application scenario is shown, as Figure 16 shown, this scattering fog effect can simulate the edge light refracted by the cloud and mist when illuminated by light, presenting a scattering effect.
[0207] After obtaining the scattering fog effect, the brightness and darkness levels of the scattering fog effect can be adjusted.
[0208] The method for adjusting the brightness and darkness levels in the application scenario can be to perform a blending process on the scattering fog effect and the first texture map to obtain a blended fog effect, and obtain a self-illuminating texture map.
[0209] Specifically, it can be to use the spatial coordinate relationship stored in the first texture map to represent the scattering fog effect in the world space coordinate system in the form of a dot matrix generated by the fog effect material to obtain a blended fog effect.
[0210] Furthermore, a self-illuminating texture map can also be obtained.
[0211] This self-illuminating texture map can control the color and brightness of the surface-emitted light. When the self-illuminating texture map is used in the scene, it will look like a visible light, and the surface of the object will also present a self-illuminating effect.
[0212] Perform brightness and darkness level adjustment on the blended fog effect and the self-illuminating texture map to obtain the target fog effect.
[0213] Specifically, obtain the position below the mixed fog effect in the world space coordinate system, and control all spaces in the lower position to brighten through the self-illuminating texture. This brightening effect can be that some areas brighten while some areas do not. That is, the transparent part of the mixed fog effect can brighten through the underlying self-illuminating texture, while the part with low transparency cannot or will not brighten through the self-illuminating texture to a certain extent, thus achieving a visually brightening effect to obtain the target fog effect.
[0214] In addition, the adjustment of the light and dark levels of the scattering fog effect can also be achieved through the second texture and the third texture.
[0215] Mix the scattering fog effect and the second texture to obtain a mixed fog effect, and obtain the self-illuminating texture.
[0216] Specifically, it can be to use the spatial coordinate relationship stored in the second texture to represent the scattering fog effect in the world space coordinate system in the form of a dot matrix generated by the fog effect material to obtain the mixed fog effect.
[0217] Furthermore, the self-illuminating texture can also be obtained. This self-illuminating texture can control the color and brightness of the surface-emitted light. When the self-illuminating texture is used in the scene, it will look like a visible light, and the surface of the object will also present a self-illuminating effect.
[0218] Adjust the light and dark levels of the mixed fog effect and the self-illuminating texture to obtain the target fog effect.
[0219] Specifically, obtain the position below the mixed fog effect in the world space coordinate system, and control all spaces in the lower position to brighten through the self-illuminating texture. This brightening effect can be that some areas brighten while some areas do not. That is, the transparent part of the mixed fog effect can brighten through the underlying self-illuminating texture, while the part with low transparency cannot or will not brighten through the self-illuminating texture to a certain extent, thus achieving a visually brightening effect to obtain the target fog effect.
[0220] Mix the scattering fog effect and the third texture to obtain a mixed fog effect, and obtain the self-illuminating texture.
[0221] Specifically, it can be to use the spatial coordinate relationship stored in the third texture to represent the scattering fog effect in the world space coordinate system in the form of a dot matrix generated by the fog effect material to obtain the mixed fog effect.
[0222] Furthermore, the self-illuminating texture can also be obtained.
[0223] This self-illuminating texture can control the color and brightness of the surface-emitted light. When the self-illuminating texture is used in the scene, it will look like a visible light, and the surface of the object will also present a self-illuminating effect.
[0224] Adjust the brightness levels of the mixed fog effect and the self-illuminating texture map to obtain the target fog effect.
[0225] Specifically, obtain the position below the mixed fog effect in the world space coordinate system, and control all the spaces in the lower position to brighten through the self-illuminating texture map. This brightening effect can be an effect where some areas brighten and some areas do not. That is, the transparent part of the mixed fog effect can be brightened through the underlying self-illuminating texture map, while the part with low transparency cannot or will not be brightened through the self-illuminating texture map to a certain extent, thus achieving a visually brightening effect to obtain the target fog effect.
[0226] Figure 17 Shows a schematic diagram of the effect of the target fog effect in the application scenario, as Figure 17 shown. The pure black area is the target fog effect, and the white area is the effect of the underlying self-illuminating texture map that shines through. Therefore, the target fog effect is more layered through the transmission of the self-illuminating texture map.
[0227] Figure 18 Shows a schematic diagram of the generated sandstorm effect in the application scenario, as Figure 18 shown. After generating the target fog effect, the parameters such as the sensitivity, complexity, offset, and cloud color of the target fog effect can be fine-tuned according to actual needs to obtain the final sand performance effect.
[0228] Figure 19 Shows a comparison diagram of the sandstorm effect generated according to the particle effect emission texture map and the sandstorm effect generated by the method of the present disclosure, as Figure 19 shown. By emitting a transparent special effect texture map with perturbation and movement through the particle effect system to simulate the sandstorm effect, although the consumption is low, it cannot meet the requirements of some projects with more delicate art performances. Specifically, since the production material algorithm itself has nothing to do with the light source information, the edge light generated by the light shining on the sand cannot be seen. Secondly, due to the need to consider the dynamic effect of the sand and dust, most of the emitted texture maps rotate randomly and irregularly, so there will be a lack of volume sense or an inaccurate expression of "volume sense". More importantly, since the sandstorm effect is simulated with a texture map, there is no internal scene of the sand and dust inside the sandstorm, and the expression of the sand and dust is not delicate, and it cannot be integrated into the terrain, and only "false" shadows can be made.
[0229] However, the sandstorm effect generated according to the method of the present disclosure gives full play to the dot matrix characteristics of multiple mixed processing, making the sandstorm effect more three-dimensional and layered, and achieving a more realistic sandstorm effect. And, during the texture map processing, adjustment parameters in multiple new directions are added, enabling the sand and dust to have more performance possibilities and being applicable to more game art style projects. This is also a way to present a more realistic sand and dust effect with as little performance consumption as possible.
[0230] Figure 20 shows a schematic diagram of the interface for using the texture mapping processing method of the present disclosure in an application scenario, as Figure 20 shown. Different 3D textures can be made according to the requirements of different game art styles. For example, when making a sea of clouds, since the clouds are relatively soft, there is no need for very small black and white blocks in the 3D texture; when making sand and dust, the black and white blocks in the 3D texture need to be more dense.
[0231] Furthermore, the produced 3D texture can be used to replace the texture included in the previous UE4 engine and applied to the Niagara system to emit a particle.
[0232] Among them, in the latest UE4 engine, the Niagara module has been added to the engine's plugins. When it is needed, just open the Plugin window through the menu Edit -> Plugin, search for "Niagara", and select Enabled. Then, when right-clicking in the Content Browser, a new menu option FX will appear. This sub-menu contains various resource options for the Niagara system. Among them, the various resources included in the Niagara system are respectively NiagaraSystem as the particle system resource, Niagara Emitter as the emitter resource, Niagara Script as the particle system logic script resource, and Niagara Parameter Collection as the parameter collection resource.
[0233] The Niagara System resource is similar to the Particle System resource in Cascade. It can be created through the right-click menu "FX -> Niagara System". When dragging it into the scene, the engine will automatically create a NiagaraActor and reference this Niagara System resource in its Niagara Component. Double-clicking on the Niagara System resource can open the editor for editing.
[0234] The Niagara system provides an editing method similar to BluePrint, making the production of the particle system more convenient and flexible. Not only can the particle emitter be controlled, but also the user can control the particles, so that the user can customize the motion state of the particles and thus produce more complex particle effects.
[0235] Figure 21 shows a schematic diagram of the interface for adjusting parameters in an application scenario, as Figure 21As shown, after emitting a particle on the Niagara system, parameters to be adjusted can be specified on the parameter table of the shader, and the adjustment can be made. Finally, the shader is applied to the particle material emitted by the Niagara system to obtain the target fog effect.
[0236] Among them, when an object is presented, in addition to its shape, it also includes its inherent color and texture. The texture also determines what material the object is made of.
[0237] Based on this, when using a special effect emission map to achieve the effect of clouds or sand and dust in the related technology, since the production material algorithm itself has nothing to do with the light source information, the edge light generated by light irradiating on the sand and dust cannot be seen. Secondly, considering the dynamic effect of the sand and wind, most of the emitted maps rotate randomly and irregularly, so it will cause the lack of volume sense or cannot express the accurate "volume sense". More importantly, since the sandstorm effect is simulated with a map, there is no internal scene of the sand and dust inside the sandstorm, and the expression of the sand and dust is not delicate enough, and it cannot blend into the terrain, and only "false" shadows can be made.
[0238] However, in the map processing method in the exemplary embodiments of the present disclosure, the mixing process of the first map and the fog effect material and the subsequent mixing process fully utilize the characteristics of the dot matrix, making the texture performance of the fog effect more voluminous and hierarchical, and bringing a more realistic fog effect on the premise of lower performance consumption. In terms of the performance of the sand and dust, it can blend into the terrain, making the performance of the sand and dust more delicate. Furthermore, when performing texture movement processing, light offset processing, and light and shade level adjustment on the fog effect, parameter adjustments in multiple new directions are added, giving more performance possibilities to the fog effect, enriching the application scenarios of the fog effect, and also being applicable to more game art style projects.
[0239] In addition, in the exemplary embodiments of the present disclosure, a map processing device is also provided. Figure 22 The structural schematic diagram of the map processing device is shown, as Figure 22 As shown, the map processing device 2900 may include: a mixing processing module 2210, a movement processing module 2220, and a fog effect adjustment module 2230. Among them:
[0240] The mixing processing module 2210 is configured to obtain the first map and the fog effect material, and perform a mixing process on the first map and the fog effect material to generate a flocculent fog effect; the movement processing module 2220 is configured to perform texture movement processing on the flocculent fog effect to obtain a floating fog effect, and perform a mixing process on the floating fog effect and the first map to obtain a wire drawing state fog effect; the fog effect adjustment module 2230 is configured to perform light offset processing on the wire drawing state fog effect to obtain a scattered fog effect, and perform light and shade level adjustment on the scattered fog effect to obtain the target fog effect.
[0241] In an exemplary embodiment of the present invention, the step of obtaining the first texture and the fog effect material includes:
[0242] Obtain a single patch model, and obtain a material map of the single patch model;
[0243] The material map is synthesized to obtain a first map, and a fog effect material is obtained.
[0244] In an exemplary embodiment of the present invention, the step of mixing the first map and the fog effect material to generate the flocculent fog effect includes:
[0245] Mixing the first texture and the fog effect material to obtain an original fog effect, and obtaining a second texture;
[0246] The second map and the original fog effect are superimposed to obtain a block fog effect, and a third map is obtained;
[0247] The third map and the block fog effect are superimposed to obtain a flocculent fog effect.
[0248] In an exemplary embodiment of the present invention, the method further comprises:
[0249] The floating fog effect and the second map are mixed to obtain a brushed fog effect.
[0250] In an exemplary embodiment of the present invention, the step of adjusting the light and dark levels of the scattered fog effect to obtain a target fog effect includes:
[0251] The scattering fog effect and the second map are mixed to obtain a mixed fog effect, and a self-luminous map is obtained;
[0252] The mixed fog effect and the self-luminous map are adjusted in terms of light and dark levels to obtain a target fog effect.
[0253] In an exemplary embodiment of the present invention, the method further comprises:
[0254] The floating fog effect and the third map are mixed to obtain a brushed fog effect.
[0255] In an exemplary embodiment of the present invention, the step of adjusting the light and dark levels of the scattered fog effect to obtain a target fog effect includes:
[0256] The scattering fog effect and the third map are mixed to obtain a mixed fog effect, and a self-luminous map is obtained;
[0257] The mixed fog effect and the self-luminous map are adjusted in terms of light and dark levels to obtain a target fog effect.
[0258] In an exemplary embodiment of the present invention, the process of obtaining a scattered fog effect by performing a light offset process on the drawn wire fog effect includes:
[0259] Determine the light direction corresponding to the drawn wire fog effect, and copy the drawn wire fog effect to obtain a backup fog effect;
[0260] Perform an offset process on the backup fog effect according to the light direction to obtain an offset fog effect, and perform a brightness adjustment process on the offset fog effect to obtain a brightness fog effect, so as to determine that the drawn wire fog effect and the brightness fog effect are scattered fog effects.
[0261] In an exemplary embodiment of the present invention, the process of performing an offset process on the backup fog effect according to the light direction to obtain an offset fog effect, and performing a brightness adjustment process on the offset fog effect to obtain a brightness fog effect includes:
[0262] Perform an offset process on the backup fog effect according to the light direction to obtain an offset fog effect, and perform a brightness increase process on the offset fog effect to obtain a brightness fog effect; or
[0263] Perform an offset process on the backup fog effect according to the opposite direction of the light direction to obtain an offset fog effect, and perform a brightness decrease process on the offset fog effect to obtain a brightness fog effect.
[0264] In an exemplary embodiment of the present invention, the process of performing a light and dark level adjustment on the scattered fog effect to obtain a target fog effect includes:
[0265] Perform a mixing process on the scattered fog effect and the first texture map to obtain a mixed fog effect, and obtain a self-illuminating texture map;
[0266] Perform a light and dark level adjustment on the mixed fog effect and the self-illuminating texture map to obtain a target fog effect.
[0267] The specific details of the above texture processing device 2200 have been described in detail in the corresponding texture processing method, so they will not be elaborated here.
[0268] It should be noted that although several modules or units of the texture processing device 2200 are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0269] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0270] Next, refer toFigure 23 The electronic device 2300 according to this embodiment of the present invention will be described. Figure 23 The illustrated electronic device 2300 is merely an example and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
[0271] As Figure 23 shown, the electronic device 2300 is presented in the form of a general-purpose computing device. The components of the electronic device 2300 may include, but are not limited to: at least one of the above-mentioned processing units 2310, at least one of the above-mentioned storage units 2320, a bus 2330 connecting different system components (including the storage unit 2320 and the processing unit 2310), and a display unit 2340.
[0272] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 2310, so that the processing unit 2310 executes the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification.
[0273] The storage unit 2320 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 2321 and / or a cache storage unit 2322, and may further include a read-only storage unit (ROM) 2323.
[0274] The storage unit 2320 may also include a program / utility 2324 having a set (at least one) of program modules 2325. Such program modules 2325 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. The implementation of a network environment may be included in each or some combination of these examples.
[0275] The bus 2330 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any bus structure in a variety of bus structures.
[0276] The electronic device 2300 can also communicate with one or more external devices 2500 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 2300, and / or communicate with any device that enables the electronic device 2300 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 2350. Moreover, the electronic device 2300 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 2360. As shown in the figure, the network adapter 2360 communicates with other modules of the electronic device 2300 through the bus 2330. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 2300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0277] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by the way of software combined with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0278] In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium, on which a program product capable of implementing the above method of this specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification.
[0279] Reference Figure 24 As shown, a program product 2400 for implementing the above method according to an embodiment of the present invention is described. It can adopt a portable compact disc read-only memory (CD-ROM) and include program code, and can run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
[0280] The program product may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0281] The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0282] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0283] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0284] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
Claims
1. A method for processing a texture map, characterized in that, The method includes: Obtaining a first texture map and a fog effect material, and performing a blending process on the first texture map and the fog effect material to generate a flocculent fog effect; Performing a texture movement process on the flocculent fog effect to obtain a floating fog effect, and performing a blending process on the floating fog effect and the first texture map to obtain a wire-drawing state fog effect; wherein, performing a texture movement process on the flocculent fog effect to obtain a floating fog effect includes: using the grabbed time attribute in the UE4 engine to move the world coordinate position grabbed during the previous blending operation, so that the flocculent fog effect moves to obtain a floating fog effect; Determining the illumination direction corresponding to the wire-drawing state fog effect, and copying the wire-drawing state fog effect to obtain a backup fog effect; performing an offset process on the backup fog effect according to the illumination direction to obtain an offset fog effect, and performing a brightness adjustment process on the offset fog effect to obtain a brightness fog effect, so as to determine the wire-drawing state fog effect and the brightness fog effect as a scattering fog effect, and performing a light and shade level adjustment on the scattering fog effect to obtain a target fog effect; wherein, performing a light and shade level adjustment on the scattering fog effect to obtain a target fog effect includes: performing a blending process on the scattering fog effect and the first texture map to obtain a blended fog effect, and obtaining a self-illuminating texture map; performing a light and shade level adjustment on the blended fog effect and the self-illuminating texture map to obtain a target fog effect.
2. The method for processing a sticker according to claim 1, wherein The obtaining the first texture map and the fog effect material includes: Obtaining a single patch model, and obtaining the material texture map of the single patch model; Performing a synthesis process on the material texture map to obtain a first texture map, and obtaining a fog effect material.
3. The sticker processing method according to claim 1, characterized in that The performing a blending process on the first texture map and the fog effect material to generate a flocculent fog effect includes: Performing a blending process on the first texture map and the fog effect material to obtain an original fog effect, and obtaining a second texture map; Performing an overlay process on the second texture map and the original fog effect to obtain a blocky fog effect, and obtaining a third texture map; Performing an overlay process on the third texture map and the blocky fog effect to obtain a flocculent fog effect.
4. The sticker processing method according to claim 3, characterized in that The method further includes: Performing a blending process on the floating fog effect and the second texture map to obtain a wire-drawing state fog effect.
5. The sticker processing method according to claim 4, wherein The performing a light and shade level adjustment on the scattering fog effect to obtain a target fog effect includes: Performing a blending process on the scattering fog effect and the second texture map to obtain a blended fog effect, and obtaining a self-illuminating texture map; Performing a light and shade level adjustment on the blended fog effect and the self-illuminating texture map to obtain a target fog effect.
6. The sticker processing method according to claim 3, wherein The method further includes: Performing a blending process on the floating fog effect and the third texture map to obtain a wire-drawing state fog effect.
7. The sticker processing method according to claim 6, wherein The performing a light and shade level adjustment on the scattering fog effect to obtain a target fog effect includes: Performing a blending process on the scattering fog effect and the third texture map to obtain a blended fog effect, and obtaining a self-illuminating texture map; Performing a light and shade level adjustment on the blended fog effect and the self-illuminating texture map to obtain a target fog effect.
8. The method for processing a sticker according to claim 1, wherein The performing an offset process on the backup fog effect according to the illumination direction to obtain an offset fog effect, and performing a brightness adjustment process on the offset fog effect to obtain a brightness fog effect includes: Performing an offset process on the backup fog effect according to the illumination direction to obtain an offset fog effect, and performing a brightness increasing process on the offset fog effect to obtain a brightness fog effect; or Offset the backup fog effect in the opposite direction of the described light direction to obtain an offset fog effect, and perform a brightness reduction process on the offset fog effect to obtain a brightness fog effect.
9. A texture processing device, characterized in that, It includes: A mixing processing module, configured to obtain a first texture map and a fog effect material, and perform a mixing process on the first texture map and the fog effect material to generate a flocculent fog effect; A moving processing module, configured to perform a texture movement process on the flocculent fog effect to obtain a floating fog effect, and perform a mixing process on the floating fog effect and the first texture map to obtain a wire drawing state fog effect; wherein, performing a texture movement process on the flocculent fog effect to obtain a floating fog effect includes: using the captured time attribute in the UE4 engine to move the world coordinate position captured during the previous mixing operation, so that the flocculent fog effect moves to obtain a floating fog effect; A fog effect adjustment module, configured to determine the light direction corresponding to the wire drawing state fog effect, and copy the wire drawing state fog effect to obtain a backup fog effect; offset the backup fog effect according to the light direction to obtain an offset fog effect, and perform a brightness adjustment process on the offset fog effect to obtain a brightness fog effect, so as to determine the wire drawing state fog effect and the brightness fog effect as scattering fog effects, and perform a light and dark level adjustment on the scattering fog effect to obtain a target fog effect; wherein, performing a light and dark level adjustment on the scattering fog effect to obtain a target fog effect includes: performing a mixing process on the scattering fog effect and the first texture map to obtain a mixed fog effect, and obtaining a self-illuminating texture map; performing a light and dark level adjustment on the mixed fog effect and the self-illuminating texture map to obtain a target fog effect.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the texture map processing method described in any one of claims 1-8.
11. An electronic device, characterized in that, It includes: A processor; A memory for storing executable instructions of the processor; Wherein, the processor is configured to execute the texture map processing method described in any one of claims 1-8 by executing the executable instructions.
Citation Information
Patent Citations
Image fog effect simulation method based on depth
CN103500460A
NGUI-based multi-layer material rendering method and device
CN111061480A