Special effects processing method, device, electronic device and storage medium

By generating the target special effect screen in the augmented reality screen and dynamically adjusting the special effect area according to the angle changes of the shooting device, the problem of dull water surface rendering effect is solved, and a more vivid and realistic special effect display is achieved.

CN115695685BActive Publication Date: 2025-08-19BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211339065.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2025-08-19
Estimated Expiration
2042-10-28

AI Technical Summary

Technical Problem

In the prior art, the water surface rendering effect in mobile phone special effects scenes is dull, with poor vividness and authenticity.

Method used

By obtaining augmented reality screens, the target special effect screen is generated, and the display of the special effect area is dynamically adjusted when the angle of the shooting device changes, simulating the actual scene changes.

Benefits of technology

It improves the vividness and authenticity of special effects processing and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695685B_ABST
    Figure CN115695685B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide a special effects processing method, device, electronic device, and storage medium. An augmented reality picture captured by a shooting device is acquired, and a target special effects picture is generated based on the augmented reality picture; when the shooting device displays a first picture area of the augmented reality picture, the first special effects area of the target special effects picture is displayed in the first picture area; when a change in the shooting angle of the shooting device is detected, the second picture area of the augmented reality picture is displayed, and the second special effects area of the target special effects picture is displayed in the second picture area. The target special effects picture is generated by a virtual display picture, and the target special effects picture can change with the change in the shooting angle of the shooting device, thereby improving the realism and vividness of the special effects processing effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to water surface rendering technology, and more particularly to a special effects processing method, device, electronic device, and storage medium. Background Art

[0002] Currently, water surface rendering technology is often involved in terminal application entertainment scenarios. A virtual camera can be used to shoot and render water surface special effects.

[0003] In the mobile phone special effects scenario, videos are generally shot through the rear camera of the mobile phone, and the rendered water surface special effects are displayed at a fixed position on the screen. The display effect is relatively dull and less vivid, and compared with the real water surface, the special effects are less realistic. Summary of the Invention

[0004] The present disclosure provides a special effect processing method, device, electronic device and storage medium to achieve the effect of improving the vividness and authenticity of the special effect processing effect.

[0005] In a first aspect, an embodiment of the present disclosure provides a special effects processing method, wherein the method includes:

[0006] Acquire an augmented reality picture captured by a shooting device, and generate a target special effects picture based on the augmented reality picture;

[0007] When the shooting device displays the first screen area of the augmented reality screen, displaying the first special effect area of the target special effect screen in the first screen area;

[0008] When it is detected that the shooting angle of the shooting device changes, the second screen area of the augmented reality screen is displayed, and the second special effect area of the target special effect screen is displayed in the second screen area.

[0009] In a second aspect, an embodiment of the present disclosure further provides a special effects rendering device, wherein the device includes:

[0010] A special effects generation module, configured to obtain an augmented reality image captured by a camera and generate a target special effects image based on the augmented reality image;

[0011] a special effect display module, configured to display the first special effect area of the target special effect image in the first image area when the shooting device displays the first image area of the augmented reality image;

[0012] The display change module is used to display the second screen area of the augmented reality screen and display the second special effect area of the target special effect screen in the second screen area when it is detected that the shooting angle of the shooting device has changed.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, wherein the electronic device includes:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the special effect processing method according to any one of claims 1 to 9.

[0017] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to execute the special effects processing method as described in any one of claims 1-9.

[0018] The technical solution of the embodiment of the present disclosure is to obtain an augmented reality picture captured by a shooting device, generate a target special effect picture based on the augmented reality picture, and generate a target special effect picture with a sense of space through the augmented reality picture, which is more in line with the real scene; when the shooting device displays the first picture area of the augmented reality picture, the first special effect area of the target special effect picture is displayed in the first picture area, and the shooting angle is associated with the picture display area of the target special effect picture to ensure the visual presentation effect; when it is detected that the shooting angle of the shooting device has changed, the second picture area of the augmented reality picture is displayed, and the second special effect area of the target special effect picture is displayed in the second picture area. The target special effect picture is generated by a virtual display picture, and different special effect areas are displayed in corresponding picture areas based on changes in the position and angle of the shooting device. The target special effect picture can change with changes in the shooting angle of the shooting device, and the changes in the shooting angle are used to simulate changes in the user's field of view. Then, by displaying different picture areas of the target special effect picture, changes in the actual scene are simulated, making the rendering effect of the target special effect picture more realistic and vivid, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 A flowchart of a special effects processing method provided by an embodiment of the present disclosure;

[0021] Figure 2 is a flowchart of another special effects processing method provided by an embodiment of the present disclosure;

[0022] Figure 3 This is a flowchart of another special effects processing method provided by an embodiment of the present disclosure;

[0023] Figure 4 is a caustic light map provided by an embodiment of the present disclosure;

[0024] Figure 5 is a normal texture map provided by an embodiment of the present disclosure;

[0025] Figure 6 is a flowchart of another special effects processing method provided by an embodiment of the present disclosure;

[0026] Figure 7 is a flowchart of an optional example of a special effects processing method provided by an embodiment of the present disclosure;

[0027] Figure 8 A schematic structural diagram of a special effects processing device provided by an embodiment of the present disclosure;

[0028] Figure 9 A schematic structural diagram of a special effects processing electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0031] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0032] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0033] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0035] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0036] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0037] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0038] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0039] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0040] Figure 1This is a flow chart of a special effects processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of rendering special effects pictures with a sense of three-dimensionality. The method can be executed by a special effects processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc. The embodiment of the present disclosure is particularly suitable for mobile terminals equipped with an augmented reality (AR) shooting device.

[0041] like Figure 1 As shown, the method of this embodiment may specifically include:

[0042] S110: Acquire an augmented reality picture captured by a shooting device, and generate a target special effects picture based on the augmented reality picture.

