Three-dimensional interactive interface rendering method and device, electronic equipment and storage medium

CN115272546BActive Publication Date: 2026-10-30NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210883001.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2026-10-30
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

[0003]随着三维游戏的发展,出现了三维交互界面,三维交互界面会存在被三维场景中的虚拟对象遮挡,以及遮挡其他虚拟对象的情况,采用上述提到的现有技术的渲染方式无法正确显示三维交互界面与三维场景的关系,影响玩家的沉浸式体验

Benefits of technology

[0066]在本申请实施例中,通过采用第一混合方式对多个半透明图层进行混合处理,得到三维交互界面的界面贴图,其中,第一混合方式用于消除基于渲染纹理技术得到的纹理贴图的颜色误差;在当前虚拟场景中渲染界面贴图,得到三维交互界面;可以实现正常显示三维交互界面与三维场景中的虚拟对象相互遮挡的关系,提高游戏的沉浸式体验效果;同时,通过用于消除基于渲染纹理技术得到的纹理贴图的颜色误差的第一混合方式,来生成三维交互界面的界面贴图,可以避免出现颜色偏差,提高三维交互界面的显示效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272546B_ABST
    Figure CN115272546B_ABST
Patent Text Reader

Abstract

The application provides a rendering method and device of a three-dimensional interactive interface, electronic equipment and a storage medium, wherein the method comprises: adopting a first mixing mode to mix a plurality of semi-transparent layers to obtain an interface map of the three-dimensional interactive interface, wherein the first mixing mode is used to eliminate color errors of a texture map obtained based on a rendering texture technology; and rendering the interface map in a current virtual scene to obtain the three-dimensional interactive interface. The method can realize normal display of the relationship between the three-dimensional interactive interface and virtual objects in a three-dimensional scene, and improve the immersive experience effect of a game. Meanwhile, the first mixing mode used to eliminate color errors of the texture map obtained based on the rendering texture technology is used to generate the interface map of the three-dimensional interactive interface, so that color deviation can be avoided, and the display effect of the three-dimensional interactive interface is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to rendering methods and apparatus for three-dimensional interactive interfaces, electronic devices, and storage media. Background Technology

[0002] In addition to the in-game 3D scene, the game's display also includes the interactive interface. Generally, the 3D scene is first rendered onto the screen using a camera. Then, after the camera has rendered the 3D scene, the interactive interface is rendered based on this rendering result. If the interactive interface has semi-transparent parts, color mixing technology is needed to blend the colors on the interactive interface with the colors in the subsequent 3D scene rendering result.

[0003] With the development of 3D games, 3D interactive interfaces have emerged. These interfaces can be obscured by virtual objects in the 3D scene, or by other virtual objects. The existing rendering methods mentioned above cannot correctly display the relationship between the 3D interactive interface and the 3D scene, affecting the player's immersive experience.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] In view of the above problems, this application is made to provide a rendering method, apparatus, electronic device, and storage medium for a three-dimensional interactive interface that overcomes or at least partially solves the above problems, including:

[0006] A method for rendering a three-dimensional interactive interface, the three-dimensional interactive interface comprising multiple semi-transparent layers, the method comprising:

[0007] The multiple semi-transparent layers are blended using a first blending method to obtain the interface texture of the three-dimensional interactive interface;

[0008] The interface texture is rendered in the current virtual scene to obtain the three-dimensional interactive interface.

[0009] Optionally, the step of blending the multiple semi-transparent layers using a first blending method to obtain the interface texture of the three-dimensional interactive interface includes:

[0010] A first blending method is determined, the first blending method including a first transparency blending method and a first semi-transparent color blending method;

[0011] Based on the interface model corresponding to the 3D interactive interface, a temporary texture map corresponding to the 3D interactive interface is generated.

[0012] Based on the hierarchical order of the multiple semi-transparent layers, the transparency information of the multiple semi-transparent layers is mixed using the first transparency mixing method to determine the first transparency information, and the first transparency information is stored in the temporary transparency channel corresponding to the temporary texture map.

[0013] Based on the hierarchical order of the multiple semi-transparent layers and the color information of the multiple semi-transparent layers, the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map is determined, and the first color information is stored in the temporary color channel corresponding to the temporary texture map.

[0014] According to the hierarchical order of the multiple semi-transparent layers, the first color information and first transparency information stored in the temporary texture map, as well as the color information and transparency information of the multiple semi-transparent layers, are mixed using the first semi-transparent color mixing method to obtain the target color information of the interface texture of the three-dimensional interactive interface.

[0015] The target transparency information corresponding to the interface texture is determined based on the first transparency information stored in the temporary texture map.

[0016] Optionally, the step of mixing the transparency information of the multiple semi-transparent layers according to their hierarchical order using a first transparency blending method to determine the first transparency information, and storing the first transparency information in the temporary transparency channel corresponding to the temporary texture map, includes:

[0017] Starting from the highest level, determine the current transparency information stored in the first target semi-transparent layer and the temporary texture map; wherein, when the level of the first target semi-transparent layer is the highest level, the current transparency information stored in the temporary texture map is 0;

[0018] The transparency information of the first target semi-transparent layer and the current transparency information stored in the temporary texture map are mixed using a first transparency blending method to obtain intermediate transparency information;

[0019] The intermediate transparency information is used to replace the current transparency information stored in the temporary texture map;

[0020] Decrease the level by 1 and return to the step of determining the current transparency information of the first target semi-transparency layer and the temporary texture map to continue execution until the level is the first level;

[0021] The current transparency information stored in the temporary texture map is determined as the first transparency information.

[0022] Optionally, determining the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map based on the layer order and color information of the plurality of semi-transparent layers, and storing the first color information in the temporary color channel corresponding to the temporary texture map, includes:

[0023] Starting from the highest level, determine the temporary pixels in the current processing second target semi-transparent layer and temporary texture map that correspond to the second target semi-transparent layer;

[0024] When the depth of the temporary pixel is inconsistent with the depth of the second target pixel of the second target semi-transparent layer, the depth of the temporary pixel and the temporary color information are replaced by the depth of the second target pixel and the second target color information, respectively; wherein, the pixel depths of the multiple semi-transparent layers are the same;

[0025] Decrease the level by 1 and return to the step of determining the temporary pixel point corresponding to the second target semi-transparent layer in the current processing second target semi-transparent layer and temporary texture map, and continue to execute until the level is the first level;

[0026] The temporary color information of the temporary pixels of the temporary texture map is determined as the first color information.

[0027] Optionally, the step of mixing the first color information and first transparency information stored in the temporary texture map, as well as the color information and transparency information of the multiple semi-transparent layers, according to the hierarchical order of the plurality of semi-transparent layers, using the first semi-transparent color mixing method to obtain the target color information of the interface texture of the three-dimensional interactive interface, includes:

[0028] Starting from the highest level, determine the initial color blending result of the currently processed third target semi-transparent layer and the previous level; wherein, the color blending result of the previous level corresponding to the third target semi-transparent layer of the highest level is the first color information; the previous level is the level corresponding to the third target semi-transparent layer plus 1;

[0029] The first semi-transparent color mixing method is used to mix the transparency information, color information, first transparency information, initial color mixing result, and first color information of the third target semi-transparent layer to obtain the current layer color information;

[0030] Decrease the level by 1 and return to the step of determining the initial color blending result of the third target semi-transparent layer and the previous level, and continue execution until the level is the first level;

[0031] The current level color information is determined as the target color information.

[0032] Optionally, rendering the interface texture in the current virtual scene to obtain the 3D interactive interface includes:

[0033] The target color information and target transparency information of the interface texture, as well as the virtual scene color information and virtual scene transparency information of the current virtual scene, are mixed using a second semi-transparent color mixing method to obtain the three-dimensional interactive interface. The second semi-transparent color mixing method is different from the first semi-transparent color mixing method.

[0034] Optionally, the three-dimensional interactive interface includes a three-dimensional irregularly shaped interactive interface.

[0035] A rendering device for a three-dimensional interactive interface, the three-dimensional interactive interface including multiple semi-transparent layers, the device comprising:

[0036] The interface texture generation module is used to blend the multiple semi-transparent layers using a first blending method to obtain the interface texture of the three-dimensional interactive interface.

[0037] The interactive interface rendering module is used to render the interface texture in the current virtual scene to obtain the three-dimensional interactive interface.

[0038] Optionally, the above-mentioned interface texture generation module includes:

[0039] The blending mode determination submodule is used to determine a first blending mode, which includes a first transparency blending mode and a first semi-transparent color blending mode;

[0040] The temporary texture map generation submodule is used to generate a temporary texture map corresponding to the 3D interactive interface based on the interface model corresponding to the 3D interactive interface.

[0041] The first transparency information determination submodule is used to perform a mixing process on the transparency information of the multiple semi-transparent layers according to the layer order of the multiple semi-transparent layers and the first transparency mixing method to determine the first transparency information, and store the first transparency information in the temporary transparency channel corresponding to the temporary texture map.

[0042] The first color information determination submodule is used to determine the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map based on the hierarchical order of the multiple semi-transparent layers and the color information of the multiple semi-transparent layers, and to store the first color information in the temporary color channel corresponding to the temporary texture map.

[0043] The target color information determination submodule is used to mix the first color information and first transparency information stored in the temporary texture map and the color information and transparency information of the multiple semi-transparent layers according to the hierarchical order of the multiple semi-transparent layers, using the first semi-transparent color mixing method, to obtain the target color information of the interface texture of the three-dimensional interactive interface.

[0044] The target transparency information determination submodule is used to determine the target transparency information corresponding to the interface texture based on the first transparency information stored in the temporary texture map.

[0045] Optionally, the first transparency information determining submodule includes:

[0046] The first determining unit is used to determine the current transparency information stored in the first target semi-transparent layer and the temporary texture map, starting from the maximum level; wherein, when the level of the first target semi-transparent layer is the maximum level, the current transparency information stored in the temporary texture map is 0.

[0047] The first processing unit is used to perform a first transparency blending process on the transparency information of the first target semi-transparent layer and the current transparency information stored in the temporary texture map to obtain intermediate transparency information.

[0048] The first replacement unit is used to replace the current transparency information stored in the temporary texture map with the intermediate transparency information;

[0049] The second determining unit is used to decrement the level by 1 and return the current transparency information of the first target semi-transparent layer and temporary texture map stored in the first determining unit until the level is the first level.

[0050] The third determining unit is used to determine the current transparency information stored in the temporary texture map as the first transparency information.

[0051] Optionally, the first color information determining submodule includes:

[0052] The fourth determining unit is used to determine, starting from the highest level, the temporary pixel points in the currently processed second target semi-transparent layer and temporary texture map corresponding to the second target semi-transparent layer;

[0053] The second replacement unit is used to replace the depth of the temporary pixel and the temporary color information with the depth of the second target pixel and the second target color information respectively when the depth of the temporary pixel is inconsistent with the depth of the second target pixel of the second target semi-transparent layer; wherein the pixel depths of the plurality of semi-transparent layers are the same;

[0054] The fifth determining unit is used to decrement the level by 1 and return to the fourth determining unit to determine the temporary pixel point corresponding to the second target semi-transparent layer in the current processing second target semi-transparent layer and temporary texture map, until the level is the first level;

[0055] The sixth determining unit is used to determine the temporary color information of the temporary pixels of the temporary texture map as the first color information.

[0056] Optionally, the target color information determination submodule includes:

[0057] The seventh determining unit is used to determine the initial color mixing result of the currently processed third target semi-transparent layer and the previous layer, starting from the maximum layer; wherein, the color mixing result of the previous layer corresponding to the third target semi-transparent layer of the maximum layer is the first color information; the previous layer is the layer corresponding to the third target semi-transparent layer plus 1;

[0058] The second processing unit is used to perform blending processing on the transparency information, color information, first transparency information, initial color blending result, and first color information of the third target semi-transparent layer using the first semi-transparent color blending method to obtain the current layer color information;

[0059] The eighth determining unit is used to decrement the level by 1 and return the initial color mixing result of the third target semi-transparent layer and the previous level determined in the seventh determining module until the level is the first level;

[0060] The ninth determining unit is used to determine the current level color information as the target color information.

[0061] Optionally, the interactive interface rendering module is used to perform a second semi-transparent color mixing method to mix the target color information and target transparency information of the interface texture with the virtual scene color information and virtual scene transparency information of the current virtual scene to obtain the three-dimensional interactive interface. The second semi-transparent color mixing method is different from the first semi-transparent color mixing method.

[0062] Optionally, the three-dimensional interactive interface includes a three-dimensional irregularly shaped interactive interface.

[0063] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the rendering method for a three-dimensional interactive interface as described above.

[0064] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the rendering method for a three-dimensional interactive interface as described above.

[0065] This application has the following advantages:

[0066] In this embodiment, a 3D interactive interface texture is obtained by blending multiple semi-transparent layers using a first blending method. The first blending method eliminates color errors in the texture maps obtained using rendering texture technology. The interface texture is then rendered in the current virtual scene to obtain the 3D interactive interface. This allows for the normal display of the 3D interactive interface and the occlusion relationship between virtual objects in the 3D scene, improving the immersive gaming experience. Furthermore, by using the first blending method to eliminate color errors in the texture maps obtained using rendering texture technology to generate the 3D interactive interface texture, color deviations can be avoided, improving the display effect of the 3D interactive interface. Attached Figure Description

