Visual interaction effect rendering method and device and electronic equipment

By emitting normal maps using particle emitters and blending them with the vertex normals of the target model, the visual performance and performance issues of water interaction effects in game development were resolved, achieving low-consumption, high-quality water ripple rendering and improving compatibility with mobile devices.

CN121330152APending Publication Date: 2026-01-13NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511545700.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

When rendering character interactions with water in game development, existing technologies often result in poor visual performance with simple special effects simulations, while complex physics or fluid algorithms require a large amount of computation, making it difficult to run smoothly on mobile devices and exhibiting poor compatibility.

Method used

Normal maps are emitted by particle emitters, rendered into preset textures, and blended with vertex normals of the target model to generate realistic interactive effect images.

Benefits of technology

It achieves high-quality water ripple effect rendering with low performance consumption on mobile devices, improving compatibility and visual performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121330152A_ABST
    Figure CN121330152A_ABST
Patent Text Reader

Abstract

The invention provides a rendering method and device for a visual interaction effect and electronic equipment, and the method comprises the steps: responding to an interaction behavior between an interaction model in a virtual scene and a target model, and controlling a particle emitter mounted on the interaction model to emit a preset normal map; the normal chartlet comprises normal information representing an interaction effect; rendering the normal map to a preset texture to obtain a target texture, and mixing a normal of the target texture with a vertex normal of the target model to obtain a target vertex normal of the target model; and rendering on the surface of the target model based on the target vertex normal to generate an image representing an interaction effect. In the mode, the normal map is emitted through the particle emitter, the normal map is rendered into the preset texture, and the preset texture is sampled to be mixed with the vertex normal of the target model, so that the water ripple effect can be rendered based on the mixed vertex normal, the implementation process is simple, the performance consumption is low, and a vivid visual effect can be realized; and thus, the compatibility is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of game development, and particularly to a rendering method and device for visualizing interactive effects and an electronic device. BACKGROUND

[0002] In the process of game development, it is often necessary to render the interactive effect between a model object and a water body. For example, when a character or an object falls into the water, it is necessary to generate a corresponding water ripple effect on the water surface. In the related art, the interactive effect is usually simulated by a simple special effect, which has a relatively simple implementation process but poor visual performance. Alternatively, a complex physical or fluid algorithm is used, which has a realistic visual performance but a large amount of calculation and high performance consumption, and is difficult to run smoothly on a mobile device and has poor compatibility. SUMMARY

[0003] Therefore, the purpose of the present disclosure is to provide a rendering method and device for visualizing interactive effects and an electronic device, which emit a normal map through a particle emitter, render the normal map into a preset texture, sample the preset texture and the vertex normal of a target model, and then render an image representing an interactive effect based on the mixed vertex normal, so as to achieve a simple implementation process, low performance consumption, realistic visual effect, and improved compatibility.

[0004] In a first aspect, an embodiment of the present disclosure provides a rendering method for visualizing interactive effects. A graphical user interface is provided by a terminal device, and the graphical user interface includes at least part of a virtual scene. The method includes: in response to an interactive model in the virtual scene interacting with a target model, controlling a particle emitter mounted on the interactive model to emit a pre-set normal map; the normal map includes normal information representing an interactive effect; rendering the normal map into a preset texture to obtain a target texture; mixing the normal of the target texture with the vertex normal of the target model to obtain a target vertex normal of the target model; and rendering an image representing the interactive effect on the surface of the target model based on the target vertex normal.

[0005] In a second aspect, the embodiments of the present disclosure provide a device for rendering a visual interactive effect, which is characterized by providing a graphical user interface by a terminal device, the graphical user interface comprising at least a partial virtual scene, and the device comprising: a map emitting module configured to control a particle emitter mounted on an interactive model in the virtual scene to emit a preset normal map in response to an interactive behavior between the interactive model and a target model; wherein the normal map comprises normal information representing an interactive effect; a normal determining module configured to render the normal map to a preset texture to obtain a target texture, and to perform a blending process on a normal of the target texture and a vertex normal of the target model to obtain a target vertex normal of the target model; and an effect rendering module configured to render an image representing the interactive effect on a surface of the target model based on the target vertex normal.

[0006] In a third aspect, the embodiments of the present disclosure provide an electronic device, which is characterized by comprising a processor and a memory, the memory storing computer executable instructions capable of being executed by the processor, and the processor executing the computer executable instructions to implement the method for rendering a visual interactive effect according to any one of the first aspect.

[0007] In a fourth aspect, the embodiments of the present disclosure provide a computer readable storage medium, which is characterized by storing computer executable instructions, and the computer executable instructions, when invoked and executed by a processor, cause the processor to implement the method for rendering a visual interactive effect according to any one of the first aspect.

[0008] The embodiments of the present disclosure bring the following beneficial effects: The present disclosure provides a method, device and electronic device for rendering a visual interactive effect, which is characterized by controlling a particle emitter mounted on an interactive model in a virtual scene to emit a preset normal map in response to an interactive behavior between the interactive model and a target model; wherein the normal map comprises normal information representing an interactive effect; rendering the normal map to a preset texture to obtain a target texture, performing a blending process on a normal of the target texture and a vertex normal of the target model to obtain a target vertex normal of the target model; and rendering an image representing the interactive effect on a surface of the target model based on the target vertex normal. In this way, the normal map is emitted by the particle emitter, the normal map is rendered to the preset texture, the preset texture is sampled and blended with the vertex normal of the target model, and the water ripple effect can be rendered based on the blended vertex normal. This method not only has a simple implementation process and low performance consumption, but also can achieve a realistic visual effect, thereby improving the compatibility.

[0009] Other features and advantages of the present disclosure will be described in the following description, and will become apparent from the description, or will be learned from the practice of the present disclosure. The purposes and other advantages of the present disclosure will be realized and achieved by the structures particularly pointed out in the specification, claims, and drawings.

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

[0011] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or 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 this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a method for rendering a visual interactive effect provided in an embodiment of this disclosure; Figure 2 A schematic diagram of a target texture provided in an embodiment of this disclosure; Figure 3 A schematic diagram illustrating a water ripple effect provided in an embodiment of this disclosure; Figure 4 A schematic diagram of a normal map provided in an embodiment of this disclosure; Figure 5 A schematic diagram of another normal map provided in an embodiment of this disclosure; Figure 6 A schematic diagram of the structure of a rendering device for visual interactive effects provided in an embodiment of this disclosure; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

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

