Rendering method and device for realizing virtual stage background wall

By processing the UV coordinates of the virtual stage background wall and random sampling to simulate the lighting effects, the problem that virtual lamps in the existing technology cannot simulate real stage lighting is solved, and high-quality virtual stage background wall rendering is achieved, improving the user experience.

CN120451370APending Publication Date: 2025-08-08TUYOO GAMES +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510539163.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing virtual lighting technology is difficult to simulate the rich effects of real stage lighting, resulting in insufficient simulation of virtual technology in terms of lighting effects, unable to meet the actual application needs of users, and limiting the immersive sensory experience of the virtual world.

Method used

By obtaining the UV coordinates of the stage background wall model, grid mask drawing and discretization are performed, combined with time-based random sampling and line-of-sight reflection vector processing, random light jumps and highlights are simulated, and the rendering effect that conforms to the real stage lights is obtained.

Benefits of technology

The rendering effect in line with the real stage lighting vision on the mobile terminal is achieved, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451370A_ABST
    Figure CN120451370A_ABST
Patent Text Reader

Abstract

The invention provides a rendering method and device for realizing a virtual stage background wall, computing equipment and a computer readable storage medium. The method comprises the following steps: obtaining a grid mask according to UV coordinates of a stage background wall model; carrying out discretization processing on UV coordinates of the stage background wall model to obtain a plurality of UV blocks, carrying out time-based randomization processing on the UV blocks, and sampling a target map to obtain a basic light random jumping effect; furthermore, according to the UV blocks and time-based randomized stage background wall sight line vector processing and sampling, random highlight spots generated by light irradiation are obtained through simulation, and finally the grid shade, the basic light random jumping effect and the highlight spots are combined to obtain the final stage background wall effect. In the mobile terminal application, a rendering effect conforming to real stage lighting vision is created, and good user experience is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer graphics rendering technology, and in particular to a rendering method and apparatus for implementing a virtual stage background wall, a computing device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of computer graphics technology, virtual worlds, unrestricted by distance and location, have become increasingly widely used, particularly in virtual performances and virtual humans. However, current virtual lighting technology struggles to simulate the rich effects of real-world stage lighting, resulting in deficiencies in virtual technology's ability to simulate lighting effects. Furthermore, existing technologies primarily focus on the visual aesthetics of virtual environments, failing to effectively meet users' actual application needs. This makes it difficult to provide an immersive sensory experience tailored to their needs, limiting the effectiveness and user experience of virtual worlds in specific application scenarios. Summary of the Invention

[0003] In view of this, embodiments of the present application provide a method and apparatus for rendering a virtual stage background wall, a computing device, and a computer-readable storage medium to address the technical deficiencies in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a method for rendering a virtual stage background wall is provided, comprising:

[0005] Obtain a stage background wall model, wherein the stage background wall model is composed of n connected rectangles of the same size, where n ≥ 3; wherein the UV coordinate ratio of the stage background wall model is the same as the length and width ratio of the model;

[0006] In the fragment shader, the mesh mask drawing of the stage background wall is completed according to the UV coordinates of the stage background wall model;

[0007] Discretizing the UV coordinates of the stage background wall model to obtain a plurality of UV blocks, and performing time-based random sampling on the first map according to the UV blocks to obtain a pixelated first sampling image;

[0008] Performing time-based random processing on the sight direction vector of the stage background wall according to the UV block and obtaining a sight reflection vector; sampling the environment sphere map according to the sight reflection vector to obtain random highlight points of the stage background wall;

[0009] The first sampling image is superimposed with the random highlight points and the grid mask to obtain a final stage background wall rendering effect.

[0010] According to a second aspect of an embodiment of the present application, a rendering device for implementing a virtual stage background wall is provided, comprising:

[0011] A loading module is used to obtain a stage background wall model, wherein the stage background wall model is composed of n connected rectangles of the same size, where n ≥ 3; wherein the UV coordinate ratio of the stage background wall model is the same as the length and width ratio of the model;

[0012] A calculation module, used for completing the mesh mask drawing of the stage background wall according to the UV coordinates of the stage background wall model in the fragment shader;

