Light beam animation generation method and device, electronic equipment and storage medium

CN116258797BActive Publication Date: 2026-09-29NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310209138.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2026-09-29
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

这种方式对于无需旋转视角的动画场景而言,存在渲染消耗资源浪费的技术问题

Benefits of technology

[0010]上述光束动画的生成方法、装置、电子设备和存储介质,创建面片模型,对所述面片模型的初始纹理坐标数据进行极坐标转换,得到目标极坐标数据;对所述目标极坐标数据进行时间偏移变量的逐帧叠加,得到每帧对应的采样坐标数据,通过所述每帧对应的采样坐标数据对预设基础贴图进行逐帧采样,得到每帧对应的目标采样结果;对预设遮罩贴图进行采样,得到遮罩采样结果,将所述遮罩采样结果与所述每帧对应的目标采样结果进行叠加,得到目标平面光束动画。该方式中,通过面片模型作为光束动画的载体和渲染对象,能够避免在场景中基于相机渲染光束动画造成的渲染资源浪费,通过对面片模型的初始纹理坐标数据进行极坐标转换后进行时间偏移变量的逐帧叠加采样,能够生成动态的采样结果,再通过遮罩贴图对采样结果进行遮罩,能够得到动态的、在遮罩范围的目标平面光束动画,从而快速获得无需旋转视角的平面光束动画,减少对渲染资源的浪费。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116258797B_ABST
    Figure CN116258797B_ABST
Patent Text Reader

Abstract

The application provides a light beam animation generation method and device, electronic equipment and a storage medium; the method comprises the following steps: creating a facet model, performing polar coordinate conversion on initial texture coordinate data of the facet model to obtain target polar coordinate data; performing frame-by-frame superposition of a time offset variable on the target polar coordinate data to obtain corresponding sampling coordinate data of each frame; performing frame-by-frame sampling on a preset base map by using the corresponding sampling coordinate data of each frame to obtain a target sampling result corresponding to each frame; sampling a preset mask map to obtain a mask sampling result; and superimposing the mask sampling result and the target sampling result corresponding to each frame to obtain a target planar light beam animation. The application can reduce waste of rendering resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of animation generation technology, and in particular to a method, apparatus, electronic device, and storage medium for generating beam animation. Background Technology

[0002] Beam animation effects are common animation effects. For example, in virtual games, volumetric light based on the Tyndall effect is a beam effect with a strong sense of atmosphere, which can enhance the experience and realism of virtual games.

[0003] In existing technologies, beam animation effects are typically achieved by constructing a 3D space on the screen for volumetric lighting rendering. This requires an additional camera and sampling of numerous textures to achieve different beam effects. For animation scenes that do not require rotating the viewpoint, this approach suffers from the technical problem of wasting rendering resources. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, apparatus, electronic device and storage medium for generating beam animation, so as to reduce the waste of rendering resources.

[0005] In a first aspect, embodiments of the present invention provide a method for generating beam animation, the method comprising: creating a patch model; performing polar coordinate transformation on the initial texture coordinate data of the patch model to obtain target polar coordinate data; performing frame-by-frame superposition of the target polar coordinate data with time offset variables to obtain sampling coordinate data corresponding to each frame; sampling a preset base map frame-by-frame using the sampling coordinate data corresponding to each frame to obtain a target sampling result corresponding to each frame; sampling a preset mask map to obtain a mask sampling result; and superimposing the mask sampling result with the target sampling result corresponding to each frame to obtain a target planar beam animation.

[0006] Secondly, embodiments of the present invention provide a beam animation generation apparatus, the apparatus comprising: a construction module for creating a patch model, performing polar coordinate transformation on the initial texture coordinate data of the patch model to obtain target polar coordinate data; a sampling module for performing frame-by-frame superposition of the target polar coordinate data with time offset variables to obtain sampling coordinate data corresponding to each frame, and performing frame-by-frame sampling on a preset base map using the sampling coordinate data corresponding to each frame to obtain a target sampling result corresponding to each frame; and a masking module for sampling a preset mask map to obtain a masking sampling result, and superimposing the masking sampling result with the target sampling result corresponding to each frame to obtain a target planar beam animation.

[0007] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described method for generating beam animation.

[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the above-described method for generating beam animation.

[0009] The embodiments of the present invention bring the following beneficial effects:

[0010] The aforementioned method, apparatus, electronic device, and storage medium for generating beam animation involve creating a patch model, performing polar coordinate transformation on the initial texture coordinate data of the patch model to obtain target polar coordinate data, performing frame-by-frame superposition of the target polar coordinate data with a time offset variable to obtain sampling coordinate data corresponding to each frame, sampling a preset base map frame-by-frame using the sampling coordinate data corresponding to each frame to obtain the target sampling result corresponding to each frame, sampling a preset mask map to obtain a mask sampling result, and superimposing the mask sampling result with the target sampling result corresponding to each frame to obtain the target planar beam animation. In this method, using the patch model as the carrier and rendering object of the beam animation avoids the waste of rendering resources caused by rendering beam animation based on the camera in the scene. By performing polar coordinate transformation on the initial texture coordinate data of the patch model and then performing frame-by-frame superposition sampling with a time offset variable, dynamic sampling results can be generated. Then, by masking the sampling results with a mask map, dynamic target planar beam animation within the masked area can be obtained, thus quickly obtaining planar beam animation without rotating the viewpoint and reducing the waste of rendering resources.

[0011] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0012] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0013] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0014] Figure 1 This is a flowchart of one embodiment of the method for generating beam animation in this invention;