[0014] Currently, rendering interactive effects between characters and water is a common requirement in game development. For example, when a character or object falls into water, corresponding interactive effects need to be generated on the water surface. Traditional games typically achieve this effect in two ways: one is through simple water splash effects, which is simple to implement but visually poor; the other is by using complex physics or fluid algorithms, which, while producing realistic effects, involves high computational demands, high performance consumption, and is difficult to run smoothly on mobile devices, also exhibiting poor compatibility. Based on this, the embodiments of this disclosure provide a rendering method, apparatus, and electronic device for visual interactive effects, which can be applied to games with rendered effects.

[0015] To facilitate understanding of this embodiment, a method for rendering visual interactive effects disclosed in this disclosure will first be described in detail. A graphical user interface (GUI) is provided through a terminal device. The GUI includes at least a portion of a virtual scene, such as... Figure 1 As shown, the method includes the following steps: Step S102: In response to the interaction between the interactive model and the target model in the virtual scene, control the particle emitter mounted on the interactive model to emit a pre-set normal map; wherein, the normal map includes normal information representing the interaction effect; The aforementioned interactive models typically refer to models capable of moving and interacting according to physical laws, such as virtual character models, virtual stone models, and virtual baseball models. Similarly, the aforementioned target models also typically refer to models capable of moving and interacting according to physical laws; these could be water models, such as static or flowing water models, or sand models, plastic models, etc. The aforementioned interactive behaviors typically refer to contact between the interactive model and the target model, such as the interactive model falling onto the surface of the target model, or the interactive model colliding with the target model. The aforementioned particle emitters can be mounted at designated locations on the interactive models, such as below or in front of them.

[0016] The aforementioned particle emitters typically have multiple pre-configured normal maps. Each normal map includes a target area representing an interactive effect, such as a water ripple effect or an oscillation effect. Therefore, these normal maps usually include a water ripple area, which is typically a circular area. The radius of the water ripples varies between different normal maps. The normal information in these normal maps represents the interactive effect on the target model's surface.

[0017] Optionally, determine the interaction position between the interactive model and the target model; control the particle emitter mounted on the interactive model to emit a pre-set normal map to the interaction position.

[0018] Optionally, taking a water ripple effect as an example, the explanation involves controlling the particle emitter mounted on the interactive model to emit multiple normal maps in succession. For example, a normal map is emitted every 0.1 seconds. Typically, the radius of the water ripple in the first emitted normal map is the first radius value, and the radius of the subsequent emitted normal maps is the second radius value, where the first radius value is smaller than the second radius value.

[0019] The aforementioned normal information typically refers to three-dimensional vector information, including the X-axis vector, Y-axis vector, and Z-axis vector.

[0020] Step S104: Render the normal map onto a preset texture to obtain the target texture, and blend the normals of the target texture with the vertex normals of the target model to obtain the target vertex normals of the target model. Optionally, the normal map is rendered to a preset texture to obtain the target texture, the target texture is sampled, and the sampling result is blended with the vertex normals of the target model to obtain the target vertex normals of the target model. The aforementioned preset texture typically refers to a RenderTexture (RT), generally understood as a special "canvas" or "camera + display". Rendering the normal map to a preset texture specifically means that the result of the rendering operation is stored in a texture image in memory, rather than being directly drawn to the screen. Normal rendering usually involves rendering the normal map directly to the screen, while the aforementioned rendering of the normal map involves rendering it to a preset texture. When it needs to be displayed on the screen, this preset texture needs to be sampled and rendered again.

[0021] To improve rendering performance, the resolution of the aforementioned preset textures is typically 512 or 256, or lower. For example, such as... Figure 2 A schematic diagram of the target texture is shown.

[0022] The above sampling results usually refer to normal information. The sampled normal information is mixed with the vertex normals of the volume model. For example, the sampled normal information is directly added to the vertex normals of the target model, or the average value is calculated.

[0023] Optionally, sampling is performed on the first position of the target texture to obtain the sampling result of the first position. The model vertex corresponding to the first position is determined from the target model. The sampling result of the first position is mixed with the vertex normal of the model vertex to obtain the target vertex normal of the model vertex corresponding to the first position in the target model.

[0024] Step S106: Render an image representing the interactive effect on the surface of the target model based on the target vertex normal.

[0025] Taking the water ripple effect as an example, water ripples are rendered on the surface of the target model based on the target vertex normal, and the movement of the water ripples is controlled according to the preset particle parameters to obtain the water ripple effect corresponding to the interactive behavior.

[0026] Specifically, the target model is rendered based on the target vertex normals to make the surface of the target model display a water ripple effect.

[0027] The preset particle parameters mentioned above refer to the particle parameters of the normal map, as the particle emitter pre-sets the particle parameters for each normal map. These preset particle parameters typically include lifecycle parameters and variation parameters. If the interactive effect is a water ripple effect, the variation parameters include: water ripple color parameters, transparency parameters, and intensity parameters. The intensity refers to the bump intensity of the water ripple.

[0028] In actual implementation, the water ripples are controlled to gradually increase in size according to preset particle parameters, the vertex colors of the water ripples gradually become more transparent according to preset particle parameters, and the intensity of the water ripples gradually decreases according to preset particle parameters, in order to achieve a dynamic effect of water ripples. That is, after the interactive model comes into contact with the target model, concentric circles of water ripples appear on the water surface until each ripple gradually disappears. For example, Figure 3 The diagram shows a water ripple effect.

[0029] This disclosure provides a method for rendering visual interactive effects. In response to an interaction between an interactive model and a target model in a virtual scene, a particle emitter mounted on the interactive model emits a pre-set normal map. The normal map includes normal information representing the interactive effect. The normal map is rendered onto a preset texture to obtain a target texture. The normals of the target texture are then blended with the vertex normals of the target model to obtain the target vertex normals of the target model. An image representing the interactive effect is generated by rendering on the surface of the target model based on the target vertex normals. In this method, by emitting a normal map using a particle emitter, rendering the normal map onto a preset texture, and sampling and blending the preset texture with the vertex normals of the target model, a water ripple effect can be rendered based on the blended vertex normals. This method is not only simple to implement and has low performance consumption, but also achieves realistic visual effects, thereby improving compatibility. One possible implementation of the above steps for rendering the normal map onto a preset texture to obtain the target texture is as follows: create a first virtual camera and control the first virtual camera to capture the normal map; render the captured image from the first virtual camera onto a preset texture to obtain the target texture; wherein the texture coordinates of the target texture correspond to the screen coordinates of the terminal device.

[0030] The first virtual camera mentioned above is different from other virtual cameras in the game. It is a separate camera that takes pictures and renders normal maps, and renders them onto a preset texture (a screen space).