[0043] Among them, the shooting device can be understood as a device for shooting the augmented reality picture. Optionally, the shooting device can be a device with a shooting function and an AR component installed, and a shooting function. The shooting device can also be used to display the special effects picture obtained after the augmented reality picture is processed with special effects. In the embodiment of the present disclosure, the terminal can be preset according to the scene requirements, and is not specifically limited here. Exemplarily, the shooting device can be an AR camera or an augmented reality AR device (such as AR glasses) configured in the terminal. It can be understood that the specific picture content of the augmented reality picture can be determined according to the actual shooting scene, and is not specifically limited here. Optionally, the augmented reality picture can be a single frame picture in the augmented reality video, or it can be an augmented reality image.

[0044] Among them, the target special effects picture can be understood as a special effects picture obtained by performing special effects processing on the augmented reality picture. In the embodiment of the present disclosure, the special effects of the target special effects picture can be preset according to the scene requirements, and are not specifically limited here. Exemplarily, the outline of the target special effects picture may be irregular. Optionally, the target special effects picture may have multiple forms of expression, for example, it may be a special effects picture obtained by performing water surface special effects rendering, snow mountain special effects rendering, flame special effects rendering or stream sand special effects rendering on the augmented reality picture. Exemplarily, the target special effects picture may be a water surface special effects picture. Furthermore, the edge of the water surface special effects picture may be nonlinear to simulate the scene of water surface fluctuations.

[0045] In a possible embodiment of the present disclosure, the augmented reality picture obtained by the shooting device may include depth information of the augmented reality picture, that is, the distance between each pixel in the augmented reality picture and the shooting device. Optionally, generating a target special effects picture based on the augmented reality picture includes: obtaining a depth estimation map of the augmented reality picture, and generating the target special effects picture based on the depth estimation map. The depth data of each pixel in the depth estimation map can be used to indicate the distance from the scene information corresponding to the pixel to the shooting device.

[0046] Exemplarily, generating a target special effects screen based on the depth estimation map includes: determining a special effects rendering area corresponding to the augmented reality screen; for each pixel to be rendered in the special effects rendering area, determining the pixel value of the pixel to be rendered based on the depth information corresponding to the pixel to be rendered in the depth estimation map; and rendering the target special effects screen based on the pixel values of each pixel to be rendered in the special effects rendering area.

[0047] Optionally, determining the special effect rendering area corresponding to the augmented reality screen includes: determining the special effect rendering area corresponding to the augmented reality screen based on a preset area generation algorithm; or, in response to a special effect application triggering operation on the augmented reality screen, obtaining the special effect rendering area based on the triggered special effect. The special effect application triggering operation can be understood as a triggering operation applied to the augmented reality screen to activate a default special effect, or a special effect selection operation for at least one special effect.

[0048] S120: When the shooting device displays the first screen area of the augmented reality screen, display the first special effect area of the target special effect screen in the first screen area.

[0049] It is understood that when the shooting angle of the camera changes, the image area of the augmented reality image displayed by the camera can change accordingly. In other words, in response to the change in the image area of the augmented reality image displayed, the corresponding special effects area can be displayed in different image areas of the target special effects image. In the embodiment of the present disclosure, the presentation effects of different image areas of the target special effects image can be the same or different.

[0050] The first screen area may be understood as the screen area corresponding to the current shooting angle of the shooting device in the augmented reality screen, and the first special effect area may be understood as the special effect area displayed corresponding to the first screen area in the target special effect screen.

[0051] Specifically, when the shooting device displays the first picture area of the augmented reality picture, the special effects area corresponding to the first picture area in the target special effects picture is obtained as the first special effects area, and the first special effects area is displayed in the first picture area.

[0052] S130. When it is detected that the shooting angle of the shooting device has changed, display the second screen area of the augmented reality screen, and display the second special effect area of the target special effect screen in the second screen area.

[0053] The shooting angle can be understood as the angle at which the camera captures the augmented reality image. Optionally, the shooting angle can be determined based on information such as the shooting position and / or shooting direction when the camera captures the augmented reality image.

[0054] The second screen area can be understood as the screen area of the augmented reality screen captured by the terminal after the shooting angle of the shooting device is changed. The second special effects area can be understood as the special effects area displayed corresponding to the second screen area in the target special effects screen. Optionally, the first screen area and the second screen area can be different, and the first special effects area and the second special effects area can be different.

[0055] Specifically, when it is detected that the shooting angle of the shooting device has changed, the second picture area of the augmented reality picture shot by the shooting device is obtained, the second picture area is displayed, and the second special effects area of the target special effects picture is displayed in the second picture area.

[0056] In order to enrich the display effect of special effects, preset special effects objects can be added to the target special effects screen. Optionally, the special effects processing method also includes: rendering a preset special effects object into the target special effects screen. Among them, the special effects object can be understood as an object rendered in the target special effects screen. In the embodiment of the present disclosure, the specific form and display method of the special effects object and other information can be preset according to needs, and are not specifically limited here. Optionally, the special effects object can be a preset special effects prop. Different target special effects screens can use the same or different special effects objects. For example, taking the target special effects screen as the water surface as an example, the special effects object can be floating objects on the water surface and / or aquatic creatures, such as ships, fish, and water plants.

[0057] Optionally, rendering the preset special effects object into the target special effects screen includes: determining target display information of the preset special effects object in the target special effects screen, and rendering the special effects object into the target special effects screen using the target display information. By rendering the preset special effects object into the target special effects screen using the target display information, the rendering effect of the target special effects screen can be enriched.

[0058] The target display information can be understood as information indicating how the special effect object is displayed in the target special effect screen. In the disclosed embodiment, the target display information can be preset according to the scene requirements and is not specifically limited here. Optionally, the target display information may include, but is not limited to, at least one of display position, motion state, display color, and display depth.

