WO2024088141A1 - 特效处理方法、装置、电子设备及存储介质 - Google Patents

特效处理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2024088141A1
WO2024088141A1 PCT/CN2023/125288 CN2023125288W WO2024088141A1 WO 2024088141 A1 WO2024088141 A1 WO 2024088141A1 CN 2023125288 W CN2023125288 W CN 2023125288W WO 2024088141 A1 WO2024088141 A1 WO 2024088141A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
special effect
preset
processing
caustic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/125288
Other languages
English (en)
French (fr)
Inventor
王兢业
李小奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Publication of WO2024088141A1 publication Critical patent/WO2024088141A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating three-dimensional [3D] models or images for computer graphics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Definitions

  • 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.
  • a virtual camera can be used to shoot and render water surface special effects.
  • a video is 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 realism of the special effects is less.
  • 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.
  • an embodiment of the present disclosure provides a special effect processing method, wherein the method includes:
  • the shooting device displays the first picture area of the augmented reality picture, displaying the first special effect area of the target special effect picture in the first picture area;
  • 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.
  • an embodiment of the present disclosure further provides a special effects rendering device, wherein the device includes:
  • a special effects generation module used to obtain an augmented reality picture captured by a shooting device, and generate a target special effects picture based on the augmented reality picture;
  • 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 picture area of the augmented reality picture and display the second special effect area of the target special effect picture in the second picture area when it is detected that the shooting angle of the shooting device changes.
  • an embodiment of the present disclosure further provides an electronic device, wherein the electronic device includes:
  • processors one or more processors
  • a storage device for storing one or more programs
  • the one or more processors 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 claims 1-9.
  • 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.
  • the technical solution of the embodiment of the present disclosure obtains the augmented reality picture taken by the shooting device, based on the The target special effects screen is generated by the augmented reality screen, and the target special effects screen with a sense of space can be generated by the augmented reality screen, which is more in line with the real scene; when the shooting device displays the first screen area of the augmented reality screen, the first special effects area of the target special effects screen is displayed in the first screen area, and the shooting angle is associated with the screen display area of the target special effects screen to ensure the visual presentation effect; 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 effects area of the target special effects screen is displayed in the second screen area.
  • the target special effects screen is generated by the virtual display screen, and different special effects areas are displayed in the corresponding screen area based on the changes in the position and angle of the shooting device, and the target special effects screen can change with the changes in the shooting angle of the shooting device, and the changes in the shooting angle are used to simulate the changes in the user's field of view, and then the changes in the actual scene are simulated by displaying different screen areas of the target special effects screen, so that the rendering effect of the target special effects screen is more realistic and vivid, and the user experience is improved.
  • FIG1 is a schematic flow chart of a special effect processing method provided by an embodiment of the present disclosure.
  • FIG2 is a flow chart of another special effect processing method provided by an embodiment of the present disclosure.
  • FIG3 is a flow chart of another special effect processing method provided by an embodiment of the present disclosure.
  • FIG4 is a caustic light map provided by an embodiment of the present disclosure.
  • FIG5 is a normal texture map provided by an embodiment of the present disclosure.
  • FIG6 is a flow chart of another special effect processing method provided by an embodiment of the present disclosure.
  • FIG7 is a flow chart of an optional example of a special effect processing method provided by an embodiment of the present disclosure.
  • FIG8 is a schematic diagram of the structure of a special effect processing device provided by an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of the structure of a special effect processing electronic device provided by an embodiment of the present disclosure.
  • a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information.
  • the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
  • the prompt information in response to receiving an active request from the user, 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.
  • the pop-up window may also carry a selection control for the user to choose "agree” or “disagree” to provide personal information to the electronic device.
  • Figure 1 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 a special effects picture with a stereoscopic sense.
  • the method can be executed by a special effects processing device, which can be implemented in the form of software and/or hardware.
  • a special effects processing device can be implemented in the form of software and/or hardware.
  • 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 a mobile terminal equipped with an augmented reality (AR) shooting device.
  • AR augmented reality
  • the method of this embodiment may specifically include:
  • the shooting device can be understood as a device for shooting the augmented reality picture.
  • the shooting device can be a device with a shooting function and an AR component installed, and has 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.
  • the terminal can be preset according to the scene requirements, and no specific limitation is made here.
  • 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 no specific limitation is made here.
  • the augmented reality picture can be a single frame picture in an augmented reality video, or it can be an augmented reality image.
  • the target special effects picture can be understood as a special effects picture obtained by performing special effects processing on the augmented reality picture.
  • the special effects of the target special effects picture can be preset according to the scene requirements, and no specific limitation is made here.
  • the outline of the target special effects picture may be irregular.
  • 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.
  • the target special effects picture may be a water surface special effects picture.
  • the edge of the water surface special effects picture may be nonlinear to simulate the scene of water surface fluctuations.
  • 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.
  • generating a target special effect picture based on the augmented reality picture includes: obtaining a depth estimation map of the augmented reality picture, and generating the target special effect picture based on the depth estimation map.
  • the depth data of each pixel in the depth estimation map can be used to indicate the depth of the pixel. The distance from the corresponding scene information to the shooting device.
  • generating a target special effects picture based on the depth estimation map includes: determining a special effects rendering area corresponding to the augmented reality picture; for each pixel to be rendered in the special effects rendering area, determining a pixel value of the pixel to be rendered based on depth information corresponding to the pixel to be rendered in the depth estimation map; and rendering to obtain the target special effects picture based on the pixel values of each pixel to be rendered in the special effects rendering area.
  • 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 trigger operation for the augmented reality screen, acquiring the special effect rendering area based on the triggered special effect.
  • the special effect application trigger operation can be understood as a trigger operation acting on the augmented reality screen for starting a default special effect, or a special effect selection operation for at least one special effect, etc.
  • the shooting device displays the first picture area of the augmented reality picture, display the first special effect area of the target special effect picture in the first picture area.
  • the screen area of the augmented reality screen displayed by the shooting device can change accordingly.
  • the corresponding special effect area can be displayed in different screen areas of the target special effect screen.
  • the presentation effects of different screen areas of the target special effect screen can be the same or different.
  • the first screen area can be understood as the screen area corresponding to the current shooting angle of the shooting device in the augmented reality screen.
  • the first special effect area can be understood as the special effect area displayed in the target special effect screen corresponding to the first screen area.
  • the shooting device displays the first screen area of the augmented reality screen
  • the special effect area corresponding to the first screen area in the target special effect screen is obtained as the first special effect area. domain, and display the first special effect area in the first picture area.
  • the shooting angle can be understood as the angle at which the shooting device shoots the augmented reality picture.
  • the shooting angle can be determined based on information such as the shooting position and/or shooting direction when the shooting device acquires the augmented reality picture.
  • 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 changes.
  • the second special effect area can be understood as the special effect area displayed in the target special effect screen corresponding to the second screen area.
  • the first screen area and the second screen area can be different, and the first special effect area and the second special effect area can be different.
  • the second picture area of the augmented reality picture captured 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.
  • the special effects processing method also includes: rendering a preset special effects object into the target special effects screen.
  • the special effects object can be understood as an object rendered in the target special effects screen.
  • 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.
  • 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.
  • the target special effects screen as a water surface as an example, the special effects object can be a floating object on the water surface and/or aquatic creatures, such as ships, fish, and water plants.
  • rendering the preset special effect object into the target special effect picture includes: determining target display information of the preset special effect object in the target special effect picture, and rendering the special effect object into the target special effect picture with the target display information.
  • rendering the preset special effect object into the target special effect picture with the target display information the rendering effect of the target special effect picture can be made richer.
  • the target display information can be understood as information used to indicate how the special effect object is displayed in the target special effect screen.
  • the target display information can be preset according to the scene requirements and is not specifically limited here.
  • the target display information may include but is not limited to at least one of display position, motion state, display color, and display depth.
  • the motion state can be understood as indicating whether the special effect object moves, and in what manner the special effect object moves when the special effect object moves.
  • the motion state of the special effect object in the target special effect picture can be a state simulating pendulum motion, etc.
  • the motion state includes dynamic or static.
  • the special effect object can be displayed in the target special effect picture in a static or dynamic manner.
  • the motion state may also include but is not limited to at least one of the motion information such as the motion angle, motion amplitude, motion time, motion trajectory and motion speed of the special effects object in the target special effects picture.
  • the display color information can be understood as the color information of the special effect object displayed in the target special effect screen.
  • 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.
  • the display depth information can be understood as the special effect object displayed on the target special effect picture. Depth information in the surface. It is understandable that, for the special effect object, the display depth information of different object areas may be different.
  • the special effect object is rendered based on the display depth information of each object area of the pre-set special effect object in the target special effect picture.
  • the special effect effect can be presented based on the display depth of the special effect object and the target special effect picture.
  • the technical solution of the disclosed embodiment obtains the augmented reality picture captured by the shooting device, generates the target special effect picture based on the augmented reality picture, and can generate the 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 changes, 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 through a virtual display picture, and the target special effect 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 change of the actual scene is simulated by displaying different picture areas of the target special effect picture, so that the rendering effect of the target special effect picture is more realistic and vivid, and the user experience is improved.
  • FIG2 is a flow chart of another special effect processing method provided by an embodiment of the present disclosure.
  • This embodiment is a refinement of the method of generating a target special effect screen based on the augmented reality screen described in the above embodiment.
  • the specific implementation method can refer to the description of this embodiment. Among them, the technical features that are the same or similar to the above embodiments are not repeated here.
  • the method of this embodiment may specifically include:
  • S210 Obtain an augmented reality image captured by a shooting device.
  • 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.
  • the optical processing includes at least one of scattering processing, reflection processing, refraction processing, caustic processing and highlight processing.
  • the initial special effects picture can be understood as a special effects picture initially generated based on the augmented reality picture.
  • the optical processing can be understood as a process of processing each pixel in the initial special effects picture based on optical information.
  • the optical processing can be at least one of scattering processing, reflection processing, refraction processing, caustic processing and highlight processing.
  • the scattering process may be understood as a process of processing at least part of the pixels in the initial special effects picture based on the scattering of light so that the initial special effects picture presents an effect of scattered light.
  • the pixels at different distances from the terminal in the initial special effects picture can present different brightness levels, making the optical effect of the initial special effects picture more realistic.
  • scattering processing is performed on the initial water surface special effects picture, and the target special effects picture obtained can be a water surface farther from the shooting device, with a darker color, and a water surface closer to the shooting device, with a brighter color, thereby improving the authenticity of the water surface special effects rendering.
  • the reflection processing can be understood as a processing method of processing at least part of the pixels 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.
  • the reflection processing can be a process of processing the optical information of the pixels 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 pixels 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.
  • the refraction processing can be a process of processing the optical information of the pixels below the water surface in the initial water surface special effects picture.
  • the initial special effects picture is processed Reflection and refraction processing can make the pixels on the water surface and below the water surface in the water surface picture present different optical effects, thereby improving the authenticity of the water surface special effects rendering.
  • the initial special effects picture can be subjected to caustic processing by sampling a preset caustic light map. It is understandable that the caustic light map and the sampling method of the caustic light map can be different according to different shooting angles of the shooting device. In the processing of the water surface special effects picture, the caustic processing can make the water surface special effects picture simulate the shimmering special effects of the real water surface under the light.
  • highlight processing can be understood as a process of making a partial area of the initial special effect picture present an optical effect of completely reflecting the light source.
  • the initial special effect picture is processed based on a preset highlight algorithm.
  • the preset highlight algorithm may include but is not limited to the Blinn-Phong lighting algorithm.
  • the optical processing may include reflection processing and refraction processing.
  • the initial special effects picture is optically processed, including: determining the direction of the refracted light according to the preset incident light and the target special effects picture, sampling the augmented reality picture according to the refracted light direction to obtain the refracted color value; determining the direction of the reflected light according to the preset incident light and the target special effects picture, sampling the preset environment map according to the reflected light direction to obtain the reflected color value; determining the reflectivity corresponding to the reflected color value and the refractive index corresponding to the refraction color value, and processing the initial special effects picture according to the refraction color value, the refractive index, the reflected color value and the reflectivity.
  • 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 smaller the picture corresponding to the refractive index.
  • the brightness of the pixels on the surface can be brighter.
  • 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 picture pixel 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.
  • the technical solution of the disclosed embodiment generates an initial special effect picture based on the augmented reality picture, and optically processes the initial special effect picture to obtain a target special effect picture, so that the rendered water surface special effect simulates the optical effects of scattering, reflection, refraction, caustics, and highlights of the real water surface, thereby improving the vividness and authenticity of the target special effect picture.
  • FIG3 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.
  • the method includes:
  • S310 Obtain an augmented reality image captured by a shooting device.
  • 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.
  • the caustic map can be understood as a map that characterizes the caustic characteristics.
  • the caustic map can be set according to actual needs and is not specifically limited here, as long as it can characterize the caustic characteristics.
  • the caustic map can be shown in Figure 4.
  • the caustic color value of each pixel point in the initial special effect picture can be determined based on the caustic light map to perform caustic processing on the initial special effect picture.
  • the caustic processing of the initial special effects picture based on a preset caustic light map includes: determining, for each picture pixel to be subjected to caustic processing in the initial special effects picture, a caustic sampling coordinate corresponding to the picture pixel point; 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 performing caustic processing on the picture pixel point based on the caustic color value corresponding to the picture pixel point.
  • 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 light map can be sampled to obtain the caustic color value corresponding to the picture pixel point.
  • 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.
  • determining the caustic sampling coordinates corresponding to the picture pixel point includes: determining the normal sampling coordinates corresponding to a preset normal texture map based on the world coordinates of the picture pixel point and the lighting direction coordinates of a preset light source; and determining the caustic sampling coordinates corresponding to the picture pixel point based on the normal sampling coordinates.
  • 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).
  • the caustic sampling coordinates corresponding to each pixel point of the picture 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.
  • 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.
  • the normal sampling points in the normal texture map are determined based on the normal sampling coordinates, and the caustic sampling coordinates corresponding to the picture pixel are determined based on the coordinates of the normal sampling points.
  • the horizontal and vertical coordinate components (i.e., the x component and the y component) of the normal sampling points can be used as the caustic sampling coordinates corresponding to the picture pixel.
  • the preset caustic light map is sampled based on the caustic sampling coordinates to obtain the caustic map value corresponding to each picture pixel.
  • determining the caustic color value corresponding to the picture pixel point based on the sampling result includes: determining the caustic color value corresponding to the picture pixel point based on the caustic map value corresponding to the picture pixel point. Specifically, the difference between the vertical axis component (i.e., the y component) of the world coordinates of the pixel point on the screen and a first preset value is calculated, and then a second ratio of the difference to a second preset value is calculated, the difference between 1 and the second ratio is used as the first factor, the caustic map value corresponding to the pixel point on the screen is used as the second factor, and the first factor and the second factor are multiplied to obtain the caustic color value corresponding to the pixel point on the screen.
  • the vertical axis component i.e., the y component
  • the initial special effects picture may be processed by combining one or more of scattering processing, reflection processing, refraction processing and highlight processing to obtain a target special effects picture.
  • the technical solution of the disclosed embodiment performs caustic processing on the initial special effects picture based on a preset caustic light map, so that the target special effects picture can present a shimmering dynamic effect, thereby improving the vividness and authenticity of the special effects rendering.
  • FIG6 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.
  • the method includes:
  • S410 Acquire an augmented reality image captured by a shooting device.
  • the sight line vector can be understood as the distance from the camera to the image to be processed.
  • the preset direction can be the longitudinal direction of the sight vector.
  • scattering processing is performed on the initial special effects picture, so that the processed initial special effects picture can present a color gradient effect.
  • two different color values can be pre-set to represent the color value of the picture pixel farthest from the terminal and the color value of the picture pixel closest to the terminal.
  • 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.
  • scattering processing is performed on the initial special effects picture, including: processing the initial special effects picture according to a preset first color value, a preset second color value, and the depth data of each pixel corresponding to the initial special effects picture.
  • 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).
  • 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.
  • 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.
  • the preset first color value and the preset second color value can be preset according to scene requirements, and are not specifically limited here.
  • the first color value can be a darker water surface color
  • the second color value can be a lighter water surface color.
  • 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 picture.
  • 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.
  • the technical solution of the disclosed embodiment is to determine the weight values of the preset first color value and the preset second color value respectively according to the component of the sight line vector corresponding to the augmented reality screen in the preset direction; determine the scattering value based on the preset first color value, the preset second color value, the weight value of the preset first color value and the weight value of the preset second color value, and apply the scattering value to the initial special effect screen.
  • This can make the target special effect screen have a visual effect of far and near differences, and improve the authenticity of special effect rendering.
  • FIG7 is a flowchart of an optional example of a special effect processing method provided by an embodiment of the present disclosure. Taking the processing of a water surface special effect picture as an example, as shown in FIG7 , the overall flow of the special effect processing method can be:
  • Render special effect objects Render special effect objects floating on the water surface in the water surface special effect screen, such as dragon boats.
  • Water surface rendering can be the result of comprehensive consideration of scattering, reflection, refraction, caustics and highlights.
  • Refraction and reflection Determine the direction of the refracted light, and sample the augmented reality image according to the refracted light direction to obtain the refracted color value; determine the direction of the reflected light, and sample the preset environment map according to the reflected light direction to obtain the reflected color value.
  • the refracted color value and the reflected color value are mixed according to the mixing coefficient calculated by the Schlick approximation method of the Fresnel law.
  • the normal texture map is sampled based on the lateral coordinate and lateral coordinate of the normal sampling coordinate to obtain a normal sampling point.
  • the horizontal and vertical coordinate components (i.e., x component and y component) of the normal sampling point are used as the horizontal and vertical coordinate components of the caustic sampling coordinates corresponding to the pixel point of the picture.
  • the preset caustic light map is sampled and processed to obtain each pixel of the picture.
  • the technical solution of this embodiment is based on the augmented reality picture obtained by the shooting device equipped with AR components to render the water surface, and performs various optical processing on the surface to render the three-dimensional (3D) special effect of the water surface from the conventional rectangular horizontal plane, thereby improving the realism of the special effect processing effect.
  • different water surface special effect areas can be displayed in the corresponding picture area according to the change of the shooting angle, thereby improving the vividness of the special effect processing effect and enhancing the user experience.
  • FIG8 is a schematic diagram of the structure of a special effect processing device provided by an embodiment of the present disclosure. As shown in FIG8 , the device includes: a special effect generation module 510 , a special effect display module 520 and a display change module 530 .
  • 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.
  • the technical solution of the disclosed embodiment obtains an augmented reality picture taken by a shooting device, generates a target special effect picture based on the augmented reality picture, and can 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 a 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.
  • the shooting angle of the shooting device is detected to have changed, 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.
  • the target special effect screen is generated by a virtual display screen, and the target special effect screen can change with 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 change of the actual scene is simulated by displaying different screen areas of the target special effect screen, so that the rendering effect of the target special effect screen is more real and vivid, and the user experience is improved.
  • the special effect generation module 510 includes: an optical processing submodule.
  • the optical processing submodule 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.
  • the optical processing submodule includes: a caustic processing unit.
  • the caustic processing unit is used to perform caustic processing on the initial special effect picture based on a preset caustic light map.
  • the caustic processing unit includes: a caustic sampling coordinate determination subunit, a caustic color value acquisition subunit and a caustic processing subunit.
  • the caustic sampling coordinate determination subunit is used to determine the caustic sampling coordinates corresponding to each picture pixel point to be subjected to caustic processing in the initial special effect picture;
  • the caustic color value acquisition subunit is used to sample a preset caustic light map based on the caustic sampling coordinates, and determine a caustic color value corresponding to a pixel point on the screen based on the sampling result;
  • 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.
  • the caustic sampling coordinate determination subunit is used to:
  • the preset The normal sampling coordinates corresponding to the normal texture map
  • the caustic sampling coordinates corresponding to the picture pixel point are determined according to the normal sampling coordinates.
  • the optical processing submodule includes a caustic processing unit, which is used to:
  • 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.
  • the optical processing submodule includes a reflection processing unit and a refraction processing unit, which are used to:
  • the reflectivity corresponding to the reflection color value and the refractive index corresponding to the refraction color value are determined, and the initial special effect picture is processed according to the refraction color value, the refractive index, the reflection color value and the reflectivity.
  • the special effect processing method further includes a special effect object rendering module, which is used to:
  • the special effect object rendering module is used to:
  • 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 with the target display information, wherein the target display information includes at least one of display position, motion state, display color and display depth.
  • the special effects processing device provided in the embodiments of the present disclosure can execute the special effects processing device provided in any embodiment of the present disclosure.
  • An effective processing method is provided, which has functional modules and beneficial effects corresponding to the execution method.
  • FIG9 is a schematic diagram of the structure of a special effect processing electronic device provided by an embodiment of the present disclosure.
  • the terminal device in the embodiment 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), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG9 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present disclosure.
  • 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 to a random access memory (RAM) 503.
  • a processing device e.g., a central processing unit, a graphics processing unit, etc.
  • RAM random access memory
  • various programs and data required for the operation of the electronic device 500 are also stored.
  • 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.
  • the following devices can be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; and storage devices 508 including, for example, a magnetic tape, a hard disk, etc. Storage device 508; and communication device 509. Communication device 509 can allow electronic device 500 to communicate with other devices wirelessly or by wire to exchange data.
  • FIG. 9 shows electronic device 500 with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices can be implemented or provided alternatively.
  • 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 contains program code for executing the method shown in the flowchart.
  • the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502.
  • the processing device 501 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • 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.
  • the technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
  • the embodiments of the present disclosure provide a computer storage medium on which a computer program is stored.
  • the program is executed by a processor, the special effect processing method provided by the above embodiments is implemented.
  • the computer-readable medium of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above.
  • Computer-readable storage media may include Including but not limited to: an electrical connection with one or more conductors, 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.
  • a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device.
  • a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such a propagated data signal can 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 can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate or transmit a program for use by or in combination with an instruction execution system, an apparatus or a device.
  • the program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network).
  • HTTP HyperText Transfer Protocol
  • 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.
  • the computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
  • the computer-readable medium carries one or more programs.
  • the electronic device obtains an augmented reality picture captured by a shooting device, A target special effects picture is generated 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.
  • 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.
  • 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., via the Internet using an Internet service provider).
  • LAN local area network
  • WAN wide area network
  • Internet service provider e.g., via the Internet using an Internet service provider
  • each box in the flowchart or block diagram may represent a module, a program segment, or a portion of a code, which contains one or more executable instructions for implementing the specified logical functions.
  • the functions marked in the boxes may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession may actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved.
  • each box in the block diagram and/or flowchart, and the combination of boxes in the block diagram and/or flowchart may be implemented with a dedicated hardware-based system that performs the specified functions or operations, or may be implemented with a dedicated It is implemented by a combination of hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or hardware.
  • the name of a unit does not limit the unit itself in some cases.
  • the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
  • exemplary types of hardware logic components 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.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOCs systems on chip
  • CPLDs complex programmable logic devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may 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 may 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.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM portable compact disk read-only memory
  • CD-ROM compact disk read-only memory
  • magnetic storage device or any suitable combination of the foregoing.
  • Example 1 provides a special effect processing method, including:
  • the shooting device displays the first picture area of the augmented reality picture, displaying the first special effect area of the target special effect picture in the first picture area;
  • 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.
  • Example 2 provides the method of Example 1, further comprising:
  • 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.
  • Example 3 provides the method of Example 2, further comprising:
  • the initial special effect picture is subjected to caustic processing based on a preset caustic light map.
  • Example 4 provides the method of Example 3, further comprising:
  • the picture pixel is subjected to caustic processing based on the caustic color value corresponding to the picture pixel.
  • Example 5 provides the method of Example 4, further comprising:
  • the caustic sampling coordinates corresponding to the picture pixel point are determined according to the normal sampling coordinates.
  • Example 6 provides the method of Example 2, further comprising:
  • 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.
  • Example 7 provides the method of Example 2, further comprising:
  • the reflectivity corresponding to the reflection color value and the refractive index corresponding to the refraction color value are determined, and the initial special effect picture is processed according to the refraction color value, the refractive index, the reflection color value and the reflectivity.
  • Example 8 provides the method of Example 1, further comprising:
  • Example 9 provides the method of Example 8, further comprising:
  • 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 with the target display information, wherein the target display information includes at least one of display position, motion state, display color and display depth.
  • Example 10 provides a special effect processing device, including:
  • a special effects generation module used to obtain an augmented reality picture captured by a shooting device, and generate a target special effects picture based on the augmented reality picture;
  • 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 picture area of the augmented reality picture and display the second special effect area of the target special effect picture in the second picture area when it is detected that the shooting angle of the shooting device changes.
  • Example 11 provides a special effects processing electronic device, including:
  • processors one or more processors
  • a storage device for storing one or more programs
  • the one or more processors 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.
  • Example 12 provides a special effect processing storage medium, including:

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本公开实施例提供了一种特效处理方法、装置、电子设备及存储介质。获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面;在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。通过虚拟显示画面生成目标特效画面,且目标特效画面能够随拍摄设备的拍摄角度的变化而变化,提高了特效处理效果的真实感和生动性。