[0031] One possible implementation of the above-described step of blending the normals of the target texture with the vertex normals of the target model to obtain the target vertex normals of the target model is as follows: The target texture is sent to the shader corresponding to the target model. The shader samples the target texture for each screen coordinate of the terminal device based on the current screen coordinate, and obtains the sampling result. The sampling result is the normal information of the target texture corresponding to the current screen coordinate. The numerical range of the normal information is mapped to a preset range to obtain the target sampling result. The target sampling result is mixed with the vertex normal of the model vertex corresponding to the current screen coordinate in the target model to obtain the target vertex normal of the target model.

[0032] The range of normal information corresponding to the current screen coordinates in the target texture is usually [0,1]. Since the range of vertex normals in the target model is [-1,1], it is necessary to map the normal information corresponding to the current screen coordinates in the target texture to the range [-1,1] to obtain the target sampling result. Specifically, the mapping process can be performed as follows: (normal*2-1) where normal is the normal information corresponding to the current screen coordinates in the target texture.

[0033] Specifically, the target sampling result and the vertex normals of the model vertex corresponding to the current screen coordinates can be mixed using the method normalize(N1 + N2). Here, N1 is the target sampling result, and N2 is the vertex normal of the model vertex corresponding to the current screen coordinates. Normalize refers to standardizing the value obtained by adding N1 and N2, which means keeping the direction unchanged while scaling the length to a specified length (e.g., "1").

[0034] In another possible approach, the sampling results only include a first vector in the first direction and a second vector in the second direction. For example, a first vector in the X-axis direction and a second vector in the Y-axis direction. After obtaining the sampling results, the numerical range of the sampling results is first mapped to a preset range, and then a third vector in the third direction, such as the third vector in the Z-axis direction, is calculated using the sqrt(1 - x^2 - y^2) method.

[0035] The above technique can be implemented using the following code: float4 ringColor = tex2D( RingTex, screenPos); / / RingTex is the target texture mentioned above, screenPos is the screen coordinates mentioned above, and ringColor is the initial sampling result, which includes the ringColor of the color and alpha channels.

[0036] float3 ringNormal = UnpackNormal(ringColor).rgb; / / ringNormal refers to unpacking the normal information from ringColor, i.e., the sampling result mentioned above.

[0037] ringNormal = mul(float3x3(i.TtoW0.xyz,i.TtoW1.xyz,i.TtoW2.xyz),ringNormal); / / Transforms ringNormal from tangent space to world space through matrix multiplication, specifically using the transformation matrix from tangent space to world space (composed of variables such as i.TtoW0).

[0038] ringNormal = normalize(ringNormal)*ringColor.a*_RingPower; / / Normalize ringNormal, then multiply by the Alpha channel of ringColor (to control intensity) and the external parameter _RingPower (to adjust the overall intensity of the ring effect), corresponding to the range mapping mentioned above.

[0039] / / float3 normal = BlendNormals(ringNormal,waterNormal); float3 normal =normalize(waterNormal+ringNormal); This can be achieved through BlendNormals, which mixes ringNormal (the target sampling result mentioned above) and waterNormal (the vertex normal of the model vertex corresponding to the current screen coordinates), or through normalization.

[0040] The aforementioned normal map includes a target region representing the interactive effect, which stores normal information representing the interactive effect; one possible implementation of the step of rendering an image representing the interactive effect based on the target vertex normals on the surface of the target model is as follows: An initial interaction effect image is generated on the surface of the target model based on the target vertex normal. The movement of this initial interaction effect image is controlled according to preset particle parameters, and an image representing the interaction effect corresponding to the interaction behavior is generated on the surface of the target model. The preset particle parameters are determined based on the attributes of the interaction model and the target model, and / or the interaction method between them. Specifically, different effects of different object interactions or different interaction methods are adjusted through parameter control. The initial interactive effect image described above can be water ripples, vibration patterns, etc. Optionally, the water ripple movement can be controlled according to preset particle parameters to generate water ripple effects corresponding to the interactive behavior on the surface of the target model.

[0041] The aforementioned preset particle parameters include at least life cycle parameters and variation parameters. The life cycle parameter is used to control the display time of the initial interactive effect image, while the variation parameter is used to control the dynamic variation effect of the initial interactive effect, such as the interaction range (e.g., the radius of water ripples or oscillations), the transparency of the image representing the interactive effect, and the intensity of the bumps.

[0042] One possible implementation of the above steps for controlling the movement of the initial interactive effect image according to preset particle parameters is as follows: controlling the initial interactive effect image to gradually disappear as the life cycle parameter is defined; controlling the dynamic change effect of the initial interactive effect image to gradually change according to the change parameter.

[0043] The changing parameters include: a first changing parameter; the step of controlling the dynamic changing effect of the initial interactive effect image to gradually change according to the changing parameter includes: controlling the range of the interactive effect of the initial interactive effect image to gradually increase according to the first changing parameter.

[0044] The changing parameters include: a second changing parameter; the step of controlling the dynamic changing effect of the initial interactive effect image to gradually change according to the changing parameters includes: controlling the transparency of the initial interactive effect image to gradually increase according to the second changing parameter.

[0045] The changing parameters include: a third changing parameter; the step of controlling the dynamic changing effect of the initial interactive effect image to gradually change according to the changing parameters includes: controlling the bump intensity of the initial interactive effect image to gradually decrease according to the third changing parameter. If the initial interactive effect image is a wave effect image; the dynamic changing effect includes one or more of the following: change range, transparency, and bump intensity; Optionally, the aforementioned changing parameters include: a first changing parameter, a second changing parameter, and a third changing parameter; One possible implementation of the above steps for controlling the dynamic changes of the initial interactive effect diagram according to the gradually changing parameters is as follows: The range of change of the fluctuation effect diagram is controlled to gradually increase according to the first change parameter; The transparency of the fluctuation effect diagram is controlled to gradually increase according to the second change parameter; The intensity of the undulation in the wave effect diagram is controlled to gradually decrease according to the third variation parameter.

[0046] Specifically, taking the water ripple effect as an example, the preset particle parameters include at least: a lifecycle parameter, a first change parameter, a second change parameter, and a third change parameter. The first change parameter controls the radius of the water ripple, the second change parameter controls the transparency of the water ripple, and the third change parameter controls the degree of unevenness or convexity of the water ripple. Higher transparency results in a lighter color or more transparent water ripple, and lower unevenness or convexity.