[0015] Figure 2 This is the first schematic diagram of the method for generating beam animation in an embodiment of the present invention;

[0016] Figure 3 This is a second schematic diagram of the method for generating beam animation in an embodiment of the present invention;

[0017] Figure 4 This is a third schematic diagram of the method for generating beam animation in an embodiment of the present invention;

[0018] Figure 5 This is the fourth schematic diagram of the method for generating beam animation in an embodiment of the present invention;

[0019] Figure 6 This is the fifth schematic diagram of the method for generating beam animation in an embodiment of the present invention;

[0020] Figure 7 This is the sixth schematic diagram of the method for generating beam animation in an embodiment of the present invention;

[0021] Figure 8 This is a flowchart of another embodiment of the method for generating beam animation in this invention;

[0022] Figure 9 This is the seventh schematic diagram of the method for generating beam animation in an embodiment of the present invention;

[0023] Figure 10 A schematic diagram of a beam animation generation device provided in an embodiment of the present invention;

[0024] Figure 11 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the method for generating beam animation in this invention includes:

[0028] Step S10: Create a patch model, perform polar coordinate transformation on the initial texture coordinate data of the patch model to obtain the target polar coordinate data;

[0029] It is understandable that a patch refers to a local tangent plane on the surface of a 3D object, which can approximate the surface of a 3D object within a certain local area. A patch model is essentially a shape in 3D space, such as a rectangle, which possesses the properties of a 3D model and can be used for material rendering. In this embodiment, the patch model serves as the carrier of the beam material and is the object of beam effect rendering; the final target plane beam animation is displayed in the patch model. In one embodiment, the patch model is created using a game engine (such as Unity or Unreal Engine) or Digital Content Creation (DCC) software (such as 3ds Max or Maya), and initial texture coordinate data (also known as initial UV coordinate data) of the patch model is generated. It is understandable that the created patch model can be a blank material model, that is, a solid color or colorless model without a texture bound, or a default material model, a model bound to a default texture. Whether it is a blank material model or a default material model, it has corresponding initial UV coordinate data, which is obtained by performing a UV unwrapping operation on the patch model. This UV coordinate data is used to sample the preset base texture after subsequent conversion processing.

[0030] In one implementation, to improve the efficiency of beam animation rendering in the game and reduce the waste of rendering resources, a UI (User Interface) element is created using the canvas component in the game engine. This UI element can then be used to indicate the patch model. Since the canvas component includes a camera-free rendering mode, the UI element created using the canvas component is particularly suitable for rendering beam effects that do not require changing the viewpoint, consuming low rendering resources and not degrading the rendering quality. In one implementation, when creating the UI element using the canvas component, a material shader can be specified, and subsequent steps S20-S30 can be executed using the specified material shader to complete the custom rendering of the beam effect and obtain the target plane beam animation.

[0031] It is understandable that the initial UV coordinate data of the patch model is in a Cartesian coordinate system. To achieve the divergence and rotation effects of the light beam, the initial UV coordinate data is converted to polar coordinates to obtain the target polar coordinate data. The polar coordinate system consists of a pole, a polar axis, and a polar radius. The position of any point in the polar coordinate system is represented by the length of the line segment between the pole and that point (i.e., the polar radius), and the angle between the polar radius and the polar axis. In one implementation, based on the transformation relationship between the Cartesian and polar coordinate systems, the initial texture coordinates of the patch model are transformed to polar coordinates to obtain the target polar coordinate data. From the above principle, assuming any point in the Cartesian coordinate system is A(x,y), and this point is represented in the polar coordinate system as A(ρ,θ), then the following transformation relationship exists between the Cartesian and polar coordinate systems:

[0032]

[0033]

[0034] Where x refers to the x-coordinate value of any point in the initial texture coordinate data, y refers to the y-coordinate value of that point in the initial texture coordinate data, ρ refers to the polar radius of that point in the target polar coordinate data, and θ refers to the polar angle of that point in the target polar coordinate data.

[0035] Understandably, if the texture is sampled based on the target polar coordinate data, the obtained sampling result will show the texture as rotated or radial. Therefore, by performing polar coordinate transformation, the sampling coordinate data of the rotation or radial effect can be obtained quickly, thereby improving the generation efficiency of beam animation.

[0036] In one implementation, by changing the value range of the initial texture coordinate data, or by performing a polar coordinate transformation on the initial texture coordinate data of the face model to obtain first polar coordinate data, different target polar coordinate data can be obtained by changing the value range of the first polar coordinate data. The sampling results using these different target polar coordinate data will affect the position of the beam divergence center in the final target plane beam animation, thereby achieving beam animation effects with different beam divergence centers and improving the flexibility of beam animation generation. For example, Figure 2 As one effect of the preset base map, if the value range of the initial texture coordinate data or the value range of the first polar coordinate data is not changed, the preset base map is sampled using the obtained target polar coordinate data, and the resulting sampling result is as follows. Figure 3 As shown, the sampling result corresponds to the beam divergence center of the final target plane beam animation located at the upper left corner of the image. However, if the value range of the initial texture coordinate data or the value range of the first polar coordinate data is changed, the obtained sampling result can be as follows: Figure 4As shown, the sampling result corresponds to the beam divergence center of the final target plane beam animation located at the center of the image, but the specific location is not limited here.