[0067] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 This is a flowchart illustrating the steps of a three-dimensional interactive interface rendering method according to an embodiment of this application.

[0069] Figure 2 This is a schematic diagram showing the relationship between the layer hierarchy and rendering order of the semi-transparent layers in an embodiment of this application;

[0070] Figure 3 This is a schematic diagram illustrating the relationship between an interactive interface and a three-dimensional scene according to an embodiment of this application;

[0071] Figure 4 This is a flowchart illustrating the steps of a method for rendering a 3D interactive interface in the Unity engine, as described in an embodiment of this application.

[0072] Figure 5 This is a structural block diagram of a rendering device for a three-dimensional interactive interface according to an embodiment of this application. Detailed Implementation

[0073] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0074] In the game display interface, if the interactive interface has semi-transparent parts, color mixing technology is required to mix the colors on the interactive interface with the colors in the rendering result of the 3D scene behind it.

[0075] The interactive interface consists of multiple layers of semi-transparent layers. The layer level of the semi-transparent layers determines the rendering order of the corresponding semi-transparent layers when generating the interactive interface. The larger the layer level of the semi-transparent layer, the earlier the corresponding rendering order; the smaller the layer level of the semi-transparent layer, the later the corresponding rendering order.

[0076] like Figure 2 As shown, when the interactive interface includes a first-level semi-transparent layer and a second-level semi-transparent layer, the second-level semi-transparent layer is rendered before the first-level semi-transparent layer.

[0077] When rendering an interactive interface containing multiple semi-transparent layers, color blending is typically achieved using standard color blending formulas. These formulas include standard semi-transparent color blending formulas and standard transparency blending formulas. The standard semi-transparent color blending formula is expressed as follows:

[0078] Color AB =Color A *(1-Alpha B )+Color B *Alpha B

[0079] Among them, Color B Indicates the color information of the current layer, Color A This represents the color information obtained after rendering the layer at the previous level. Alpha B Color indicates the transparency information of the current layer. AB This represents the blended color obtained after rendering the current layer. The "upper level" layer refers to the layer with a level one higher than the current layer. When the current layer is the highest level layer, then "Color" is used. A It is 0.

[0080] The standard transparency blending formula is expressed as follows:

[0081] AB Alpha=A Alpha *(1-B Alpha )+B Alpha

[0082] Among them, Alpha A Alpha represents the transparency information obtained after rendering the layer at the previous level. B This indicates the transparency information of the current layer, AB. Alpha This represents the blending transparency information obtained after rendering the current layer. When the current layer is the highest-level layer, the Alpha value is... A It is 0.

[0083] like Figure 3 As shown, the interactive interface 200 includes layers 202 and 203. Layers 202 and 203 both represent a layer within the interactive interface, with layer 202 being rendered before layer 203. In one example, layer 202 represents a red layer with 30% opacity, and layer 203 represents a green layer with 60% opacity. The 3D scene 201 serves as the background color of the interactive interface 200; therefore, opacity is not considered, meaning the 3D scene is opaque by default, with a corresponding opacity value of 1. The color of the 3D scene 201 is recorded as the background color, and the layer containing the 3D scene 201 is higher than the layer containing the interactive interface 200.

[0084] In existing technology, the color processing of the overlapping part of layers 202 and 203, i.e., region 204, is as follows: 1. First, the 3D scene 201 is rendered to obtain the 3D scene color, i.e., the background color with a transparency information of 1. 2. Layer 202 in the interactive interface is rendered. Using a conventional semi-transparent color mixing formula, the color after layer 202 and the 3D scene are mixed is: 70% background color + 30% red. 3. Layer 203 in the interactive interface is rendered. Using a conventional semi-transparent color mixing formula, the color after layer 203, layer 202, and the 3D scene are mixed, i.e., the color of region 204 is: (70% background color + 30% red) * 40% + 60% green, which can also be expressed as: 28% background color + 12% red + 60% green, i.e., the color that region 204 finally displays on the screen.

[0085] With the development of 3D games, 3D interactive interfaces have emerged. The main difference between 3D and 2D interactive interfaces lies in the fact that 3D interactive interfaces can be obscured by virtual objects within the 3D scene, or even obscure other virtual objects. For example, a holographic bracelet floating on a virtual character's wrist might have interactive objects such as buttons, text, and sliders, and the bracelet would shift and rotate with the 3D scene. These types of 3D interactive interfaces share the same characteristics as the virtual objects in the 3D scene. Therefore, unlike traditional interactive interfaces, it's often impossible to render the 3D scene first and then render the interactive interface separately. In other words, if traditional rendering methods are used for 3D interactive interfaces, the relationship between the 3D interactive interface and the 3D scene may not be correctly displayed, thus affecting the player's immersive experience.

[0086] To address the shortcomings of existing technologies that fail to accurately display the relationship between 3D interactive interfaces and 3D scenes, the inventors conceived of using Render To Texture (RT) technology. RT technology pre-organizes and constructs the interface content to be displayed and interacted with on the 3D interactive interface using a conventional planar interactive interface approach. Then, a separate camera (which can be called an RT camera) renders the planar interactive interface onto an image. Finally, this image is overlaid onto the pre-made interface model corresponding to the 3D interactive interface. At this point, the 3D interactive interface acts like a virtual object in the 3D scene, possessing attributes such as model and textures, and can participate in the regular 3D scene rendering.

[0087] However, the inventors discovered that in the process of obtaining the interface texture map corresponding to the 3D interactive interface using RT technology, for 3D interactive interfaces with multiple semi-transparent layers, the generated texture map will have color deviation, affecting the final display effect.

[0088] In view of this, embodiments of this application provide a rendering method for a three-dimensional interactive interface. By employing a first blending method to eliminate color errors in texture maps obtained based on RT technology, multiple semi-transparent layers constituting the three-dimensional interactive interface are blended to generate an interface texture map for the three-dimensional interactive interface, thus avoiding color deviation. The interface texture map is then rendered in the current virtual scene to obtain the three-dimensional interactive interface. The current virtual scene may include the three-dimensional interactive interface and virtual objects in the three-dimensional scene. By using texture mapping, the mutual occlusion relationship between the three-dimensional interactive interface and virtual objects in the three-dimensional scene can be taken into account, ensuring an immersive gaming experience.

[0089] In one embodiment of this application, the rendering method for a 3D interactive interface can run on a local terminal device or a server. When the rendering method for a 3D interactive interface runs on a server, it can be implemented and executed based on a cloud interactive system, wherein the cloud interactive system includes a server and client devices.