Description

特效处理方法、装置、电子设备及存储介质
相关申请的交叉引用
本申请要求于2022年10月28日提交的申请号202211339065.X的中国专利的权益。以上申请的全部教导通过引用并入本文。
技术领域
本公开实施例涉及水面渲染技术,尤其涉及一种特效处理方法、装置、电子设备及存储介质。
背景技术
当前,终端应用娱乐场景中,通常涉及到水面渲染技术,可以通过一个虚拟的相机,拍摄并渲染得到水面特效。
在手机特效场景下,一般是通过手机后置摄像头拍摄视频,将渲染得到的水面特效显示在屏幕中的固定位置,显示效果比较呆板,生动性较差,且与真实水面相比,特效效果的真实性较差。
发明内容
本公开提供一种特效处理方法、装置、电子设备及存储介质,以实现提高了特效处理效果的生动性和真实性的效果。
第一方面,本公开实施例提供了一种特效处理方法,其中,该方法包括:
获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效 画面;
在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;
在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
第二方面,本公开实施例还提供了一种特效渲染装置,其中,该装置包括:
特效生成模块,用于获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面;
特效显示模块,用于在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;
显示变化模块,用于在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
第三方面,本公开实施例还提供了一种电子设备,其中,该电子设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-9中任一所述的特效处理方法。
第四方面,本公开实施例还提供了一种包含计算机可执行指令的存储介质,其中,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-9中任一所述的特效处理方法。
本公开实施例的技术方案,获取拍摄设备拍摄的增强现实画面,基于所述 增强现实画面生成目标特效画面,能够通过增强现实画面生成具有空间感的目标特效画面,更加贴合真实场景;在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中,将拍摄角度与目标特效画面的画面显示区域关联,保证视觉呈现效果;在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。通过虚拟显示画面生成目标特效画面,基于所述拍摄设备的位置和角度的变化,将不同的特效区域显示于相对应的画面区域,且目标特效画面能够随拍摄设备的拍摄角度的变化而变化,采用拍摄角度的变化仿真用户的视野变化,进而通过显示目标特效画面的不同画面区域来模拟实际场景的变化情况,使得目标特效画面的渲染效果更加真实,更加生动,提升了用户体验。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例所提供的一种特效处理方法的流程示意图;
图2是本公开实施例所提供的另一种特效处理方法的流程示意图;
图3是本公开实施例所提供的又一种特效处理方法的流程示意图;
图4是本公开实施例所提供的一种焦散光贴图;
图5是本公开实施例所提供的一种法线纹理贴图;
图6是本公开实施例所提供的再一种特效处理方法的流程示意图;
图7是本公开实施例所提供的一种特效处理方法的可选实例的流程示意图;
图8为本公开实施例所提供的一种特效处理装置的结构示意图;
图9为本公开实施例所提供的一种特效处理电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说 明性的目的,而并不是用于对这些消息或信息的范围进行限制。
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。
图1为本公开实施例所提供的一种特效处理方法的流程示意图,本公开实施例适用于具有立体感的特效画面渲染的情形,该方法可以由特效处理装置来执行,该装置可以通过软件和/或硬件的形式实现,可选的,通过电子设备来实现,该电子设备可以是移动终端、PC端或服务器等,本公开实施例尤其适用于设置有增强现实(Augmented Reality,AR)拍摄装置的移动终端。
如图1所示,本实施例的方法具体可包括:
S110、获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面。
其中,所述拍摄设备可以理解为用于拍摄所述增强现实画面的设备。可选的,所述拍摄设备可以是具有拍摄功能且安装有AR组件,具有拍摄功能的设备。所述拍摄设备还可用于显示对所述增强现实画面进行特效处理后得到的特效画面。在本公开实施例中,所述终端可以根据场景需求预设,在此不做具体限定。示例性的,所述拍摄设备可以是配置于终端中的AR相机或增强现实AR设备(如AR眼镜)等。可以理解的是,增强现实画面的具体画面内容可以根据实际拍摄场景确定,在此不做具体限定。可选的,所述增强现实画面可以是增强现实视频中的单帧画面,也可以是增强现实图像。
其中,目标特效画面可以理解为针对所述增强现实画面进行特效处理得到的特效画面。在本公开实施例中,所述目标特效画面的特效效果可以根据场景需求预设,在此不做具体限定。示例性地,所述目标特效画面的轮廓可以是不规则的。可选的,所述目标特效画面的表现形式可以有多种,例如,可以是针对所述增强现实画面进行水面特效渲染、雪山特效渲染、火焰特效渲染或流沙特效渲染等得到的特效画面。示例性的,所述目标特效画面可以是水面特效画面。进一步地,水面特效画面的边缘可以是非线性的,以模拟水面波动的场景。
在本公开能够实施例中,通过所述拍摄设备所获取的增强现实画面,可以包括所述增强现实画面的景深信息,即所述增强现实画面中每个像素点与所述拍摄设备之间的距离。可选地,基于所述增强现实画面生成目标特效画面,包括:获取所述增强现实画面的深度估计图,基于所述深度估计图生成目标特效画面。其中,所述深度估计图中每个像素点的深度数据可用于指示该像素点对 应的场景信息到拍摄设备的距离。
示例性地,基于所述深度估计图生成目标特效画面,包括:确定与所述增强现实画面对应的特效渲染区域;针对特效渲染区域中的每个待渲染像素点,基于所述深度估计图中所述待渲染像素点对应的深度信息,确定所述待渲染像素点的像素值;基于所述特效渲染区域中各个待渲染像素点的像素值渲染得到目标特效画面。
可选地,确定与所述增强现实画面对应的特效渲染区域,包括:基于预设的区域生成算法确定与所述增强现实画面对应的特效渲染区域;或者,响应于针对所述增强现实画面的特效应用触发操作,基于触发的特效获取特效渲染区域。其中,所述特效应用触发操作可以理解为作用于所述增强现实画面用于启动默认特效的触发操作,或者,针对至少一个特效的特效选择操作等。
S120、在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中。
可以理解的是,在所述拍摄设备的拍摄角度发生变化时,通过所述拍摄设备显示所述增强现实画面的画面区域可以随之变化,换言之,针对显示的所述增强现实画面的画面区域的变化,可以将所述目标特效画面的不同画面区域中显示相应特效区域。在本公开实施例中,目标特效画面的不同画面区域的呈现效果可以相同也可以不同。
其中,所述第一画面区域可以理解为通过所述增强现实画面中与拍摄设备当前的拍摄角度所对应的画面区域。所述第一特效区域可以理解为目标特效画面中与所述第一画面区域对应显示的特效区域。
具体地,在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,获取所述目标特效画面中与所述第一画面区域对应的特效区域作为第一特效区 域,并将所述第一特效区域显示于所述第一画面区域中。
S130、在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
其中,拍摄角度可以理解为所述拍摄设备拍摄所述增强现实画面时的角度。可选的,所述拍摄角度可以基于所述拍摄设备获取所述增强现实画面时的拍摄位置和/或拍摄朝向等信息确定。
其中,所述第二画面区域可以理解为在所述拍摄设备的拍摄角度发生变化后,通过所述终端拍摄的增强现实画面的画面区域。所述第二特效区域可以理解为目标特效画面中与所述第二画面区域对应显示的特效区域。可选地,所述第一画面区域与所述第二画面区域可以不同,所述第一特效区域与所述第二特效区域可以不同。
具体地,在检测到所述拍摄设备的拍摄角度发生变化的情况下,获取拍摄设备拍摄到的所述增强现实画面的第二画面区域,显示所述第二画面区域,并在所述第二画面区域中显示所述目标特效画面的第二特效区域。
为了丰富特效的显示效果,可以在目标特效画面中增加渲染预设的特效对象。可选的,所述特效处理方法,还包括:将预设的特效对象渲染至所述目标特效画面中。其中,所述特效对象可以理解为渲染于所述目标特效画面中的对象。在本公开实施例中,所述特效对象的具体形态和显示方式等信息可以根据需求预设,在此不做具体限定。可选的,所述特效对象可以是预设的特效道具。不同的目标特效画面可以采用相同或不同的特效对象。示例性的,以目标特效画面为水面为例,所述特效对象可以是水面漂浮物和/或水中生物等,例如可以是船只、鱼以及水草等。
可选的,所述将预设的特效对象渲染至所述目标特效画面中,包括:确定预设的特效对象在所述目标特效画面中的目标显示信息,以所述目标显示信息将所述特效对象渲染至所述目标特效画面中。通过将预设的特效对象以目标显示信息渲染至所述目标特效画面中,可以使所述目标特效画面的渲染效果更加丰富。
其中,目标显示信息可以理解为用于指示所述特效对象在所述目标特效画面中以何种方式进行显示的信息。在本公开实施例中,所述目标显示信息可以根据场景需求预设,在此不做具体限定。可选的,所述目标显示信息可以包括但不限于显示位置、运动状态、显示颜色以及显示深度中的至少一种。
其中,运动状态可以理解为用于指示所述特效对象是否发生运动,以及,在所述特效对象发生运动的情况下以何种方式进行运动。在本公开实施例中,示例性的,特效对象在所述目标特效画面中的运动状态可以是模拟钟摆运动的状态等。
可选的,所述运动状态包括动态或静态。示例性地,特效对象可以在所述目标特效画面中以静态或动态的方式显示。
可选的,在所述特效对象发生运动的情况下,所述运动状态还可以包括但不限于所述特效对象在所述目标特效画面中的运动角度、运动幅度、运动时间、运动轨迹以及运动速度等运动信息中的至少一种。
其中,显示颜色信息可以理解为所述特效对象显示在所述目标特效画面中的颜色信息。可选的,所述显示颜色信息基于所述特效对象在所述目标特效画面中的显示位置确定。具体地,可以基于所述特效对象在所述目标特效画面中的显示位置处的像素点的颜色值和/或深度数据确定。
其中,所述显示深度信息可以理解为所述特效对象显示在所述目标特效画 面中的深度信息。可以理解的是,针对所述特效对象,不同对象区域的显示深度信息可以不同。在本公开实施例中,可选的,基于预先设置的特效对象的各个对象区域在所述目标特效画面中的显示深度信息渲染所述特效对象。在本公开实施例中,可以基于所述特效对象与所述目标特效画面的显示深度呈现特效效果。采用本技术方案,可以实现所述特效对象的部分区域遮挡所述目标特效画面,或者所述目标特效画面遮挡所述特效对象的部分区域的特效效果。
本公开实施例的技术方案,获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面,能够通过增强现实画面生成具有空间感的目标特效画面,更加贴合真实场景;在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中,将拍摄角度与目标特效画面的画面显示区域关联,保证视觉呈现效果;在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。通过虚拟显示画面生成目标特效画面,且目标特效画面能够随拍摄设备的拍摄角度的变化而变化,采用拍摄角度的变化仿真用户的视野变化,进而通过显示目标特效画面的不同画面区域来模拟实际场景的变化情况,使得目标特效画面的渲染效果更加真实,更加生动,提升了用户体验。
图2是本公开实施例所提供的另一种特效处理方法的流程示意图,本实施例是对上述实施例中所述将所述基于所述增强现实画面生成目标特效画面进行细化。可选地,具体实施方式可以参见本实施例的说明。其中,与前述实施例相同或相似的技术特征在此不再赘述。
如图2所示,本实施例的方法具体可包括:
S210、获取拍摄设备拍摄的增强现实画面。
S220、基于所述增强现实画面生成初始特效画面,对所述初始特效画面进行光学处理,得到目标特效画面。
其中,所述光学处理包括散射处理、反射处理、折射处理、焦散处理和高光处理中的至少一种。
其中,所述初始特效画面可以理解为基于所述增强现实画面初步生成的特效画面。所述光学处理可以理解为基于光学信息对所述初始特效画面中每个像素点进行处理的过程。可选的,所述光学处理可以是散射处理、反射处理、折射处理、焦散处理和高光处理中的至少一种。
其中,散射处理可以理解为基于光的散射对所述初始特效画面中的至少部分像素点进行处理,以使初始特效画面呈现具有散射光的效果的处理方式。
在本公开实施例中,通过所述初始特效画面进行散射处理,可以使所述初始特效画面中,与终端不同距离的像素点,呈现不同的亮暗程度,使所述初始特效画面的光学效果更加真实。示例性的,针对初始水面特效画面进行散射处理,所获取的目标特效画面可以是距离拍摄设备较远的水面,颜色较暗,距离拍摄设备较近的水面,颜色较亮,提高了水面特效渲染的真实性。
其中,反射处理可以理解为基于光的反射对所述初始特效画面中的至少部分像素点进行处理,以使初始特效画面呈现具有发射光的效果的处理方式。可选的,所述反射处理可以是对初始水面特效画面中水面表面像素点的光学信息进行处理的过程。折射处理可以理解为对基于光的折射对所述初始特效画面中的至少部分像素点进行处理,以使初始特效画面呈现具有折射光的效果的处理方式。可选的,所述折射处理可以是对初始水面特效画面中水面表面以下像素点的光学信息进行处理的过程。在本公开实施例中,针对所述初始特效画面进 行反射处理和折射处理,可以使水面画面中水面表面和水面以下像素点呈现不同的光学效果,提高了水面特效渲染的真实性。
在本公开实施例中,可以通过采样预设的焦散光贴图的方式,对所述初始特效画面进行焦散处理,可以理解的是,根据针对所述拍摄设备的不同拍摄角度,焦散光贴图以及对焦散光贴图的采样方式也可以不同。在水面特效画面的处理中,通过焦散处理可以使得水面特效画面模拟出真实水面在光下的波光粼粼的特效效果。
其中,高光处理可以理解为使所述初始特效画面的部分区域呈现完全反射光源的光学效果的处理过程。可选地,基于预设的高光算法对初始特效画面进行处理。示例性地,预设的高光算法可包括但不仅限于Blinn-Phong光照算法。
示例性地,光学处理可以包括反射处理和折射处理。可选的,对所述初始特效画面进行光学处理,包括:根据预设入射光和所述目标特效画面确定折射光方向,根据所述折射光方向对所述增强现实画面进行采样得到折射颜色值;根据预设入射光和所述目标特效画面确定反射光方向,根据所述反射光方向对预设环境贴图进行采样得到反射颜色值;确定与所述反射颜色值对应的反射率和与所述折射颜色值对应的折射率,根据所述折射颜色值、所述折射率、所述反射颜色值与所述反射率对所述初始特效画面进行处理。
其中,所述预设入射光基于预设光源的光照方向确定。所述折射光方向可以理解为针对所述预设入射光和所述目标特效画面的折射率所确定的光线方向。所述折射颜色值可以理解为根据所述折射光方向对所述增强现实画面进行采样所得到颜色值。所述折射率可以理解为折射光线的辐射能量占所述预设入射光线的辐射能量的百分比。可以理解的是,所述折射率可以根据场景需求预设,在此不做具体限定。具体的,所述折射率越大,则所述折射率所对应的所述画 面像素点的亮暗程度可以更亮。
其中,反射光方向可以理解为针对所述预设入射光和所述目标特效画面中水面的反射率所确定的光线方向。预设环境贴图可以理解为表征所述折射光方向所对应的颜色值的贴图。反射颜色值可以理解为根据所述反射光方向对所述预设环境贴图进行采样所得到颜色值。所述反射率可以理解为所述反射光线的辐射能量占所述预设入射光线的辐射能量的百分比。可以理解的是,所述反射率可以根据场景需求预设,在此不做具体限定。具体的,所述反射率越大,则所述反射率所对应的所述画面像素点的亮暗程度可以更亮。以水面特效画面的渲染为例,通常情况下,水面以下的画面像素点亮度会较暗,水面表面的画面像素点亮度会较亮。
S230、在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中。
S240、在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
本公开实施例的技术方案,基于所述增强现实画面生成初始特效画面,对所述初始特效画面进行光学处理,得到目标特效画面。使渲染的水面特效模拟了真实水面的散射、反射、折射、焦散以及高光等光学效果,提高了目标特效画面的生动性与真实性。
图3是本公开实施例所提供的又一种特效处理方法的流程示意图,本实施例是对上述实施例中所述将所述对所述初始特效画面进行光学处理进行细化。
如图3所示,所述方法包括:
S310、获取拍摄设备拍摄的增强现实画面。
S320、基于所述增强现实画面生成初始特效画面,基于预设的焦散光贴图对所述初始特效画面进行焦散处理。
其中,所述焦散光贴图可以理解为表征焦散光特征的贴图。所述焦散光贴图可以根据实际需求进行设置,在此并不做具体限定,只要能够表征出焦散特性即可。例如焦散光贴图可以如图4所示。
在本公开实施例中,可以基于焦散光贴图确定所述初始特效画面中每个画面像素点的焦散颜色值,以对所述初始特效画面进行焦散处理。
可选的,所述基于预设焦散光贴图对所述初始特效画面进行焦散处理,包括:针对所述初始特效画面中每个待进行焦散处理的画面像素点,确定与所述画面像素点对应的焦散采样坐标;基于所述焦散采样坐标对预设的焦散光贴图进行采样处理,基于采样结果确定与所述画面像素点对应的焦散颜色值;基于与所述画面像素点对应的焦散颜色值对所述画面像素点进行焦散处理。
其中,所述画面像素点可以理解为针对所述初始特效画面中每个待进行焦散处理的像素点。所述焦散采样坐标可以理解为可以对焦散光贴图进行采样,获取所述画面像素点对应的焦散颜色值所依赖的坐标。所述采样处理可以理解为基于所述焦散采样坐标对预设的焦散光贴图进行采样,得到与所述画面像素点对应的焦散颜色值的处理过程。所述焦散颜色值可以理解为通过采样处理所获取的预设焦散光贴图中与所述画面像素点对应的像素点的颜色值。
可选的,确定与所述画面像素点对应的焦散采样坐标,包括:根据所述画面像素点的世界坐标和预设光源的光照方向坐标,确定与预设的法线纹理贴图对应的法线采样坐标;根据所述法线采样坐标确定与所述画面像素点对应的焦散采样坐标。
其中,所述世界坐标可以理解为由三个互相垂直并相交的坐标轴所组成坐标。所述预设光源可以理解为提供入射光的物体。在本公开实施例中,所述预设光源可以根据需求预设,在此不做具体先限定。所述光照方向坐标可以理解为入射光的光照方向坐标。所述法线纹理贴图可以理解为表征水面波纹特征的法线纹理的贴图(具体样例可参考图5)。在本公开实施例中,可以基于所述法线纹理贴图确定每个所述画面像素点对应的焦散采样坐标。所述法线采样坐标可以理解为针对所述法线纹理贴图进行采样的坐标。
具体的,确定世界坐标和预设光源的光照方向坐标,获取世界坐标和预设光源的光照方向的二维向量,通过计算获取可以于预设的发现纹理贴图进行采样的法线采样坐标。具体地,计算画面像素点的世界坐标的纵轴分量(即,y分量)与光照方向坐标的纵轴分量(即,y分量)的第一比值;将所述第一比值与光光照方向坐标的纵轴分量(即,x分量)的乘积与画面像素点的世界坐标的横轴分量(即,x分量)的和作为法线纹理贴图上的法线采样坐标的横坐标,将所述第一比值与光光照方向坐标的竖轴分量(即,z分量)的乘积与画面像素点的世界坐标的竖轴分量(即,z分量)的和作为法线纹理贴图上的法线采样坐标的纵坐标。
进一步的,基于法线采样坐标确定所述法线纹理贴图中的法线采样点,基于法线采样点的坐标确定与所述画面像素点对应的焦散采样坐标。具体的,可以将法线采样点的横纵坐标分量(即,x分量和y分量)作为与所述画面像素点对应的焦散采样坐标。然后,基于焦散采样坐标对预设的焦散光贴图进行采样处理,得到每个所述画面像素点对应的焦散贴图值。
可选地,基于采样结果确定与所述画面像素点对应的焦散颜色值,包括:基于所述画面像素点对应的焦散贴图值确定所述画面像素点对应的焦散颜色值。 具体地,计算画面像素点的世界坐标的纵轴分量(即,y分量)与第一预设数值的差值,再计算该差值与第二预设数值的第二比值,将1与所述第二比值的差值作为第一因子,将所述画面像素点对应的焦散贴图值作为第二因子,将第一因子与第二因子相乘得到与所述画面像素点对应的焦散颜色值。
在此基础上,还可以结合散射处理、反射处理、折射处理以及高光处理中的一种或多种方式对所述初始特效画面进行处理,得到目标特效画面。
S330、在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中。
S340、在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
本公开实施例的技术方案,基于预设的焦散光贴图对所述初始特效画面进行焦散处理,可以使所述目标特效画面呈现波光粼粼的动态效果,提高了特效渲染的生动性与真实性。
图6是本公开实施例所提供的再一种特效处理方法的流程示意图,本实施例是对上述实施例中所述将所述对所述初始特效画面进行光学处理进行细化。
如图6所示,所述方法包括:
S410、获取拍摄设备拍摄的增强现实画面。
S420、基于所述增强现实画面生成初始特效画面。
S430、根据与所述增强现实画面对应的视线向量在预设方向上的分量,分别确定预设第一颜色值和预设第二颜色值的权重值。
在本实施例中,所述视线向量可以理解为拍摄设备到待进行焦散处理的画 面像素点的向量。预设方向可以是视线向量的纵轴方向。
在本公开实施例中,针对所述初始特效画面进行散射处理,可以使处理后的所述初始特效画面呈现颜色渐变的效果。示例性地,可以预先设置两个不同的颜色值,分别表征距离所述终端最远的画面像素点的颜色值和与所述终端距离最进的画面像素点的颜色值。具体地,采用预设第一颜色值表示距离所述终端最远的画面像素点的颜色值。所述预设第二颜色值表示距离所述终端最近的画面像素点的颜色值。可选的,对所述初始特效画面进行散射处理,包括:根据预设第一颜色值、预设第二颜色值以及与所述初始特效画面中对应的每个像素点的深度数据,对所述初始特效画面进行处理。其中,每个像素点的深度数据可以基于该像素点的视线向量在纵轴(即,y轴)的分量的值确定。
具体地,针对每个像素点,可以根据归一化后的视线向量的y分量的值分别确定所述预设第一颜色的第一权重和预设第二颜色的第二权重,进而基于预设第一颜色、第一权重、预设第二颜色和第二权重确定散射光值,在基于散射光值确定所述像素点的颜色值。
进一步地,可以将归一化后的视线向量的y分量的值作为所述预设第一颜色的第一权重,将1与所述第一权重的差值作为预设第二颜色的第二权重。
可以理解的是,在本公开实施例中,所述预设第一颜色值和所述预设第二颜色值可以根据场景需求预设,在此不做具体限定。可选的,在初始特效画面为水面画面的情况下,所述设第一颜色值可以是较深的水面颜色,所述设第二颜色值可以是较浅的水面颜色。
S440、基于预设第一颜色值、预设第二颜色值、所述预设第一颜色值的权重值和所述预设第二颜色值的权重值确定散射值,将所述散射值作用于所述初始特效画面,得到目标特效画面。
具体的,将预设第一颜色乘以第一权重得到的第一乘积与预设第二颜色乘以第二权重得到的第二乘积求和得到散射光值。进而将所述散射值作用于所述初始特效画面。
在此基础上,还可以结合进行反射处理、折射处理、焦散处理和高光处理中的一种或多种方式对所述初始特效画面进行处理,得到目标特效画面。
S450、在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中。
S460、在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
本公开实施例的技术方案,根据与所述增强现实画面对应的视线向量在预设方向上的分量,分别确定预设第一颜色值和预设第二颜色值的权重值;基于预设第一颜色值、预设第二颜色值、所述预设第一颜色值的权重值和所述预设第二颜色值的权重值确定散射值,将所述散射值作用于所述初始特效画面。可以使所述目标特效画面具有远近差异的视觉效果,提高了特效渲染的真实性。
图7是本公开实施例所提供的一种特效处理方法的可选实例的流程示意图。以水面特效画面的处理为例,如图7所示,特效处理方法的整体流程可以是:
1、获取增强现实画面。通过安装有AR相机的终端,拍摄包含景深信息的增强现实画面,并基于AR相机组件获取场景内的深度估计图,写入AR相机的深度缓冲。
2、渲染特效对象。渲染水面漂浮的特效对象于水面特效画面中,如,龙舟。
3、计算出特效对象的显示颜色写入颜色的缓冲,并计算出特效对象的显示 深度写入深度缓冲。
4、渲染水面。水面渲染可以是把散射、反射、折射、焦散和高光综合考虑的结果。其中,
1)散射:将归一化后的视线向量的y分量的值作为所述预设第一颜色的第一权重,将1与所述第一权重的差值作为预设第二颜色的第二权重,将预设第一颜色乘以第一权重得到的第一乘积与预设第二颜色乘以第二权重得到的第二乘积求和得到散射光值。
2)折射和反射:确定折射光方向,根据所述折射光方向对所述增强现实画面进行采样得到折射颜色值;确定反射光方向,据所述反射光方向对预设环境贴图进行采样得到反射颜色值。将折射颜色值和反射颜色值根据菲涅尔定律的Schlick近似法计算的混合系数进行混合。
3)焦散:将画面像素点的世界坐标的纵轴分量(即,y分量)与光照方向坐标的纵轴分量(即,y分量)的比值与光光照方向坐标的纵轴分量(即,x分量)的乘积作为第一参数,将画面像素点的世界坐标的横轴分量(即,x分量)作为第二参数,将第一参数与第二参数的和作为法线纹理贴图上的法线采样坐标的横坐标,将画面像素点的世界坐标的纵轴分量(即,y分量)与光照方向坐标的纵轴分量(即,y分量)的比值与光光照方向坐标的竖轴分量(即,z分量)的乘积作为第三参数,将画面像素点的世界坐标的竖轴分量(即,z分量)作为第四参数,将第三参数和第四参数的和作为法线纹理贴图上的法线采样坐标的纵坐标。进一步的,基于法线采样坐标的横坐标和纵坐标对所述法线纹理贴图进行采样,得到法线采样点。将法线采样点的横纵坐标分量(即,x分量和y分量)作为与所述画面像素点对应的焦散采样坐标的横纵坐标分量。然后,基于焦散采样坐标对预设的焦散光贴图进行采样处理,得到每个所述画面像素 点对应的焦散贴图值。
4)高光:使用Blinn-Phong方法,确定高光颜色值。
5、将水面渲染结果写入系统缓存中,以跟随拍摄设备的拍摄角度显示水面特效画面的画面区域。
本实施例的技术方案,基于安装有AR组件的拍摄设备获取增强现实画面来渲染水面,并且对书面进行多种光学处理,把常规的矩形水平面,渲染出了三维(Three-dimensional,3D)的水面的特效效果,提高了特效处理效果的真实感。而且,还能够根据拍摄角度的变化,将不同的水面特效区域显示于对应画面区域中,提高了特效处理效果的生动性提升了用户体验。
图8为本公开实施例所提供的一种特效处理装置结构示意图,如图8所示,所述装置包括:特效生成模块510、特效显示模块520以及显示变化模块530。
其中,特效生成模块510,用于获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面;特效显示模块520,用于在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;显示变化模块530,用于在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
本公开实施例的技术方案,获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面,能够通过增强现实画面生成具有空间感的目标特效画面,更加贴合真实场景;在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中,将拍摄角度与目标特效画面的画面显示区域关联,保证视觉呈现效 果;在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。通过虚拟显示画面生成目标特效画面,且目标特效画面能够随拍摄设备的拍摄角度的变化而变化,采用拍摄角度的变化仿真用户的视野变化,进而通过显示目标特效画面的不同画面区域来模拟实际场景的变化情况,使得目标特效画面的渲染效果更加真实,更加生动,提升了用户体验。
可选的,特效生成模块510,包括:光学处理子模块。
其中,所述光学处理子模块,用于基于所述增强现实画面生成初始特效画面,对所述初始特效画面进行光学处理,得到目标特效画面,其中,所述光学处理包括散射处理、反射处理、折射处理、焦散处理和高光处理中的至少一种。
可选的,所述光学处理子模块,包括:焦散处理单元。
其中,所述焦散处理单元,用于基于预设的焦散光贴图对所述初始特效画面进行焦散处理。
可选的,所述焦散处理单元,包括:焦散采样坐标确定子单元、焦散颜色值获取子单元以及焦散处理子单元。
其中,所述焦散采样坐标确定子单元,用于针对所述初始特效画面中每个待进行焦散处理的画面像素点,确定与所述画面像素点对应的焦散采样坐标;
所述焦散颜色值获取子单元,用于基于所述焦散采样坐标对预设的焦散光贴图进行采样处理,基于采样结果确定与所述画面像素点对应的焦散颜色值;
所述焦散处理子单元,用于基于与所述画面像素点对应的焦散颜色值对所述画面像素点进行焦散处理。
可选的,所述焦散采样坐标确定子单元,用于:
根据所述画面像素点的世界坐标和预设光源的光照方向坐标,确定与预设 的法线纹理贴图对应的法线采样坐标;
根据所述法线采样坐标确定与所述画面像素点对应的焦散采样坐标。
可选的,所述光学处理子模块,包括焦散处理单元,用于:
根据与所述增强现实画面对应的视线向量在预设方向上的分量,分别确定预设第一颜色值和预设第二颜色值的权重值;
基于预设第一颜色值、预设第二颜色值、所述预设第一颜色值的权重值和所述预设第二颜色值的权重值确定散射值,将所述散射值作用于所述初始特效画面。
可选的,所述光学处理子模块,包括反射处理和折射处理单元,用于:
根据预设入射光和所述目标特效画面确定折射光方向,根据所述折射光方向对所述增强现实画面进行采样得到折射颜色值;
根据预设入射光和所述目标特效画面确定反射光方向,根据所述反射光方向对预设环境贴图进行采样得到反射颜色值;
确定与所述反射颜色值对应的反射率和与所述折射颜色值对应的折射率,根据所述折射颜色值、所述折射率、所述反射颜色值与所述反射率对所述初始特效画面进行处理。
可选的,所述特效处理方法,还包括特效对象渲染模块,用于:
将预设的特效对象渲染至所述目标特效画面中。
可选的,所述特效对象渲染模块,用于:
确定预设的特效对象在所述目标特效画面中的目标显示信息,以所述目标显示信息将所述特效对象渲染至所述目标特效画面中,其中,所述目标显示信息包括显示位置、运动状态、显示颜色以及显示深度中的至少一种。
本公开实施例所提供的特效处理装置可执行本公开任意实施例所提供的特 效处理方法,具备执行方法相应的功能模块和有益效果。
值得注意的是,上述装置所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本公开实施例的保护范围。
图9为本公开实施例所提供的一种特效处理电子设备的结构示意图。下面参考图9,其示出了适于用来实现本公开实施例的电子设备(例如图9中的终端设备或服务器)500的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图9示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图9所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。编辑/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的 存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图9示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
本公开实施例提供的电子设备与上述实施例提供的特效处理方法属于同一公开构思,未在本实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的有益效果。
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的特效处理方法。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包 括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取拍摄设备拍摄的增强现实画面, 基于所述增强现实画面生成目标特效画面;在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用 硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,【示例一】提供了一种特效处理方法,包括:
获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面;
在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;
在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
根据本公开的一个或多个实施例,【示例二】提供了示例一的方法,还包括:
基于所述增强现实画面生成初始特效画面,对所述初始特效画面进行光学处理,得到目标特效画面,其中,所述光学处理包括散射处理、反射处理、折射处理、焦散处理和高光处理中的至少一种。
根据本公开的一个或多个实施例,【示例三】提供了示例二的方法,还包括:
基于预设的焦散光贴图对所述初始特效画面进行焦散处理。
根据本公开的一个或多个实施例,【示例四】提供了示例三的方法,还包括:
针对所述目标特效画面中每个待进行焦散处理的画面像素点,确定与所述画面像素点对应的焦散采样坐标;
基于所述焦散采样坐标对预设的焦散光贴图进行采样处理,基于采样结果确定与所述画面像素点对应的焦散颜色值;
基于与所述画面像素点对应的焦散颜色值对所述画面像素点进行焦散处理。
根据本公开的一个或多个实施例,【示例五】提供了示例四的方法,还包括:
根据所述画面像素点的世界坐标和预设光源的光照方向坐标,确定与预设的法线纹理贴图对应的法线采样坐标;
根据所述法线采样坐标确定与所述画面像素点对应的焦散采样坐标。
根据本公开的一个或多个实施例,【示例六】提供了示例二的方法,还包括:
根据与所述增强现实画面对应的视线向量在预设方向上的分量,分别确定预设第一颜色值和预设第二颜色值的权重值;
基于预设第一颜色值、预设第二颜色值、所述预设第一颜色值的权重值和所述预设第二颜色值的权重值确定散射值,将所述散射值作用于所述初始特效画面。
根据本公开的一个或多个实施例,【示例七】提供了示例二的方法,还包括:
根据预设入射光和所述目标特效画面确定折射光方向,根据所述折射光方向对所述增强现实画面进行采样得到折射颜色值;
根据预设入射光和所述目标特效画面确定反射光方向,根据所述反射光方向对预设环境贴图进行采样得到反射颜色值;
确定与所述反射颜色值对应的反射率和与所述折射颜色值对应的折射率,根据所述折射颜色值、所述折射率、所述反射颜色值与所述反射率对所述初始特效画面进行处理。
根据本公开的一个或多个实施例,【示例八】提供了示例一的方法,还包括:
将预设的特效对象渲染至所述目标特效画面中。
根据本公开的一个或多个实施例,【示例九】提供了示例八的方法,还包括:
确定预设的特效对象在所述目标特效画面中的目标显示信息,以所述目标显示信息将所述特效对象渲染至所述目标特效画面中,其中,所述目标显示信息包括显示位置、运动状态、显示颜色以及显示深度中的至少一种。
根据本公开的一个或多个实施例,【示例十】提供了一种特效处理装置,包括:
特效生成模块,用于获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面;
特效显示模块,用于在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;
显示变化模块,用于在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
根据本公开的一个或多个实施例,【示例十一】提供了一种特效处理电子设备,包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如示例一至示例九中任一所述的特效处理方法。
根据本公开的一个或多个实施例,【示例十二】提供了一种特效处理存储介质,包括:
所述计算机可执行指令在由计算机处理器执行时用于执行如示例一至示例九中任一所述的特效处理方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并 行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (20)

  1. 一种特效处理方法,其特征在于,包括:
    获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面;
    在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;
    在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
  2. 根据权利要求1所述的特效处理方法,其特征在于,所述基于所述增强现实画面生成目标特效画面,包括:
    基于所述增强现实画面生成初始特效画面,对所述初始特效画面进行光学处理,得到目标特效画面,其中,所述光学处理包括散射处理、反射处理、折射处理、焦散处理和高光处理中的至少一种。
  3. 根据权利要求2所述的特效处理方法,其特征在于,所述对所述初始特效画面进行焦散处理,包括:
    基于预设的焦散光贴图对所述初始特效画面进行焦散处理。
  4. 根据权利要求3所述的特效处理方法,其特征在于,所述基于预设焦散光贴图对所述初始特效画面进行焦散处理,包括:
    针对所述初始特效画面中每个待进行焦散处理的画面像素点,确定与所述画面像素点对应的焦散采样坐标;
    基于所述焦散采样坐标对预设的焦散光贴图进行采样处理,基于采样结果 确定与所述画面像素点对应的焦散颜色值;
    基于与所述画面像素点对应的焦散颜色值对所述画面像素点进行焦散处理。
  5. 根据权利要求4所述的特效处理方法,其特征在于,所述确定与所述画面像素点对应的焦散采样坐标,包括:
    根据所述画面像素点的世界坐标和预设光源的光照方向坐标,确定与预设的法线纹理贴图对应的法线采样坐标;
    根据所述法线采样坐标确定与所述画面像素点对应的焦散采样坐标。
  6. 根据权利要求2所述的特效处理方法,其特征在于,所述对所述初始特效画面进行散射处理,包括:
    根据与所述增强现实画面对应的视线向量在预设方向上的分量,分别确定预设第一颜色值和预设第二颜色值的权重值;
    基于预设第一颜色值、预设第二颜色值、所述预设第一颜色值的权重值和所述预设第二颜色值的权重值确定散射值,将所述散射值作用于所述初始特效画面。
  7. 根据权利要求2所述的特效处理方法,其特征在于,所述光学处理包括反射处理和折射处理;所述对所述初始特效画面进行光学处理,包括:
    根据预设入射光和所述目标特效画面确定折射光方向,根据所述折射光方向对所述增强现实画面进行采样得到折射颜色值;
    根据预设入射光和所述目标特效画面确定反射光方向,根据所述反射光方向对预设环境贴图进行采样得到反射颜色值;
    确定与所述反射颜色值对应的反射率和与所述折射颜色值对应的折射率,根据所述折射颜色值、所述折射率、所述反射颜色值与所述反射率对所述初始 特效画面进行处理。
  8. 根据权利要求1所述的特效处理方法,其特征在于,还包括:
    将预设的特效对象渲染至所述目标特效画面中。
  9. 根据权利要求8所述的特效处理方法,其特征在于,所述将预设的特效对象渲染至所述目标特效画面中,包括:
    确定预设的特效对象在所述目标特效画面中的目标显示信息,以所述目标显示信息将所述特效对象渲染至所述目标特效画面中,其中,所述目标显示信息包括显示位置、运动状态、显示颜色以及显示深度中的至少一种。
  10. 一种特效渲染装置,其特征在于,包括:
    特效生成模块,用于获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效画面;
    特效显示模块,用于在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;
    显示变化模块,用于在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
  11. 一种电子设备,其特征在于,所述电子设备包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器执行:
    获取拍摄设备拍摄的增强现实画面,基于所述增强现实画面生成目标特效 画面;
    在所述拍摄设备显示所述增强现实画面的第一画面区域的情况下,将所述目标特效画面的第一特效区域显示于所述第一画面区域中;
    在检测到所述拍摄设备的拍摄角度发生变化的情况下,显示所述增强现实画面的第二画面区域,将所述目标特效画面的第二特效区域显示于所述第二画面区域中。
  12. 根据权利要求11所述的电子设备,其特征在于,所述基于所述增强现实画面生成目标特效画面,包括:
    基于所述增强现实画面生成初始特效画面,对所述初始特效画面进行光学处理,得到目标特效画面,其中,所述光学处理包括散射处理、反射处理、折射处理、焦散处理和高光处理中的至少一种。
  13. 根据权利要求12所述的电子设备,其特征在于,所述对所述初始特效画面进行焦散处理,包括:
    基于预设的焦散光贴图对所述初始特效画面进行焦散处理。
  14. 根据权利要求13所述的电子设备,其特征在于,所述基于预设焦散光贴图对所述初始特效画面进行焦散处理,包括:
    针对所述初始特效画面中每个待进行焦散处理的画面像素点,确定与所述画面像素点对应的焦散采样坐标;
    基于所述焦散采样坐标对预设的焦散光贴图进行采样处理,基于采样结果确定与所述画面像素点对应的焦散颜色值;
    基于与所述画面像素点对应的焦散颜色值对所述画面像素点进行焦散处理。
  15. 根据权利要求14所述的电子设备,其特征在于,所述确定与所述画面 像素点对应的焦散采样坐标,包括:
    根据所述画面像素点的世界坐标和预设光源的光照方向坐标,确定与预设的法线纹理贴图对应的法线采样坐标;
    根据所述法线采样坐标确定与所述画面像素点对应的焦散采样坐标。
  16. 根据权利要求12所述的电子设备,其特征在于,所述对所述初始特效画面进行散射处理,包括:
    根据与所述增强现实画面对应的视线向量在预设方向上的分量,分别确定预设第一颜色值和预设第二颜色值的权重值;
    基于预设第一颜色值、预设第二颜色值、所述预设第一颜色值的权重值和所述预设第二颜色值的权重值确定散射值,将所述散射值作用于所述初始特效画面。
  17. 根据权利要求12所述的电子设备,其特征在于,所述光学处理包括反射处理和折射处理;所述对所述初始特效画面进行光学处理,包括:
    根据预设入射光和所述目标特效画面确定折射光方向,根据所述折射光方向对所述增强现实画面进行采样得到折射颜色值;
    根据预设入射光和所述目标特效画面确定反射光方向,根据所述反射光方向对预设环境贴图进行采样得到反射颜色值;
    确定与所述反射颜色值对应的反射率和与所述折射颜色值对应的折射率,根据所述折射颜色值、所述折射率、所述反射颜色值与所述反射率对所述初始特效画面进行处理。
  18. 根据权利要求11所述的电子设备,其特征在于,当所述一个或多个程序被所述一个或多个处理器执行,还使得所述一个或多个处理器执行:
    将预设的特效对象渲染至所述目标特效画面中。
  19. 根据权利要求18所述的电子设备,其特征在于,所述将预设的特效对象渲染至所述目标特效画面中,包括:
    确定预设的特效对象在所述目标特效画面中的目标显示信息,以所述目标显示信息将所述特效对象渲染至所述目标特效画面中,其中,所述目标显示信息包括显示位置、运动状态、显示颜色以及显示深度中的至少一种。
  20. 一种包含计算机可执行指令的存储介质,其特征在于,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-9中任一所述的特效处理方法。