[0047] One possible implementation of the above steps for controlling the movement of water ripples according to preset particle parameters is as follows: controlling the water ripples to simultaneously perform at least one or more of the following steps: controlling the water ripples to gradually disappear with the life cycle parameter; controlling the radius of the water ripples to gradually increase according to a first variation parameter; controlling the transparency of the water ripples to gradually increase according to a second variation parameter; and controlling the unevenness intensity of the water ripples to gradually decrease according to a third variation parameter.

[0048] For example, with a lifecycle parameter of 5 seconds, the water ripples gradually disappear as the countdown reaches 5 seconds. The first variable parameter is 8, which controls the radius of the water ripples to gradually increase to 8 as the countdown reaches 5 seconds. The second variable parameter is 90%, which controls the transparency of the water ripples to gradually increase to 90% as the countdown reaches 5 seconds. The third variable parameter is 10%, which controls the intensity of the ripples to gradually decrease to 10% as the countdown reaches 5 seconds.

[0049] One possible implementation of the above-described step of controlling the particle emitter mounted on the interactive model to emit a pre-set normal map is as follows: determine the interaction position between the interactive model and the target model; control the particle emitter mounted on the interactive model to emit the pre-set normal map to the interaction position.

[0050] The aforementioned particle emitter is pre-configured with multiple normal maps, and these normal maps correspond to a specified emission order. Another possible implementation of the step of controlling the particle emitter mounted on the interactive model to emit the pre-set normal maps is as follows: according to the specified emission order, control the particle emitter mounted on the interactive model to emit the corresponding normal maps.

[0051] The interactive effect ranges corresponding to the above multiple normal maps are different, and the interactive effect range corresponding to the normal map is proportional to the order value corresponding to the emission order of the normal map.

[0052] Optionally, the particle emitters mounted on the interactive model can be controlled to emit corresponding normal maps at preset intervals according to a specified firing order. The preset intervals can be 1 second, 0.5 seconds, etc., and can be pre-configured according to the game's needs.

[0053] Taking a water ripple effect as an example, the particle emitter is pre-configured with five normal maps: the first normal map, the second normal map, the third normal map, the fourth normal map, and the fifth normal map. The emission order of the first normal map is "1", with a corresponding numerical value of "1". The emission order of the second normal map is "2", with a corresponding numerical value of "2". The emission order of the third normal map is "3", with a corresponding numerical value of "3". The emission order of the fourth normal map is "4", with a corresponding numerical value of "4". The emission order of the fifth normal map is "5", with a corresponding numerical value of "5". The particle emitter is controlled to first emit the first normal map, then the second normal map after 1 second, the third normal map after 2 seconds, the fourth normal map after 3 seconds, and the fifth normal map after 4 seconds. Among them, the radius of the water ripples of the first normal map (i.e. the corresponding interactive effect range) is smaller than the radius of the water ripples of the second normal map, the radius of the water ripples of the second normal map is smaller than the radius of the water ripples of the third normal map, the radius of the water ripples of the third normal map is smaller than the radius of the water ripples of the fourth normal map, and the radius of the water ripples of the fourth normal map is smaller than the radius of the water ripples of the fifth normal map.

[0054] The above methods also include: (1) Generate the first texture; The first texture usually refers to a grayscale image, which can be a circle, a rectangle, etc.

[0055] (2) For each pixel in the first texture, determine the color value of the pixel based on the preset control parameters; In one possible approach, for each pixel in the first texture, it is determined whether the pixel is located within the water ripple area according to pre-configured control parameters. If not, the color value of the pixel is determined to be a first color value; if so, the color value of the pixel is determined to be a second color value.

[0056] In another possible approach, a target region in the first texture is determined according to pre-set control parameters; wherein the target region includes edge regions and non-edge regions; if a pixel is not located in the target region, the color value of the pixel is determined to be a first color value; if the pixel is located in a non-edge region, the color value of the pixel is determined to be a second color value; if the pixel is located in an edge region, the color value of the pixel is determined to be a third color value; wherein the third color value is less than the second color value and greater than the first color value. The first color value is 0, the second color value is 1 (0 represents black, 1 represents white), and the third color value is less than 1 and greater than 0. Taking the water ripple effect as an example, the pre-set control parameters mentioned above include at least: the width of the water ripple, the range of the water ripple (such as the maximum diffusion distance of the water ripple), and the edge transition value of the water ripple. It usually also includes: Render Queue (controls the rendering queue and determines the order in which objects are drawn, affecting effects such as transparency and occlusion), Enable GPU Instancing (enables GPU instantiation, batch rendering of identical objects to optimize performance), and Double Sided Global Illumination (enables double-sided global illumination, allowing both the front and back sides of the object to participate in global illumination calculations, affecting lighting and shadow effects).

[0057] Optionally, firstly, based on the effective range and width of the ripple effect in the control parameters, determine the first edge value and the second edge value of the ripple. Then, based on the edge transition value and the first edge value in the control parameters, determine the first transition value of the first edge value. Next, based on the edge transition value and the second edge value in the control parameters, determine the second transition value of the second edge value. Determine the distance between the pixel and the center point of the first texture. Use the first edge value, the first transition value, and this distance value as the first input value of the objective function, and determine the first output value of the pixel based on the objective function. Use the second edge value, the second transition value, and this distance value as the second input value of the objective function, and determine the second output value of the pixel based on the objective function. The difference between the first output value and the second output value is determined as the color value of the pixel.

[0058] Specifically, the difference between the effective range of the water ripple and the width of the water ripple is calculated to obtain the first edge value threshold1; the sum of the effective range of the water ripple and the width of the water ripple is calculated to obtain the second edge value threshold2; the sum of the first edge value and the edge transition value smoothness of the water ripple is calculated to determine the first transition value of the first edge value; the sum of the second edge value and the edge transition value smoothness of the water ripple is calculated to determine the second transition value of the second edge value; and the distance value dis between the pixel and the center point of the first texture is determined.

[0059] The first edge value, the first transition value, and the distance value are used as the first input values ​​of the objective function `smoothstep`. Based on the objective function, the first output value of the pixel is determined. That is, `value = smoothstep(threshold1, threshold1 + smoothness, dis)`. If `dis` is less than or equal to `threshold1`, the first output value is 0; if `dis` is greater than or equal to `threshold1 + smoothness`, the first output value is 1; if `dis` is less than `threshold1 + smoothness` but greater than `threshold1`, the first output value is `t = clamp((dis - threshold1) / (smoothness), 0.0, 1.0)`.