[0090] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interactive system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of the 3D interactive interface rendering method are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a first terminal device, television, computer, or PDA; however, the rendering of the 3D interactive interface is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0091] Reference Figure 1 The diagram illustrates a flowchart of a rendering method for a three-dimensional interactive interface according to an embodiment of this application. In this embodiment, the three-dimensional interactive interface includes multiple semi-transparent layers, and the method may include the following steps:

[0092] Step 101: The multiple semi-transparent layers are blended using the first blending method to obtain the interface texture of the three-dimensional interactive interface.

[0093] The first mixing method is used to eliminate color errors in texture maps obtained based on rendering texture technology.

[0094] Step 102: Render the interface texture in the current virtual scene to obtain the three-dimensional interactive interface.

[0095] This application embodiment uses a first blending method to blend multiple semi-transparent layers to obtain a 3D interactive interface texture. The first blending method is used to eliminate color errors in the texture map obtained based on rendering texture technology. The interface texture is then rendered in the current virtual scene to obtain the 3D interactive interface. This allows for the normal display of the 3D interactive interface and the occlusion relationship between virtual objects in the 3D scene, improving the immersive experience of the game. At the same time, by using the first blending method to eliminate color errors in the texture map obtained based on rendering texture technology to generate the interface texture of the 3D interactive interface, color deviation can be avoided, improving the display effect of the 3D interactive interface.

[0096] The rendering method of the three-dimensional interactive interface in this exemplary embodiment will be further explained below.

[0097] In step 101, the multiple semi-transparent layers are blended using a first blending method to obtain the interface texture of the three-dimensional interactive interface.

[0098] The 3D interactive interface consists of multiple layers of semi-transparent layers. The layer level of the semi-transparent layers determines the rendering order of the corresponding semi-transparent layers when generating the interface textures for the 3D interactive interface. The larger the layer level of the semi-transparent layer, the earlier the corresponding rendering order; the smaller the layer level of the semi-transparent layer, the later the corresponding rendering order.

[0099] Rendering texture technology, or RT technology, uses conventional color mixing methods to generate texture maps. In this embodiment, the conventional color mixing method can be referred to as the second mixing method. The first mixing method is used to eliminate color errors between the texture map obtained based on rendering texture technology and the rendered 3D scene. It can be understood that the first mixing method is a mixing method corresponding to the second mixing method and can solve the corresponding defects of the second mixing method. Specifically, the process of determining the first mixing method may include: obtaining an initial texture map of the 3D interactive interface using RT technology with the second mixing method; rendering the initial texture map in the current virtual scene to obtain an initial mixing result; rendering the actual texture map in the current virtual scene to obtain an actual mixing result; and determining the first mixing method based on the difference between the initial mixing result and the actual mixing result. The mixing method used to obtain the initial mixing result and the actual mixing result is the same; optionally, the mixing method used to obtain the initial mixing result and the actual mixing result is the second mixing method.

[0100] To facilitate understanding of the process of determining the first mixing method by those skilled in the art, the following example uses the method corresponding to the conventional color mixing formula as an example. That is, the second mixing method includes a second transparency mixing method and a second semi-transparent color mixing method. The formula corresponding to the second transparency mixing method is the conventional transparency mixing formula, and the formula corresponding to the second semi-transparent color mixing method is the conventional semi-transparent color mixing formula. Combined with... Figure 3 The interactive interface 200 of the included layers 202 and 203 is illustrated by way of example.

[0101] The relevant technology employs a second hybrid approach, RT technology, to render the content of the 3D interactive interface onto an image. This image is then used as the texture map corresponding to the interface model of the 3D interactive interface in the rendering of the 3D scene. The specific process is as follows:

[0102] First, we need to determine the background color and transparency of the RT camera. To distinguish it from the background color mentioned earlier, we will refer to the RT camera's background color as the camera background color. This camera background color can be customized by the developer, but as a background color, its transparency does not need to be considered; that is, the transparency information is 1.

[0103] Then, render layer 202, which is a red layer with 30% transparency. Using the normal color blending mode, the color of layer 202 after blending with the camera background is: 70% camera background color + 30% red, with an transparency of 30%.

[0104] Next, render layer 203, which is a green layer with 60% opacity. Using a standard color blending method, the resulting color after blending layer 203 with layer 202 and the camera background is: 28% camera background color + 12% red + 60% green, with an opacity of 72%. This means that the initial texture map color corresponding to area 204 in the 3D interactive interface is: 28% camera background color + 12% red + 60% green, with an opacity of 72%.

[0105] Finally, the initial texture map is rendered in the current virtual scene. When the virtual objects in the current virtual scene do not obscure the 3D interactive interface, the 3D scene other than the 3D interactive interface in the current virtual scene is used as the background color. Its transparency does not need to be considered, that is, the transparency information is 1. The color of the 3D scene is recorded as the background color. The initial texture map is rendered in the current virtual scene, that is, the initial texture map is rendered with the 3D scene as the background. Using the conventional color mixing formula, the color of the area in the initial texture map that is mixed with layer 203, layer 202 and the camera background and the 3D scene is: 28% background color + 20.16% camera background color + 8.64% red + 43.2% green.

[0106] When virtual objects in the current virtual scene do not obscure the 3D interactive interface, the traditional method of rendering the 3D scene first and then rendering the interactive interface separately can be used. In this case, the color and transparency of the rendered interactive interface are the actual blending result. In the actual blending result, the colors of layers 203 and 202 of the 3D interactive interface after blending with the 3D scene are: 28% background color + 12% red + 60%. The specific calculation process for the actual blending result can be found in the previous calculation. Figure 3 The process of determining the color and transparency information in the central region 204 will not be elaborated here.

[0107] The comparison reveals that the colors in the initial blending result differ from those in the actual blending result. Specifically, the initial blending result contains less red and green and more of the RT camera's background color. In other words, in RT technology, the RT camera's background color interferes with the blending result, causing color deviations when the 3D interactive interface and the 3D scene are blended.

[0108] It should be noted that when RT technology uses other mixing methods, the first mixing method can also be derived by comparing the difference between the initial mixing result and the actual mixing result.

[0109] To address the color deviation between the initial blending result and the actual blending result obtained using the RT technique with the second blending method (i.e., the blending method corresponding to the conventional color blending formula), this application proposes a first blending method. Using the first blending method to generate the texture map of the 3D interactive interface, i.e., the interface map, can avoid the color deviation between the initial blending result and the actual blending result obtained through RT technique.

[0110] Taking the second mixing method as an example, which corresponds to the conventional color mixing formula mentioned above, the first mixing method includes the first transparency mixing method and the first semi-transparent color mixing method;

[0111] The formula for the first transparency blending mode is as follows:

[0112] AB Alpha =A Alpha *(1-a Alpha )+B Alpha

[0113] Among them, Alpha A Alpha represents the transparency information obtained after rendering the layer at the previous level. B This indicates the transparency information of the current layer, AB. Alpha This indicates the blending transparency information obtained after the current layer is rendered.