PCT/CN2023/125288 2022-10-28 2023-10-18 特效处理方法、装置、电子设备及存储介质 Ceased WO2024088141A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211339065.X 2022-10-28
CN202211339065.XA CN115695685B (zh) 2022-10-28 2022-10-28 特效处理方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2024088141A1 true WO2024088141A1 (zh) 2024-05-02

Family

ID=85046679

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/125288 Ceased WO2024088141A1 (zh) 2022-10-28 2023-10-18 特效处理方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN115695685B (zh)
WO (1) WO2024088141A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120769159A (zh) * 2024-06-25 2025-10-10 荣耀终端股份有限公司 图像处理方法以及相关装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115695685B (zh) * 2022-10-28 2025-08-19 北京字跳网络技术有限公司 特效处理方法、装置、电子设备及存储介质
CN118795674B (zh) * 2024-09-13 2024-12-10 宏景科技股份有限公司 一种用于增强vr眼镜虚拟显示效果的方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111356000A (zh) * 2018-08-17 2020-06-30 北京达佳互联信息技术有限公司 视频合成方法、装置、设备及存储介质
CN112866562A (zh) * 2020-12-31 2021-05-28 上海米哈游天命科技有限公司 画面处理方法、装置、电子设备及存储介质
CN112954193A (zh) * 2021-01-27 2021-06-11 维沃移动通信有限公司 拍摄方法、装置、电子设备及介质
WO2022095467A1 (zh) * 2020-11-06 2022-05-12 北京市商汤科技开发有限公司 增强现实场景下的展示方法、装置、设备、介质及程序
CN115695685A (zh) * 2022-10-28 2023-02-03 北京字跳网络技术有限公司 特效处理方法、装置、电子设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716646A (zh) * 2019-10-15 2020-01-21 北京市商汤科技开发有限公司 一种增强现实数据呈现方法、装置、设备及存储介质
CN113784148B (zh) * 2020-06-10 2026-01-13 阿里巴巴集团控股有限公司 数据处理方法、系统、相关设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111356000A (zh) * 2018-08-17 2020-06-30 北京达佳互联信息技术有限公司 视频合成方法、装置、设备及存储介质
WO2022095467A1 (zh) * 2020-11-06 2022-05-12 北京市商汤科技开发有限公司 增强现实场景下的展示方法、装置、设备、介质及程序
CN112866562A (zh) * 2020-12-31 2021-05-28 上海米哈游天命科技有限公司 画面处理方法、装置、电子设备及存储介质
CN112954193A (zh) * 2021-01-27 2021-06-11 维沃移动通信有限公司 拍摄方法、装置、电子设备及介质
CN115695685A (zh) * 2022-10-28 2023-02-03 北京字跳网络技术有限公司 特效处理方法、装置、电子设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120769159A (zh) * 2024-06-25 2025-10-10 荣耀终端股份有限公司 图像处理方法以及相关装置

