Aurora effect generation method and device and electronic equipment
By dynamic processing of aurora trajectory and noise map displacement mapping, aurora animation rendering with texture details is generated, and virtual camera shooting and color adjustment is used to solve the problems of cumbersome production and limited effects in the existing technology, achieving high-quality and flexible aurora effect generation.
Patent Information
- Application Number
- CN202411676079.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-05-06
AI Technical Summary
When simulating and producing aurora effects, the process is cumbersome and the rendering cost is high. The dynamic effect is limited by the material itself, resulting in poor aurora effects.
By dynamically processing the acquired target aurora trajectory, an aurora animation rendering is generated, and a preset noise map is used to perform permutation mapping to increase texture details. Set the processed aurora animation image on the preset card, shoot with a virtual camera, and adjust the color in response to the color configuration command.
Without the help of other aurora materials, texture materials are generated through noise maps and aurora effects are quickly created through aurora tracks, improving the flexibility and quality of aurora effects generation.
Smart Images

Figure CN119941968A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data rendering, and in particular to a method, device and electronic device for generating aurora effects. Background Art
[0002] In some projects that need to add aurora effects, the director has high requirements for the shape distribution and dynamic effects of the aurora. If it is simulated in Houdini, special effects material debugging and rendering are required. The process is cumbersome and the rendering cost is high. If it is done through material splicing, the dynamic effect is greatly limited by the material itself, resulting in poor aurora effect. Summary of the invention
[0003] The purpose of the present disclosure is to provide a method, device and electronic device for generating an aurora effect, so as to improve the flexibility of generating the aurora effect while ensuring the quality of the aurora effect.
[0004] In a first aspect, the present disclosure provides a method for generating an aurora effect, the method comprising: dynamically processing an acquired target aurora trajectory to obtain an aurora motion effect image; wherein the target aurora trajectory in the aurora motion effect image has a flow effect; performing displacement mapping processing on the aurora motion effect image through a preset noise image to obtain an aurora motion effect image with texture details; setting the aurora motion effect image with texture details on a preset card, and setting the preset card at a designated position in front of a virtual camera, so that the virtual camera can shoot the aurora motion effect image with texture details on the preset card in a shooting picture through the preset card; and performing color configuration on the aurora motion effect image in the shooting picture in response to a color configuration instruction to obtain a shooting picture with an aurora effect.
[0005] In a second aspect, the present disclosure provides a color-changing device in a game, the device comprising: a motion effect generation module, for dynamically processing an acquired target aurora trajectory to obtain an aurora motion effect image; wherein the target aurora trajectory in the aurora motion effect image has a flow effect; a displacement mapping module, for performing displacement mapping processing on the aurora motion effect image through a preset noise image, to obtain an aurora motion effect image with texture details; an aurora setting module, for setting the aurora motion effect image with texture details on a preset card, and setting the preset card at a designated position in front of a virtual camera, so that the virtual camera can shoot the aurora motion effect image with texture details on the preset card in a shooting picture through the preset card; a color adjustment module, for performing color configuration on the aurora motion effect image in the shooting picture in response to a color configuration instruction, to obtain a shooting picture with an aurora effect.
[0006] In a third aspect, the present disclosure provides an electronic device, which includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned method for generating the aurora effect.
[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for generating the aurora effect.
[0008] The embodiments of the present disclosure bring the following beneficial effects:
[0009] The present disclosure provides a method, device and electronic device for generating an aurora effect. First, the acquired target aurora trajectory is dynamically processed to obtain an aurora motion effect image; wherein the target aurora trajectory in the aurora motion effect image has a flow effect; then, the aurora motion effect image is subjected to displacement mapping processing through a preset noise map to obtain an aurora motion effect image with texture details; then, the aurora motion effect image with texture details is set on a preset card, and the preset card is set at a specified position in front of a virtual camera, so that the virtual camera can shoot the aurora motion effect image with texture details on the preset card in a shooting picture through the preset card; then, in response to a color configuration instruction, the aurora motion effect image in the shooting picture is color configured to obtain a shooting picture with an aurora effect. This method can generate texture materials through noise maps and quickly produce aurora effects through aurora trajectories without the help of other aurora materials, and this method has a high degree of production freedom.
[0010] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0011] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, the following specifically cites preferred implementation modes and describes them in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 A flow chart of a method for generating an aurora effect provided in an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of a target aurora trajectory provided by an embodiment of the present disclosure;
[0015] Figure 3 A schematic diagram of the relationship between a preset card and a virtual camera provided in an embodiment of the present disclosure;
[0016] Figure 4 A schematic diagram showing aurora tracks captured by a virtual camera provided by an embodiment of the present disclosure through a preset card;
[0017] Figure 5 A schematic diagram of synthesizing an aurora effect in a shooting picture provided by an embodiment of the present disclosure;
[0018] Figure 6 A schematic diagram of a preset card for adding a light source effect to an aurora trail provided in an embodiment of the present disclosure;
[0019] Figure 7 A schematic diagram of generating a first graph provided by an embodiment of the present disclosure;
[0020] Figure 8 A comparison diagram of a preset noise image and a second image provided in an embodiment of the present disclosure;
[0021] Fig. 9 A schematic diagram of the structure of a device for generating an aurora effect provided in an embodiment of the present disclosure;
[0022] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
[0023] Figure Number:
[0024] 1-Virtual camera; 2-Preset card. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure described and shown in the drawings here can be arranged and designed in various different configurations.
[0026] Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents selected embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure.
[0027] The related technology provides three methods for producing aurora effects:
[0028] Method 1 is to use the aurora material captured by video to track and synthesize it with the real-shot material in the post-production stage to obtain the real-shot material with aurora effect. However, this method is subject to many limitations of the real-shot material, such as the camera shooting angle, material clarity, etc.
[0029] Method 2: Use 3D software such as Maya and Houdini to simulate special effects, assign the simulated aurora motion effects to materials, and finally synthesize the camera rendering sequence obtained through 3D tracking into the real shot. However, using 3D software such as Maya and Houdini to simulate is time-consuming and costly, and the final effect can only be seen after the aurora motion is rendered and synthesized, which makes the whole process inconvenient.
[0030] Method three is to use aurora pictures to add displacement to simulate dynamic effects, and then match the actual footage through tracking. However, this method does not provide enough dynamic details for the aurora, and there is little room for post-adjustment.
[0031] Based on the above problems, the embodiments of the present invention provide a method, device and electronic device for generating an aurora effect. The technology can be applied to the scene of performing aurora rendering on the captured material.
[0032] In order to facilitate understanding of the embodiment of the present invention, a method for generating an aurora effect provided by the embodiment of the present invention is first described in detail. Figure 1 As shown, the method includes the following specific processes:
[0033] Step S102, dynamically processing the acquired target aurora trajectory to obtain an aurora dynamic effect graph; wherein the target aurora trajectory in the aurora dynamic effect graph has a flow effect.
[0034] In the specific implementation, after obtaining the target aurora track, it is necessary to dynamically process the target aurora track in order to add turbulent dynamics to the target aurora track and simulate the effect of the slow flow of the aurora, thereby obtaining an aurora dynamic effect diagram of the target aurora track with a dynamic flow effect. Specifically, the above dynamic processing method can be determined according to R&D needs, for example, it can be to add noise or waveforms to the target aurora track, or it can be to add a disturbance effect to the target aurora track through the corresponding disturbance function of the software.
[0035] It should be noted that in the prior art, when making the dynamic effect of the aurora in the special effects link, it is necessary to adjust the dynamics first, and then render it to see the effect. If the dynamics are not good, it is necessary to return to the special effects link to continue making it, and then render it again to see the dynamic effect. The modification process is to go back and forth to make it, and the whole process is very cumbersome, and the rendering time is long. The present disclosure can use the post-production software nuke, and use the turbulence function in nuke to generate the dynamic disturbance effect of the target aurora trajectory. This method is to directly perform disturbance processing on the 2D picture (that is, the picture containing the target aurora trajectory), and the dynamic effect can be displayed in a WYSIWYG way, without spending time rendering, which helps to quickly adjust the simulated aurora dynamic effect.
[0036] The method for obtaining the above-mentioned target aurora trajectory can be determined according to research and development needs. For example, the target aurora trajectory can be a trajectory of any shape input by the user, or a target aurora trajectory drawn by the user using a brush tool. The brush tool is an important tool in image editing, which is used to draw or fill images. The user can use the brush tool to draw an aurora trajectory of any shape, and determine the drawn aurora trajectory as the target aurora trajectory, such as Figure 2 FIG. 1 is a schematic diagram of a target aurora trajectory provided by an embodiment of the present invention. Figure 2 The multiple gray and white lines in the image are target auroral trails.
[0037] Step S104, performing displacement mapping processing on the aurora motion effect image through a preset noise image to obtain an aurora motion effect image with texture details.
[0038] In specific implementation, the above-mentioned preset noise map is set according to user needs, and the preset noise map may include one or more. Use the preset noise map to perform brushed displacement on the target aurora track in the aurora animation image to increase the texture details of the target aurora track, so that the subsequent aurora effect has more light and dark changes. Among them, the processing method corresponding to the above-mentioned displacement mapping processing can be determined according to research and development needs. For example, the displacement mapping processing may include pixel overlay processing, pixel mapping and displacement processing.
[0039] Step S106, setting the aurora animation image with texture details on a preset card, and setting the preset card at a designated position in front of the virtual camera, so that the virtual camera can capture the aurora animation image with texture details on the preset card in the shooting screen through the preset card.
[0040] In the specific implementation, after obtaining the aurora motion effect image with texture details, a preset card can be created. The preset card is a three-dimensional card in nuke. The three-dimensional card is a basic three-dimensional geometric body. It is a plane object that can be created and used in three-dimensional space. Then the aurora motion effect image with texture details is pasted into the preset card, and the rotation displacement perspective of the preset card in front of the virtual camera is adjusted to match the camera perspective of the real shot material (equivalent to the above-mentioned shooting screen), so that the virtual camera can shoot the aurora motion effect image with texture details on the preset card onto the real shot material through the preset card.
[0041] like Figure 3 FIG. 1 is a schematic diagram showing the relationship between a preset card and a virtual camera provided by the present invention. Figure 3 The number 1 is the virtual camera, and the number 2 corresponds to the preset card. The preset card is set at a specified position in front of the virtual camera. The specified position enables the virtual camera to shoot through the preset card and project the aurora track in the preset card to the position in the shooting screen where the aurora needs to be simulated. Figure 4 FIG. 1 is a schematic diagram showing the aurora trajectory captured by a virtual camera provided by the present invention through a preset card. Figure 4 The left image in the figure is an animated aurora with texture details. Figure 4 The image on the right is the style of the aurora trail captured by the virtual camera through the preset card set at the specified position. Since the aurora appears in the sky, the direction of the aurora trail in the preset card needs to be adjusted so that the aurora effect appears in the sky in the picture captured by the virtual camera through the preset card.
[0042] like Figure 5 FIG. 1 is a schematic diagram of synthesizing an aurora effect in a shooting picture provided by an embodiment of the present disclosure. Figure 5 The gray track displayed in the sky above the shooting picture is the simulated aurora effect. This method can view the aurora effect in real time and adjust the aurora effect in real time.
[0043] Step S108, in response to the color configuration instruction, color configuration is performed on the aurora dynamic effect image in the shooting picture to obtain a shooting picture with aurora effect.
[0044] In the specific implementation, users can set the aurora trail in the aurora animation to any color as needed. For example, the aurora trail can be set to blue, purple or other composite colors, so that the aurora effect can be simulated more realistically in the shooting picture.
[0045] The above-mentioned method for generating aurora effects can generate texture materials through noise maps and quickly produce aurora effects through aurora tracks without the help of other aurora materials. This method has a high degree of freedom in production.
[0046] The following embodiments are used to describe the method of adding aurora motion effects and the method of adding wire drawing effects.
[0047] Specifically, the above-mentioned specific process of dynamically processing the target aurora trajectory to obtain the aurora motion effect diagram may include: adding turbulent noise to the target aurora trajectory, and adjusting the perturbation parameters of the turbulent noise to obtain the aurora motion effect diagram; wherein the perturbation parameters include at least one of the following: perturbation density, perturbation intensity and perturbation speed.
[0048] In the specific implementation, the disturbance parameters of the turbulent noise added to the target aurora trajectory are adjusted in the post-production software nuke to quickly control the dynamic effect. This method can see the aurora dynamic effect in real time, without rendering to view the dynamic effect, omitting the rendering time and avoiding the tedious steps of production. Among them, the above disturbance parameters include at least the following parameters: disturbance density, disturbance intensity and disturbance speed. Among them, the disturbance density can also be called frequency, which determines the density of turbulent noise. Higher frequencies will produce more details, while lower frequencies will generate larger turbulent structures. The disturbance intensity can also be called amplitude, which controls the intensity of turbulent disturbances. Higher amplitudes will produce greater turbulence, while lower amplitudes will produce weaker turbulence; the disturbance speed controls the speed of turbulent disturbances.
[0049] Furthermore, after setting the preset card with the aurora motion effect graphic pasted on it at a designated position in front of the virtual camera, it is also possible to respond to the effect adding instruction to increase the light source effect of the aurora motion effect graphic in the shooting picture; wherein the light source effect is the aurora track in the aurora motion effect graphic that simulates the effect of light shining from a specific direction.
[0050] In the specific implementation, in order to make the simulated aurora effect more realistic, a light source effect can be added to the aurora track in the aurora animation diagram. The present disclosure can add a light source effect to the aurora track through the Godray node, that is, add a Godray node to the preset card with the aurora animation diagram, so that the aurora track produces a brushed effect. Among them, the Godray node is used in the Nuke software to add an effect similar to God's light, also known as the directional blur effect. This effect can simulate the effect of light irradiating from a specific direction in the production of visual effects, similar to the "directional blur" effect in AE (equivalent to the effect of brushing up and down), but the direction can be selected; through the Godray node, the light source effect in the scene can be enhanced, making the objects in the scene look more vivid and real.
[0051] like Figure 6FIG. 1 is a schematic diagram of a preset card for adding a light source effect to an aurora trail provided by an embodiment of the present invention. Figure 6 Is for Figure 4 A schematic diagram of the aurora trail after adding the light source effect. Figure 6 There is an upward-drawn effect on the aurora trails in the video.
[0052] The following embodiments are used to describe a method for generating an aurora animation with texture details.
[0053] Specifically, the specific process of performing displacement mapping processing on the aurora motion effect image through the preset noise map to obtain the aurora motion effect image with texture details can be achieved through the following steps 10-12:
[0054] Step 10, performing a first replacement process on the aurora dynamic effect image and the preset texture map to obtain a first image.
[0055] The above-mentioned preset texture map is generated by a preset function, and the preset texture map is a two-dimensional UV map. The above-mentioned preset texture map can be generated in the following manner: based on the preset image resolution, determine the height and width of the preset texture map; perform the following operations for each pixel in the preset texture map: based on the coordinate value and width corresponding to the first axis in the pixel coordinates corresponding to the current pixel, obtain the first color value corresponding to the current pixel in the first color channel; based on the coordinate value and height corresponding to the second axis in the pixel coordinates corresponding to the current pixel, obtain the second color value corresponding to the current pixel in the second color channel; based on the first color value and the second color value, obtain the color value corresponding to the current pixel in the preset texture map.
[0056] In practical applications, the preset image resolution matches the image size of the picture taken by the virtual camera. For example, the preset image resolution can be 1024*1024, or other resolutions, which can be determined according to research and development requirements. The lower left corner of the preset texture map can be used as the origin to establish a rectangular coordinate system, so as to obtain the pixel coordinates corresponding to each pixel in the preset texture map. The specific axis of the first and second axes can be determined according to research and development requirements, and the specific color channels of the RGB channels of the first and second color channels can also be determined according to research and development requirements. For example, the first axis is the X-axis, the second axis is the Y-axis, the first color channel is the red channel, and the second color channel is the green channel.
[0057] In an optional embodiment, the specific process of obtaining the first color value corresponding to the current pixel point in the first color channel based on the coordinate value and width corresponding to the first axis in the pixel coordinates corresponding to the current pixel point may include: adding the coordinate value corresponding to the first axis to a preset value to obtain an addition result; dividing the addition result by the width to obtain a division result; and determining the first color value corresponding to the current pixel point in the first color channel based on the division result. Here, dividing the addition result by the width is equivalent to normalizing the coordinate value of the first axis so that the normalized value corresponds to the color value of the first color channel. The preset value can be determined according to research and development needs. For example, the preset value can be 0 or 0.5.
[0058] Similarly, the coordinate value corresponding to the second axis is added to the preset value to obtain an addition result; the addition result is divided by the height to obtain a division result; based on the division result, the second color value corresponding to the current pixel in the second color channel is determined. Then, the color values of the first color value and the second color value corresponding to the current pixel are added to obtain the color value corresponding to the current pixel in the preset texture map.
[0059] In a specific implementation, the above-mentioned first replacement processing may be to perform pixel superposition of the aurora motion effect image and the preset texture map to obtain a superimposed image, and then perform opacity processing on the aurora track in the superimposed image to obtain the first image. The above-mentioned first replacement processing may also be to perform opacity processing on the target aurora track in the aurora motion effect image to obtain a processed aurora motion effect image; and perform pixel addition of the processed aurora motion effect image and the preset texture map to obtain the first image. Among them, the opacity processing is only performed on the aurora track to make the aurora track transparent, so that the texture details generated subsequently are more natural.
[0060] For example, Figure 7 FIG. 1 is a schematic diagram of generating a first graph provided by an embodiment of the present invention. Figure 7 The left image in the figure is the superimposed image generated by superimposing the preset texture map and the aurora dynamic effect map. Figure 7 The right image in is the first image obtained by performing opacity processing on the aurora tracks in the superimposed images.
[0061] Step 11, performing a second replacement process on the preset noise image and the first image to obtain a second image.
[0062] In a specific implementation, the preset noise map is replaced and mapped with the first map, so that in the preset noise map, the pixel position corresponding to the aurora track in the first map generates a distortion mark, and the preset noise map that generates the distortion mark is determined as the second map. The distortion mark generated at the position corresponding to the aurora track in the second map increases the brushed details of the noise map. Figure 8FIG. 4 is a comparison diagram of a preset noise image and a second image provided by an embodiment of the present invention. Figure 8 The left image in the figure is the preset noise map. Figure 8 The right image in the figure is a second image obtained by replacing the preset noise image with the first image. The second image has more brushed details than the preset noise image.
[0063] In a specific embodiment, the specific process of performing a second replacement process on the preset noise map and the first map to obtain the second map may include: mapping the texture information in the first map to the preset noise map to obtain the mapped preset noise map, and determining the mapped preset noise map as the second map. This method can be implemented through the stmap node in nuke, which can map the texture information in the first map to the UV channel in the preset noise map, perform reverse calculation, correspond to the 0...1 map space, and then remap it back to the preset noise map by changing the map to obtain the second map.
[0064] Step 12, masking the preset noise image, the second image and the aurora motion effect image to obtain an aurora motion effect image with texture details.
[0065] In specific implementation, the above-mentioned mask processing is an image processing technology that uses masks to control the display and hiding parts of an image to achieve a specific visual effect. The basic principle of mask processing is to use black, white and different degrees of gray to control the display degree of the picture. Mask processing allows users to achieve special layer overlay effects without destroying the original image. It also has the functions of protection and isolation, that is, the areas in the image that do not need to be edited can be protected. Specifically, in the aurora animation with texture details, only the aurora trajectory position corresponds to the preset noise map and the pattern corresponding to the second image, and the rest is black or white.
[0066] In practical applications, the preset noise image and the aurora motion effect image can be masked to obtain the processing result image, and the processing result image can be masked with the second image to obtain the aurora motion effect image with texture details; the preset noise image can also be superimposed with the second image to obtain the superimposed result, and then the superimposed result and the laser motion effect image can be masked to obtain the aurora motion effect image with texture details. Among them, the aurora track in the aurora motion effect image is the display part in the mask.
[0067] In an optional embodiment, the preset noise map includes at least one; the preset noise map is generated in the following manner: in response to a parameter adjustment operation on a default noise map, a preset noise map with texture details is generated; wherein the parameters of the default noise map include at least one of the following: noise type, brightness, and contrast. wherein different noise types correspond to different noise particles, and increasing brightness and reducing contrast can enhance noise details and make noise texture clearer.
[0068] In a specific embodiment, the preset noise maps in step 11 and step 12 are different, that is, the present disclosure includes two preset noise maps. When generating a preset noise map, first create a noise node in nuke to obtain a default noise map corresponding to the default parameters, then adjust it to the target noise type and adjust the brightness and contrast to obtain the first preset noise map; adjust the brightness and contrast on the basis of the default noise map to obtain the second preset noise map. This method can adjust the default noise map to the density of small particles, so as to increase the particle texture details of the aurora track in the above step 12. Among them, the first preset noise map and the second noise map have different noise types, different noise densities, different brightness and contrast, which can be understood as two different types of noise maps. Specifically, the above-mentioned first preset noise map can be the preset noise map used in step 11, and the above-mentioned second preset noise map can be the preset noise map used in step 12.
[0069] The above method does not require the use of other external plug-ins and image materials. It only needs to interact with multiple Noises (equivalent to the above preset noise map) in Nuke, allowing users to customize the aurora effect in Nuke according to the brush, and can quickly view the final effect after adjustment and synthesis.
[0070] Corresponding to the above method embodiment, the embodiment of the present invention also provides a device for generating an aurora effect, such as Fig. 9 As shown, the device comprises:
[0071] The dynamic effect generation module 90 is used to dynamically process the acquired target aurora trajectory to obtain an aurora dynamic effect graph; wherein the target aurora trajectory in the aurora dynamic effect graph has a flow effect.
[0072] The displacement mapping module 91 is used to perform displacement mapping processing on the aurora motion effect image through a preset noise image to obtain an aurora motion effect image with texture details.
[0073] The aurora setting module 92 is used to set an aurora dynamic effect image with texture details on a preset card, and set the preset card at a specified position in front of the virtual camera, so that the virtual camera can capture the aurora dynamic effect image with texture details on the preset card in the shooting screen through the preset card.
[0074] The color adjustment module 93 is used to perform color configuration on the aurora dynamic effect image in the shooting picture in response to the color configuration instruction to obtain a shooting picture with aurora effect.
[0075] The above-mentioned method and device for generating aurora effects can generate texture materials through noise maps and quickly produce aurora effects through aurora tracks without the help of other aurora materials. This method has a high degree of freedom in production.
[0076] Specifically, the above-mentioned device also includes an effect adding module, which is used to: respond to an effect adding instruction to increase the light source effect of the aurora animation in the captured picture; wherein the light source effect is the aurora trajectory in the aurora animation to simulate the effect of light irradiating from a specific direction.
[0077] Furthermore, the above-mentioned motion effect generation module 90 is used to: add turbulence noise to the target aurora trajectory, and adjust the disturbance parameters of the turbulence noise to obtain the aurora motion effect diagram; wherein the disturbance parameters include at least one of the following: disturbance density, disturbance intensity and disturbance speed.
[0078] Furthermore, the above-mentioned preset noise map includes at least one; based on this, the above-mentioned device also includes a noise generation module, which is used to: respond to the parameter adjustment operation of the default noise map, and generate a preset noise map with texture details; wherein the parameters of the default noise map include at least one of the following: noise type, brightness and contrast.
[0079] Furthermore, the above-mentioned replacement mapping module 91 is used to: perform a first replacement process on the aurora motion effect image and the preset texture map to obtain a first image; perform a second replacement process on the preset noise map and the first image to obtain a second image; perform masking process on the preset noise map, the second image and the aurora motion effect image to obtain an aurora motion effect image with texture details.
[0080] Furthermore, the above-mentioned texture map generation module is used to: determine the height and width of the preset texture map based on the preset image resolution; perform the following operations for each pixel point in the preset texture map: obtain the first color value corresponding to the current pixel point in the first color channel based on the coordinate value and width corresponding to the first axis in the pixel coordinates corresponding to the current pixel point; obtain the second color value corresponding to the current pixel point in the second color channel based on the coordinate value and height corresponding to the second axis in the pixel coordinates corresponding to the current pixel point; obtain the color value corresponding to the current pixel point in the preset texture map based on the first color value and the second color value.
[0081] Furthermore, the above-mentioned replacement mapping module 91 is used to: perform opacity processing on the target aurora track in the aurora motion effect image to obtain a processed aurora motion effect image; and perform pixel addition on the processed aurora motion effect image and a preset texture map image to obtain a first image.
[0082] Furthermore, the replacement mapping module 91 is used to: map the texture information in the first image into a preset noise image to obtain a mapped preset noise image, and determine the mapped preset noise image as the second image.
[0083] Furthermore, the above-mentioned device also includes a trajectory drawing module, which is used to: obtain the target aurora trajectory drawn by a brush tool before dynamically processing the acquired target aurora trajectory to obtain the aurora dynamic effect image.
[0084] The device for generating aurora effects provided in the embodiments of the present disclosure has the same implementation principle and technical effects as those in the aforementioned method embodiments. For the sake of brief description, reference may be made to the corresponding contents in the aforementioned method embodiments for matters not mentioned in the device embodiments.
[0085] The present disclosure also provides an electronic device, such as Fig.10 As shown, the electronic device includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned method for generating the aurora effect.
[0086] Specifically, the above-mentioned method for generating the aurora effect includes: dynamically processing the acquired target aurora trajectory to obtain an aurora motion effect image; wherein the target aurora trajectory in the aurora motion effect image has a flow effect; performing displacement mapping processing on the aurora motion effect image through a preset noise image to obtain an aurora motion effect image with texture details; setting the aurora motion effect image with texture details on a preset card, and setting the preset card at a designated position in front of the virtual camera, so that the virtual camera can pass through the preset card and capture the aurora motion effect image with texture details on the preset card in the shooting picture; in response to the color configuration instruction, color configuring the aurora motion effect image in the shooting picture to obtain a shooting picture with an aurora effect.
[0087] The above-mentioned method for generating aurora effects can generate texture materials through noise maps and quickly produce aurora effects through aurora tracks without the help of other aurora materials. This method has a high degree of freedom in production.
[0088] In an optional embodiment, the above method also includes: in response to an effect adding instruction, adding a light source effect to the aurora animation graphic in the captured image; wherein the light source effect is the aurora track in the aurora animation graphic that simulates the effect of light irradiating from a specific direction.
[0089] In an optional embodiment, the above-mentioned step of dynamically processing the target aurora trajectory to obtain the aurora motion effect diagram includes: adding turbulent noise to the target aurora trajectory, and adjusting the disturbance parameters of the turbulent noise to obtain the aurora motion effect diagram; wherein the disturbance parameters include at least one of the following: disturbance density, disturbance intensity and disturbance speed.
[0090] In an optional embodiment, the above-mentioned preset noise map includes at least one; the preset noise map is generated in the following manner: in response to a parameter adjustment operation on a default noise map, a preset noise map with texture details is generated; wherein the parameters of the default noise map include at least one of the following: noise type, brightness and contrast.
[0091] In an optional embodiment, the above-mentioned step of performing replacement mapping processing on the aurora motion effect image through a preset noise map to obtain an aurora motion effect image with texture details includes: performing a first replacement processing on the aurora motion effect image and a preset texture map to obtain a first image; performing a second replacement processing on the preset noise map and the first image to obtain a second image; and performing masking processing on the preset noise map, the second image and the aurora motion effect image to obtain an aurora motion effect image with texture details.
[0092] In an optional embodiment, the above-mentioned preset texture map is generated in the following manner: based on the preset image resolution, the height and width of the preset texture map are determined; for each pixel point in the preset texture map, the following operations are performed: based on the coordinate value and width corresponding to the first axis in the pixel coordinates corresponding to the current pixel point, the first color value corresponding to the current pixel point in the first color channel is obtained; based on the coordinate value and height corresponding to the second axis in the pixel coordinates corresponding to the current pixel point, the second color value corresponding to the current pixel point in the second color channel is obtained; based on the first color value and the second color value, the color value corresponding to the current pixel point in the preset texture map is obtained.
[0093] In an optional embodiment, the above-mentioned step of performing a first replacement processing on the aurora motion effect image and the preset texture map to obtain the first image includes: performing opacity processing on the target aurora track in the aurora motion effect image to obtain a processed aurora motion effect image; adding pixels of the processed aurora motion effect image and the preset texture map image to obtain the first image.
[0094] In an optional embodiment, the above-mentioned step of performing a second replacement process on the preset noise map and the first map to obtain the second map includes: mapping the texture information in the first map to the preset noise map to obtain the mapped preset noise map, and determining the mapped preset noise map as the second map.
[0095] In an optional embodiment, before dynamically processing the acquired target aurora trajectory to obtain the aurora motion effect diagram, the method further includes: acquiring the target aurora trajectory drawn by a brush tool.
[0096] Further, Fig.10 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .
[0097] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0098] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 101 or the instruction in the form of software. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.
[0099] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for generating the aurora effect. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0100] Specifically, the above-mentioned method for generating the aurora effect includes: dynamically processing the acquired target aurora trajectory to obtain an aurora motion effect image; wherein the target aurora trajectory in the aurora motion effect image has a flow effect; performing displacement mapping processing on the aurora motion effect image through a preset noise image to obtain an aurora motion effect image with texture details; setting the aurora motion effect image with texture details on a preset card, and setting the preset card at a designated position in front of the virtual camera, so that the virtual camera can pass through the preset card and capture the aurora motion effect image with texture details on the preset card in the shooting picture; in response to the color configuration instruction, color configuring the aurora motion effect image in the shooting picture to obtain a shooting picture with an aurora effect.
[0101] The above-mentioned method for generating aurora effects can generate texture materials through noise maps and quickly produce aurora effects through aurora tracks without the help of other aurora materials. This method has a high degree of freedom in production.
[0102] In an optional embodiment, the above method also includes: in response to an effect adding instruction, adding a light source effect to the aurora animation graphic in the captured image; wherein the light source effect is the aurora track in the aurora animation graphic that simulates the effect of light irradiating from a specific direction.
[0103] In an optional embodiment, the above-mentioned step of dynamically processing the target aurora trajectory to obtain the aurora motion effect diagram includes: adding turbulent noise to the target aurora trajectory, and adjusting the disturbance parameters of the turbulent noise to obtain the aurora motion effect diagram; wherein the disturbance parameters include at least one of the following: disturbance density, disturbance intensity and disturbance speed.
[0104] In an optional embodiment, the above-mentioned preset noise map includes at least one; the preset noise map is generated in the following manner: in response to a parameter adjustment operation on a default noise map, a preset noise map with texture details is generated; wherein the parameters of the default noise map include at least one of the following: noise type, brightness and contrast.
[0105] In an optional embodiment, the above-mentioned step of performing replacement mapping processing on the aurora motion effect image through a preset noise map to obtain an aurora motion effect image with texture details includes: performing a first replacement processing on the aurora motion effect image and a preset texture map to obtain a first image; performing a second replacement processing on the preset noise map and the first image to obtain a second image; and performing masking processing on the preset noise map, the second image and the aurora motion effect image to obtain an aurora motion effect image with texture details.
[0106] In an optional embodiment, the above-mentioned preset texture map is generated in the following manner: based on the preset image resolution, the height and width of the preset texture map are determined; for each pixel point in the preset texture map, the following operations are performed: based on the coordinate value and width corresponding to the first axis in the pixel coordinates corresponding to the current pixel point, the first color value corresponding to the current pixel point in the first color channel is obtained; based on the coordinate value and height corresponding to the second axis in the pixel coordinates corresponding to the current pixel point, the second color value corresponding to the current pixel point in the second color channel is obtained; based on the first color value and the second color value, the color value corresponding to the current pixel point in the preset texture map is obtained.
[0107] In an optional embodiment, the above-mentioned step of performing a first replacement processing on the aurora motion effect image and the preset texture map to obtain the first image includes: performing opacity processing on the target aurora track in the aurora motion effect image to obtain a processed aurora motion effect image; adding pixels of the processed aurora motion effect image and the preset texture map image to obtain the first image.
[0108] In an optional embodiment, the above-mentioned step of performing a second replacement process on the preset noise map and the first map to obtain the second map includes: mapping the texture information in the first map to the preset noise map to obtain the mapped preset noise map, and determining the mapped preset noise map as the second map.
[0109] In an optional embodiment, before dynamically processing the acquired target aurora trajectory to obtain the aurora motion effect diagram, the method further includes: acquiring the target aurora trajectory drawn by a brush tool.
[0110] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a terminal device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0111] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0112] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for generating an aurora effect, characterized in that: The method comprises: Dynamically processing the acquired target aurora trajectory to obtain an aurora dynamic effect image; wherein the target aurora trajectory in the aurora dynamic effect image has a flow effect; Performing displacement mapping processing on the aurora motion effect image through a preset noise map to obtain an aurora motion effect image with texture details; The aurora dynamic effect image with texture details is set on a preset card, and the preset card is set at a designated position in front of the virtual camera, so that the virtual camera can shoot the aurora dynamic effect image with texture details on the preset card in the shooting picture through the preset card; In response to the color configuration instruction, the aurora dynamic effect image in the shooting picture is color configured to obtain a shooting picture with aurora effect.
2. The method according to claim 1, characterized in that The method further comprises: In response to the effect adding instruction, a light source effect is added to the aurora motion effect image in the captured image; wherein the light source effect is the aurora track in the aurora motion effect image simulating the effect of light irradiating from a specific direction.
3. The method according to claim 1, characterized in that The step of dynamically processing the target aurora trajectory to obtain an aurora dynamic effect image includes: Turbulence noise is added to the target aurora trajectory, and a disturbance parameter of the turbulence noise is adjusted to obtain an aurora motion effect diagram; wherein the disturbance parameter includes at least one of the following: disturbance density, disturbance intensity, and disturbance speed.
4. The method according to claim 1, characterized in that: The preset noise map includes at least one; the preset noise map is generated in the following manner: In response to a parameter adjustment operation on a default noise map, a preset noise map with texture details is generated; wherein the parameters of the default noise map include at least one of the following: noise type, brightness, and contrast.
5. The method according to claim 1, characterized in that The step of performing a displacement mapping process on the aurora dynamic effect image through a preset noise map to obtain the aurora dynamic effect image with texture details includes: Performing a first replacement process on the aurora dynamic effect image and the preset texture map to obtain a first image; Performing a second replacement process on the preset noise map and the first map to obtain a second map; The preset noise image, the second image and the aurora motion effect image are masked to obtain the aurora motion effect image with texture details.
6. The method according to claim 5, characterized in that The preset texture map is generated in the following way: Based on a preset image resolution, determining a height and a width of the preset texture map; For each pixel in the preset texture map, perform the following operations: Obtaining a first color value corresponding to the current pixel point in the first color channel based on a coordinate value corresponding to the first axial direction in the pixel coordinates corresponding to the current pixel point and the width; Obtaining a second color value corresponding to the current pixel point in the second color channel based on a coordinate value corresponding to the second axial direction in the pixel coordinates corresponding to the current pixel point and the height; Based on the first color value and the second color value, a color value corresponding to the current pixel in the preset texture map is obtained.
7. The method according to claim 5, characterized in that The step of performing a first replacement process on the aurora dynamic effect image and the preset texture map to obtain a first image includes: Performing opacity processing on the target aurora track in the aurora dynamic effect image to obtain a processed aurora dynamic effect image; The processed aurora dynamic effect image and the preset texture image are pixel-added to obtain the first image.
8. The method according to claim 5, characterized in that The step of performing a second replacement process on the preset noise map and the first map to obtain a second map includes: The texture information in the first image is mapped into the preset noise image to obtain a mapped preset noise image, and the mapped preset noise image is determined as the second image.
9. The method according to claim 5, characterized in that Before the step of dynamically processing the acquired target aurora trajectory to obtain an aurora dynamic effect image, the method further includes: Get the target aurora trail drawn by the brush tool.
10. A device for generating an aurora effect, characterized in that: The device comprises: A dynamic effect generation module, used for dynamically processing the acquired target aurora trajectory to obtain an aurora dynamic effect graph; wherein the target aurora trajectory in the aurora dynamic effect graph has a flow effect; A displacement mapping module, used for performing displacement mapping processing on the aurora motion effect image through a preset noise map to obtain an aurora motion effect image with texture details; An aurora setting module, used to set the aurora dynamic effect image with texture details on a preset card, and set the preset card at a designated position in front of the virtual camera, so that the virtual camera can shoot the aurora dynamic effect image with texture details on the preset card in the shooting picture through the preset card; The color adjustment module is used to perform color configuration on the aurora dynamic effect image in the shooting picture in response to the color configuration instruction to obtain a shooting picture with aurora effect.
11. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for generating the aurora effect according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method for generating the aurora effect as described in any one of claims 1 to 9.