[0013] a first sampling module, configured to discretize the UV coordinates of the stage background wall model to obtain a plurality of UV blocks, and perform time-based random sampling on the first map according to the UV blocks to obtain a pixelated first sampling image;

[0014] A second sampling module is used to perform time-based random processing on the sight direction vector of the stage background wall according to the UV block and obtain a sight reflection vector; and sample the environment sphere map according to the sight reflection vector to obtain random highlight points of the stage background wall;

[0015] A rendering module is used to superimpose the first sampling image with the random highlight points and the grid mask to obtain a final stage background wall rendering effect.

[0016] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein when the processor executes the instructions, the steps of the method for rendering a virtual stage background wall are implemented.

[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions. When the instructions are executed by a processor, the steps of the method for rendering a virtual stage background wall are implemented.

[0018] Through the method provided in the embodiments of the present application, a grid mask is first obtained according to the UV coordinates of the stage background wall model; then, the UV coordinates of the stage background wall model are discretized to obtain multiple UV blocks, and these UV blocks are subjected to time-based random processing and then sampled from the target map to obtain a basic random light bounce effect; further, based on the UV blocks and the time-based randomized stage background wall sight line vector processing and sampling, random highlight points generated by light illumination are simulated, and finally, the grid mask, the basic random light bounce effect and the random highlight points are merged to obtain the final stage background wall effect, creating a rendering effect that conforms to the real stage lighting vision in the mobile application, and achieving a better user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1is a structural block diagram of a computing device provided in an embodiment of the present application;

[0020] Figure 2 This is a flow chart of a method for rendering a virtual stage background wall provided in an embodiment of the present application;

[0021] Figure 3 This is a schematic diagram of the effect of a virtual stage background wall model provided by an embodiment of the present application;

[0022] Figure 4 This is a schematic diagram of a grid mask generated according to the UV coordinates of a virtual stage background wall provided in an embodiment of the present application;

[0023] Figure 5 This is a schematic diagram of a discretized representation of UV coordinates provided in an embodiment of the present application;

[0024] Figure 6 is a schematic diagram of a first map provided in an embodiment of the present application;

[0025] Figure 7 is a schematic diagram of a pixelated first sampled image obtained by randomly sampling a first map provided by an embodiment of the present application;

[0026] Figure 8 is another schematic diagram of a pixelated first sampled image obtained by sampling a first map provided by an embodiment of the present application;

[0027] Figure 9 is a schematic diagram of an environment sphere map provided in an embodiment of the present application;

[0028] Figure 10 The embodiment of the present application provides a random highlight point that moves with the line of sight and is obtained by randomly sampling the environment sphere map;

[0029] Figure 11 This is a schematic diagram of the final rendering effect of a virtual stage background wall achieved according to the method of an embodiment of the present application;

[0030] Figure 12 This is a structural diagram of a rendering device for implementing a virtual stage background wall provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.

[0032] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0033] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of the present application, first may also be referred to as second, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "in response to determining."

[0034] In the present application, a method and apparatus for rendering a virtual stage background wall, a computing device, and a computer-readable storage medium are provided, which will be described in detail one by one in the following embodiments.

[0035] Figure 1 1 shows a block diagram of a computing device 100 according to an embodiment of the present application. Components of the computing device 100 include, but are not limited to, a memory 110 and a processor 120. The processor 120 is connected to the memory 110 via a bus 130, and a database 150 is used to store data.

[0036] The computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 140 may include one or more of any type of network interface (e.g., a network interface card (NIC)), whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0037] In one embodiment of the present application, the above components of the computing device 100 and Figure 1 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 1The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0038] Computing device 100 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC.

[0039] In the embodiments of the present application, Figure 2 A flowchart of a method for rendering a virtual stage background wall provided by the present application is shown, including steps 202 to 210.

[0040] Step 202: Obtain a stage background wall model. The stage background wall model is composed of n connected rectangles of the same size, where n≥3. The UV coordinate ratio of the stage background wall model is the same as the length and width ratio of the model.