[0037] In one implementation, before performing polar coordinate transformation on the initial texture coordinate data of the face model, the initial texture coordinate data can be offset by a preset value to obtain target texture coordinate data. Then, the target texture coordinate data is transformed into polar coordinates to obtain target polar coordinate data. It can be understood that by offsetting the initial texture coordinate data by a preset offset value, the beam divergence center of the final target planar beam animation can be moved outside the frame. For example, as... Figure 5 As shown, a sampling result is obtained by sampling a preset base map using target polar coordinate data generated by offsetting the initial texture coordinate data by a preset value. Figure 5 Compared to Figure 3 The beam divergence center moves outside the screen. Different preset offset values ​​can change the position of the beam divergence center outside the screen, but the specifics are not limited here.

[0038] Step S20: Superimpose the time offset variable on the target polar coordinate data frame by frame to obtain the sampling coordinate data corresponding to each frame. Then, sample the preset base map frame by frame using the sampling coordinate data corresponding to each frame to obtain the target sampling result corresponding to each frame.

[0039] In this embodiment, to enhance the dynamic beam flow effect and generate beam animation, the sampling coordinates of each frame are offset by a time offset variable, resulting in different sampling coordinate data for each frame. It can be understood that the time offset variable increases with the progression of time in each frame; for example, the time offset variable is 0 for the first frame, 20 for the second frame, and 40 for the third frame, but the specifics are not limited here. In this embodiment, the time offset variable for each frame is first determined, and then the target polar coordinate data is superimposed with the time offset variable for each frame to obtain the corresponding sampling coordinate data for each frame. Since the time offset variable increases with the progression of time in each frame, the sampling coordinate data for each frame also increases with the progression of time in each frame, thus producing the beam flow animation effect. It should be noted that, since the sampling coordinate data increases with the progression of time in each frame, in order to perform cyclic sampling and avoid the use of coordinate data that cannot correspond to the coordinates of the preset base map, the sampler's addressing mode is a cyclic mode. That is, if the sampling coordinate data exceeds the coordinate range of the preset base map, the sampling coordinate data is re-determined through the cyclic addressing mode to obtain sampling coordinate data that conforms to the coordinate range. For example, assuming that a sampled coordinate data of 1.2 is obtained by superimposing time offset variables, which exceeds the coordinate range of [0,1] of the preset base map, then 1.2-1=0.2 can be used to obtain the sampled coordinate data of 0.2 within the map coordinate range. The specific value is not limited here.

[0040] In one implementation, the frame-by-frame superposition of the time offset variable on the target polar coordinate data can be either a single-direction superposition or a multi-directional superposition. Specifically, in a single-direction superposition implementation, the frame-by-frame superposition of the time offset variable on the target polar coordinate data to obtain the sampled coordinate data corresponding to each frame includes: determining the time offset variable for each frame, and superimposing the polar radius in the target polar coordinate data with the time offset variable for each frame to obtain the sampled coordinate data corresponding to each frame. In a multi-directional superposition implementation, the frame-by-frame superposition of the time offset variable on the target polar coordinate data to obtain the sampled coordinate data corresponding to each frame includes: determining the time offset variable for each frame, superimposing the polar radius in the target polar coordinate data with the time offset variable for each frame, and superimposing the polar radius in the target polar coordinate data with a preset offset angle to obtain the sampled coordinate data corresponding to each frame.

[0041] In this embodiment, after obtaining the sampling coordinate data corresponding to each frame, the preset base map is sampled frame by frame using a preset sampler to obtain the target sampling result corresponding to each frame. In one embodiment, the frame rate per second (fps) of the target plane beam animation can be preset or dynamically determined according to rendering resources. That is, in this step, the frame rate per second of the target polar coordinate data obtained by superimposing the time offset variable frame by frame can be preset or dynamically determined according to rendering resources. For example, assuming the preset fps is 24 frames / second, then when superimposing the time offset variable frame by frame on the target polar coordinate data, 24 frames of time offset variable are superimposed per second to obtain the sampling coordinate data corresponding to 24 frames per second. In real-time rendering in the game engine, the frame rate per second can be determined in real time according to the rendering resources during real-time rendering, such as network speed and hardware configuration of the rendering terminal. The specific details are not limited here.

[0042] Step S30: Sample the preset mask texture to obtain the mask sampling result, and superimpose the mask sampling result with the target sampling result corresponding to each frame to obtain the target plane beam animation.

[0043] It is understandable that the target plane beam animation is a Tyndall effect animation on a 2D plane. To obtain better beam animation effects and make the beam range of the target plane beam animation more controllable, a preset mask map is sampled, and the obtained mask sampling results are superimposed with the target sampling results corresponding to each frame. This limits the beam range and beam intensity of the target plane beam animation to the specified standards of the preset mask map, thereby generating beam animations with different effects more flexibly. For example... Figure 6 The image shown is one implementation of a preset mask texture, based on... Figure 6 One frame of the target plane beam animation generated by the preset mask map can be as follows: Figure 7 As shown, it can be seen Figure 7 The beam range is limited to the white area of ​​the preset mask map. Without the sampling and overlay of the preset mask map, the beam range of the target plane beam animation will exist in the entire screen. Therefore, the preset mask map achieves the effect of beam masking, making the beam animation effect more controllable and the generation method more flexible.

[0044] The beam animation generation method provided by the above embodiments uses a patch model as the carrier and rendering object of the beam animation, which can avoid the waste of rendering resources caused by rendering beam animation based on the camera in the scene. By performing polar coordinate transformation on the initial texture coordinate data of the patch model and then performing frame-by-frame superposition sampling of the time offset variable, dynamic sampling results can be generated. Then, by masking the sampling results with a mask map, dynamic target planar beam animation within the mask range can be obtained, thereby quickly obtaining planar beam animation without rotating the viewpoint and reducing the waste of rendering resources.