[0060] The second edge value, second transition value, and distance value are used as the second input value of the objective function. Based on the objective function, the second output value of the pixel is determined, and the difference between the first output value and the second output value is determined as the color value of the pixel. That is, value2 = smoothstep(threshold2, threshold2 + smoothness, dis). If dis is less than or equal to threshold2, the second output value is 0; if dis is greater than or equal to threshold2 + smoothness, the second output value is 1; if dis is less than threshold2 + smoothness but greater than threshold2, the second output value is t = clamp((dis – threshold2) / (smoothness), 0.0, 1.0).

[0061] For example, such as Figure 4 The diagram shown illustrates the normal map, where the white pixels represent the water ripple area.

[0062] (3) Based on the color value of the pixel, determine the normal information of the pixel and obtain the normal map.

[0063] Optionally, color values ​​are sampled in a specified direction at the pixel to obtain multiple sampling results; based on the multiple sampling results, a first vector and a second vector are determined; and the three-dimensional vector composed of the first vector, the second vector, and the preset vector is determined as the normal information of the pixel.

[0064] The numerical range of the normal information of the above pixels is [-1,1], and it needs to be mapped to [0,1] through mapping.

[0065] The specified direction refers to the front, back, left, and right of the pixel. The first sampling result is obtained by sampling the color value at a specified distance in front of the pixel, the second sampling result is obtained by sampling the color value at a specified distance behind the pixel, the third sampling result is obtained by sampling the color value at a specified distance to the left of the pixel, and the fourth sampling result is obtained by sampling the color value at a specified distance to the right of the pixel.

[0066] The difference between the first and second sampling results is calculated to obtain a first vector. The difference between the third and fourth sampling results is calculated to obtain a second vector. The preset vector is a vector perpendicular to the first and second vectors, and its value is 1. The three-dimensional vector composed of the first vector, the second vector, and the preset vector is determined as the normal information of the pixel.

[0067] The above method can be implemented using the following code: float normalcenter = doublesmoothstep(i.uv) / / Calculates the center position of the pixel based on the texture coordinates i.uv; / / wavy normal float colore = doubleSmoothstep(i.uv+half4(-1,0,0,0)*0.004); float color1 =doublesmoothstep(i.uv + half4(1,0,,0)*0.004); float color2=doublesmoothstep(i.uv+half4(0,-1,0,0)*0.004); float color3 = doubleSmoothstep(i.uv + half4(0,1,0,0)*0.004); / / By offsetting the texture coordinates i.uv in different directions (left and right, up and down) and calling the doubleSmoothstep function, we obtain "smooth transition values" in different directions, which are the multiple sampling results mentioned above.

[0068] float2 ddxy=float2(color0-color1,color2-color3); / / This calculates the difference between the first and second sampling results to obtain the first vector, and calculates the difference between the third and fourth sampling results to obtain the second vector; float3 normal=float3((ddxy*BumpPower),1.0); Multiply the first and second vectors by the external parameter BumpPower (used to adjust the "bump strength"), and then add the Z component (set to 1.0) to form a three-dimensional normal vector; normal = normalize(normal); / / Normalizes the normal vector; float4 finalcolor = float4((normal *0.5 + 0.5)* normalcenter *i.color.a, normalcenter * i.color.a); / / Maps the normal from [-1,1] to the range [0,1]; return finalColor; For example, such as Figure 5 The diagram shown illustrates a normal map, in which the target area stores normal information.

[0069] The aforementioned method balances real-time performance, performance, and compatibility, enabling high-quality water interaction effects on performance-constrained devices such as mobile devices. It meets the dual requirements of smoothness and visual presentation in actual projects. It also has a high degree of customizability and stylization capabilities, allowing for the creation of different styles of ripple particles (i.e., normal maps) by adjusting control parameters. It is suitable for various art styles and project requirements, making it highly versatile.

[0070] Corresponding to the above method embodiments, this disclosure provides a rendering device for visual interactive effects, which provides a graphical user interface through a terminal device. The graphical user interface includes at least a portion of a virtual scene, such as... Figure 6 As shown, the device includes: The texture emission module 601 is used to control the particle emitter mounted on the interactive model to emit a pre-set normal map in response to the interaction behavior between the interactive model and the target model in the virtual scene; wherein, the normal map includes normal information representing the interaction effect; The normal determination module 602 is used to render the normal map to a preset texture to obtain a target texture, and to blend the normals of the target texture with the vertex normals of the target model to obtain the target vertex normals of the target model. Effect rendering module 603 is used to render an image representing an interactive effect on the surface of the target model based on the target vertex normal.

[0071] This disclosure provides a rendering apparatus for visual interactive effects. In response to an interaction between an interactive model and a target model in a virtual scene, a particle emitter mounted on the interactive model emits a pre-set normal map. The normal map includes normal information representing the interactive effect. The normal map is rendered onto a preset texture to obtain a target texture. The normals of the target texture are then blended with the vertex normals of the target model to obtain the target vertex normals of the target model. An image representing the interactive effect is generated by rendering on the surface of the target model based on the target vertex normals. In this method, by emitting a normal map via a particle emitter, rendering the normal map onto a preset texture, and sampling and blending the preset texture with the vertex normals of the target model, a water ripple effect can be rendered based on the blended vertex normals. This method is not only simple to implement and has low performance consumption, but also achieves realistic visual effects, thereby improving compatibility.

[0072] The aforementioned normal determination module is also used for: creating a first virtual camera, controlling the first virtual camera to capture normal maps; rendering the captured image from the first virtual camera onto a preset texture to obtain a target texture; wherein the texture coordinates of the target texture correspond to the screen coordinates of the terminal device.

[0073] The aforementioned normal determination module is further configured to: send the target texture to the shader corresponding to the target model; sample the target texture for each screen coordinate of the terminal device based on the current screen coordinate, and obtain a sampling result; wherein the sampling result is the normal information corresponding to the current screen coordinate in the target texture; map the numerical range of the normal information to a preset range to obtain the target sampling result; and perform a mixing process between the target sampling result and the vertex normal of the model vertex corresponding to the current screen coordinate in the target model to obtain the target vertex normal of the target model.

[0074] The aforementioned normal map includes a target region representing the interactive effect, and the target region stores normal information representing the interactive effect; The aforementioned effect rendering module is also used to: generate an initial interactive effect map on the surface of the target model based on the target vertex normal, control the movement of the initial interactive effect map according to preset particle parameters, and generate an image representing the interactive effect corresponding to the interactive behavior on the surface of the target model.

[0075] The aforementioned preset particle parameters are determined based on the attributes of the interaction model and the target model, and / or the interaction method between the interaction model and the target model.