[0114] The formula for the first semi-transparent color mixing method is as follows:

[0115]

[0116] Among them, RT color Represents the blended color information obtained after rendering the current layer; RT alpha This indicates the final transparency of the interface texture, i.e., the target transparency information; Color LastStep This represents the blended color information obtained after rendering the layer at the previous level; Alpha current Indicates the transparency information of the current layer; Color current Indicates the color information of the current layer; A color This represents the first color information stored in the temporary color channel corresponding to the temporary texture map, which is the underlying color information corresponding to each semi-transparent layer. It can also be understood as the background color information in the interface texture corresponding to the 3D interactive interface.

[0117] Based on the aforementioned first semi-transparent color mixing method, step 101 may include:

[0118] A first blending method is determined, which includes a first transparency blending method and a first semi-transparent color blending method;

[0119] Based on the interface model corresponding to the 3D interactive interface, generate a temporary texture map corresponding to the 3D interactive interface;

[0120] Based on the hierarchical order of multiple semi-transparent layers, the transparency information of multiple semi-transparent layers is mixed using the first transparency blending method to determine the first transparency information, and the first transparency information is stored in the temporary transparency channel corresponding to the temporary texture map.

[0121] Based on the hierarchical order of multiple semi-transparent layers and the color information of multiple semi-transparent layers, determine the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map, and store the first color information into the temporary color channel corresponding to the temporary texture map.

[0122] According to the hierarchical order of multiple semi-transparent layers, the first color information and first transparency information stored in the temporary texture map, as well as the color information and transparency information of multiple semi-transparent layers, are mixed using the first semi-transparent color mixing method to obtain the target color information of the interface texture of the 3D interactive interface.

[0123] The target transparency information corresponding to the interface texture is determined based on the first transparency information stored in the temporary texture map.

[0124] In this embodiment, during the process of generating the interface texture map of the 3D interactive interface, it is first necessary to determine a first blending method to eliminate the color error caused by RT technology, so as to solve the color difference problem caused by RT technology. The process of determining the first blending method can be referred to the previous description.

[0125] After determining the first blending method, before obtaining the interface texture of the 3D interactive interface using the first blending method, it is necessary to first determine RT in the formula corresponding to the first blending method. alpha and A color .

[0126] For example, in determining RT alpha and A color In the process, a temporary texture map corresponding to the 3D interactive interface can be generated first based on the interface model. The temporary texture map can be understood as a buffer of the same size as the interface map. Each pixel in the temporary texture map has four channels, including a temporary transparency channel and a temporary color channel consisting of three channels. Then, according to the hierarchical order of the multiple semi-transparent layers of the 3D interactive interface, the transparency information of the multiple semi-transparent layers is mixed using a first transparency blending method to determine the first transparency information. This first transparency information is the target transparency information RT of the interface map. alpha To facilitate subsequent processing, the first transparency information is stored in the temporary transparency channel corresponding to the temporary texture map. Next, based on the layer order and color information of the multiple semi-transparent layers, the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map is determined. This first color information is the background color information A of the interface texture. color To facilitate subsequent processing, the first color information is stored in the temporary color channel corresponding to the temporary texture map.

[0127] In determining RT alpha and A color Then, according to the hierarchical order of multiple semi-transparent layers, the first color information and first transparency information stored in the temporary texture map, as well as the color information and transparency information of multiple semi-transparent layers, are substituted into the formula corresponding to the first semi-transparent color mixing method to obtain the target color information of the interface texture of the 3D interactive interface.

[0128] Optionally, the above-mentioned method of blending the transparency information of multiple semi-transparent layers according to their hierarchical order using a first transparency blending method to determine the first transparency information, and storing the first transparency information in the temporary transparency channel corresponding to the temporary texture map, may include:

[0129] Starting from the highest level, determine the current transparency information stored in the first target semi-transparent layer and the temporary texture map; where, when the level of the first target semi-transparent layer is the highest level, the current transparency information stored in the temporary texture map is 0;

[0130] The transparency information of the first target semi-transparent layer and the current transparency information stored in the temporary texture map are mixed using the first transparency blending method to obtain intermediate transparency information;

[0131] Replace the current transparency information stored in the temporary texture map with intermediate transparency information;

[0132] Decrease the level by 1 and return to the step of determining the current transparency information of the first target semi-transparency layer and the temporary texture map to continue execution until the level is the first level;

[0133] The current transparency information stored in the temporary texture map is determined as the first transparency information.

[0134] The layer level of the semi-transparent layer determines its rendering order in the process of generating interface textures. The higher the layer level, the earlier the rendering order. Therefore, starting from the highest layer level, that is, starting from the first rendering order, multiple semi-transparent layers are mixed to obtain the interface texture.

[0135] As can be seen from the first transparency blending formula mentioned above, when rendering each semi-transparent layer, it is also necessary to determine the transparency rendering result of the corresponding upper-level layer. In this embodiment, the temporary transparency channel of the temporary texture map is used to store the transparency rendering result of the upper-level layer. Therefore, when rendering each semi-transparent layer, it is necessary not only to determine the currently processed semi-transparent layer, but also to determine the current transparency information stored in the temporary texture map. Then, the transparency information of the currently processed semi-transparent layer, i.e., the first target semi-transparent layer, and the current transparency information stored in the temporary texture map are substituted into the formula corresponding to the first transparency blending method to calculate the transparency blending result of the first target semi-transparent layer, i.e., the intermediate transparency information. The intermediate transparency information is then used to replace the current transparency information stored in the temporary texture map. When the first-level semi-transparent layer is rendered, the current transparency information stored in the temporary texture map is the final transparency information, i.e., the first transparency information stored in the temporary texture map, which is also the target transparency information of the interface texture.

[0136] Optionally, the above-mentioned determination of the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map based on the rendering order and color information of the multiple semi-transparent layers, and the storage of the first color information in the temporary color channel corresponding to the temporary texture map, may include:

[0137] Starting from the highest level, determine the temporary pixels in the current processing second target semi-transparent layer and temporary texture map that correspond to the second target semi-transparent layer;

[0138] When the depth of the temporary pixel is inconsistent with the depth of the second target pixel in the second target semi-transparent layer, the depth of the temporary pixel and the temporary color information are replaced by the depth of the second target pixel and the second target color information, respectively; wherein, the pixel depths of multiple semi-transparent layers are the same;

[0139] Decrease the level by 1 and return to the step of determining the temporary pixel corresponding to the second target semi-transparent layer in the temporary texture map of the currently processed second target semi-transparent layer and continue to execute until the level is the first level;

[0140] The temporary color information of the temporary pixels of the temporary texture map is determined as the first color information.