[0045] Please see Figure 8 Another embodiment of the method for generating beam animation in this invention includes:

[0046] Step S801: Create a patch model, perform polar coordinate transformation on the initial texture coordinate data of the patch model to obtain the target polar coordinate data;

[0047] In one embodiment, step S801 includes: creating a patch model using a preset canvas component, the patch model being a quadrilateral patch model; performing a polar coordinate transformation on the initial texture coordinate data of the patch model using a preset pole to obtain initial polar coordinate data, the preset pole being used to indicate the target beam divergence center; and performing a fixed-value offset on the initial polar coordinate data to obtain target polar coordinate data. In this embodiment, to improve the rendering efficiency of the beam animation, unlike the volume rendering method using a scene as the carrier, this embodiment uses a patch model as the carrier for the beam animation. Initial texture coordinate data is generated using a quadrilateral patch model created using a preset canvas component, and then the initial texture coordinate data is transformed on a polar coordinate using a preset pole to obtain initial polar coordinate data. The preset pole is used to indicate the target beam divergence center in the target planar beam animation; that is, different preset poles can produce target planar beam animations with different beam divergence centers. Next, by applying a fixed-value offset to the initial polar coordinate data, the target beam divergence center can be moved out of the target plane beam animation's frame range, that is, out of the plane model's frame range, achieving the effect that there is more than one beam divergence center in the frame, making the beam animation more realistic.

[0048] In one embodiment, the above-mentioned polar coordinate transformation of the initial texture coordinate data of the face model to obtain initial polar coordinate data includes: constructing polar coordinates of the initial texture coordinate data of the face model to a preset pole using a preset arctangent function. In this embodiment, the preset arctangent function can quickly construct polar coordinates of the initial texture coordinate data of the face model to a preset pole, thereby obtaining initial polar coordinate data. The arctangent function is one of the inverse trigonometric functions, referring to the inverse function of y = tanx.

[0049] Step S802: Determine the first time offset variable and the second time offset variable for each frame. The second time offset variable is greater than the first time offset variable. The second time offset variable and the first time offset variable increase as time progresses.

[0050] In this embodiment, to enhance the rolling flow effect of the beam animation, two sampling results of different beam flow velocities are obtained using two different time offset variables. These two sampling results are then superimposed to achieve the rolling beam flow effect. In this embodiment, both the first and second time offset variables increase with time and frame count, and the second time offset variable is greater than the first time offset variable. For example, assuming the first time offset variable is 0 in the first frame, then the second time offset variable in the first frame could be 0.21, the first time offset variable in the second frame could be 0.2, and the second time offset variable in the first frame could be 0.41; specific values ​​are not limited here. In one embodiment, the difference between the first and second time offset variables can be a fixed preset difference or a dynamically changing dynamic difference; specific values ​​are not limited here.

[0051] In one implementation, determining a first time offset variable and a second time offset variable for each frame includes: determining a first time offset constant, a second time offset constant, and a time variable value for each frame; superimposing the time variable value and the first time offset constant for each frame to obtain the first time offset variable for each frame; and superimposing the time variable value and the second time offset constant for each frame to obtain the second time offset variable for each frame. In this implementation, to make the rolling speed of the beam flow controllable, the first time offset constant and the second time offset constant indicate the beam rolling speed. Specifically, in this implementation, the first time offset variable for each frame is obtained by superimposing the time variable value and the first time offset constant for each frame, and the second time offset variable for each frame is obtained by superimposing the time variable value and the second time offset constant for each frame. The first and second time offset constants are fixed constants, while the time variables are variables that increase with time and the time progression of each frame, such as 0 for the first frame, 20 for the second frame, 40 for the third frame, and so on. Specific values ​​are not limited here. Assuming the first time offset constant is 0.01 and the second time offset constant is 0.02, then the first time offset variable of the first frame is 0.01 (i.e., 0 + 0.01 = 0.01), the second time offset variable of the first frame is 0.02 (i.e., 0 + 0.02 = 0.02), the first time offset variable of the second frame is 20.01 (i.e., 20 + 0.01 = 20.01), and the second time offset variable of the second frame is 20.02 (i.e., 20 + 0.02 = 20.02). The specific values ​​are not limited here.

[0052] Step S803: Frame by frame superposition of the first time offset variable on the target polar coordinate data to obtain the first sampled coordinate data corresponding to each frame; Frame by frame superposition of the second time offset variable on the target polar coordinate data to obtain the second sampled coordinate data corresponding to each frame.

[0053] In this step, the target polar coordinate data is superimposed using the first time offset variable of each frame to obtain the first sampled coordinate data for each frame. Then, the target polar coordinate data is superimposed using the second time offset variable of each frame to obtain the second sampled coordinate data for each frame. Different time offset variables indicate different sampled coordinates, thus obtaining different sampling results. For example, if a coordinate in the target polar coordinate data is 10, and the first time offset variable in the first frame is 0.01, then the first sampled coordinate data for the first frame is 10.01. If the first time offset variable in the second frame is 20.01, then the first sampled coordinate data for that coordinate in the second frame is 30.02 (i.e., 10.01 + 20.01 = 30.02). The specific value is not limited here. The second sampled coordinate data follows the same principle, and will not be elaborated further here.