[0041] In the embodiment of the present application, the stage background wall model is composed of n rectangles of the same size connected at a certain angle during the production process, where n≥3; Figure 3 As shown in FIG, three rectangles are connected in 3D space to form an open three-dimensional structure similar to a stage; the rectangles serving as walls are at right angles to the ground in 3D space, forming a U-shaped structure. Figure 3 In the stage background wall model, the entire stage consists of 3 faces and 12 vertices, which consumes very little resource performance and is suitable for mobile terminal performance. Those skilled in the art can set the number of rectangles according to the needs of the stage background wall, and will not be repeated here.

[0042] Furthermore, the stage background wall model is UV unfolded to ensure that the UV ratio is the same as the length-to-width ratio of the actual stage background wall model.

[0043] Step 204: In the fragment shader, the mesh mask drawing of the stage background wall is completed according to the UV coordinates of the stage background wall model.

[0044] In the embodiment of the present application, the grid mask drawing of the stage background wall model is completed according to the UV coordinates of the stage background wall model, such as Figure 4 As shown, schematically, the drawing process includes:

[0045] float2 uv = i.uv * _GridSize; / / Scale the UV coordinates of the input pixel and control the density of the grid through _GridSize. The smaller the value, the larger the grid.

[0046] float2 fracUV = frac(uv); / / Get the fractional part of the scaled UV to determine the grid line position

[0047] float2 fwidthUV = fwidth(uv); / / Get the UV interpolation between adjacent pixels to calculate the range required for anti-aliasing to make the grid lines smoother

[0048] fixed2 grid_left = smoothstep(0.5-fwidthUV,0.5,fracUV); / / Generate grid edge

[0049] fixed2 grid_right = smoothstep(0.5,0.5+fwidthUV,fracUV); / / Generate grid edge

[0050] grid_left -= grid_right; / / Generate a black and white grid, where the grid lines are white and the interior of the grid is black.

[0051] fixed gridMask = 1-max(grid_left.x, grid_left.y); / / Generate the final grid line mask, the grid lines are black and the inside of the grid is white

[0052] Step 206: Discretize the UV coordinates of the stage background wall model to obtain a plurality of UV blocks, and perform time-based random sampling on the first map according to the UV blocks to obtain a pixelated first sampling image.

[0053] In the embodiment of the present application, the key to simulating stage lighting lies in the performance of pixelated lighting, which is converted in the shader into sampling a continuous map into a pixelated map, and the pixels correspond to the above-mentioned grid mask, so that each grid corresponds to a color.

[0054] Specifically, during the sampling process, the UV coordinates of the stage background wall model are first discretized to obtain multiple UV blocks. Discretization of UV coordinates is the process of dividing the continuous UV space into a series of independent UV blocks with clear boundaries.

[0055] It is feasible to map the UV coordinates of each point on the model to the corresponding UV block by rounding or other mathematical functions. This process converts the originally continuous coordinate values into discrete block indices. Through the mapped coordinates, it is possible to quickly determine which UV block any given UV coordinate belongs to. In this process, the UV coordinates are mapped to these discrete UV blocks, and each UV block is usually defined by integer coordinates, that is, the integer serial number of each UV block is the same. For example, the scaled UV coordinates are processed using the floor function to obtain the integer serial number of each UV block:

[0056] float2 id=floor(uv-0.5)

[0057] like Figure 5 As schematically shown, multiple UV coordinates in an area can be discretized to correspond to the same UV block, and the UV coordinates corresponding to the numbers in the left figure correspond to the UV blocks with the same numbers in the right figure.

[0058] In the embodiments of this application, the lighting effects of the virtual stage background wall need to be achieved through random pixel movement. Therefore, the UV blocks need to be randomized based on time. As time goes by, the UV blocks will jump randomly, and the sampled images will follow the movement, thus simulating the lighting effect.

[0059] Specifically, the lighting transformation effect is simulated by randomly sampling a first texture through UV blocks. The first texture can be various graphics that meet the needs of the stage background wall; Figure 6 As shown, schematically, the first map may be a circle.

[0060] First, convert the UV block number into a first value between 0 and 1: float2 uv_id = id / _Size;

[0061] Furthermore, the first value uv_id is randomized based on time:

[0062] float seed = _Time.x * _NoiseSpeed_1; / / seed is a seed that changes over time and can be used to introduce dynamic changes