[0076] The preset particle parameters mentioned above include at least: lifecycle parameters and change parameters; the effect rendering module is also used to: control the initial interactive effect image to gradually disappear as the lifecycle parameters are used; and control the dynamic change effect of the initial interactive effect image to gradually change according to the change parameters.

[0077] The changing parameters include: a first changing parameter; the above-mentioned effect rendering module is also used to: control the range of the interaction effect of the initial interaction effect diagram to gradually increase according to the first changing parameter; The changing parameters include: a second changing parameter; the above-mentioned effect rendering module is also used to: control the transparency of the initial interactive effect image to gradually increase according to the second changing parameter.

[0078] The changing parameters include: a third changing parameter; the above-mentioned effect rendering module is also used to: control the bump intensity of the initial interactive effect image to gradually decrease according to the third changing parameter.

[0079] The aforementioned texture emission module is also used to: determine the interaction position between the interactive model and the target model; and control the particle emitter mounted on the interactive model to emit a pre-set normal map to the interaction position.

[0080] The aforementioned particle emitter is pre-configured with multiple normal maps, and these normal maps correspond to a specified emission order. The aforementioned map emission module is also used to: control the particle emitter mounted on the interactive model to emit the corresponding normal maps according to the specified emission order.

[0081] The interactive effect ranges corresponding to the multiple normal maps mentioned above are different, and the interactive effect range corresponding to the normal map is proportional to the order value corresponding to the emission order of the normal map.

[0082] The aforementioned device also includes a texture generation module, used for: generating a first texture; determining the color value of each pixel in the first texture based on pre-set control parameters; and determining the normal information of the pixel based on the color value of the pixel to obtain a normal map.

[0083] The texture generation module described above is also used to: determine the target region in the first texture according to preset control parameters; wherein the target region includes edge regions and non-edge regions; if a pixel is not located in the target region, determine the color value of the pixel as a first color value; if a pixel is located in a non-edge region, determine the color value of the pixel as a second color value; if a pixel is located in an edge region, determine the color value of the pixel as a third color value; wherein the third color value is less than the second color value and greater than the first color value. The texture generation module described above is also used to: sample color values ​​in a specified direction of a pixel to obtain multiple sampling results; determine a first vector and a second vector based on the multiple sampling results; and determine the three-dimensional vector composed of the first vector, the second vector, and a preset vector as the normal information of the pixel.

[0084] The rendering apparatus for visual interactive effects provided in this embodiment has the same technical features as the rendering method for visual interactive effects provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.

[0085] 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 rendering method for the above-described visual interactive effects. This electronic device can be a server or a terminal device.

[0086] See Figure 7 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 rendering method of the above-mentioned visual interactive effect.

[0087] Furthermore, Figure 7 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.

[0088] The memory 101 may include high-speed random access memory (RAM) and may also include 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, metropolitan area network, etc. The bus 102 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 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.

[0089] The 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 the processor 100 or by instructions in software form. The 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 disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure 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, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0090] The processor in the aforementioned electronic device, by executing machine-executable instructions, can perform the following operations in the rendering method for the aforementioned visual interactive effects: In response to interaction between an interactive model and a target model in a virtual scene, a particle emitter mounted on the interactive model emits a pre-set normal map. The normal map includes normal information representing the interaction effect. The normal map is rendered onto a preset texture to obtain the target texture. The normals of the target texture are then blended with the vertex normals of the target model to obtain the target vertex normals of the target model. An image representing the interaction effect is then rendered on the surface of the target model based on these target vertex normals. This method, by emitting a normal map via a particle emitter, rendering the normal map onto a preset texture, and sampling and blending the preset texture with the vertex normals of the target model, allows for the rendering of a water ripple effect based on the blended vertex normals. This approach is not only simple and low-performance, but also achieves realistic visual effects, thereby improving compatibility. The above-described steps of rendering the normal map onto a preset texture to obtain a target texture include: creating a first virtual camera and controlling the first virtual camera to capture the normal map; rendering the captured image from the first virtual camera onto a preset texture to obtain the target texture; wherein the texture coordinates of the target texture correspond to the screen coordinates of the terminal device.

[0091] The above-described step of mixing the normals of the target texture with the vertex normals of the target model to obtain the target vertex normals of the target model includes: sending the target texture to the shader corresponding to the target model; sampling the target texture for each screen coordinate of the terminal device according to the current screen coordinate, and obtaining a sampling result; wherein, the sampling result is the normal information of the target texture corresponding to the current screen coordinate; mapping the numerical range of the normal information to a preset range to obtain a target sampling result; and mixing the target sampling result with the vertex normals of the model vertices corresponding to the current screen coordinates in the target model to obtain the target vertex normals of the target model.

[0092] The aforementioned normal map includes a target region representing the interactive effect, and the target region stores normal information representing the interactive effect. The step of rendering an image representing the interactive effect on the surface of the target model based on the target vertex normal includes: generating an initial interactive effect map on the surface of the target model based on the target vertex normal, controlling the movement of the initial interactive effect map according to preset particle parameters, and generating an image representing the interactive effect corresponding to the interactive behavior on the surface of the target model.

[0093] The preset particle parameters are determined based on the attributes of the interaction model and the target model, and / or the interaction method between the interaction model and the target model.

[0094] The aforementioned preset particle parameters include at least: lifecycle parameters and change parameters; the step of controlling the movement of the initial interactive effect image according to the preset particle parameters includes: controlling the initial interactive effect image to gradually disappear as the lifecycle parameters are defined; and controlling the dynamic change effect of the initial interactive effect image to gradually change according to the change parameters.

[0095] The aforementioned changing parameters include: a first changing parameter; the step of controlling the dynamic changing effect of the initial interactive effect image to gradually change according to the changing parameter includes: controlling the range of the interactive effect of the initial interactive effect image to gradually increase according to the first changing parameter.

[0096] The changing parameters include: a second changing parameter; the step of controlling the dynamic changing effect of the initial interactive effect image to gradually change according to the changing parameters includes: controlling the transparency of the initial interactive effect image to gradually increase according to the second changing parameter.

[0097] The changing parameters include: a third changing parameter; the step of controlling the dynamic change effect of the initial interactive effect image to gradually change according to the changing parameters includes: controlling the convexity intensity of the initial interactive effect image to gradually decrease according to the third changing parameter.

[0098] The steps described above for controlling the particle emitter mounted on the interactive model to emit a pre-set normal map include: determining the interaction position between the interactive model and the target model; and controlling the particle emitter mounted on the interactive model to emit the pre-set normal map to the interaction position.