[0141] The first color information stored in the temporary texture map can be understood as the background color information of the interface texture, combined with... Figure 2 As shown in the multiple semi-transparent layers, the pixels in each semi-transparent layer can correspond only to a portion of the pixels in the interface texture. That is, the background color information of different pixels in the interface texture can correspond to the color information of the corresponding pixels in different semi-transparent layers. In this embodiment, based on the rendering order of the layers, starting with the highest-level semi-transparent layer, the currently processed semi-transparent layer, i.e., the second target semi-transparent layer, and the temporary pixels in the temporary texture map corresponding to the second target semi-transparent layer are determined. For example, if the second target semi-transparent layer is... Figure 2 When the second-level layer is used, the temporary pixel is the pixel corresponding to the triangle in the second-level layer. That is, the pixel that forms the triangle in the second-level layer is the second target pixel.

[0142] Depth detection determines whether the depth of the temporary pixel matches the depth of the second target pixel in the second semi-transparent layer. If they don't match, the depth and color information of the temporary pixel are replaced with the depth of the second target pixel and the color information of the second target. The depth of pixels in the temporary texture map can be considered infinitely far, while the depth of pixels in the semi-transparent layer can be calculated by determining the distance between the semi-transparent layer and the virtual camera. Multiple semi-transparent layers are used to generate the same interface texture; therefore, the pixel depths of multiple semi-transparent layers are the same. This means that the depth of pixels in the temporary texture map can only be replaced once. After the first-level semi-transparent layer is rendered, the temporary color information stored in the temporary texture map is the final color information of the temporary texture map, i.e., the first color information stored in the temporary texture map, which is also the base color information of the interface texture.

[0143] Optionally, the above-mentioned mixing of the first color information and first transparency information stored in the temporary texture map, as well as the color information and transparency information of the multiple semi-transparent layers, according to the hierarchical order of the multiple semi-transparent layers, using the first semi-transparent color mixing method, to obtain the target color information of the interface texture of the 3D interactive interface, may include:

[0144] Starting from the highest level, determine the initial color blending result of the currently processed third target semi-transparent layer and the previous level; where the color blending result of the previous level corresponding to the third target semi-transparent layer of the highest level is the first color information; the previous level is the level corresponding to the third target semi-transparent layer plus 1;

[0145] The first semi-transparent color blending method is used to blend the transparency information, color information, first transparency information, initial color blending result, and first color information of the third target semi-transparent layer to obtain the color information of the current layer.

[0146] Decrease the layer by 1 and return to the step that determines the initial color blending result of the third target semi-transparent layer being processed and the previous layer, and continue execution until the layer is the first layer;

[0147] The current layer color information is determined as the target color information.

[0148] After obtaining the first transparency information and the first color information, according to the first semi-transparent color blending formula mentioned above, when rendering each semi-transparent layer, it is also necessary to determine the color rendering result of the corresponding upper-level layer. Therefore, when rendering each semi-transparent layer, it is necessary not only to determine the currently processed semi-transparent layer, i.e., the third target semi-transparent layer, but also to determine the initial color blending result corresponding to the upper-level layer. Then, the transparency information, color information, first transparency information, initial color blending result, and first color information of the third target semi-transparent layer are substituted into the formula corresponding to the first semi-transparent color blending method to calculate the transparency blending result of the third target semi-transparent layer, i.e., the color information of the current level. When the first level semi-transparent layer is rendered, the color information of the current level is the final color information of the interface texture, i.e., the target color information of the interface texture.

[0149] In step 102, the interface texture is rendered in the current virtual scene to obtain the three-dimensional interactive interface.

[0150] After obtaining the interface texture, the interface texture is applied to the corresponding interface model and rendered as part of the current virtual scene to obtain a 3D interactive interface.

[0151] For example, the process of rendering interface textures in the current virtual scene to obtain a 3D interactive interface may include:

[0152] The target color information and target transparency information of the interface texture, as well as the virtual scene color information and virtual scene transparency information of the current virtual scene, are mixed using a second semi-transparent color mixing method to obtain a three-dimensional interactive interface.

[0153] The second semi-transparent color blending method can be the conventional color blending method mentioned above, or other blending methods that do not produce color deviation. In this embodiment, during the generation of interface textures, the color difference of the texture maps generated by RT technology is taken into account using the first blending method. Therefore, when generating the 3D interactive interface, there is no longer a color difference, which means that the 3D interactive interface can be displayed in the game screen without color difference.

[0154] For example, conventional semi-transparent materials can be used for rendering. During the rendering process, a second semi-transparent color blending method is used to perform color blending processing on the 3D interactive interface and the virtual objects in the 3D scene to obtain the rendering results of the 3D interactive interface and the virtual objects in the 3D scene.

[0155] It should be noted that when the 3D interactive interface is occluded by a virtual object in the current virtual scene, the interface texture corresponding to the occluded part is used as the background of the virtual object, and the virtual object is used as the foreground. That is, the layer of the interface texture corresponding to the occluded part is higher than the layer of the virtual object. This is then substituted into the formula corresponding to the second semi-transparent color blending method for calculation. For the parts of the 3D interactive interface that are not occluded by virtual objects in the current virtual scene, the current virtual scene is used as the background, and the interface texture corresponding to the unoccluded part is used as the foreground. That is, the layer of the interface texture corresponding to the unoccluded part is lower than the layer of the current virtual scene. This is then substituted into the formula corresponding to the second semi-transparent color blending method for calculation. Therefore, the 3D interactive interface rendering method provided in this application embodiment can also correctly render 3D irregularly shaped interactive interfaces. For example, a 3D irregularly shaped interactive interface can be understood as an interactive interface with irregular edges and / or non-planar surfaces.

[0156] To facilitate understanding by those skilled in the art, the following will be combined with Figure 4 This paper describes the main steps of implementing the rendering method of the three-dimensional interactive interface provided in the embodiments of this application in the Unity game engine.

[0157] Step 401: Generate a buffer with the same size as the interface texture of the 3D interactive interface. This buffer can be represented as a temporary texture map of the 3D interactive interface. To ensure the accuracy of color and transparency, the color format of the temporary texture map is 32-bit RGBA. It can be understood that the temporary texture map includes an alpha channel and a color channel. The alpha channel is also called the A channel, and the color channel is also called the RGB channel. The A channel is 0 in the initial state, that is, the initial transparency state of the temporary texture map is completely transparent.

[0158] Step 402: Write the transparency value, i.e., the transparency information, into the A channel of the buffer using the first rendering instruction. The writing method follows the formula below:

[0159] Dst Alpha *(1-Src Alpha )+Src Alpha

[0160] Among them, Src Alpha Dst represents the transparency information of the pixel that needs to be rendered. Alpha This represents the transparency of the pixels currently in the buffer.