[0059] The motion state can be understood as indicating whether the special effect object is moving, and in what manner the special effect object is moving if it is moving. In the embodiment of the present disclosure, for example, the motion state of the special effect object in the target special effect picture can be a state simulating the motion of a pendulum, etc.

[0060] Optionally, the motion state includes dynamic or static. Exemplarily, the special effect object can be displayed in the target special effect picture in a static or dynamic manner.

[0061] Optionally, when the special effects object moves, the motion state may also include but is not limited to at least one of the motion information of the special effects object in the target special effects picture, such as the motion angle, motion amplitude, motion time, motion trajectory and motion speed.

[0062] The display color information can be understood as the color information of the special effect object displayed in the target special effect screen. Optionally, the display color information is determined based on the display position of the special effect object in the target special effect screen. Specifically, it can be determined based on the color value and / or depth data of the pixel point at the display position of the special effect object in the target special effect screen.

[0063] Among them, the display depth information can be understood as the depth information of the special effects object displayed in the target special effects screen. It can be understood that, for the special effects object, the display depth information of different object areas may be different. In an embodiment of the present disclosure, optionally, the special effects object is rendered based on the display depth information of each object area of the pre-set special effects object in the target special effects screen. In an embodiment of the present disclosure, the special effects effect can be presented based on the display depth of the special effects object and the target special effects screen. By adopting this technical solution, a special effects effect can be achieved in which a part of the area of the special effects object blocks the target special effects screen, or the target special effects screen blocks a part of the area of the special effects object.

[0064] The technical solution of the embodiment of the present disclosure obtains the augmented reality picture captured by the shooting device, generates the target special effects picture based on the augmented reality picture, and can generate the target special effects picture with a sense of space through the augmented reality picture, which is more in line with the real scene; when the shooting device displays the first picture area of the augmented reality picture, the first special effects area of the target special effects picture is displayed in the first picture area, and the shooting angle is associated with the picture display area of the target special effects picture to ensure the visual presentation effect; when it is detected that the shooting angle of the shooting device has changed, the second picture area of the augmented reality picture is displayed, and the second special effects area of the target special effects picture is displayed in the second picture area. The target special effects picture is generated by a virtual display picture, and the target special effects picture can change with the change of the shooting angle of the shooting device. The change of the shooting angle is used to simulate the change of the user's field of view, and then the changes in the actual scene are simulated by displaying different picture areas of the target special effects picture, so that the rendering effect of the target special effects picture is more realistic and more vivid, thereby improving the user experience.

[0065] Figure 2 This is a flow chart of another special effects processing method provided by an embodiment of the present disclosure. This embodiment refines the method of generating a target special effects image based on the augmented reality image described in the above embodiment. For specific implementations, please refer to the description of this embodiment. Technical features that are identical or similar to those in the above embodiments are not repeated here.

[0066] like Figure 2 As shown, the method of this embodiment may specifically include:

[0067] S210: Acquire an augmented reality image captured by a shooting device.

[0068] S220: Generate an initial special effects picture based on the augmented reality picture, and perform optical processing on the initial special effects picture to obtain a target special effects picture.

[0069] The optical processing includes at least one of scattering processing, reflection processing, refraction processing, caustic processing and highlight processing.

[0070] The initial special effects image can be understood as a special effects image initially generated based on the augmented reality image. The optical processing can be understood as the process of processing each pixel in the initial special effects image based on optical information. Optionally, the optical processing can be at least one of scattering processing, reflection processing, refraction processing, caustics processing, and highlight processing.

[0071] The scattering process may be understood as a process of processing at least a portion of pixels in the initial special effects picture based on light scattering, so that the initial special effects picture presents an effect of scattered light.

[0072] In the disclosed embodiments, scattering processing is performed on the initial special effects image, so that pixels at different distances from the terminal in the initial special effects image appear at different brightness levels, making the optical effect of the initial special effects image more realistic. For example, scattering processing is performed on the initial water surface special effects image. The resulting target special effects image can be darker for water surfaces farther from the camera and brighter for water surfaces closer to the camera, thereby improving the realism of the water surface special effects rendering.

[0073] Among them, the reflection processing can be understood as a processing method of processing at least part of the pixel points in the initial special effects picture based on the reflection of light, so that the initial special effects picture presents an effect of emitting light. Optionally, the reflection processing can be a process of processing the optical information of the pixel points on the water surface in the initial water surface special effects picture. The refraction processing can be understood as a processing method of processing at least part of the pixel points in the initial special effects picture based on the refraction of light, so that the initial special effects picture presents an effect of refracting light. Optionally, the refraction processing can be a process of processing the optical information of the pixel points below the water surface in the initial water surface special effects picture. In the embodiment of the present disclosure, the reflection processing and refraction processing are performed on the initial special effects picture, so that the pixel points on the water surface and below the water surface in the water surface picture can present different optical effects, thereby improving the authenticity of the water surface special effects rendering.

[0074] In the disclosed embodiments, caustics processing can be performed on the initial special effects image by sampling a preset caustics map. It is understood that the caustics map and the sampling method for the caustics map may vary depending on the shooting angle of the camera. In the processing of the water surface special effects image, caustics processing can simulate the shimmering effect of a real water surface under light.

[0075] Specifically, highlight processing can be understood as a process of causing a portion of the initial special effects image to exhibit an optical effect of completely reflecting a light source. Optionally, the initial special effects image is processed based on a preset highlight algorithm. Exemplarily, the preset highlight algorithm may include, but is not limited to, a Blinn-Phong lighting algorithm.

[0076] Exemplarily, the optical processing may include reflection processing and refraction processing. Optionally, the optical processing of the initial special effects screen includes: determining the direction of the refracted light according to the preset incident light and the target special effects screen, sampling the augmented reality screen according to the refracted light direction to obtain a refracted color value; determining the direction of the reflected light according to the preset incident light and the target special effects screen, sampling a preset environment map according to the reflected light direction to obtain a reflected color value; determining a reflectivity corresponding to the reflected color value and a refractive index corresponding to the refracted color value, and processing the initial special effects screen according to the refracted color value, the refractive index, the reflected color value, and the reflectivity.