[0063] float2 uv_id_random = N22(uv_id + seed); / / Process uv_id to generate a random second value. This function randomizes uv_id based on time. As time goes by, uv will jump randomly and the sampled image will also move randomly.

[0064] Furthermore, the first value and the second value are interpolated to control the randomness of the sampling, so that the sampling result maintains the shape of the first texture as a whole while having a certain sense of randomness. The first texture is sampled using the interpolated UV coordinates to obtain the following: Figure 7 The first sample image is shown:

[0065] fixed4 mainTex=tex2D(_MainTex,lerp(uv_id,uv_id_random,_RandomIntensity))

[0066] Due to the introduction of uv_id_random, the sampling result of the first map varies within a certain range, thus achieving a pixelated random jumping lighting effect.

[0067] Preferably, the first texture is sampled directly using uv_id to obtain a pixelated second sampled image similar to the image of the first texture, such as Figure 8 Furthermore, the second sampled image can be used for rendering of any intermediate stage of the stage background wall, or for rendering of the initial or final stage.

[0068] Step 208: Performing time-based random processing on the sight direction vector of the stage background wall to obtain a sight reflection vector; sampling the environment sphere map according to the sight reflection vector to obtain random highlight points of the stage background wall.

[0069] In order to simulate the real stage effect in the embodiment of the present application, it is also necessary to simulate the abnormally bright highlights caused by the lighting. These highlights are both random and change with the lighting, which is also one of the significant visual effects of the stage effect. For these highlights, a discretized three-dimensional vector sampling environment sphere is used to achieve this. A schematic diagram of an environment sphere is shown as follows: Figure 9 shown.

[0070] Move the origin of the stage background wall UV coordinates to the center of the UV coordinates to obtain the discrete coordinates of each UV block in the model space:

[0071] float4 id_pos_os=float4(id-_Size*0.5,0,1)

[0072] Define the coordinate position of the center of the environment sphere, which is _Size*0.5 behind the center of the stage background wall:

[0073] float3 sphereCenter=float3(0,0,_Size*0.5)

[0074] Furthermore, the normal direction and the viewing direction of the stage are calculated based on sphereCenter and id_pos_os.

[0075] float3 nDirOS=normalize(id_pos_os+sphereCenter);

[0076] float3 vDirOS=normalize(sphereCenter-id_pos_os);

[0077] Furthermore, the sight direction vector is randomized and the reflection vector is calculated to achieve different visual effects in the graphics. Specifically, the following steps are included:

[0078] 1. Generate a random rotation angle based on time changes, and rotate the sight direction vector vDirOS around the specified axis according to the random rotation angle:

[0079] float rotateDegree=fmod(_Time.y*_RotateSpeed+_RotateDegree,360);

[0080] vDirOS=RotateAround(rotateDegree,vDirOS);

[0081] Among them, _Time.y: represents the number of seconds the game or application runs.

[0082] _RotateSpeed: defines the speed of rotation per second, the unit is usually degrees per second.

[0083] _RotateDegree: Initial rotation angle or offset.

[0084] fmod() is a mathematical function used for modulo operations. This code calculates the current rotation angle and uses fmod to limit the result to the range [0, 360). This prevents excessively large or negative angles from affecting the rotation logic. This ensures that the angle remains within the valid range.

[0085] 2. Randomize the xz coordinates of the rotated sight direction vector:

[0086] float2 vDirOS_random=N22(vDirOS.xz);

[0087] 3. Mix the original and random values of the gaze direction vector:

[0088] vDirOS.xz=lerp(vDirOS.xz,vDirOS_random,_RandomIntensity);

[0089] Perturb the x and z components of vDirOS according to vDirOS_random, and adjust the degree of randomness in the gaze direction according to the value of _RandomIntensity. Lerp represents a linear interpolation function, used to interpolate between two values, and _RandomIntensity controls the degree of interpolation, which is used to control the intensity of the randomization effect on the gaze direction.

[0090] 4. Calculate the reflection vector

[0091] float3 vReflectOS=reflect(-vDirOS,nDirOS);

[0092] The reflect function is used to obtain the sight reflection vector vReflectOS based on the normal direction vector and the sight direction vector obtained by interpolation.