[0054] Step S804: Sample the preset base texture frame by frame using the first sampling coordinate data corresponding to each frame to obtain the first sampling result corresponding to each frame; sample the preset base texture frame by frame using the second sampling coordinate data corresponding to each frame to obtain the second sampling result corresponding to each frame.

[0055] In this step, different sampling coordinate data for each frame are used to sample the preset base map, resulting in different sampling results for each frame. This achieves the beam rolling effect generated by the superposition of different sampling results. For example, assuming a first sampling coordinate data of 10.01 in the first frame, then the pixel in the first sampling result of the first frame originates from the pixel at coordinate 10.01 in the preset base map. Specific details are not specified here. The second sampling result follows the same principle, and will not be elaborated further here.

[0056] In one embodiment, the preset base map contains multiple black and white stripes, with a grayscale gradient transition between each stripe. In this embodiment, to improve the efficiency of base map creation and reduce the complexity of texture creation, the preset base map contains multiple black and white stripes, with a grayscale gradient transition between each stripe, which can be used to create beam effects. For example... Figure 2 As shown, the width of each bar indicates the thickness of the beam in the target plane beam animation, the distance between each bar indicates the distance between the beams in the target plane beam animation, and the brightness of the preset base map indicates the brightness of the beam in the target plane beam animation, making the beam animation effect generation more flexible.

[0057] Step S805: Superimpose the first sampling result and the second sampling result corresponding to each frame to obtain the target sampling result corresponding to each frame;

[0058] In this step, the first and second sampling results corresponding to each frame are superimposed to obtain the target sampling result corresponding to each frame. All target sampling results are played frame by frame to achieve the effect of beam animation.

[0059] Step S806: Sample the preset mask texture to obtain the mask sampling result, and superimpose the mask sampling result with the target sampling result corresponding to each frame to obtain the target plane beam animation.

[0060] In one embodiment, step S806 includes: sampling a preset mask map to obtain a mask sampling result; calculating a gradient grayscale with attenuation based on the mask sampling result to obtain a gradient grayscale result; and superimposing the mask sampling result and the gradient grayscale result with the target sampling result corresponding to each frame frame by frame to obtain a target planar beam animation. In this embodiment, by calculating the gradient grayscale with attenuation, the masking intensity of the preset mask map on the target sampling result corresponding to each frame can be indicated. In one embodiment, the gradient grayscale result is obtained by calculating the attenuation grayscale of the mask sampling result using a preset attenuation function. Since the preset mask map has a gradient effect, the attenuation grayscale also has a gradient effect. Finally, the mask sampling result, the gradient grayscale result, and the target sampling result corresponding to each frame are superimposed frame by frame to obtain the mask sampling result corresponding to each frame. Then, all the mask sampling results are played frame by frame to obtain the target planar beam animation.

[0061] In one embodiment, the above-mentioned calculation of the attenuated gradient grayscale based on the mask sampling results to obtain the gradient grayscale result includes: calculating the attenuated gradient grayscale based on the mask sampling results using a preset smoothed step function to obtain the gradient grayscale result. In this embodiment, the gradient grayscale result can be obtained by performing attenuation calculation on the mask sampling results using a preset smoothed step function. Figure 9 The image shown is a gradient grayscale result; no specific limitation is made here.

[0062] The beam animation generation method provided by the above embodiments uses a patch model as the carrier and rendering object of the beam animation, which can avoid the waste of rendering resources caused by rendering beam animation based on the camera in the scene. By performing polar coordinate transformation on the initial texture coordinate data of the patch model and then performing frame-by-frame superposition sampling of the time offset variable, dynamic sampling results can be generated. Then, by masking the sampling results with a mask map, dynamic target planar beam animation within the mask range can be obtained, thereby quickly obtaining planar beam animation without rotating the viewpoint and reducing the waste of rendering resources.

[0063] For the corresponding method embodiments described above, see [link to relevant documentation]. Figure 10The diagram shows a device for generating beam animation. The device includes: a construction module 1000, used to create a patch model and perform polar coordinate transformation on the initial texture coordinate data of the patch model to obtain target polar coordinate data; a sampling module 1020, used to perform frame-by-frame superposition of the target polar coordinate data with time offset variables to obtain sampling coordinate data corresponding to each frame, and to sample a preset base map frame-by-frame using the sampling coordinate data corresponding to each frame to obtain the target sampling result corresponding to each frame; and a masking module 1040, used to sample a preset mask map to obtain a masking sampling result, and to superimpose the masking sampling result with the target sampling result corresponding to each frame to obtain the target planar beam animation.

[0064] The aforementioned beam animation generation device uses a patch model as the carrier and rendering object for beam animation, which avoids the waste of rendering resources caused by rendering beam animation based on the camera in the scene. By performing polar coordinate transformation on the initial texture coordinate data of the patch model and then performing frame-by-frame superposition sampling of the time offset variable, dynamic sampling results can be generated. Then, by masking the sampling results with a mask map, dynamic target planar beam animation within the mask range can be obtained, thereby quickly obtaining planar beam animation without rotating the viewpoint and reducing the waste of rendering resources.

[0065] Optionally, the above sampling module includes:

[0066] A determining unit is used to determine a first time offset variable and a second time offset variable for each frame, wherein the second time offset variable is greater than the first time offset variable, and the second time offset variable and the first time offset variable increase as time progresses;

[0067] The offset unit is used to perform frame-by-frame superposition of the first time offset variable on the target polar coordinate data to obtain the first sampled coordinate data corresponding to each frame, and to perform frame-by-frame superposition of the second time offset variable on the target polar coordinate data to obtain the second sampled coordinate data corresponding to each frame.