[0077] Among them, the preset incident light is determined based on the illumination direction of a preset light source. The refracted light direction can be understood as the light direction determined by the refractive index of the preset incident light and the target special effect picture. The refracted color value can be understood as the color value obtained by sampling the augmented reality picture according to the refracted light direction. The refractive index can be understood as the percentage of the radiant energy of the refracted light to the radiant energy of the preset incident light. It can be understood that the refractive index can be preset according to the scene requirements and is not specifically limited here. Specifically, the larger the refractive index, the brighter the brightness of the pixel point of the picture corresponding to the refractive index can be.

[0078] Among them, the direction of reflected light can be understood as the direction of light determined for the preset incident light and the reflectivity of the water surface in the target special effects picture. The preset environment map can be understood as a map that characterizes the color value corresponding to the direction of the refracted light. The reflected color value can be understood as the color value obtained by sampling the preset environment map according to the direction of the reflected light. The reflectivity can be understood as the percentage of the radiant energy of the reflected light to the radiant energy of the preset incident light. It can be understood that the reflectivity can be preset according to the scene requirements and is not specifically limited here. Specifically, the greater the reflectivity, the brighter the brightness of the pixel points of the picture corresponding to the reflectivity can be. Taking the rendering of the water surface special effects picture as an example, under normal circumstances, the brightness of the picture pixels below the water surface will be darker, and the brightness of the picture pixels on the water surface will be brighter.

[0079] S230: When the shooting device displays the first screen area of the augmented reality screen, display the first special effect area of the target special effect screen in the first screen area.

[0080] S240. When it is detected that the shooting angle of the shooting device has changed, display the second screen area of the augmented reality screen, and display the second special effect area of the target special effect screen in the second screen area.

[0081] The technical solution of the disclosed embodiment generates an initial special effects image based on the augmented reality image, and then optically processes the initial special effects image to obtain a target special effects image. This renders the water surface special effects to simulate the optical effects of real water, such as scattering, reflection, refraction, caustics, and highlights, thereby enhancing the vividness and realism of the target special effects image.

[0082] Figure 3 This is a flow chart of another special effect processing method provided by an embodiment of the present disclosure. This embodiment refines the optical processing of the initial special effect picture described in the above embodiment.

[0083] like Figure 3 As shown, the method includes:

[0084] S310: Acquire an augmented reality image captured by a shooting device.

[0085] S320: Generate an initial special effects picture based on the augmented reality picture, and perform caustic processing on the initial special effects picture based on a preset caustic light map.

[0086] The caustic light map can be understood as a map that characterizes the caustic light characteristics. The caustic light map can be set according to actual needs and is not specifically limited here, as long as it can characterize the caustic characteristics. For example, the caustic light map can be as follows Figure 4 shown.

[0087] In an embodiment of the present disclosure, the caustic color value of each pixel point in the initial special effect picture can be determined based on the caustic light map, so as to perform caustic processing on the initial special effect picture.

[0088] Optionally, the caustic processing of the initial special effects picture based on the preset caustic light map includes: determining the caustic sampling coordinates corresponding to each picture pixel point to be caustic processed in the initial special effects picture; sampling the preset caustic light map based on the caustic sampling coordinates, and determining the caustic color value corresponding to the picture pixel point based on the sampling result; and caustic processing of the picture pixel point based on the caustic color value corresponding to the picture pixel point.

[0089] Among them, the picture pixel point can be understood as each pixel point to be subjected to caustic processing in the initial special effects picture. The caustic sampling coordinates can be understood as the coordinates on which the caustic color value corresponding to the picture pixel point can be sampled from the caustic light map. The sampling process can be understood as the process of sampling the preset caustic light map based on the caustic sampling coordinates to obtain the caustic color value corresponding to the picture pixel point. The caustic color value can be understood as the color value of the pixel point corresponding to the picture pixel point in the preset caustic light map obtained by the sampling process.

[0090] Optionally, determining the caustic sampling coordinates corresponding to the pixel point of the picture includes: determining the normal sampling coordinates corresponding to the preset normal texture map based on the world coordinates of the pixel point of the picture and the lighting direction coordinates of a preset light source; and determining the caustic sampling coordinates corresponding to the pixel point of the picture based on the normal sampling coordinates.