Also Published As

Publication number Publication date
CN115695685B (zh) 2025-08-19
CN115695685A (zh) 2023-02-03

Similar Documents

Publication Publication Date Title
KR102663617B1 (ko) 증강 현실 객체의 조건부 수정
WO2024088141A1 (zh) 特效处理方法、装置、电子设备及存储介质
JP7609517B2 (ja) 画像レンダリング方法、装置、機器及び媒体
WO2023179346A1 (zh) 特效图像处理方法、装置、电子设备及存储介质
CN114461064B (zh) 虚拟现实交互方法、装置、设备和存储介质
WO2024104248A1 (zh) 虚拟全景图的渲染方法、装置、设备及存储介质
US20230267063A1 (en) Real-time latency measurements in streaming systems and applications
JP2015114775A (ja) 画像処理装置および画像処理方法
CN114742934B (zh) 图像渲染方法、装置、可读介质及电子设备
CN114428573A (zh) 特效图像处理方法、装置、电子设备及存储介质
CN111862349A (zh) 虚拟画笔实现方法、装置和计算机可读存储介质
CN113223110B (zh) 画面渲染方法、装置、设备及介质
CN115170715A (zh) 图像渲染方法、装置、电子设备及介质
CN111862342B (zh) 增强现实的纹理处理方法、装置、电子设备及存储介质
WO2022156389A1 (zh) 图形显示方法、装置、设备及介质
WO2025113515A1 (zh) 一种增强现实方法、装置、电子设备及存储介质
WO2024088144A1 (zh) 增强现实画面的处理方法、装置、电子设备及存储介质
CN113744379B (zh) 图像生成方法、装置和电子设备
CN112967369B (zh) 一种光线展示方法和装置
CN114419238B (zh) 特效图像处理方法、装置、电子设备及存储介质
CN117994284A (zh) 碰撞检测方法、装置、电子设备和存储介质
CN115100346A (zh) 头发光照渲染方法、图像处理模型训练方法、装置及设备
US20240153159A1 (en) Method, apparatus, electronic device and storage medium for controlling based on extended reality
US20240378769A1 (en) Effect processing method and apparatus, electronic device and storage medium
CN117632063A (zh) 基于虚拟现实空间的显示处理方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23881719

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01.08.2025)

122 Ep: pct application non-entry in european phase

Ref document number: 23881719

Country of ref document: EP

Kind code of ref document: A1