[0099] The aforementioned particle emitter is pre-configured with multiple normal maps, and the multiple normal maps correspond to a specified emission order; the step of controlling the particle emitter mounted on the interactive model to emit the pre-configured normal maps includes: controlling the particle emitter mounted on the interactive model to emit the corresponding normal maps according to the specified emission order.

[0100] The interactive effect ranges corresponding to the above multiple normal maps are different, and the interactive effect range corresponding to the normal map is proportional to the order value corresponding to the emission order of the normal map.

[0101] The above method further includes: generating a first texture; determining the color value of each pixel in the first texture based on pre-set control parameters; and determining the normal information of the pixel based on the color value of the pixel to obtain the normal map.

[0102] The step of determining the color value of a pixel based on preset control parameters includes: determining a target region in the first texture according to the preset control parameters; wherein the target region includes edge regions and non-edge regions; if the pixel is not located in the target region, determining the color value of the pixel as a first color value; if the pixel is located in the non-edge region, determining the color value of the pixel as a second color value; if the pixel is located in the edge region, determining the color value of the pixel as a third color value; wherein the third color value is less than the second color value and greater than the first color value. The above-described step of determining the normal information of a pixel based on its color value includes: sampling color values ​​in a specified direction of the pixel to obtain multiple sampling results; determining a first vector and a second vector based on the multiple sampling results; and determining the three-dimensional vector composed of the first vector, the second vector, and a preset vector as the normal information of the pixel.

[0103] This embodiment also provides a machine-readable storage medium that stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the above-mentioned rendering method for visual interactive effects.

[0104] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be executed to perform the following operations in the rendering method for the aforementioned visual interactive effects: In response to interaction between an interactive model and a target model in a virtual scene, a particle emitter mounted on the interactive model emits a pre-set normal map. The normal map includes normal information representing the interaction effect. The normal map is rendered onto a preset texture to obtain the target texture. The normals of the target texture are then blended with the vertex normals of the target model to obtain the target vertex normals of the target model. An image representing the interaction effect is then rendered on the surface of the target model based on these target vertex normals. This method, by emitting a normal map via a particle emitter, rendering the normal map onto a preset texture, and sampling and blending the preset texture with the vertex normals of the target model, allows for the rendering of a water ripple effect based on the blended vertex normals. This approach is not only simple and low-performance, but also achieves realistic visual effects, thereby improving compatibility. The above-described steps of rendering the normal map onto a preset texture to obtain a target texture include: creating a first virtual camera and controlling the first virtual camera to capture the normal map; rendering the captured image from the first virtual camera onto a preset texture to obtain the target texture; wherein the texture coordinates of the target texture correspond to the screen coordinates of the terminal device.

[0105] The above-described step of mixing the normals of the target texture with the vertex normals of the target model to obtain the target vertex normals of the target model includes: sending the target texture to the shader corresponding to the target model; sampling the target texture for each screen coordinate of the terminal device according to the current screen coordinate, and obtaining a sampling result; wherein, the sampling result is the normal information of the target texture corresponding to the current screen coordinate; mapping the numerical range of the normal information to a preset range to obtain a target sampling result; and mixing the target sampling result with the vertex normals of the model vertices corresponding to the current screen coordinates in the target model to obtain the target vertex normals of the target model.

[0106] The aforementioned normal map includes a target region representing the interactive effect, and the target region stores normal information representing the interactive effect. The step of rendering an image representing the interactive effect on the surface of the target model based on the target vertex normal includes: generating an initial interactive effect map on the surface of the target model based on the target vertex normal, controlling the movement of the initial interactive effect map according to preset particle parameters, and generating an image representing the interactive effect corresponding to the interactive behavior on the surface of the target model.

[0107] The preset particle parameters are determined based on the attributes of the interaction model and the target model, and / or the interaction method between the interaction model and the target model.

[0108] The aforementioned preset particle parameters include at least: lifecycle parameters and change parameters; the step of controlling the movement of the initial interactive effect image according to the preset particle parameters includes: controlling the initial interactive effect image to gradually disappear as the lifecycle parameters are defined; and controlling the dynamic change effect of the initial interactive effect image to gradually change according to the change parameters.

[0109] The aforementioned changing parameters include: a first changing parameter; the step of controlling the dynamic changing effect of the initial interactive effect image to gradually change according to the changing parameter includes: controlling the range of the interactive effect of the initial interactive effect image to gradually increase according to the first changing parameter.

[0110] The changing parameters include: a second changing parameter; the step of controlling the dynamic changing effect of the initial interactive effect image to gradually change according to the changing parameters includes: controlling the transparency of the initial interactive effect image to gradually increase according to the second changing parameter.

[0111] The changing parameters include: a third changing parameter; the step of controlling the dynamic change effect of the initial interactive effect image to gradually change according to the changing parameters includes: controlling the convexity intensity of the initial interactive effect image to gradually decrease according to the third changing parameter.

[0112] The steps described above for controlling the particle emitter mounted on the interactive model to emit a pre-set normal map include: determining the interaction position between the interactive model and the target model; and controlling the particle emitter mounted on the interactive model to emit the pre-set normal map to the interaction position.

[0113] The aforementioned particle emitter is pre-configured with multiple normal maps, and the multiple normal maps correspond to a specified emission order; the step of controlling the particle emitter mounted on the interactive model to emit the pre-configured normal maps includes: controlling the particle emitter mounted on the interactive model to emit the corresponding normal maps according to the specified emission order.

[0114] The interactive effect ranges corresponding to the above multiple normal maps are different, and the interactive effect range corresponding to the normal map is proportional to the order value corresponding to the emission order of the normal map.

[0115] The above method further includes: generating a first texture; determining the color value of each pixel in the first texture based on pre-set control parameters; and determining the normal information of the pixel based on the color value of the pixel to obtain the normal map.

[0116] The step of determining the color value of a pixel based on preset control parameters includes: determining a target region in the first texture according to the preset control parameters; wherein the target region includes edge regions and non-edge regions; if the pixel is not located in the target region, determining the color value of the pixel as a first color value; if the pixel is located in the non-edge region, determining the color value of the pixel as a second color value; if the pixel is located in the edge region, determining the color value of the pixel as a third color value; wherein the third color value is less than the second color value and greater than the first color value. The above-described step of determining the normal information of a pixel based on its color value includes: sampling color values ​​in a specified direction of the pixel to obtain multiple sampling results; determining a first vector and a second vector based on the multiple sampling results; and determining the three-dimensional vector composed of the first vector, the second vector, and a preset vector as the normal information of the pixel.