[0091] Among them, the world coordinates can be understood as coordinates composed of three mutually perpendicular and intersecting coordinate axes. The preset light source can be understood as an object that provides incident light. In the embodiment of the present disclosure, the preset light source can be preset according to needs and is not specifically limited here. The illumination direction coordinates can be understood as the illumination direction coordinates of the incident light. The normal texture map can be understood as a map of the normal texture that characterizes the ripple characteristics of the water surface (for specific examples, please refer to Figure 5 In an embodiment of the present disclosure, the caustic sampling coordinates corresponding to each pixel point of the screen can be determined based on the normal texture map. The normal sampling coordinates can be understood as the coordinates for sampling the normal texture map.

[0092] Specifically, determine the world coordinates and the illumination direction coordinates of the preset light source, obtain the two-dimensional vector of the world coordinates and the illumination direction of the preset light source, and obtain the normal sampling coordinates that can be sampled in the preset texture map by calculation. Specifically, calculate the first ratio of the vertical axis component (i.e., y component) of the world coordinates of the pixel point on the screen to the vertical axis component (i.e., y component) of the illumination direction coordinate; use the product of the first ratio and the vertical axis component (i.e., x component) of the illumination direction coordinate and the horizontal axis component (i.e., x component) of the world coordinates of the pixel point on the screen as the horizontal coordinate of the normal sampling coordinate on the normal texture map, and use the product of the first ratio and the vertical axis component (i.e., z component) of the illumination direction coordinate and the vertical axis component (i.e., z component) of the world coordinates of the pixel point on the screen as the vertical coordinate of the normal sampling coordinate on the normal texture map.

[0093] Furthermore, a normal sampling point in the normal texture map is determined based on the normal sampling coordinates, and a caustic sampling coordinate corresponding to the image pixel is determined based on the coordinates of the normal sampling point. Specifically, the horizontal and vertical coordinate components (i.e., the x component and the y component) of the normal sampling point can be used as the caustic sampling coordinates corresponding to the image pixel. Then, a preset caustic light map is sampled based on the caustic sampling coordinates to obtain a caustic map value corresponding to each image pixel.

[0094] Optionally, determining the caustic color value corresponding to the image pixel based on the sampling result includes: determining the caustic color value corresponding to the image pixel based on the caustic map value corresponding to the image pixel. Specifically, calculating the difference between the vertical axis component (i.e., the y component) of the world coordinates of the image pixel and a first preset value, then calculating a second ratio of the difference to a second preset value, using the difference between 1 and the second ratio as a first factor, using the caustic map value corresponding to the image pixel as a second factor, and multiplying the first factor by the second factor to obtain the caustic color value corresponding to the image pixel.

[0095] On this basis, the initial special effects picture may be processed in combination with one or more of scattering processing, reflection processing, refraction processing and highlight processing to obtain a target special effects picture.

[0096] S330: When the shooting device displays the first screen area of the augmented reality screen, display the first special effect area of the target special effect screen in the first screen area.

[0097] S340: When it is detected that the shooting angle of the shooting device has changed, display the second screen area of the augmented reality screen, and display the second special effect area of the target special effect screen in the second screen area.

[0098] The technical solution of the embodiment of the present disclosure performs caustic processing on the initial special effects picture based on a preset caustic light map, which can make the target special effects picture present a shimmering dynamic effect, thereby improving the vividness and authenticity of the special effects rendering.

[0099] Figure 6 3 is a flow chart of another special effect processing method provided by an embodiment of the present disclosure. This embodiment refines the optical processing of the initial special effect picture described in the above embodiment.

[0100] like Figure 6 As shown, the method includes:

[0101] S410: Acquire an augmented reality image captured by a shooting device.

[0102] S420: Generate an initial special effects picture based on the augmented reality picture.

[0103] S430: Determine weight values of a preset first color value and a preset second color value according to a component of a sight line vector corresponding to the augmented reality screen in a preset direction.

[0104] In this embodiment, the sight line vector can be understood as a vector from the camera to the pixel point on the image to be subjected to caustic processing. The preset direction can be the longitudinal axis direction of the sight line vector.

[0105] In an embodiment of the present disclosure, scattering processing is performed on the initial special effects picture, so that the processed initial special effects picture can present a color gradient effect. Exemplarily, two different color values can be pre-set to respectively represent the color value of the picture pixel farthest from the terminal and the color value of the picture pixel closest to the terminal. Specifically, a preset first color value is used to represent the color value of the picture pixel farthest from the terminal. The preset second color value represents the color value of the picture pixel closest to the terminal. Optionally, scattering processing is performed on the initial special effects picture, including: processing the initial special effects picture according to the preset first color value, the preset second color value and the depth data of each pixel corresponding to the initial special effects picture. Wherein, the depth data of each pixel can be determined based on the value of the component of the sight vector of the pixel on the vertical axis (i.e., the y-axis).

[0106] Specifically, for each pixel point, the first weight of the preset first color and the second weight of the preset second color can be determined respectively according to the value of the y component of the normalized line of sight vector, and then the scattered light value is determined based on the preset first color, the first weight, the preset second color and the second weight, and then the color value of the pixel point is determined based on the scattered light value.

[0107] Furthermore, the value of the y component of the normalized sight line vector may be used as the first weight of the preset first color, and the difference between 1 and the first weight may be used as the second weight of the preset second color.

[0108] It is understood that in the embodiments of the present disclosure, the preset first color value and the preset second color value can be preset according to scene requirements and are not specifically limited here. Optionally, when the initial special effect image is a water surface image, the preset first color value can be a darker water surface color, and the preset second color value can be a lighter water surface color.

[0109] S440: Determine a scattering value based on a preset first color value, a preset second color value, a weight value of the preset first color value, and a weight value of the preset second color value, and apply the scattering value to the initial special effect picture to obtain a target special effect picture.

[0110] Specifically, a first product obtained by multiplying a preset first color by a first weight and a second product obtained by multiplying a preset second color by a second weight are summed to obtain a scattered light value, and the scattered light value is then applied to the initial special effect image.

[0111] On this basis, the initial special effects picture may be processed in combination with one or more of reflection processing, refraction processing, caustic processing and highlight processing to obtain a target special effects picture.

[0112] S450: When the shooting device displays the first screen area of the augmented reality screen, display the first special effect area of the target special effect screen in the first screen area.

[0113] S460: When it is detected that the shooting angle of the shooting device has changed, display the second screen area of the augmented reality screen, and display the second special effect area of the target special effect screen in the second screen area.

[0114] The technical solution of the disclosed embodiment determines weights for a preset first color value and a preset second color value based on the component of the sight line vector corresponding to the augmented reality image in a preset direction. A scattering value is determined based on the preset first color value, the preset second color value, the weight of the preset first color value, and the weight of the preset second color value, and is applied to the initial special effect image. This allows the target special effect image to have a visual effect of different distances, improving the realism of the special effect rendering.

[0115] Figure 7 This is a flow chart of an optional example of a special effect processing method provided by the embodiment of the present disclosure. Taking the processing of the water surface special effect picture as an example, Figure 7 As shown, the overall process of the special effects processing method can be:

[0116] 1. Capture the augmented reality image. Use a terminal equipped with an AR camera to capture the augmented reality image containing depth information. Based on the AR camera component, obtain the depth estimation map within the scene and write it into the AR camera's depth buffer.

[0117] 2. Render special effects objects. Render special effects objects floating on the water surface, such as a dragon boat, in the water surface special effects screen.

[0118] 3. Calculate the display color of the special effect object and write it into the color buffer, and calculate the display depth of the special effect object and write it into the depth buffer.

[0119] 4. Rendering the water surface. Water surface rendering can be the result of comprehensive consideration of scattering, reflection, refraction, caustics and highlights.

[0120] 1) Scattering: The value of the y component of the normalized line of sight vector is used as the first weight of the preset first color, the difference between 1 and the first weight is used as the second weight of the preset second color, and the first product obtained by multiplying the preset first color by the first weight and the second product obtained by multiplying the preset second color by the second weight are summed to obtain the scattered light value.