[0093] Furthermore, the environment sphere is sampled according to the line of sight reflection vector. Since the values stored in the white pixels in the environment sphere map are higher than 1, random highlight points that move with the line of sight are obtained.

[0094] fixed4 var_cubemapOS = texCUBElod(_Cubemap, float4(vReflectOS, 0)); / / Sample the environment sphere map _Cubemap according to the reflection vector vReflectOS

[0095] Preferably, the contrast of the sampling result color is increased, and the color of the highlight point is changed to simulate the random highlight points generated by the light shining on the stage background wall. The result is as follows Figure 10 As shown, the highlight points within a single mesh corresponding to the UV block are a single color.

[0096] Step 210: Superimpose the first sampled image with the random highlight points and the grid mask to obtain the final stage background wall rendering effect.

[0097] In this step, the pixelated first sampled image obtained by random sampling in step 206 is superimposed with the random highlight points obtained in step 208, and then multiplied with the grid mask obtained in step 204 to obtain the final stage background wall rendering effect. A schematic final rendering effect is shown as follows: Figure 11 shown.

[0098] In the above-mentioned embodiment of the present application, in order to efficiently simulate the lighting rendering effect of a real stage background wall on a mobile terminal, a grid mask is first obtained according to the UV coordinates of the stage background wall model; then, the UV coordinates of the stage background wall model are discretized to obtain multiple UV blocks, and these UV blocks are subjected to time-based random processing and then the target map is sampled to obtain a basic light random jumping effect; further, based on the UV blocks and the time-based randomized stage background wall sight line vector processing and sampling, random highlights generated by light illumination are simulated, and finally, the grid mask, the basic light random jumping effect and the random highlights are merged to obtain the final stage background wall effect, creating a rendering effect that conforms to the real stage lighting vision in the mobile application, and achieving a better user experience.

[0099] Corresponding to the above method embodiment, the present application also provides an embodiment of a rendering device for realizing a virtual stage background wall, such as Figure 12 As shown, the device includes:

[0100] A loading module is used to obtain a stage background wall model, wherein the stage background wall model is composed of n connected rectangles of the same size, where n ≥ 3; wherein the UV coordinate ratio of the stage background wall model is the same as the length and width ratio of the model;

[0101] A calculation module, used for completing the mesh mask drawing of the stage background wall according to the UV coordinates of the stage background wall model in the fragment shader;

[0102] a first sampling module, configured to discretize the UV coordinates of the stage background wall model to obtain a plurality of UV blocks, and perform time-based random sampling on the first map according to the UV blocks to obtain a pixelated first sampling image;

[0103] A second sampling module is used to perform time-based random processing on the sight direction vector of the stage background wall according to the UV block and obtain a sight reflection vector; and sample the environment sphere map according to the sight reflection vector to obtain random highlight points of the stage background wall;

[0104] A rendering module is used to superimpose the first sampling image with the random highlight points and the grid mask to obtain a final stage background wall rendering effect.

[0105] The above is a schematic scheme for implementing a rendering device for a virtual stage background wall according to this embodiment. It should be noted that the technical scheme for implementing the rendering device for a virtual stage background wall and the technical scheme for implementing the rendering method for a virtual stage background wall are based on the same concept. For details not described in detail in the technical scheme for implementing the rendering device for a virtual stage background wall, please refer to the description of the technical scheme for implementing the rendering method for a virtual stage background wall.

[0106] In one embodiment of the present application, a computing device is further provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor. When the processor executes the instructions, the steps of the method for rendering a virtual stage background wall are implemented.

[0107] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution for the aforementioned method for rendering a virtual stage background wall are based on the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution for the aforementioned method for rendering a virtual stage background wall.

[0108] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the method for rendering a virtual stage background wall as described above.

[0109] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the aforementioned method for rendering a virtual stage background wall are based on the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the aforementioned method for rendering a virtual stage background wall.

[0110] The foregoing description describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0111] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0112] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0113] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0114] The preferred embodiments of the present application disclosed above are intended only to help illustrate the present application. The optional embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of this application. This application selects and describes these embodiments in detail in order to better explain the principles and practical applications of this application, so that those skilled in the art can better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.