[0161] Step 402 yields the final transparency information of the interface texture, i.e., the target transparency information.

[0162] Step 403: Write color values, i.e., color information, into the RGB channels of the buffer using the first rendering instruction. It's important to note that while writing color values ​​into the RGB channels of the buffer, this step also writes the distance from the currently rendered pixel to the camera into a depth buffer for subsequent depth detection. In other words, during the process of writing color values ​​into the RGB channels of the buffer, depth detection is performed, comparing the depth of the pixel to be rendered with the corresponding depth in the depth buffer. Only when the depths do not match is the color information of the pixel to be rendered written into the corresponding RGB channel of the buffer. The formula followed for this writing method is as follows:

[0163] Dst Color *0+Src Color

[0164] Among them, Src Color Dst represents the color of the pixel that needs to be rendered. Color This represents the color of the pixels currently in the cache.

[0165] Step 404: Copy the information stored in the buffer A channel to the A channel of the interface texture through the third rendering instruction, and write the target color information into the RGB channel of the interface texture.

[0166] The formula to follow when writing target color information into the RGB channel of the interface texture is the first semi-transparent color mixing formula mentioned earlier, which can avoid color difference.

[0167] Step 405: Render the current virtual scene using the fourth rendering instruction. The current virtual scene includes a 3D interactive interface and a 3D scene. This involves applying interface textures to the corresponding interface model, rendering the interface model as a virtual object within the current virtual scene to ensure accurate positional relationships between the 3D interactive interface and the virtual objects in the 3D scene, thus enhancing game immersion. In the specific rendering process, semi-transparent materials can be used for rendering. A second semi-transparent color blending method is used to blend the colors of the 3D interactive interface and the virtual objects in the 3D scene to obtain the final rendering results.

[0168] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0169] Reference Figure 5 This diagram illustrates a structural block diagram of an embodiment of a rendering apparatus for a three-dimensional interactive interface according to this application. Corresponding to the above-described embodiment of a rendering method for a three-dimensional interactive interface, the three-dimensional interactive interface includes multiple semi-transparent layers, and the apparatus may include the following modules:

[0170] The interface texture generation module 501 is used to perform blending processing on the multiple semi-transparent layers using a first blending method to obtain the interface texture of the three-dimensional interactive interface.

[0171] The interactive interface rendering module 502 is used to render the interface texture in the current virtual scene to obtain the three-dimensional interactive interface.

[0172] Optionally, the interface texture generation module 501 mentioned above may include:

[0173] The blending mode determination submodule is used to determine a first blending mode, which includes a first transparency blending mode and a first semi-transparent color blending mode;

[0174] The temporary texture map generation submodule is used to generate a temporary texture map corresponding to the 3D interactive interface based on the interface model corresponding to the 3D interactive interface.

[0175] The first transparency information determination submodule is used to perform a mixing process on the transparency information of the multiple semi-transparent layers according to the layer order of the multiple semi-transparent layers and the first transparency mixing method to determine the first transparency information, and store the first transparency information in the temporary transparency channel corresponding to the temporary texture map.

[0176] The first color information determination submodule is used to determine the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map based on the hierarchical order of the multiple semi-transparent layers and the color information of the multiple semi-transparent layers, and to store the first color information in the temporary color channel corresponding to the temporary texture map.

[0177] The target color information determination submodule is used to mix the first color information and first transparency information stored in the temporary texture map and the color information and transparency information of the multiple semi-transparent layers according to the hierarchical order of the multiple semi-transparent layers, using the first semi-transparent color mixing method, to obtain the target color information of the interface texture of the three-dimensional interactive interface.

[0178] The target transparency information determination submodule is used to determine the target transparency information corresponding to the interface texture based on the first transparency information stored in the temporary texture map.

[0179] Optionally, the first transparency information determining submodule may include:

[0180] The first determining unit is used to determine the current transparency information stored in the first target semi-transparent layer and the temporary texture map, starting from the maximum level; wherein, when the level of the first target semi-transparent layer is the maximum level, the current transparency information stored in the temporary texture map is 0.

[0181] The first processing unit is used to perform a first transparency blending process on the transparency information of the first target semi-transparent layer and the current transparency information stored in the temporary texture map to obtain intermediate transparency information.

[0182] The first replacement unit is used to replace the current transparency information stored in the temporary texture map with the intermediate transparency information;

[0183] The second determining unit is used to decrement the level by 1 and return the current transparency information stored in the first determining module for the first target semi-transparent layer and temporary texture map, until the level is the first level.

[0184] The third determining unit is used to determine the current transparency information stored in the temporary texture map as the first transparency information.

[0185] Optionally, the first color information determining submodule may include:

[0186] The fourth determining unit is used to determine, starting from the highest level, the temporary pixel points in the currently processed second target semi-transparent layer and temporary texture map corresponding to the second target semi-transparent layer;

[0187] The second replacement unit is used to replace the depth of the temporary pixel and the temporary color information with the depth of the second target pixel and the second target color information respectively when the depth of the temporary pixel is inconsistent with the depth of the second target pixel of the second target semi-transparent layer; wherein the pixel depths of the plurality of semi-transparent layers are the same;

[0188] The fifth determining unit is used to decrement the level by 1 and return to the fourth determining module to determine the temporary pixel point corresponding to the second target semi-transparent layer in the current processing second target semi-transparent layer and temporary texture map, until the level is the first level;

[0189] The sixth determining unit is used to determine the temporary color information of the temporary pixels of the temporary texture map as the first color information.

[0190] Optionally, the target color information determination submodule may include:

[0191] The seventh determining unit is used to determine the initial color mixing result of the currently processed third target semi-transparent layer and the previous layer, starting from the maximum layer; wherein, the color mixing result of the previous layer corresponding to the third target semi-transparent layer of the maximum layer is the first color information; the previous layer is the layer corresponding to the third target semi-transparent layer plus 1;

[0192] The second processing unit is used to perform blending processing on the transparency information, color information, first transparency information, initial color blending result, and first color information of the third target semi-transparent layer using the first semi-transparent color blending method to obtain the current layer color information;

[0193] The eighth determining unit is used to decrement the level by 1 and return the initial color mixing result of the third target semi-transparent layer and the previous level determined in the seventh determining module until the level is the first level;

[0194] The ninth determining unit is used to determine the current level color information as the target color information.

[0195] Optionally, the interactive interface rendering module 502 can be used to mix the target color information and target transparency information of the interface texture and the virtual scene color information and virtual scene transparency information of the current virtual scene using a second semi-transparent color mixing method to obtain the three-dimensional interactive interface. The second semi-transparent color mixing method is different from the first semi-transparent color mixing method.

[0196] Optionally, the three-dimensional interactive interface includes a three-dimensional irregularly shaped interactive interface.

