A video stream real-time cloud rendering method based on edge computing
By adopting a cloud-edge collaborative rendering process, the rendering process is divided into cloud-based global illumination and edge-based direct illumination. By using spherical harmonic functions to compress information, the problem of computing resource costs on edge computing platforms is solved, and the user experience and performance of real-time cloud rendering are improved.
Patent Information
- Application Number
- CN202211302617.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-10-24
AI Technical Summary
Existing real-time cloud rendering technologies suffer from high computing resource costs on edge computing platforms and struggle to effectively address network latency and bandwidth limitations, impacting user experience.
By adopting a cloud-edge collaborative model, the rendering process is divided into cloud-based global illumination calculation and edge-based direct illumination calculation. Rendering information is compressed using spherical harmonic functions and rendered and shading is performed on the edge server, thereby reducing the computational burden on the edge through cloud GPU computing power.
It reduces hardware pressure and computing resource costs at the edge, reduces GPU computing power consumption, improves user experience and frame rate, and optimizes network latency and bandwidth bottlenecks.
Smart Images

Figure CN115564882B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computer technology and image processing technology, and more specifically, relates to a real-time cloud rendering method for video streams based on edge computing. Background Technology
[0002] With the development of real-time rendering technology and hardware computing power, rendering quality is getting higher and higher, but hardware power consumption is also increasing, which greatly limits the rendering quality on low-power devices such as mobile devices. Real-time cloud rendering is a simple and effective cross-platform solution that can eliminate the need for complex optimization and configuration operations in different operating environments. With the development of edge computing, some real-time cloud rendering based on edge computing has been proposed, but most studies have only verified the improvement of the user experience of real-time cloud rendering by edge computing, without effectively solving the problem of computing resource costs for deploying real-time cloud rendering on edge computing platforms.
[0003] While real-time cloud rendering technology has seen considerable industry adoption, it has long been constrained by network latency, bandwidth, and the cost of computing resources. Centralized cloud computing typically places computing centers within backbone networks. Due to the complexity of the backbone network leading to the user access network and the impact of network congestion, centralized cloud servers struggle to guarantee the downlink bandwidth and latency requirements for real-time cloud rendering under large-scale concurrent user access. On the hardware side, the complexity of hardware architecture and the closed-source policies of GPU manufacturers have prevented the development of a cost-effective and mature SR-IOV standard for virtualization support, hindering the development of GPU virtualization technology and resulting in expensive GPU computing power. Summary of the Invention
[0004] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a real-time cloud rendering method for video streams based on edge computing. Its purpose is to reduce the computational resource costs incurred during rendering, thereby improving the user experience of real-time cloud rendering by utilizing edge computing while solving the computational resource cost problem arising from the combination of real-time cloud rendering systems and edge computing.
[0005] To achieve the above objectives, this invention provides a real-time cloud rendering method for video streams based on edge computing, comprising the following steps:
[0006] Step S1: Maintain several NetGI Volume components in the scene on the cloud server and update the irradiance map in real time based on the rendering process of the cloud center server;
[0007] Step S2: Based on the rendering update strategy, deliver the texture as rendering information to the update agent. For probes that are updated more frequently, use the compressed spherical harmonic function factor instead of the texture as rendering information.
[0008] Step S3: The updated agent distributes rendering information based on the subscription information at the edge. The edge server reconstructs diffuse lighting information based on the rendering information distributed in the cloud through the edge server rendering process, performs lighting calculations based on the deferred shading pipeline, and finally delivers the rendered image to the user.
[0009] In one embodiment of the present invention, step S1 specifically includes:
[0010] Step S11: Analyze and decompose the rasterization pipeline or the hybrid rendering pipeline with rasterization pipeline as the main component. For multi-user online real-time cloud rendering applications, only general real-time rendering is abstracted.
[0011] Step S12: Based on the abstract analysis of the rasterization rendering process in step S11, the incident lighting calculation has extremely high complexity among all rendering calculations. The incident lighting is decomposed into two parts: global illumination and direct lighting. The more complex global illumination calculation is offloaded to the cloud for calculation, while the direct lighting is completed by the edge server. The rendering process is split into two parts: global illumination rendering calculation in the cloud and rendering shading calculation at the edge. When the edge server loses its connection with the cloud, it can still use the previously incorrect global illumination information combined with the direct lighting results to complete the shading calculation to ensure the continuity of the image.
[0012] Step S13: In the global illumination rendering calculation at the cloud center, the cloud center server deploys multiple NetGI Volumes with different priorities covering the entire scene in the initial scene. In the distributed group of lighting probes, each probe stores spherical Irradiance information and depth information. The Irradiance information is stored using an 8*8 three-dimensional vector texture, and the depth information is stored using a 16*16 two-dimensional vector texture. At the same time, each Volume maintains a set of probe state matrices. The probe's active state is defined as Dead, Active, Sleep, Awake, Static, and Update. The probe is initially in the Active state when it is created. When the probe is inside a static object, it will be permanently defined as Dead. When there are movable dynamic meshes around the probe, it will be defined as Awake. The Static state means that there are only static meshes around the probe. The Sleep state means that the probe is in an open area and there are no meshes around it that can be projected by light. The Update state indicates that the cloud will update the probe texture to the edge. All active probes in the Volume sample the ambient lighting based on ray tracing.
[0013] In one embodiment of the present invention, step S11 is defined as follows:
[0014] Definition 1: Collection of 3D models positioni rotate i scale i This represents the position transformation matrix, rotation transformation matrix, and scaling matrix of the model, mesh. i Representative model o i The corresponding set of primitives, o i =(mesh i position i rotate i scale i (material) represents the material used in the model. There is not a one-to-one correspondence between the material and the model.
[0015] Definition 2: Material = (shader, parameter), where shader represents the shader program corresponding to the material, and parameter determines the parameter settings of the shader;
[0016] Definition 3: Mesh (set of primitives) i =(v i vn i , vt i f i ), where v i The coordinate matrix vn represents the set of vertices. i Represents the vertex normal coordinate matrix, vt i f represents the vertex texture coordinate matrix. i The vertex index matrix representing the primitives drawn;
[0017] Definition 4: Set of light sources type i Including other parameters related to the type of light source, l i =(lposition) i ,direction i intensity i type i It specifies the position, direction, intensity, and type of the light source;
[0018] Definition 5: u i =(uposition) i up i view i near i , far i ,fov i , aspect i camera iLet uposition be a set of cameras, where each online user can be abstracted as an observing camera with general properties. i up i view i near i , far i ,fov i , aspect i camera i These represent the camera's spatial position, the camera's top orientation vector, the viewing angle, the near and far clipping planes, the field of view, the aspect ratio, and the camera parameters, respectively. All online users can then use the set... describe.
[0019] In one embodiment of the present invention, in step S11, the rendering process, i.e., the rendering pipeline, for each user under the rasterization rendering pipeline is simplified and described by the following steps:
[0020] Step S111: In the application phase, the CPU determines the camera parameters u of user i. i After performing preliminary frustum culling calculations with the 3D model set, we have the set whereσ(o j u i ) represents object o j At the visual vertebral body v i The intersection test is performed, with a value of 1 indicating intersection and a value of 0 indicating no intersection; after removing the problematic models, the remaining model set is traversed. For any model Prepare model graph metadata mesh j And prepare the shader and related parameters according to the model material;
[0021] Step S112: In the geometry phase, the GPU meshes the graph data loaded into video memory. j and user perspective information u i Perform a vertex coordinate view transformation, from model space to meshWorld. j Observation space meshView j MeshPersp (Clipping Space) j Subsequently, fine-grained primitive culling is performed in clip space. After primitive culling, screen mapping maps the vertices in the primitive set to screen coordinates. In some cases, the geometry stage also performs vertex and lighting rendering shading calculations to obtain the light radiation intensity vl reflected by the vertex in the viewing direction. j MVP stands for Model-View-Projection Transformation Matrix;
[0022] Step S113: Rasterization interpolates mesh' between pixels covered by primitives based on vertex data. j =(v′) j ,vn′ j ,vt′ j ,vl′ j f′ j ,s′ j ), s′ j This represents the screen coordinate attribute; subsequently, the fragment shader performs the final pixel coloring calculation for output to the target screen. The fragment coloring result can be described as a primitive mesh'. j Color value flag of the covered screen area j =(c j ,s′ j After the fragments are colored, the colors will be mixed on the screen based on the results of transparency and depth tests to generate the final display image.
[0023] In one embodiment of the present invention, in step S112:
[0024] meshWorld j =(v j ×M, vn j ×M, vt j f j (1)
[0025] meshView j =(v j ×MV, vn j ×MV, vt j f j (2)
[0026] meshPersp j =(v j ×MVP, vn j ×MVP, vt j f j (3)
[0027] M = scale j ×position j ×rotate j (4)
[0028]
[0029]
[0030] In one embodiment of the present invention, the sampling of ambient lighting based on ray tracing by all active probes in the Volume in step S13 specifically includes:
[0031] Step S131: Probes in Sleep and Awake states intersect with the bounding box of the dynamic mesh in the scene, which will cause some probes to change their state;
[0032] Step S132: For each probe in both Awake and Static states, n sampling points are generated by uniformly sampling along a spherical Fibonacci sequence. Each sampling point is connected to the probe to generate n rays. A single ray tracing is performed on each ray to obtain scene intersection information, including world space position, normal direction, and BRDF value. The world space position of each intersection point is used as depth information to update the probe depth map. The calculation is as follows, where the s coefficient is used to reduce the ray tracing sampling weights that deviate from the direction of the depth map texels;
[0033]
[0034] Step S133: At scene intersection point p i The intersection information is used as input to calculate direct lighting using the deferred rendering pipeline, and then at intersection p... i The probes surrounding it are sampled, and an indirect illumination calculation is performed. The Radiance value of the incident light at the intersection is obtained by combining the indirect and direct illumination.
[0035] Step S134: The Radiance result is used to calculate the current probe Irradiance information, i.e., E. raytrace The calculation formula is as follows:
[0036]
[0037] Step S135: Based on the above calculation results, update the texture. Following the concept of deferred lighting, perform the update calculation according to the following deferred update formula. By reusing similar ray tracing results between frames, the actual solution of physical lighting can be gradually approximated:
[0038] E new (1-α)*E raytrace +α*E old (9)
[0039] d new = (1-α)*d raytrace +α*d old (10)
[0040] in For the probe in Distance to the nearest object in the direction, For the probe in Radiance of direction reception For the texel normal, L i For ray tracing at sampling point p i Calculated Radiance, θ i For sampling point p i The angle between the sampling direction and the texel normal, where α is the hysteresis coefficient, is used to mix different ray tracing results between frames.
[0041] In one embodiment of the present invention, step S2 specifically includes:
[0042] Step S21: Considering the variation range of different probes, the update strategy selectively updates the illumination probes at an appropriate frequency without affecting the illumination effect;
[0043] Step S22: Considering the low characteristics of diffuse lighting information stored in the irradiance map and the property of spherical harmonic functions that can help with indirect lighting compression and calculation, the irradiance map is decomposed using spherical harmonic basis functions. In the frequency domain, a limited number of parameters are used to approximate the irradiance map for network transmission, thereby significantly reducing network bandwidth consumption. Based on the network conditions and the probe's update frequency, the irradiance map and spherical harmonic parameters are selectively placed into the update queue, and the update results are sent to the edge server with different bandwidth consumption.
[0044] In one embodiment of the present invention, the rendering update strategy in step S21 specifically includes:
[0045] The cloud server maintains a volume subscription system for each user, which includes several volume indexes around the user and an update queue. The length of the queue depends on the network status of the edge server and is defined in the scheduling database of the cloud server.
[0046] A Volume subscribed to by one or more users stores the probe texture last passed to the edge for each probe that is not in a Dead state. The initial value of this texture is set to all zeros.
[0047] After the probe texture is updated, all non-Dead probes that have subscribed to a Volume will perform a difference operation with the probe texture that was last passed to the edge. When this difference is higher than a certain threshold, the probe will enter the Update state and enter a brief period of silence, no longer participating in the texture update of ray tracing, until the texture synchronization to the edge is completed.
[0048] The probe that enters the Update state puts the update information into the update queue of all subscribers, updates the probe texture cache, and exits the Update state;
[0049] The cloud distributes update information to each edge server based on the update queue.
[0050] In one embodiment of the present invention, step S22 specifically includes:
[0051] Spherical harmonic basis functions are a set of orthogonal basis functions defined on a sphere, where l is called the zone number, and the number of coefficients of the spherical harmonic basis functions is l. 2 Irradiance is decomposed based on spherical harmonic basis functions:
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058] Where Y l m The screen coordinates of the interpolated pixel are given by the following formula for any m! = 0: Normal of the sampling plane It can be defined by the spherical angle (α, β, γ). The rotation of the normal plane can be converted into a rotation of the light field, and the calculation formula can be simplified by utilizing the rotation invariance of the spherical harmonic function, i.e.:
[0059]
[0060] By introducing equation (15), the following can be directly calculated based on different band numbers l: The value of , and when l≥3 The value of approaches 0, so we can obtain the result by only considering l≤2. The approximate value; Equation (17) serves as the Irradiance reconstruction formula at the edge, and the edge server updates the Irradiance value of the reconstruction probe based on the spherical harmonic factor given by the cloud; the cloud server calculates the spherical harmonic factor corresponding to the probe Irradiance. Based on equation (13), modify the ray tracing sampling equation (8) to obtain a new sampling equation (18), that is, calculate the projection of the Radiance of the sampling direction in each spherical harmonic basis function during each ray tracing. Also, based on the idea of inter-frame ray sampling multiplexing, the update of the spherical harmonic factor is shown in equation (19).
[0061]
[0062]
[0063] In one embodiment of the present invention, step S3 specifically includes:
[0064] Step S31: In the edge rendering and shading calculation, based on the splitting results of step S11, a rendering instance that communicates peer-to-peer with the user is run on the edge server. Each rendering instance maintains the complete virtual world scene around the user and several volume caches and maintains communication with the cloud to obtain probe texture updates. When the instance performs rendering and shading, it will calculate direct lighting and combine it with the global illumination texture cached in the volume for shading, based on the Cook-Torrance rendering model (ignoring self-illumination):
[0065]
[0066] in To observe the direction, The incident direction, For the surface at point p, the integration domain is the solid angles of the hemisphere above point p. Point p in the direction of observation Radiance of reflection, k d For the diffuse component of the BRDF function, k s Let k be the specular reflection component of the BRDF function. According to the law of conservation of energy, we have k d +k s =1, Let be the radiance of the light received at point p in the incident direction, and DFG be the microsurface distribution function;
[0067] Step S32: Equation (20) divides the integral calculation of reflected light into two parts: specular reflection and diffuse reflection. For the diffuse reflection part, the incident light... Split into direct lighting and global illumination The shading calculation results for diffuse indirect lighting for:
[0068]
[0069]
[0070] In summary, the technical solutions conceived by this invention have the following beneficial effects compared with the prior art:
[0071] (1) Current real-time cloud rendering applications are not natively designed for the cloud, which makes their deployment at the edge difficult. Most studies have only verified the improvement of the user experience of real-time cloud rendering by edge computing, but none of them have effectively solved the problem of computing resource costs for the actual deployment of real-time cloud rendering on edge computing platforms. The cloud-edge collaboration mode proposed in this invention can reduce the hardware pressure and computing resource costs at the edge.
[0072] (2) From the perspective of the rendering process, considering that most real-time cloud rendering applications can often be summarized as a multi-user online collaborative virtual world, the user screen can be considered as different viewing perspectives in the same world. This means that there must be repeated calculations of common information in the rendering of user screens. Reusing this common information can significantly reduce the computing power consumption of the GPU, thereby reducing the computing resource cost of the edge server. The cloud-edge collaborative real-time cloud rendering model proposed in this invention can use edge computing to reduce the latency of the real-time cloud rendering system and eliminate bandwidth bottlenecks;
[0073] (3) In view of the high computing resource cost problem brought about by edge computing, the collaborative rendering process in this invention uses cloud GPU computing power to reduce the GPU computing power burden at the edge in the form of cloud-edge collaboration.
[0074] (4) To further reduce the total GPU computing power requirement, the rendering process is broken down into view-dependent and view-independent calculations. A common calculation component is reused in real-time cloud rendering with multiple users online. By maintaining view-independent rendering calculations for the shared virtual world in the cloud center, the online world of multiple users can be utilized, reducing redundant and unnecessary calculations in rendering. Finally, this invention also proposes a rendering information update strategy and a rendering method based on spherical harmonic functions to reduce cloud bandwidth consumption.
[0075] (5) Experiments have shown that, compared with existing methods, the real-time cloud rendering method for video streams based on edge computing proposed in this invention has better performance. Compared with the cloud center solution, network and interaction latency are reduced. At the same time, compared with the pure edge rendering solution, the frame rate is also improved in large-scale multi-dynamic light source scenarios. Attached Figure Description
[0076] Figure 1 This is a cloud-edge collaborative real-time cloud rendering architecture diagram of a video stream real-time cloud rendering method based on edge computing in an embodiment of the present invention.
[0077] Figure 2 This is a classic rasterization rendering flowchart of a real-time cloud rendering method for video streams based on edge computing in an embodiment of the present invention.
[0078] Figure 3This is an example diagram of the cloud-edge collaborative rendering process of a real-time cloud rendering method for video streams based on edge computing in an embodiment of the present invention;
[0079] Figure 4 This is a probe state transition diagram of a real-time cloud rendering method for video streams based on edge computing in an embodiment of the present invention. Detailed Implementation
[0080] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0081] Real-time cloud rendering is considered the next generation of rendering technology and is playing an increasingly important role in various industries. However, its user experience has always been limited by network quality. Edge computing, as a new era's general paradigm for low-latency applications, can effectively solve the user experience problem of real-time cloud rendering. However, the unique characteristics of edge computing bring computational resource costs to real-time cloud rendering. Therefore, it is necessary to refactor real-time cloud rendering applications to suit the characteristics of the edge and minimize the computational resource burden on the edge.
[0082] To improve the user experience of real-time cloud rendering while leveraging edge computing, and to address the computational resource costs associated with combining real-time cloud rendering systems with edge computing, such as... Figure 1 As shown, this invention provides a method for real-time cloud rendering of video streams based on edge computing, the method comprising:
[0083] Step S1: Maintain several NetGI Volume components in the scene on the cloud server, and update the irradiance map in real time based on the rendering process of the cloud center server. Specifically, this includes:
[0084] Step S11: Analyze and decompose the rasterization pipeline or the hybrid rendering pipeline with rasterization pipeline as the main component. For multi-user online real-time cloud rendering applications, only general real-time rendering is abstracted.
[0085] Definition 1: Collection of 3D models position i rotate i scale i This represents the position transformation matrix, rotation transformation matrix, and scaling matrix of the model, mesh. i Representative model o i The corresponding set of primitives, o i =(mesh iposition i rotate i scale i (material) represents the material used in the model. There is not a one-to-one correspondence between the material and the model.
[0086] Definition 2: Material = (shader, parameter), where shader represents the shader program corresponding to the material, and parameter determines the parameter settings of the shader;
[0087] Definition 3: Mesh (set of primitives) i =(v i vn i , vt i f i ), where v i The coordinate matrix vn represents the set of vertices. i Represents the vertex normal coordinate matrix, vt i f represents the vertex texture coordinate matrix. i The vertex index matrix representing the primitives drawn;
[0088] Definition 4: Set of light sources type i Including other parameters related to the type of light source, l i =(lposition) i ,direction i intensity i type i It specifies the position, direction, intensity, and type of the light source;
[0089] Definition 5: u i =(uposition) i up i view i near i , far i ,fov i , aspect i camera i Let uposition be a set of cameras, where each online user can be abstracted as an observing camera with general properties. i up i view i near i , far i ,fov i , aspect i camera iThese represent the camera's spatial position, the camera's top orientation vector, the viewing angle, the near and far clipping planes, the field of view, the aspect ratio, and camera parameters, respectively. All online users can then use the set... describe;
[0090] like Figure 2 As shown, in the rasterization rendering pipeline, each user's rendering process, or rendering pipeline, can be simplified and described by the following steps:
[0091] Step S111: In the application phase, the CPU determines the camera parameters u of user i. i After performing preliminary frustum culling calculations with the 3D model set, we have the set whereσ(o j u i ) represents object o j At the visual vertebral body v i The intersection test is performed, with a value of 1 indicating intersection and a value of 0 indicating no intersection. After removing the problematic models, the remaining model set is traversed. For any model Prepare model graph metadata mesh j And prepare the shader and related parameters according to the model material;
[0092] Step S112: In the geometry phase, the GPU meshes the graph data loaded into video memory. i and user perspective information u i Perform a vertex coordinate view transformation, from model space to meshWorld. j Observation space meshView j MeshPersp (Clipping Space) j Subsequently, fine-grained primitive culling is performed in clip space. After primitive culling, screen mapping maps the vertices in the primitive set to screen coordinates. In some cases, the geometry stage also performs vertex and lighting rendering shading calculations to obtain the light radiation intensity vl reflected by the vertex in the viewing direction. j MVP stands for Model-View-Projection Transformation Matrix;
[0093] meshWorld j =(v j ×M, vn j ×M, vt j f j (1)
[0094] meshView j =(v j ×MV, vn j ×MV, vtj f j (2)
[0095] meshPersp j =(v j ×MVP, vn j ×MVP, vt j f j (3)
[0096] M = scale j ×position j ×rotate j (4)
[0097]
[0098]
[0099] Step S113: Rasterization interpolates mesh' between pixels covered by primitives based on vertex data. j =(v′) j ,vn′ j ,vt′ j ,vl′ j f′ j ,s′ j ), s′ j This represents the screen coordinate attribute. Subsequently, the fragment shader performs the final pixel coloring calculations for the target screen. The fragment coloring result can be described as a primitive mesh'. j Color value flag of the covered screen area j =(c j ,s′ j After the fragments are colored, the colors will be mixed on the screen based on the results of transparency and depth tests to generate the final display image.
[0100] Step S12: Based on the abstract analysis of the rasterization rendering process in Step S11, the incident lighting calculation has extremely high complexity among all rendering calculations. The incident lighting is decomposed into two parts: global illumination and direct lighting. The more complex global illumination calculation is offloaded to the cloud, while direct lighting is completed by the edge server. The rendering process is thus divided into two parts: global illumination rendering calculation in the cloud and rendering and shading calculation at the edge. Figure 3 As shown, even when the edge server loses its connection with the cloud, it can still use past erroneous global illumination information combined with direct lighting results to complete the shading calculation to ensure the continuity of the image.
[0101] Step S13: In the global illumination rendering calculation at the cloud center, the cloud center server deploys multiple NetGI Volumes with different priorities covering the entire scene in the initial scene. In the distributed group of lighting probes, each probe stores spherical Irradiance information and depth information. The Irradiance information is stored using an 8*8 three-dimensional vector texture, and the depth information is stored using a 16*16 two-dimensional vector texture. At the same time, each Volume maintains a set of probe state matrices. The probe's active state is defined as Dead, Active, Sleep, Awake, Static, and Update. The probe is initially in the Active state when it is created. When the probe is inside a static object, it will be permanently defined as Dead. When there are movable dynamic meshes around the probe, it will be defined as Awake. The Static state means that there are only static meshes around the probe. The Sleep state means that the probe is in an open area and there are no meshes around it that can be projected by light. The Update state indicates that the cloud will update the probe texture to the edge. All active probes in the Volume sample the ambient lighting based on ray tracing.
[0102] Specifically, all active probes in the Volume sample ambient lighting based on ray tracing, including:
[0103] Step S131: Probes in Sleep and Awake states intersect with the bounding box of the dynamic mesh in the scene, which will cause some probes to change their state;
[0104] Step S132: For each probe in both Awake and Static states, n sampling points are generated by uniformly sampling along a spherical Fibonacci sequence. Each sampling point is connected to the probe to generate n rays. A single ray tracing is performed on each ray to obtain scene intersection information, including world space position, normal direction, and BRDF value. The world space position of each intersection point is used as depth information to update the probe depth map. The calculation is as follows, where the s coefficient is used to reduce the ray tracing sampling weights that deviate from the direction of the depth map texels;
[0105]
[0106] Step S133: At scene intersection point p i The intersection information is used as input to calculate direct lighting using the deferred rendering pipeline, and then at intersection p... i The probes surrounding it are sampled, and an indirect illumination calculation is performed. The Radiance value of the incident light at the intersection is obtained by combining the indirect and direct illumination.
[0107] Step S134: The Radiance result is used to calculate the current probe Irradiance information, i.e., E. raytrace The calculation formula is as follows:
[0108]
[0109] Step S135: Based on the above calculation results, update the texture. Following the concept of deferred lighting, perform the update calculation according to the following deferred update formula. By reusing similar ray tracing results between frames, the actual solution of physical lighting can be gradually approximated:
[0110] E new (1-α)*E raytrace +α*E old (9)
[0111] d new = (1-α)*d raytrace +α*d old (10)
[0112] in For the probe in Distance to the nearest object in the direction, For the probe in Radiance of direction reception For the texel normal, L i For ray tracing at sampling point p i Calculated Radiance, θ i For sampling point p i The angle between the sampling direction and the texel normal, where α is the hysteresis coefficient, is used to mix different ray tracing results between frames.
[0113] Step S2: Based on the rendering update strategy, deliver the texture as rendering information to the update agent. For probes that are updated frequently, use a compressed spherical harmonic function factor instead of the texture as rendering information. Specifically, this includes:
[0114] Step S21: As Figure 4 As shown, considering the variation range of different probes, the update strategy in this invention can selectively update the illumination probes at an appropriate frequency without affecting the illumination effect.
[0115] The rendering update strategy specifically includes:
[0116] The cloud server maintains a volume subscription system for each user, which includes several volume indexes around the user and an update queue. The length of the queue depends on the network status of the edge server and is defined in the scheduling database of the cloud server.
[0117] A Volume subscribed to by one or more users stores the probe texture last passed to the edge for each probe that is not in a Dead state. The initial value of this texture is set to all zeros.
[0118] After the probe texture is updated, all non-Dead probes that have subscribed to a Volume will perform a difference operation with the probe texture that was last passed to the edge. When this difference is higher than a certain threshold, the probe will enter the Update state and enter a brief period of silence, no longer participating in the texture update of ray tracing, until the texture synchronization to the edge is completed.
[0119] The probe that enters the Update state puts the update information into the update queue of all subscribers, updates the probe texture cache, and exits the Update state;
[0120] The cloud distributes update information to each edge server based on the update queue.
[0121] Step S22: Considering the low characteristics of diffuse lighting information stored in the irradiance map and the property of spherical harmonic functions to aid in indirect lighting compression and calculation, the irradiance map is decomposed using spherical harmonic basis functions. A limited number of parameters are used in the frequency domain to approximate the irradiance map for network transmission, thereby significantly reducing network bandwidth consumption. Therefore, based on network conditions and probe update frequency, irradiance maps and spherical harmonic parameters are selectively placed into the update queue, and update results are sent to the edge server with different bandwidth consumption. Specifically:
[0122] Spherical harmonic basis functions are a set of orthogonal basis functions defined on a sphere, where l is called the zone number, and the number of coefficients of the spherical harmonic basis functions is l. 2 Irradiance is decomposed based on spherical harmonic basis functions:
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129] Where Y l m The screen coordinates of the interpolated pixel are given by the following formula for any m! = 0: Normal of the sampling plane It can be defined by the spherical angle (α, β, γ). The rotation of the normal plane can be converted into a rotation of the light field, and the calculation formula can be simplified by utilizing the rotation invariance of the spherical harmonic function, i.e.:
[0130]
[0131] By introducing equation (15), the following can be directly calculated based on different band numbers l: The value of , and when l≥3 The value of approaches 0, so we can obtain the result by only considering l≤2. The approximate value is given by equation (17). Equation (17) serves as the Irradiance reconstruction formula at the edge. The edge server updates the Irradiance value of the reconstruction probe based on the spherical harmonic factor provided by the cloud. The cloud server calculates the spherical harmonic factor corresponding to the probe Irradiance. Based on equation (13), the ray tracing sampling equation (8) is modified to obtain a new sampling equation (18), that is, the projection of the radiance of the sampling direction into each spherical harmonic basis function is calculated during each ray tracing. Similarly, based on the idea of inter-frame ray sampling multiplexing, the update of the spherical harmonic factor is shown in equation (19).
[0132]
[0133]
[0134] Step S3: The updated agent distributes rendering information based on the subscription information at the edge. The edge server, through the edge server rendering process, reconstructs diffuse lighting information based on the rendering information distributed from the cloud, performs lighting calculations based on the deferred shading pipeline, and finally delivers the rendered image to the user. Specifically, this includes:
[0135] Step S31: In the edge rendering and shading calculation, based on the splitting results of step S11, a rendering instance that communicates peer-to-peer with the user is run on the edge server. Each rendering instance maintains the complete virtual world scene around the user and several volume caches and maintains communication with the cloud to obtain probe texture updates. When the instance performs rendering and shading, it will calculate direct lighting and combine it with the global illumination texture cached in the volume for shading, based on the Cook-Torrance rendering model (ignoring self-illumination):
[0136]
[0137] in To observe the direction, The incident direction, For the surface at point p, the integration domain is the solid angles of the hemisphere above point p. Point p in the direction of observation Radiance of reflection, k d For the diffuse component of the BRDF function, k s Let k be the specular reflection component of the BRDF function. According to the law of conservation of energy, we have k d +k s =1, Let denot p be the radiance of the light received at point p in the incident direction, and DFG be the microsurface distribution function.
[0138] Step S32: Equation (20) divides the integral calculation of reflected light into two parts: specular reflection and diffuse reflection. For the diffuse reflection part, the incident light... Split into direct lighting and global illumination The shading calculation results for diffuse indirect lighting for:
[0139]
[0140]
[0141] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A real-time cloud rendering method for video streams based on edge computing, characterized in that, Includes the following steps: Step S1: Maintain several NetGI Volume components in the scene on the cloud server and update the irradiance map in real time based on the rendering process of the cloud center server; Step S2: Decompose the irradiance map using spherical harmonic basis functions. Selectively place the irradiance map and spherical harmonic parameters into the update queue according to the network conditions and the probe update frequency, and send the update results to the edge server with different bandwidth consumption. Step S3: The agent updates and distributes rendering information based on the subscription information at the edge. The edge server reconstructs diffuse lighting information based on the rendering information distributed from the cloud through the edge server rendering process, performs lighting calculations based on the deferred shading pipeline, and finally delivers the rendered image to the user. Step S3 specifically includes: Step S31: In edge rendering and shading calculations, the rasterization pipeline or a hybrid rendering pipeline primarily based on the rasterization pipeline is analyzed and decomposed. Based on the decomposition results, rendering instances that communicate peer-to-peer with the user are run on the edge server. Each rendering instance maintains the complete virtual world scene surrounding the user and several volume caches, and maintains communication with the cloud to obtain probe texture updates. When the instance performs rendering and shading, direct lighting is calculated and combined with the global illumination texture cached in the volume for shading, based on the Cook-Torrance rendering model. (20) in To observe the direction, The incident direction, for The surface normal of the point, with the integration domain Ω. for Point towards the direction of observation Radiance of reflection For the diffuse component of the BRDF function, For the specular reflection component of the BRDF function, according to the law of conservation of energy, we have... , for The radiance of the point in the incident direction. The distribution function of the micro-surface; Step S32: Equation (20) divides the integral calculation of reflected light into two parts: specular reflection and diffuse reflection. For the diffuse reflection part, the incident light is... Split into direct lighting and global illumination The shading calculation results for diffuse indirect lighting are as follows. for: (21) (22)。 2. The real-time cloud rendering method for video streams based on edge computing as described in claim 1, characterized in that, Step S1 specifically includes: Step S11: Analyze and break down the rasterization pipeline or the hybrid rendering pipeline that is primarily based on the rasterization pipeline; Step S12: Based on the abstract analysis of the rasterization rendering process in step S11, the incident lighting calculation has extremely high complexity among all rendering calculations. The incident lighting is decomposed into two parts: global lighting and direct lighting. The global lighting is loaded into the cloud for calculation, while the direct lighting is completed by the edge server. Step S13: In the global illumination rendering calculation at the cloud center, the cloud center server deploys multiple NetGI Volumes with different priorities covering the entire scene in the initial scene. In the distributed group of lighting probes, each probe stores spherical Irradiance information and depth information. The Irradiance information is stored using an 8×8 three-dimensional vector texture, and the depth information is stored using a 16×16 two-dimensional vector texture. At the same time, each Volume maintains a set of probe state matrices. The probe's active state is defined as Dead, Active, Sleep, Awake, Static, and Update. The probe is initially in the Active state when it is created. When the probe is inside a static object, it will be permanently defined as Dead. When there are movable dynamic meshes around the probe, it will be defined as Awake. The Static state means that there are only static meshes around the probe. The Sleep state means that the probe is in an open area and there are no meshes around it that can be projected by light. The Update state indicates that the cloud will update the probe texture to the edge. All active probes in the Volume sample the ambient lighting based on ray tracing.
3. The real-time cloud rendering method for video streams based on edge computing as described in claim 2, characterized in that, In step S11, the following definition is made: Definition 1: Set of 3D Models , Representative model The corresponding set of primitives, These represent the position transformation matrix, rotation transformation matrix, and scaling matrix of the model, respectively. Material represents the material used in the model. There is no one-to-one correspondence between the material and the model. Definition 2: Material ,in This represents the shader program corresponding to the material. The shader parameter settings have been determined; Definition 3: Set of primitives ,in The coordinate matrix representing the set of vertices. Represents the vertex normal coordinate matrix. Represents the vertex texture coordinate matrix. The vertex index matrix representing the primitives drawn; Definition 4: Set of light sources , It specifies the position, direction, intensity, and type of the light source; Definition 5: Let be a set of cameras, where each online user is abstracted as an observing camera with general properties, where These represent the camera's spatial position, camera top orientation vector, viewing angle, near clipping plane, far clipping plane, field of view, aspect ratio, and camera parameters, respectively. All online users are represented by the set... describe.
4. The real-time cloud rendering method for video streams based on edge computing as described in claim 3, characterized in that, In step S11, under the rasterization rendering pipeline, the rendering process for each user, i.e., the rendering pipeline, is simplified to the following steps: Step S111: In the application phase, the CPU, based on the user... Camera parameters After performing preliminary frustum culling calculations with the 3D model set, we have the set ,in Represents objects The intersection test with the view frustum is performed, with a value of 1 indicating intersection and a value of 0 indicating non-intersection; after elimination, the remaining model set is traversed. For any model Prepare model graph metadata And based on the model material Prepare and related parameters ; Step S112: In the geometry phase, the GPU uses the graph data loaded into video memory. and user perspective information Perform a vertex coordinate view transformation, from model space to world space. Observation space Cutting space Then, fine-grained primitive culling is performed in clip space. After primitive culling is completed, screen mapping maps the vertices in the primitive set to screen coordinates one by one. Step S113: Rasterization interpolates the pixels covered by the primitives based on vertex data. , Indicates screen coordinates; Subsequently, the fragment shader performs the final pixel coloring calculations for output to the target screen. The fragment coloring result can be described as a primitive. Color values of the covered screen area After the fragments are colored, the colors will be mixed on the screen based on the results of transparency and depth tests to generate the final display image.
5. The real-time cloud rendering method for video streams based on edge computing as described in claim 4, characterized in that, In step S112: (1) (2) (3) (4) (5) (6)。
Citation Information
Patent Citations
Graph rendering method and equipment
CN113141511A
Multimedia conference processing method based on mobile edge computing server and related products thereof
CN114125366A