[0068] The sampling unit is used to sample the preset base map frame by frame using the first sampling coordinate data corresponding to each frame to obtain the first sampling result corresponding to each frame, and to sample the preset base map frame by frame using the second sampling coordinate data corresponding to each frame to obtain the second sampling result corresponding to each frame.

[0069] The overlay unit is used to overlay the first sampling result and the second sampling result corresponding to each frame to obtain the target sampling result corresponding to each frame.

[0070] Optionally, the determining unit is further configured to: determine a first time offset constant, a second time offset constant, and a time variable value for each frame; superimpose the time variable value for each frame and the first time offset constant to obtain a first time offset variable for each frame; and superimpose the time variable value for each frame and the second time offset constant to obtain a second time offset variable for each frame.

[0071] Optionally, the above-mentioned building modules include:

[0072] A creation unit is used to create a patch model using a preset canvas component, wherein the patch model is a quadrilateral patch model;

[0073] The conversion unit is used to perform polar coordinate conversion on the initial texture coordinate data of the patch model with a preset pole to obtain initial polar coordinate data. The preset pole is used to indicate the divergence center of the target beam.

[0074] The offset unit is used to perform a fixed-value offset on the initial polar coordinate data to obtain the target polar coordinate data.

[0075] Optionally, the above-mentioned conversion unit is further configured to: construct the polar coordinates of the initial texture coordinate data of the patch model by using a preset arctangent function to obtain the initial polar coordinate data.

[0076] Optionally, the above-mentioned masking module includes:

[0077] The mask sampling unit is used to sample the preset mask texture to obtain the mask sampling result;

[0078] The attenuation unit is used to calculate the attenuated gradient grayscale based on the mask sampling result, and obtain the gradient grayscale result;

[0079] The gradient overlay unit is used to overlay the mask sampling result and the gradient grayscale result with the target sampling result corresponding to each frame frame by frame to obtain the target plane beam animation.

[0080] Optionally, the attenuation unit is further configured to: calculate the attenuated gradient grayscale based on the mask sampling result using a preset smoothing step function, and obtain the gradient grayscale result.

[0081] Optionally, the aforementioned preset base map contains multiple black and white stripes, with grayscale gradients between each stripe.

[0082] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-described method for generating beam animation. This electronic device can be a server or a terminal device.

[0083] See Figure 11 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the above-described method for generating beam animation.

[0084] Furthermore, Figure 11 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.

[0085] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0086] Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. Processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101. The processor 100 reads information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments, for example:

[0087] Create a patch model, perform polar coordinate transformation on the initial texture coordinate data of the patch model to obtain target polar coordinate data; superimpose the target polar coordinate data frame by frame with time offset variables to obtain the sampling coordinate data corresponding to each frame; sample the preset base map frame by frame using the sampling coordinate data corresponding to each frame to obtain the target sampling result corresponding to each frame; sample the preset mask map to obtain the mask sampling result; superimpose the mask sampling result with the target sampling result corresponding to each frame to obtain the target planar beam animation.

[0088] In this approach, using a patch model as the carrier and rendering object for beam animation avoids the waste of rendering resources caused by rendering beam animation based on the camera in the scene. By performing polar coordinate transformation on the initial texture coordinate data of the patch model and then performing frame-by-frame superposition sampling of the time offset variable, dynamic sampling results can be generated. Then, by masking the sampling results with a mask map, dynamic target planar beam animation within the masked range can be obtained, thus quickly obtaining planar beam animation without rotating the viewpoint and reducing the waste of rendering resources.

[0089] Optionally, the above-mentioned frame-by-frame superposition of the target polar coordinate data with time offset variables yields the sampled coordinate data corresponding to each frame. The preset base texture is then sampled frame-by-frame using the sampled coordinate data corresponding to each frame to obtain the target sampling result for each frame. This includes: determining a first time offset variable and a second time offset variable for each frame, where the second time offset variable is greater than the first time offset variable, and both the second and first time offset variables increase over time; performing frame-by-frame superposition of the first time offset variable on the target polar coordinate data to obtain the first sampled coordinate data for each frame; performing frame-by-frame superposition of the second time offset variable on the target polar coordinate data to obtain the second sampled coordinate data for each frame; performing frame-by-frame sampling of the preset base texture using the first sampled coordinate data corresponding to each frame to obtain the first sampling result for each frame; performing frame-by-frame sampling of the preset base texture using the second sampled coordinate data corresponding to each frame to obtain the second sampling result for each frame; and superimposing the first and second sampling results for each frame to obtain the target sampling result for each frame.

[0090] Optionally, determining the first time offset variable and the second time offset variable for each frame includes: determining a first time offset constant, a second time offset constant, and a time variable value for each frame; superimposing the time variable value for each frame and the first time offset constant to obtain the first time offset variable for each frame; and superimposing the time variable value for each frame and the second time offset constant to obtain the second time offset variable for each frame.

[0091] Optionally, the above-mentioned creation of the patch model, and the polar coordinate transformation of the initial texture coordinate data of the patch model to obtain the target polar coordinate data, includes: creating the patch model through a preset canvas component, wherein the patch model is a quadrilateral patch model; performing polar coordinate transformation on the initial texture coordinate data of the patch model at a preset pole to obtain the initial polar coordinate data, wherein the preset pole is used to indicate the divergence center of the target beam; and performing a fixed-value offset on the initial polar coordinate data to obtain the target polar coordinate data.