[0121] 2) Refraction and Reflection: Determine the direction of refracted light and sample the augmented reality image based on the refracted light direction to obtain a refracted color value. Determine the direction of reflected light and sample a preset environment map based on the reflected light direction to obtain a reflected color value. The refracted and reflected color values are blended using a blending coefficient calculated using the Schlick approximation of Fresnel's law.

[0122] 3) Caustics: The product of the ratio of the vertical axis component (i.e., y component) of the world coordinates of the pixel point on the screen to the vertical axis component (i.e., y component) of the illumination direction coordinate and the vertical axis component (i.e., x component) of the illumination direction coordinate is used as the first parameter, the horizontal axis component (i.e., x component) of the world coordinates of the pixel point on the screen is used as the second parameter, the sum of the first parameter and the second parameter is used as the horizontal coordinate of the normal sampling coordinate on the normal texture map, the product of the ratio of the vertical axis component (i.e., y component) of the world coordinates of the pixel point on the screen to the vertical axis component (i.e., y component) of the illumination direction coordinate and the vertical axis component (i.e., z component) of the illumination direction coordinate is used as the third parameter, the vertical axis component (i.e., z component) of the world coordinates of the pixel point on the screen is used as the fourth parameter, and the sum of the third parameter and the fourth parameter is used as the vertical coordinate of the normal sampling coordinate on the normal texture map. Further, the normal texture map is sampled based on the horizontal and vertical coordinates of the normal sampling coordinate to obtain a normal sampling point. The x and y components of the normal sampling point are used as the x and y components of the caustic sampling coordinates corresponding to the image pixel. A pre-set caustic light map is then sampled based on the caustic sampling coordinates to obtain a caustic map value corresponding to each image pixel.

[0123] 4) Highlight: Use the Blinn-Phong method to determine the highlight color value.

[0124] 5. Write the water surface rendering results into the system cache to display the screen area of the water surface special effects screen according to the shooting angle of the shooting device.

[0125] The technical solution of this embodiment uses augmented reality footage captured by a camera equipped with an AR component to render the water surface. By applying various optical processing techniques to the surface, the conventional rectangular horizontal surface is transformed into a three-dimensional (3D) water surface, enhancing the realism of the special effects. Furthermore, different water surface special effects areas can be displayed in corresponding image areas based on the shooting angle, enhancing the vividness of the special effects and improving the user experience.

[0126] Figure 8 This is a structural diagram of a special effects processing device provided by an embodiment of the present disclosure, such as Figure 8 As shown, the device includes: a special effect generation module 510, a special effect display module 520 and a display change module 530.

[0127] Among them, the special effects generation module 510 is used to obtain the augmented reality picture captured by the shooting device and generate a target special effects picture based on the augmented reality picture; the special effects display module 520 is used to display the first special effects area of the target special effects picture in the first picture area when the shooting device displays the first picture area of the augmented reality picture; the display change module 530 is used to display the second picture area of the augmented reality picture when it is detected that the shooting angle of the shooting device has changed, and display the second special effects area of the target special effects picture in the second picture area.

[0128] The technical solution of the embodiment of the present disclosure obtains the augmented reality picture captured by the shooting device, generates the target special effects picture based on the augmented reality picture, and can generate the target special effects picture with a sense of space through the augmented reality picture, which is more in line with the real scene; when the shooting device displays the first picture area of the augmented reality picture, the first special effects area of the target special effects picture is displayed in the first picture area, and the shooting angle is associated with the picture display area of the target special effects picture to ensure the visual presentation effect; when it is detected that the shooting angle of the shooting device has changed, the second picture area of the augmented reality picture is displayed, and the second special effects area of the target special effects picture is displayed in the second picture area. The target special effects picture is generated by a virtual display picture, and the target special effects picture can change with the change of the shooting angle of the shooting device. The change of the shooting angle is used to simulate the change of the user's field of view, and then the changes in the actual scene are simulated by displaying different picture areas of the target special effects picture, so that the rendering effect of the target special effects picture is more realistic and more vivid, thereby improving the user experience.

[0129] Optionally, the special effect generation module 510 includes: an optical processing submodule.

[0130] Among them, the optical processing sub-module is used to generate an initial special effects picture based on the augmented reality picture, and optically process the initial special effects picture to obtain a target special effects picture, wherein the optical processing includes at least one of scattering processing, reflection processing, refraction processing, caustic processing and highlight processing.

[0131] Optionally, the optical processing submodule includes: a caustic processing unit.

[0132] The caustic processing unit is used to perform caustic processing on the initial special effect picture based on a preset caustic light map.

[0133] Optionally, the caustics processing unit includes: a caustics sampling coordinate determination subunit, a caustics color value acquisition subunit, and a caustics processing subunit.

[0134] The caustic sampling coordinate determining subunit is configured to determine, for each pixel point to be subjected to caustic processing in the initial special effect picture, a caustic sampling coordinate corresponding to the pixel point;