[0197] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0198] This application also discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the rendering method for the three-dimensional interactive interface as described above.

[0199] This application also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the rendering method for the three-dimensional interactive interface as described above.

[0200] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0201] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0202] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0203] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0204] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0205] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0206] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0207] The rendering method, apparatus, electronic device, and storage medium for a three-dimensional interactive interface provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for rendering a three-dimensional interactive interface, characterized in that, The 3D interactive interface includes multiple semi-transparent layers, and the method includes: The multiple semi-transparent layers are blended using a first blending method to obtain the interface texture of the three-dimensional interactive interface; The first blending method is used to eliminate color errors in texture maps obtained based on rendering texture technology. The process of determining the first blending method includes: obtaining an initial texture map of the 3D interactive interface by using the rendering texture technology of the second blending method, wherein the second blending method is RT technology; rendering the initial texture map in the current virtual scene to obtain an initial blending result; rendering the actual texture map in the current virtual scene to obtain an actual blending result; and determining the first blending method based on the difference between the initial blending result and the actual blending result. The interface texture is rendered in the current virtual scene to obtain the three-dimensional interactive interface.

2. The method according to claim 1, characterized in that, The process of blending the multiple semi-transparent layers using a first blending method to obtain the interface texture of the 3D interactive interface includes: A first blending method is determined, the first blending method including a first transparency blending method and a first semi-transparent color blending method; Based on the interface model corresponding to the 3D interactive interface, a temporary texture map corresponding to the 3D interactive interface is generated. Based on the hierarchical order of the multiple semi-transparent layers, the transparency information of the multiple semi-transparent layers is mixed using the first transparency mixing method to determine the first transparency information, and the first transparency information is stored in the temporary transparency channel corresponding to the temporary texture map. Based on the hierarchical order of the multiple semi-transparent layers and the color information of the multiple semi-transparent layers, the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map is determined, and the first color information is stored in the temporary color channel corresponding to the temporary texture map. According to the hierarchical order of the multiple semi-transparent layers, the first color information and first transparency information stored in the temporary texture map, as well as the color information and transparency information of the multiple semi-transparent layers, are mixed using the first semi-transparent color mixing method to obtain the target color information of the interface texture of the three-dimensional interactive interface. The target transparency information corresponding to the interface texture is determined based on the first transparency information stored in the temporary texture map.

3. The method according to claim 2, characterized in that, The step of blending the transparency information of the multiple semi-transparent layers according to their layer order using a first transparency blending method to determine the first transparency information, and storing the first transparency information in the temporary transparency channel corresponding to the temporary texture map, includes: Starting from the highest level, determine the current transparency information stored in the first target semi-transparent layer and the temporary texture map; wherein, when the level of the first target semi-transparent layer is the highest level, the current transparency information stored in the temporary texture map is 0; The transparency information of the first target semi-transparent layer and the current transparency information stored in the temporary texture map are mixed using a first transparency blending method to obtain intermediate transparency information; The intermediate transparency information is used to replace the current transparency information stored in the temporary texture map; Decrease the level by 1 and return to the step of determining the current transparency information of the first target semi-transparency layer and the temporary texture map to continue execution until the level is the first level; The current transparency information stored in the temporary texture map is determined as the first transparency information.

4. The method according to claim 3, characterized in that, The step of determining the first color information of the first rendered semi-transparent layer corresponding to each temporary pixel of the temporary texture map based on the layer order and color information of the multiple semi-transparent layers, and storing the first color information in the temporary color channel corresponding to the temporary texture map, includes: Starting from the highest level, determine the temporary pixels in the current processing second target semi-transparent layer and temporary texture map that correspond to the second target semi-transparent layer; When the depth of the temporary pixel is inconsistent with the depth of the second target pixel of the second target semi-transparent layer, the depth of the temporary pixel and the temporary color information are replaced by the depth of the second target pixel and the second target color information, respectively; wherein, the pixel depths of the multiple semi-transparent layers are the same; Decrease the level by 1 and return to the step of determining the temporary pixel point corresponding to the second target semi-transparent layer in the current processing second target semi-transparent layer and temporary texture map, and continue to execute until the level is the first level; The temporary color information of the temporary pixels of the temporary texture map is determined as the first color information.

5. The method according to claim 4, characterized in that, The step of mixing the first color information and first transparency information stored in the temporary texture map, as well as the color information and transparency information of the multiple semi-transparent layers, according to the hierarchical order of the multiple semi-transparent layers, using the first semi-transparent color mixing method, to obtain the target color information of the interface texture of the 3D interactive interface, includes: Starting from the highest level, determine the initial color blending result of the currently processed third target semi-transparent layer and the previous level; wherein, the color blending result of the previous level corresponding to the third target semi-transparent layer of the highest level is the first color information; the previous level is the level corresponding to the third target semi-transparent layer plus 1; The first semi-transparent color mixing method is used to mix the transparency information, color information, first transparency information, initial color mixing result, and first color information of the third target semi-transparent layer to obtain the current layer color information; Decrease the level by 1 and return to the step of determining the initial color blending result of the third target semi-transparent layer and the previous level, and continue execution until the level is the first level; The current level color information is determined as the target color information.

6. The method according to claim 5, characterized in that, The step of rendering the interface texture in the current virtual scene to obtain the three-dimensional interactive interface includes: The target color information and target transparency information of the interface texture, as well as the virtual scene color information and virtual scene transparency information of the current virtual scene, are mixed using a second semi-transparent color mixing method to obtain the three-dimensional interactive interface. The second semi-transparent color mixing method is different from the first semi-transparent color mixing method.

7. The method according to claim 1, characterized in that, The three-dimensional interactive interface includes a three-dimensional irregular interactive interface.

8. A rendering device for a three-dimensional interactive interface, characterized in that, The three-dimensional interactive interface includes multiple semi-transparent layers, and the device includes: The interface texture generation module is used to blend the multiple semi-transparent layers using a first blending method to obtain the interface texture of the 3D interactive interface. The first blending method is used to eliminate color errors in the texture map obtained based on rendering texture technology. The process of determining the first blending method includes: obtaining an initial texture map of the 3D interactive interface using the rendering texture technology with a second blending method, where the second blending method is RT technology; rendering the initial texture map in the current virtual scene to obtain an initial blending result; rendering the actual texture map in the current virtual scene to obtain an actual blending result; and determining the first blending method based on the difference between the initial blending result and the actual blending result. The interactive interface rendering module is used to render the interface texture in the current virtual scene to obtain the three-dimensional interactive interface.

9. An electronic device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the rendering method for a three-dimensional interactive interface as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the rendering method for a three-dimensional interactive interface as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Interface image rendering method and device, storage medium and terminal

    CN114225403A