Claims

1. A method for rendering a virtual stage background wall, characterized in that: include: Obtain a stage background wall model, wherein the stage background wall model is composed of n connected rectangles of the same size, where n ≥ 3; wherein the UV coordinate ratio of the stage background wall model is the same as the length and width ratio of the model; In the fragment shader, the mesh mask drawing of the stage background wall is completed according to the UV coordinates of the stage background wall model; Discretizing the UV coordinates of the stage background wall model to obtain a plurality of UV blocks, and performing time-based random sampling on the first map according to the UV blocks to obtain a pixelated first sampling image; Performing time-based random processing on the sight direction vector of the stage background wall according to the UV block and obtaining a sight reflection vector; sampling the environment sphere map according to the sight reflection vector to obtain random highlight points of the stage background wall; The first sampling image is superimposed with the random highlight points and the grid mask to obtain a final stage background wall rendering effect.

2. The method according to claim 1, wherein Completing the mesh mask drawing of the stage background wall according to the UV coordinates of the stage background wall model includes: Scale the UV coordinates of the input pixel and get the decimal part of the scaled UV to determine the grid line position.

3. The method according to claim 2, wherein: Discretization of the UV coordinates of the stage background wall model to obtain multiple UV blocks includes: The scaled UV coordinates are mapped to the corresponding UV blocks through a rounding function, so that multiple original UV coordinates are discretized to correspond to the same UV block.

4. The method according to claim 1, wherein Performing time-based random sampling on the first map according to the UV block to obtain a pixelated first sampled image includes: Converting the serial number of the UV block into a first value between 0 and 1; performing a time-based randomization process on the first value to generate a second value; The first value and the second value are interpolated, and the first map is sampled according to the interpolation result to obtain a pixelated first sampled image.

5. The method according to claim 4, wherein Performing time-based random sampling on the first map according to the UV block to obtain a pixelated first sampled image further includes: The first map is sampled using a first value to obtain a second sampled image.

6. The method according to claim 1, wherein Performing time-based random processing on the sight direction vector of the stage background wall according to the UV block and obtaining a sight reflection vector includes: Move the center point of the stage background wall to the origin to obtain the discrete coordinates of each UV block in the model space; define the coordinate position of the center of the environment sphere to be directly behind the center of the stage background wall; The sight direction of the stage background wall is calculated according to the coordinates of the center of the environment sphere and the discrete coordinates of the UV block; and the sight direction vector is subjected to time-based randomization processing to obtain a sight reflection vector.

7. The method according to claim 6, wherein: The sight reflection vector is calculated by performing time-based randomization on the sight direction vector, including: Generate a random rotation angle based on time changes, and rotate the sight direction vector around the specified axis according to the random rotation angle; Randomize the rotated sight direction vector to obtain a random sight direction vector; Interpolate the original value of the sight direction vector and the obtained random sight direction vector; The line of sight reflection vector is obtained according to the interpolation result and the normal direction vector.

8. The method according to claim 1, wherein After sampling the environment sphere map according to the sight reflection vector to obtain random highlight points on the stage background wall, the following steps are included: Increases the contrast of the sampled color and changes the color of random highlights.

9. A rendering device for realizing a virtual stage background wall, characterized in that: include: A loading module is used to obtain a stage background wall model, wherein the stage background wall model is composed of n connected rectangles of the same size, where n ≥ 3; wherein the UV coordinate ratio of the stage background wall model is the same as the length and width ratio of the model; A calculation module, used for completing the mesh mask drawing of the stage background wall according to the UV coordinates of the stage background wall model in the fragment shader; a first sampling module, configured to discretize the UV coordinates of the stage background wall model to obtain a plurality of UV blocks, and perform time-based random sampling on the first map according to the UV blocks to obtain a pixelated first sampling image; A second sampling module is used to perform time-based random processing on the sight direction vector of the stage background wall according to the UV block and obtain a sight reflection vector; and sample the environment sphere map according to the sight reflection vector to obtain random highlight points of the stage background wall; A rendering module is used to superimpose the first sampling image with the random highlight points and the grid mask to obtain a final stage background wall rendering effect.

10. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein: When the processor executes the instructions, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.