[0135] The caustic color value acquisition subunit is used to sample a preset caustic light map based on the caustic sampling coordinates, and determine the caustic color value corresponding to the pixel point on the screen based on the sampling result;

[0136] The caustic processing subunit is used to perform caustic processing on the picture pixel points based on the caustic color values corresponding to the picture pixel points.

[0137] Optionally, the caustics sampling coordinate determination subunit is used to:

[0138] Determining the normal sampling coordinates corresponding to the preset normal texture map according to the world coordinates of the pixel point on the picture and the illumination direction coordinates of the preset light source;

[0139] The caustic sampling coordinates corresponding to the pixel point on the screen are determined according to the normal sampling coordinates.

[0140] Optionally, the optical processing submodule includes a caustic processing unit, which is used to:

[0141] Determining weight values of a preset first color value and a preset second color value respectively according to a component of a sight line vector corresponding to the augmented reality picture in a preset direction;

[0142] A scattering value is determined based on a preset first color value, a preset second color value, a weight value of the preset first color value, and a weight value of the preset second color value, and the scattering value is applied to the initial special effect picture.

[0143] Optionally, the optical processing submodule includes a reflection processing unit and a refraction processing unit, which are used to:

[0144] Determining a refracted light direction according to a preset incident light and the target special effect picture, and sampling the augmented reality picture according to the refracted light direction to obtain a refracted color value;

[0145] Determine the direction of reflected light according to the preset incident light and the target special effect picture, and sample the preset environment map according to the reflected light direction to obtain a reflected color value;

[0146] A reflectivity corresponding to the reflection color value and a refractive index corresponding to the refraction color value are determined, and the initial special effect image is processed according to the refraction color value, the refractive index, the reflection color value, and the reflectivity.

[0147] Optionally, the special effects processing method further includes a special effects object rendering module, which is used to:

[0148] Render the preset special effect object into the target special effect screen.

[0149] Optionally, the special effect object rendering module is used to:

[0150] Determine target display information of a preset special effect object in the target special effect picture, and render the special effect object into the target special effect picture using the target display information, wherein the target display information includes at least one of display position, motion state, display color, and display depth.

[0151] The special effects processing device provided by the embodiments of the present disclosure can execute the special effects processing method provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.

[0152] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0153] Figure 9 This is a structural diagram of a special effects processing electronic device provided by an embodiment of the present disclosure. Figure 9 , which shows an electronic device (eg Figure 9The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0154] like Figure 9 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0155] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 9 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0156] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0157] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0158] The electronic device provided by the embodiment of the present disclosure and the special effects processing method provided by the above embodiment belong to the same disclosed concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0159] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the special effect processing method provided in the above embodiment is implemented.

[0160] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0161] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0162] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0163] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the augmented reality picture captured by the shooting device, and generates a target special effects picture based on the augmented reality picture; when the shooting device displays the first picture area of the augmented reality picture, the first special effects area of the target special effects picture is displayed in the first picture area; when it is detected that the shooting angle of the shooting device has changed, the second picture area of the augmented reality picture is displayed, and the second special effects area of the target special effects picture is displayed in the second picture area.

[0164] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0166] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0167] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0168] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0169] According to one or more embodiments of the present disclosure, [Example 1] provides a special effects processing method, including:

[0170] Acquire an augmented reality picture captured by a shooting device, and generate a target special effects picture based on the augmented reality picture;

[0171] When the shooting device displays the first screen area of the augmented reality screen, displaying the first special effect area of the target special effect screen in the first screen area;

[0172] When it is detected that the shooting angle of the shooting device changes, the second screen area of the augmented reality screen is displayed, and the second special effect area of the target special effect screen is displayed in the second screen area.

[0173] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further comprising:

[0174] An initial special effects picture is generated based on the augmented reality picture, and the initial special effects picture is optically processed to obtain a target special effects picture, wherein the optical processing includes at least one of scattering processing, reflection processing, refraction processing, caustic processing and highlight processing.

[0175] According to one or more embodiments of the present disclosure, [Example 3] provides the method of Example 2, further comprising:

[0176] The initial special effect image is subjected to caustic processing based on a preset caustic light map.

[0177] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 3, further comprising:

[0178] For each pixel point to be subjected to caustic processing in the target special effect picture, determining a caustic sampling coordinate corresponding to the pixel point;

[0179] Sampling a preset caustic light map based on the caustic sampling coordinates, and determining a caustic color value corresponding to the pixel point on the screen based on the sampling result;

[0180] The pixel points of the picture are subjected to caustic processing based on the caustic color values corresponding to the pixel points of the picture.

[0181] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 4, further comprising:

[0182] Determining the normal sampling coordinates corresponding to the preset normal texture map according to the world coordinates of the pixel point on the picture and the illumination direction coordinates of the preset light source;

[0183] The caustic sampling coordinates corresponding to the pixel point on the screen are determined according to the normal sampling coordinates.

[0184] According to one or more embodiments of the present disclosure, [Example 6] provides the method of Example 2, further comprising:

[0185] Determining weight values of a preset first color value and a preset second color value respectively according to a component of a sight line vector corresponding to the augmented reality picture in a preset direction;

[0186] A scattering value is determined based on a preset first color value, a preset second color value, a weight value of the preset first color value, and a weight value of the preset second color value, and the scattering value is applied to the initial special effect picture.

[0187] According to one or more embodiments of the present disclosure, [Example 7] provides the method of Example 2, further comprising:

[0188] Determining a refracted light direction according to a preset incident light and the target special effect picture, and sampling the augmented reality picture according to the refracted light direction to obtain a refracted color value;

[0189] Determine the direction of reflected light according to the preset incident light and the target special effect picture, and sample the preset environment map according to the reflected light direction to obtain a reflected color value;