[0092] Optionally, the above-mentioned polar coordinate transformation of the initial texture coordinate data of the face model to obtain the initial polar coordinate data includes: constructing the polar coordinates of the initial texture coordinate data of the face model to the preset poles using a preset arctangent function to obtain the initial polar coordinate data.

[0093] Optionally, the above-mentioned sampling of the preset mask texture to obtain the mask sampling result, and superimposing the mask sampling result with the target sampling result corresponding to each frame to obtain the target planar beam animation, includes: sampling the preset mask texture to obtain the mask sampling result; calculating the attenuated gradient grayscale based on the mask sampling result to obtain the gradient grayscale result; and superimposing the mask sampling result and the gradient grayscale result with the target sampling result corresponding to each frame frame by frame to obtain the target planar beam animation.

[0094] Optionally, the above-mentioned calculation of the attenuated gradient grayscale based on the mask sampling results to obtain the gradient grayscale result includes: calculating the attenuated gradient grayscale based on the mask sampling results using a preset smoothing step function to obtain the gradient grayscale result.

[0095] Optionally, the aforementioned preset base map contains multiple black and white stripes, with grayscale gradients between each stripe.

[0096] This embodiment also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the aforementioned method for generating beam animations. For example:

[0097] Create a patch model, perform polar coordinate transformation on the initial texture coordinate data of the patch model to obtain target polar coordinate data; superimpose the target polar coordinate data frame by frame with time offset variables to obtain the sampling coordinate data corresponding to each frame; sample the preset base map frame by frame using the sampling coordinate data corresponding to each frame to obtain the target sampling result corresponding to each frame; sample the preset mask map to obtain the mask sampling result; superimpose the mask sampling result with the target sampling result corresponding to each frame to obtain the target planar beam animation.

[0098] In this approach, using a patch model as the carrier and rendering object for beam animation avoids the waste of rendering resources caused by rendering beam animation based on the camera in the scene. By performing polar coordinate transformation on the initial texture coordinate data of the patch model and then performing frame-by-frame superposition sampling of the time offset variable, dynamic sampling results can be generated. Then, by masking the sampling results with a mask map, dynamic target planar beam animation within the masked range can be obtained, thus quickly obtaining planar beam animation without rotating the viewpoint and reducing the waste of rendering resources.

[0099] Optionally, the above-mentioned frame-by-frame superposition of the target polar coordinate data with time offset variables yields the sampled coordinate data corresponding to each frame. The preset base texture is then sampled frame-by-frame using the sampled coordinate data corresponding to each frame to obtain the target sampling result for each frame. This includes: determining a first time offset variable and a second time offset variable for each frame, where the second time offset variable is greater than the first time offset variable, and both the second and first time offset variables increase over time; performing frame-by-frame superposition of the first time offset variable on the target polar coordinate data to obtain the first sampled coordinate data for each frame; performing frame-by-frame superposition of the second time offset variable on the target polar coordinate data to obtain the second sampled coordinate data for each frame; performing frame-by-frame sampling of the preset base texture using the first sampled coordinate data corresponding to each frame to obtain the first sampling result for each frame; performing frame-by-frame sampling of the preset base texture using the second sampled coordinate data corresponding to each frame to obtain the second sampling result for each frame; and superimposing the first and second sampling results for each frame to obtain the target sampling result for each frame.

[0100] Optionally, determining the first time offset variable and the second time offset variable for each frame includes: determining a first time offset constant, a second time offset constant, and a time variable value for each frame; superimposing the time variable value for each frame and the first time offset constant to obtain the first time offset variable for each frame; and superimposing the time variable value for each frame and the second time offset constant to obtain the second time offset variable for each frame.

[0101] Optionally, the above-mentioned creation of the patch model, and the polar coordinate transformation of the initial texture coordinate data of the patch model to obtain the target polar coordinate data, includes: creating the patch model through a preset canvas component, wherein the patch model is a quadrilateral patch model; performing polar coordinate transformation on the initial texture coordinate data of the patch model at a preset pole to obtain the initial polar coordinate data, wherein the preset pole is used to indicate the divergence center of the target beam; and performing a fixed-value offset on the initial polar coordinate data to obtain the target polar coordinate data.

[0102] Optionally, the above-mentioned polar coordinate transformation of the initial texture coordinate data of the face model to obtain the initial polar coordinate data includes: constructing the polar coordinates of the initial texture coordinate data of the face model to the preset poles using a preset arctangent function to obtain the initial polar coordinate data.

[0103] Optionally, the above-mentioned sampling of the preset mask texture to obtain the mask sampling result, and superimposing the mask sampling result with the target sampling result corresponding to each frame to obtain the target planar beam animation, includes: sampling the preset mask texture to obtain the mask sampling result; calculating the attenuated gradient grayscale based on the mask sampling result to obtain the gradient grayscale result; and superimposing the mask sampling result and the gradient grayscale result with the target sampling result corresponding to each frame frame by frame to obtain the target planar beam animation.

[0104] Optionally, the above-mentioned calculation of the attenuated gradient grayscale based on the mask sampling results to obtain the gradient grayscale result includes: calculating the attenuated gradient grayscale based on the mask sampling results using a preset smoothing step function to obtain the gradient grayscale result.

[0105] Optionally, the aforementioned preset base map contains multiple black and white stripes, with grayscale gradients between each stripe.