[0117] The computer program products of the visualization interactive effect rendering method, apparatus, electronic device and system provided in the embodiments of this disclosure include 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.

[0118] 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.

[0119] Furthermore, in the description of the embodiments of this disclosure, unless otherwise expressly 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 this disclosure based on the specific circumstances.

[0120] 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 this disclosure, in essence, 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 this disclosure. 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.

[0121] In the description of this disclosure, 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, and are only for the convenience of describing this disclosure and 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, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0122] Finally, it should be noted that the above embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure 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, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such 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 this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method for rendering visual interactive effects, characterized in that, The method of providing a graphical user interface (GUI) via a terminal device, the GUI including at least a portion of a virtual scene, includes: In response to an interaction between the interactive model and the target model in the virtual scene, the particle emitter mounted on the interactive model is controlled to emit a pre-set normal map; wherein, the normal map includes normal information representing the interactive effect; The normal map is rendered onto a preset texture to obtain a target texture. The normals of the target texture are then blended with the vertex normals of the target model to obtain the target vertex normals of the target model. Based on the target vertex normals, an image representing the interactive effect is generated by rendering on the surface of the target model.

2. The method according to claim 1, characterized in that, The step of rendering the normal map onto a preset texture to obtain the target texture includes: Create a first virtual camera and control the first virtual camera to capture the normal map; The image captured by the first virtual camera is rendered onto a preset texture to obtain the target texture; wherein the texture coordinates of the target texture correspond to the screen coordinates of the terminal device.

3. The method according to claim 2, characterized in that, The step of blending the normals of the target texture with the vertex normals of the target model to obtain the target vertex normals of the target model includes: Send the target texture to the shader corresponding to the target model; The shader samples the target texture for each screen coordinate of the terminal device based on the current screen coordinate, and obtains a sampling result; wherein the sampling result is the normal information of the target texture corresponding to the current screen coordinate. The numerical range of the normal information is mapped to a preset range to obtain the target sampling result; The target sampling result is mixed with the vertex normal of the model vertex corresponding to the current screen coordinate in the target model to obtain the target vertex normal of the target model.

4. The method according to claim 1, characterized in that, The normal map includes a target region representing the interactive effect, and the target region stores normal information representing the interactive effect; The step of rendering an image representing an interactive effect on the surface of the target model based on the target vertex normal includes: An initial interactive effect image is generated on the surface of the target model based on the target vertex normal, and the movement of the initial interactive effect image is controlled according to preset particle parameters to generate an image representing the interactive effect corresponding to the interactive behavior on the surface of the target model.

5. The method according to claim 4, characterized in that, The preset particle parameters are determined based on the attributes of the interaction model and the target model, and / or the interaction method between the interaction model and the target model.

6. The method according to claim 4, characterized in that, The preset particle parameters include at least: life cycle parameters and change parameters; The step of controlling the motion of the initial interactive effect diagram according to preset particle parameters includes: The initial interactive effect image gradually disappears as the lifecycle parameters are controlled; The dynamic changes of the initial interactive effect image are controlled to gradually change according to the change parameters.

7. The method according to claim 6, characterized in that, The changing parameters include: a first changing parameter; The step of controlling the dynamic changes of the initial interactive effect image to gradually change according to the change parameters includes: The range of interactive effects in the initial interactive effect diagram is gradually increased according to the first change parameter.

8. The method according to claim 6, characterized in that, The changing parameters include: a second changing parameter; The step of controlling the dynamic changes of the initial interactive effect image to gradually change according to the change parameters includes: The transparency of the initial interactive effect image is controlled to gradually increase according to the second change parameter.

9. The method according to claim 6, characterized in that, The changing parameters include: a third changing parameter; The step of controlling the dynamic changes of the initial interactive effect image to gradually change according to the change parameters includes: The convexity intensity of the initial interactive effect image is controlled to gradually decrease according to the third variation parameter.

10. The method according to claim 1, characterized in that, The step of controlling the particle emitter mounted on the interactive model to emit a pre-set normal map includes: Determine the interaction positions between the interaction model and the target model; Control the particle emitter mounted on the interactive model to emit a pre-set normal map towards the interactive location.

11. The method according to claim 1, characterized in that, The particle emitter is pre-configured with multiple normal maps, and the multiple normal maps correspond to a specified emission order; The step of controlling the particle emitter mounted on the interactive model to emit a pre-set normal map includes: According to the specified launch sequence, control the particle emitters mounted on the interactive model to launch the corresponding normal maps.

12. The method according to claim 11, characterized in that, The interactive effect ranges corresponding to the multiple normal maps are different, and the interactive effect range corresponding to the normal map is proportional to the order value corresponding to the emission order of the normal map.

13. The method according to claim 4, characterized in that, The method further includes: Generate the first texture; For each pixel in the first texture, the color value of the pixel is determined based on pre-set control parameters; Based on the color value of the pixel, the normal information of the pixel is determined, and the normal map is obtained.

14. The method according to claim 13, characterized in that, The step of determining the color value of the pixel based on preset control parameters includes: The target region in the first texture is determined according to the preset control parameters; wherein the target region includes edge regions and non-edge regions; If the pixel is not located in the target area, the color value of the pixel is determined to be a first color value; If the pixel is located in the non-edge region, the color value of the pixel is determined to be the second color value; If the pixel is located in the edge region, the color value of the pixel is determined to be a third color value; wherein the third color value is less than the second color value and greater than the first color value.

15. The method according to claim 13, characterized in that, The step of determining the normal information of the pixel based on its color value includes: Color values ​​are sampled in a specified direction at the pixel to obtain multiple sampling results; Based on the multiple sampling results, determine the first vector and the second vector; The three-dimensional vector composed of the first vector, the second vector, and the preset vector is determined as the normal information of the pixel.

16. A rendering device for visual interactive effects, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface including at least a portion of a virtual scene, the device comprising: The texture emission module is used to control the particle emitter mounted on the interactive model to emit a pre-set normal map in response to the interaction behavior between the interactive model and the target model in the virtual scene; wherein, the normal map includes normal information representing the interaction effect; The normal determination module is used to render the normal map to a preset texture to obtain a target texture, and to blend the normals of the target texture with the vertex normals of the target model to obtain the target vertex normals of the target model. The effect rendering module is used to render an image representing the interactive effect on the surface of the target model based on the target vertex normal.

17. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the rendering method for the visual interactive effects according to any one of claims 1-15.

18. 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 rendering method for the visual interactive effect as described in any one of claims 1-15.