[0190] A reflectivity corresponding to the reflection color value and a refractive index corresponding to the refraction color value are determined, and the initial special effect image is processed according to the refraction color value, the refractive index, the reflection color value, and the reflectivity.

[0191] According to one or more embodiments of the present disclosure, [Example 8] provides the method of Example 1, further comprising:

[0192] Render the preset special effect object into the target special effect screen.

[0193] According to one or more embodiments of the present disclosure, [Example 9] provides the method of Example 8, further comprising:

[0194] Determine target display information of a preset special effect object in the target special effect picture, and render the special effect object into the target special effect picture using the target display information, wherein the target display information includes at least one of display position, motion state, display color, and display depth.

[0195] According to one or more embodiments of the present disclosure, [Example 10] provides a special effects processing device, including:

[0196] A special effects generation module, configured to obtain an augmented reality image captured by a camera and generate a target special effects image based on the augmented reality image;

[0197] a special effect display module, configured to display the first special effect area of the target special effect image in the first image area when the shooting device displays the first image area of the augmented reality image;

[0198] The display change module is used to display the second screen area of the augmented reality screen and display the second special effect area of the target special effect screen in the second screen area when it is detected that the shooting angle of the shooting device has changed.

[0199] According to one or more embodiments of the present disclosure, [Example 11] provides a special effects processing electronic device, including:

[0200] one or more processors;

[0201] a storage device for storing one or more programs,

[0202] When the one or more programs are executed by the one or more processors, the one or more processors implement the special effect processing method as described in any one of Examples 1 to 9.

[0203] According to one or more embodiments of the present disclosure, [Example 12] provides a special effects processing storage medium, including:

[0204] When executed by a computer processor, the computer executable instructions are used to perform the special effect processing method described in any one of Examples 1 to 9.

[0205] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0206] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0207] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A special effects processing method, characterized in that: include: Acquiring an augmented reality picture captured by a shooting device, and generating a target special effect picture based on the augmented reality picture, wherein the outline of the target special effect picture is irregular; When the shooting device displays the first screen area of the augmented reality screen, displaying the first special effect area of the target special effect screen in the first screen area; When it is detected that the shooting angle of the shooting device changes, the second screen area of the augmented reality screen is displayed, and the second special effect area of the target special effect screen is displayed in the second screen area.

2. The special effects processing method according to claim 1, characterized in that: Generating a target special effect picture based on the augmented reality picture includes: An initial special effects picture is generated based on the augmented reality picture, and the initial special effects picture is optically processed to obtain a target special effects picture, wherein the optical processing includes at least one of scattering processing, reflection processing, refraction processing, caustic processing and highlight processing.

3. The special effect processing method according to claim 2, characterized in that: The performing caustic processing on the initial special effect picture includes: The initial special effect image is subjected to caustic processing based on a preset caustic light map.

4. The special effect processing method according to claim 3, characterized in that: The performing caustic processing on the initial special effect picture based on a preset caustic light map includes: For each picture pixel to be subjected to caustic processing in the initial special effect picture, determining a caustic sampling coordinate corresponding to the picture pixel; Sampling a preset caustic light map based on the caustic sampling coordinates, and determining a caustic color value corresponding to the pixel point on the screen based on the sampling result; The pixel points of the picture are subjected to caustic processing based on the caustic color values corresponding to the pixel points of the picture.

5. The special effect processing method according to claim 4, characterized in that: The determining of the caustic sampling coordinates corresponding to the pixel points of the picture includes: Determining the normal sampling coordinates corresponding to the preset normal texture map according to the world coordinates of the pixel point on the picture and the illumination direction coordinates of the preset light source; The caustic sampling coordinates corresponding to the pixel point on the screen are determined according to the normal sampling coordinates.

6. The special effect processing method according to claim 2, characterized in that: The scattering processing of the initial special effect picture includes: Determining weight values of a preset first color value and a preset second color value respectively according to a component of a sight line vector corresponding to the augmented reality picture in a preset direction; A scattering value is determined based on a preset first color value, a preset second color value, a weight value of the preset first color value, and a weight value of the preset second color value, and the scattering value is applied to the initial special effect picture.

7. The special effect processing method according to claim 2, characterized in that: The optical processing includes reflection processing and refraction processing; the optical processing of the initial special effect image includes: Determining a refracted light direction according to a preset incident light and the target special effect picture, and sampling the augmented reality picture according to the refracted light direction to obtain a refracted color value; Determine the direction of reflected light according to the preset incident light and the target special effect picture, and sample the preset environment map according to the reflected light direction to obtain a reflected color value; A reflectivity corresponding to the reflection color value and a refractive index corresponding to the refraction color value are determined, and the initial special effect image is processed according to the refraction color value, the refractive index, the reflection color value, and the reflectivity.

8. The special effect processing method according to claim 1, characterized in that: Also includes: Render the preset special effect object into the target special effect screen.

9. The special effect processing method according to claim 8, characterized in that: The rendering of the preset special effect object into the target special effect picture includes: Determine target display information of a preset special effect object in the target special effect picture, and render the special effect object into the target special effect picture using the target display information, wherein the target display information includes at least one of display position, motion state, display color, and display depth.

10. A special effects rendering device, characterized in that: include: a special effects generation module, configured to obtain an augmented reality picture captured by a shooting device, and generate a target special effects picture based on the augmented reality picture, wherein the outline of the target special effects picture is irregular; a special effect display module, configured to display the first special effect area of the target special effect image in the first image area when the shooting device displays the first image area of the augmented reality image; The display change module is used to display the second screen area of the augmented reality screen and display the second special effect area of the target special effect screen in the second screen area when it is detected that the shooting angle of the shooting device has changed.

11. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the special effect processing method according to any one of claims 1 to 9.

12. A storage medium containing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the special effect processing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Augmented reality data presentation method, device and equipment and storage medium

    CN110716646A