[0106] The computer program product of the method, apparatus, electronic device and storage medium for generating beam animation provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0108] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0109] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0110] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0111] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating beam animation, characterized in that, The method includes: Create a patch model, and perform polar coordinate transformation on the initial texture coordinate data of the patch model to obtain the target polar coordinate data; The target polar coordinate data is superimposed frame by frame with time offset variables to obtain the sampling coordinate data corresponding to each frame. The preset base map is sampled frame by frame using the sampling coordinate data corresponding to each frame to obtain the target sampling result corresponding to each frame. The preset mask texture is sampled to obtain the mask sampling result. The mask sampling result is superimposed with the target sampling result corresponding to each frame to obtain the target planar beam animation. The process involves frame-by-frame superposition of the target polar coordinate data with a time offset variable to obtain sampled coordinate data for each frame. Then, frame-by-frame sampling of a preset base texture is performed using this sampled coordinate data to obtain the target sampling result for each frame, including: Determine a first time offset variable and a second time offset variable for each frame, wherein the second time offset variable is greater than the first time offset variable, and both the second time offset variable and the first time offset variable increase as time progresses; The target polar coordinate data is superimposed frame by frame with the first time offset variable to obtain the first sampled coordinate data corresponding to each frame; the target polar coordinate data is superimposed frame by frame with the second time offset variable to obtain the second sampled coordinate data corresponding to each frame. The preset base texture is sampled frame by frame using the first sampling coordinate data corresponding to each frame to obtain the first sampling result corresponding to each frame. The preset base texture is sampled frame by frame using the second sampling coordinate data corresponding to each frame to obtain the second sampling result corresponding to each frame. The first sampling result and the second sampling result corresponding to each frame are superimposed to obtain the target sampling result corresponding to each frame.

2. The method according to claim 1, characterized in that, The determination of the first time offset variable and the second time offset variable for each frame includes: Determine the first time offset constant, the second time offset constant, and the time variable values ​​for each frame; The time variable value of each frame is superimposed with the first time offset constant to obtain the first time offset variable of each frame, and the time variable value of each frame is superimposed with the second time offset constant to obtain the second time offset variable of each frame.

3. The method according to claim 1, characterized in that, The process of creating a patch model involves performing a polar coordinate transformation on the initial texture coordinate data of the patch model to obtain target polar coordinate data, including: A patch model is created using a preset canvas component; the patch model is a quadrilateral patch model. The initial texture coordinate data of the patch model is transformed into polar coordinates with a preset pole to obtain initial polar coordinate data. The preset pole is used to indicate the divergence center of the target beam. The initial polar coordinate data is offset by a fixed value to obtain the target polar coordinate data.

4. The method according to claim 3, characterized in that, The step of performing a polar coordinate transformation on the initial texture coordinate data of the patch model at a preset pole to obtain initial polar coordinate data includes: The initial polar coordinate data is obtained by constructing the polar coordinates of the initial texture coordinate data of the patch model using a preset arctangent function to obtain the polar coordinates of the preset poles.

5. The method according to claim 1, characterized in that, The step of sampling a preset mask texture to obtain a mask sampling result, and then superimposing the mask sampling result with the target sampling result corresponding to each frame to obtain the target planar beam animation, includes: Sample the preset mask texture to obtain the mask sampling result; The attenuated gradient grayscale is calculated based on the mask sampling results to obtain the gradient grayscale result; The mask sampling results and the gradient grayscale results are superimposed frame by frame with the target sampling results corresponding to each frame to obtain the target plane beam animation.

6. The method according to claim 5, characterized in that, The step of calculating the attenuated gradient grayscale based on the mask sampling results to obtain the gradient grayscale result includes: Based on the mask sampling results, the attenuated gradient grayscale is calculated using a preset smoothing step function to obtain the gradient grayscale result.

7. The method according to any one of claims 1-6, characterized in that, The preset base texture contains multiple black and white stripes, with grayscale gradients between each stripe.

8. A device for generating beam animation, characterized in that, The device includes: The building module is used to create a patch model and perform polar coordinate transformation on the initial texture coordinate data of the patch model to obtain the target polar coordinate data; The sampling module is used to superimpose the time offset variable on the target polar coordinate data frame by frame to obtain the sampling coordinate data corresponding to each frame. The preset base map is sampled frame by frame using the sampling coordinate data corresponding to each frame to obtain the target sampling result corresponding to each frame. The masking module is used to sample a preset mask texture to obtain a mask sampling result, and then superimpose the mask sampling result with the target sampling result corresponding to each frame to obtain the target planar beam animation. The sampling module includes: A determining unit is used to determine a first time offset variable and a second time offset variable for each frame, wherein the second time offset variable is greater than the first time offset variable, and the second time offset variable and the first time offset variable increase as time progresses; The offset unit is used to perform frame-by-frame superposition of the first time offset variable on the target polar coordinate data to obtain the first sampled coordinate data corresponding to each frame, and to perform frame-by-frame superposition of the second time offset variable on the target polar coordinate data to obtain the second sampled coordinate data corresponding to each frame. The sampling unit is used to sample the preset base map frame by frame using the first sampling coordinate data corresponding to each frame to obtain the first sampling result corresponding to each frame, and to sample the preset base map frame by frame using the second sampling coordinate data corresponding to each frame to obtain the second sampling result corresponding to each frame. The overlay unit is used to overlay the first sampling result and the second sampling result corresponding to each frame to obtain the target sampling result corresponding to each frame.

9. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method for generating beam animation according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for generating beam animation according to any one of claims 1-7.

Citation Information

Patent Citations

  • Virtual character eye rendering method and device, electronic equipment and storage medium

    CN114949863A

  • Lens halo generation method and device, and electronic device

    CN115546082A