Video picture rendering method, apparatus, device, and medium
By simulating camera and mesh patch region splitting and synchronous rendering technology, the problem of high-quality rendering in real-time video rendering is solved, and high-resolution and high-frame-rate video rendering effects are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-10-28
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies struggle to meet the demands for high-quality rendering in real-time video, especially when the rendering machine is overloaded and cannot simultaneously achieve high resolution and high frame rate.
By combining a simulated camera with mesh patches, the rendering area is determined, and multiple rendering machines are used to split and synchronously render video frames, finally synthesizing high-quality video frames.
It enables the generation of high-quality video images in real-time video rendering scenarios, meeting the requirements of high resolution and high frame rate, and avoiding the load problems of traditional rendering methods.
Smart Images

Figure CN116485966B_ABST
Abstract
Description
Technical Field
[0001] This application relates to video processing technology, and in particular to a video image rendering method, apparatus, device, and medium. Background Technology
[0002] With the development of computer technology, people have increasingly higher requirements for the quality of video images. For example, in the gaming industry, players also have high demands for the quality of game graphics. High-quality video images require both high resolution and high frame rate. If only one rendering machine is used to render the video images, it will inevitably increase the rendering load on the rendering machine, and an overloaded rendering machine cannot meet the high-quality requirements of the video images.
[0003] Therefore, in order to obtain high-quality video images, traditional technology usually splits the video image into frames over time, with each rendering machine responsible for rendering one or more frames obtained from the split. However, this rendering method is only suitable for rendering offline videos and cannot meet the needs of real-time video rendering scenarios. Summary of the Invention
[0004] Therefore, it is necessary to provide a video rendering method, apparatus, device, and medium that can meet the requirements of real-time, high-quality video rendering scenarios, addressing the aforementioned technical problems.
[0005] In a first aspect, this application provides a video image rendering method, the method comprising:
[0006] The rendering area is determined based on the relative positions between the viewpoint in the simulated camera and each vertex in the mesh; the simulated camera is obtained by simulating a virtual camera in the rendering engine; the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera;
[0007] Based on the current position of the simulated camera, determine the real-time video frame to be rendered within the rendering area;
[0008] For each video frame, the video frame is spatially divided into regions based on the grid patches to obtain multiple video sub-frames;
[0009] By using multiple pre-set rendering machines, the multiple video sub-frames are rendered synchronously to obtain the rendered sub-frames corresponding to the multiple video sub-frames respectively;
[0010] The rendered sub-pictures corresponding to the multiple video sub-pictures are combined to obtain the rendered picture corresponding to the video frame picture.
[0011] Secondly, this application provides a video image rendering apparatus, the apparatus comprising:
[0012] The determination module is used to determine the rendering area based on the relative position between the viewpoint in the simulated camera and each vertex in the mesh; and to determine the real-time video frame to be rendered within the rendering area based on the current position of the simulated camera; the simulated camera is obtained by simulating a virtual camera in the rendering engine; the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera;
[0013] The splitting module is used to spatially split each video frame into multiple video sub-frames based on the grid patches.
[0014] The rendering module is used to synchronously render the multiple video sub-frames using multiple pre-set rendering machines to obtain the rendered sub-frames corresponding to the multiple video sub-frames respectively.
[0015] The compositing module is used to compose the rendered sub-pictures corresponding to the multiple video sub-pictures to obtain the rendered picture corresponding to the video frame picture.
[0016] In one embodiment, the current position of the simulated camera is determined based on the current position of the virtual camera in the three-dimensional virtual scene; the determining module is further configured to determine the real-time scene content located within the rendering area in the three-dimensional virtual scene based on the current position of the simulated camera, and obtain the real-time video frame image to be rendered.
[0017] In one embodiment, the mesh patch includes multiple mesh sub-patterns; the coordinates of the common vertices of two adjacent mesh sub-patterns are the same; the splitting module is further configured to, for each video frame, spatially split the rendering area corresponding to the video frame according to the common vertices in the multiple mesh sub-patterns, and determine the real-time scene content in each of the split sub-regions as video sub-frames.
[0018] In one embodiment, the apparatus further includes:
[0019] A construction module is used to model the virtual sensor based on its physical dimensions and the number of rendering machines to obtain the plurality of mesh sub-patterns; wherein the number of mesh sub-patterns is consistent with the number of rendering machines; and the sum of the areas of the plurality of mesh sub-patterns is consistent with the area of the virtual sensor.
[0020] In one embodiment, the determining module is further configured to determine the distance between the viewpoint and the mesh patch based on the focal length of the virtual camera in the rendering engine; and to obtain the relative position between the viewpoint and each vertex in the mesh patch based on the distance.
[0021] In one embodiment, the simulated camera is obtained through a display component; the display component is the parent of the viewpoint and the mesh patch; the determining module is further configured to determine the current position of the virtual camera; and assign the current position of the virtual camera to the display component to obtain the current position of the simulated camera.
[0022] In one embodiment, the plurality of rendering machines includes a master rendering machine and at least one slave rendering machine; the master rendering machine is equipped with a synchronization card; the rendering module is further configured to receive a synchronization rendering signal generated by a synchronization signal generator based on a preset target frame rate through the synchronization card in the master rendering machine; synchronize the synchronization rendering signal to the slave rendering machine through the synchronization card; and control the master rendering machine and the slave rendering machine to synchronously render the plurality of video sub-frames respectively through the synchronization rendering signals received by the master rendering machine and the slave rendering machine, so as to obtain the rendered sub-frames corresponding to the plurality of video sub-frames respectively.
[0023] In one embodiment, the rendered sub-picture includes a rendered sub-picture signal; the synthesis module is further configured to, when the video signal acquisition card receives the synchronous acquisition signal generated by the synchronous signal generator, synchronously acquire the rendered sub-picture signals corresponding to the plurality of video sub-pictures through the video signal acquisition card; and synthesize the synchronously acquired rendered sub-picture signals corresponding to the plurality of video sub-pictures to obtain the rendered picture corresponding to the video frame picture.
[0024] In one embodiment, the apparatus further includes:
[0025] The conversion module is used to convert the format of the rendering sub-screen signals corresponding to the multiple video sub-screens synchronously after receiving the synchronization conversion signal through the format converter, when the signal format of the rendering sub-screen signals obtained by synchronous rendering of the master and slave rendering machines is inconsistent with the signal format specified by the video signal acquisition card, so as to obtain the rendering sub-screen signals consistent with the signal format specified by the video signal acquisition card, so as to allow the video signal acquisition card to perform synchronous acquisition.
[0026] In one embodiment, the video signal acquisition card is deployed on a video compositer; the video compositer further includes a composite video canvas; the composite module is further configured to set the frame rate of the composite video canvas to the target frame rate; by using the composite video canvas that satisfies the target frame rate, the rendering sub-screen signals corresponding to the multiple video sub-screens synchronously acquired by the video signal acquisition card are synchronously composited to obtain the rendering screen corresponding to the video frame.
[0027] In one embodiment, the video frame includes a real-time image of a virtual object; the video sub-image includes a real-time sub-image; the determining module is further configured to determine, in a real-time rendering scene of a virtual object, the real-time image of the virtual object to be rendered within the rendering area based on the current position of the simulated camera; the compositing module is further configured to compose the rendering sub-images corresponding to the multiple real-time sub-images respectively to obtain the rendering image corresponding to the real-time image of the virtual object.
[0028] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the various method embodiments of this application.
[0029] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various method embodiments of this application.
[0030] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the various method embodiments of this application.
[0031] The aforementioned video rendering method, apparatus, device, medium, and computer program product determine the rendering area based on the relative positions between the viewpoint in the simulated camera and each vertex in the mesh patch. Based on the current position of the simulated camera, the real-time video frame to be rendered within the rendering area is determined. Since the simulated camera is a simulation of a virtual camera in the rendering engine, and the mesh patch is constructed based on the physical dimensions of the virtual sensor in the virtual camera and can be used for image splitting, for each video frame, the video frame is spatially divided into multiple video sub-frames based on the mesh patch. Multiple pre-set rendering machines synchronously render these multiple video sub-frames, obtaining rendered sub-frames corresponding to each video sub-frame. These rendered sub-frames are then combined to obtain the rendered image corresponding to the video frame. Compared to traditional offline rendering methods, this application, by constructing a mesh patch based on the physical dimensions of the virtual sensor in the virtual camera to spatially split the video frame and synchronously rendering the split sub-frames using multiple rendering machines, can obtain high-quality real-time video images, meeting the needs of real-time video rendering scenarios. Attached Figure Description
[0032] Figure 1 This is a diagram illustrating the application environment of a video rendering method in one embodiment.
[0033] Figure 2This is a flowchart illustrating a video rendering method in one embodiment;
[0034] Figure 3 This is a schematic diagram illustrating the positional relationship between a viewpoint and a mesh patch in one embodiment;
[0035] Figure 4 This is a schematic diagram illustrating the principle of segmentation modeling based on the physical dimensions of a virtual sensor and distributed rendering in one embodiment.
[0036] Figure 5 This is a schematic diagram illustrating the mapping relationship between the renderer, mesh sub-facets, and the viewport in one embodiment.
[0037] Figure 6 This is a schematic diagram illustrating the principle of determining the distance between the viewpoint and the grid patch based on the focal length of a virtual camera in one embodiment;
[0038] Figure 7 This is a schematic diagram illustrating the principle of determining the position of an analog camera based on the position of a virtual camera in one embodiment.
[0039] Figure 8 This is a schematic diagram of the hardware environment constructed for video rendering in one embodiment;
[0040] Figure 9 This is a flowchart illustrating a video rendering method in another embodiment;
[0041] Figure 10 This is a schematic diagram illustrating an application scenario of a video rendering method in one embodiment.
[0042] Figure 11 This is a flowchart illustrating the video rendering method in yet another embodiment;
[0043] Figure 12 This is a structural block diagram of a video rendering device in one embodiment;
[0044] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0046] The video rendering method provided in this application can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on other servers. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal 102 and server 104 can be directly or indirectly connected via wired or wireless communication; this application does not impose any restrictions on this connection.
[0047] Server 104 determines the rendering area based on the relative positions of the viewpoint in the simulated camera and the vertices in the mesh. The simulated camera is obtained by simulating a virtual camera in the rendering engine; the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera. Server 104 determines the real-time video frames to be rendered within the rendering area based on the current position of the simulated camera. For each video frame, it spatially divides the video frame into multiple video sub-frames based on the mesh. Server 104 can synchronously render these multiple video sub-frames using multiple pre-set rendering machines, obtaining rendered sub-frames corresponding to each video sub-frame. These rendered sub-frames are then combined to obtain the rendered image corresponding to the video frame.
[0048] It is understood that server 104 can send the synthesized rendered image to terminal 102 for display. This embodiment does not limit this, and it is understood that... Figure 1 The application scenarios shown are for illustrative purposes only and are not limited to these.
[0049] In one embodiment, such as Figure 2 As shown, a video rendering method is provided. This method can be applied to computer devices, which can be terminals or servers. The method can be executed independently by the terminal or server, or it can be implemented through interaction between the terminal and the server. This embodiment uses the application of this method to a computer device as an example for illustration, and includes the following steps:
[0050] Step 202: Determine the rendering area based on the relative positions between the viewpoint in the simulated camera and each vertex in the mesh; the simulated camera is obtained by simulating a virtual camera in the rendering engine; the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera.
[0051] The rendering engine is a real-time 3D rendering engine used to render images. The virtual camera is a virtual camera within the rendering engine. The simulated camera is a camera simulated based on the virtual camera. The simulated camera includes a viewpoint and mesh panels. The mesh panels are 3D patches located in the 3D virtual scene, constructed based on the physical dimensions of the virtual sensors in the virtual camera. The virtual sensor is a virtual sensor within the virtual camera. The rendering area is the area used to render video images.
[0052] Specifically, the computer device can determine the rendering area based on the relative positions of the viewpoint in the simulated camera and the vertices in the mesh. In other words, the computer device can determine a cone based on the viewpoint and the vertices in the mesh, and the area inside this cone is the rendering area.
[0053] In one embodiment, such as Figure 3 As shown, the computer device can connect the viewpoint O in the analog camera to each vertex (A, B, C, D) in the mesh ABCD to obtain a quadrangular pyramid O-ABCD. The area inside this pyramid is the rendering area.
[0054] Step 204: Determine the real-time video frame to be rendered within the rendering area based on the current position of the analog camera.
[0055] A real-time video frame is a single image within a real-time video stream. In other words, a real-time video stream contains multiple real-time video frames.
[0056] Specifically, the computer equipment can determine the current position of the analog camera, and based on the current position of the analog camera, determine the real-time image content to be rendered within the rendering area, thereby obtaining the real-time video frame image to be rendered.
[0057] In one embodiment, the computer device can obtain the current position of a virtual camera and determine the current position of a simulated camera based on the current position of the virtual camera. It is understood that the computer device can use the current position of the virtual camera as the current position of the simulated camera. The computer device can also process the current position of the virtual camera and use the processed position as the current position of the simulated camera.
[0058] Step 206: For each video frame, the video frame is spatially divided into regions based on the grid patches to obtain multiple video sub-frames.
[0059] Among them, a video sub-picture is a video picture obtained by spatially dividing a video frame into regions. It can be understood that the multiple video sub-pictures obtained by the division are spatially independent of each other.
[0060] In one embodiment, for each real-time video frame, the computer device can spatially divide the rendering area corresponding to the video frame according to a grid patch to obtain multiple sub-regions. Then, the computer device can determine the real-time video content to be rendered in each sub-region, and based on the real-time video content to be rendered in each sub-region, obtain multiple video sub-frames.
[0061] Step 208: Using multiple pre-set rendering machines, multiple video sub-frames are rendered synchronously to obtain the rendered sub-frames corresponding to each of the multiple video sub-frames.
[0062] Among them, the rendered sub-picture is the picture obtained by rendering the video sub-picture.
[0063] Specifically, the computer equipment is pre-configured with multiple rendering machines. Through these pre-configured rendering machines, the computer equipment can simultaneously render multiple video sub-frames, resulting in rendered sub-frames corresponding to each of the multiple video sub-frames. It can be understood that each rendering machine can be responsible for rendering at least one video sub-frame.
[0064] In one embodiment, multiple rendering machines can receive synchronous rendering signals and rendering instructions respectively. Through the synchronous rendering signals and rendering instructions, the multiple rendering machines are controlled to synchronously render multiple video sub-pictures to obtain the rendered sub-pictures corresponding to the multiple video sub-pictures respectively.
[0065] Step 210: Combine the rendered sub-pictures corresponding to the multiple video sub-pictures to obtain the rendered picture corresponding to the video frame picture.
[0066] The rendered image is the image obtained after rendering video frames.
[0067] Specifically, the computer equipment is pre-deployed with a synthesizer. The computer equipment can receive the rendering sub-pictures corresponding to multiple video sub-pictures output by each rendering machine through the synthesizer, and synthesize the rendering sub-pictures corresponding to the multiple video sub-pictures to obtain the rendering picture corresponding to the video frame picture.
[0068] In the aforementioned video rendering method, the rendering area is determined based on the relative positions between the viewpoint in the simulated camera and each vertex in the mesh. Then, based on the current position of the simulated camera, the real-time video frame to be rendered within the rendering area is determined. Since the simulated camera is a virtual camera simulated within the rendering engine, and the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera, it can be used for image splitting. Therefore, for each video frame, the video frame is spatially split into multiple video sub-frames based on the mesh. Multiple pre-set rendering machines synchronously render these multiple video sub-frames, resulting in rendered sub-frames corresponding to each video sub-frame. These rendered sub-frames are then combined to obtain the rendered image corresponding to the video frame. Compared to traditional offline rendering methods, this application, by constructing a mesh based on the physical dimensions of the virtual sensor in the virtual camera to spatially split the video frame and synchronously rendering the split sub-frames using multiple rendering machines, can obtain high-quality real-time video images, meeting the needs of real-time video rendering scenarios.
[0069] In one embodiment, the current position of the simulated camera is determined based on the current position of the virtual camera in the three-dimensional virtual scene; determining the real-time video frame to be rendered within the rendering area based on the current position of the simulated camera includes: determining the real-time scene content located within the rendering area in the three-dimensional virtual scene based on the current position of the simulated camera, and obtaining the real-time video frame to be rendered.
[0070] Specifically, the computer equipment can determine the current position of the simulated camera based on the current position of the virtual camera in the 3D virtual scene, and then determine the real-time scene content within the rendering area of the 3D virtual scene based on the current position of the simulated camera, thus obtaining the real-time video frame to be rendered. It can be understood that the real-time scene content within the rendering area of the 3D virtual scene is renderable, i.e., visible. The real-time scene content outside the rendering area of the 3D virtual scene is not rendered, i.e., invisible.
[0071] In the above embodiments, by simulating the current position of the camera, the real-time scene content located within the rendering area in the three-dimensional virtual scene is determined, and the real-time video frame image to be rendered is obtained, which can improve the rendering speed of the video frame image.
[0072] In one embodiment, a mesh patch includes multiple mesh sub-patterns; adjacent mesh sub-patterns share the same coordinates of their common vertices; for each video frame, the video frame is spatially divided into multiple video sub-frames based on the mesh patch, including: for each video frame, the rendering area corresponding to the video frame is spatially divided based on the common vertices of the multiple mesh sub-patterns, and the real-time scene content within each sub-region after the division is determined as the video sub-frame.
[0073] In this context, a shared vertex is a mesh vertex that is common to two mesh sub-faces. A sub-region is a region obtained by spatially splitting the rendering region.
[0074] Specifically, for each video frame, the computer device can spatially divide the rendering area corresponding to the video frame into multiple sub-regions based on the common vertices in multiple mesh sub-patterns. Then, the computer device can determine the real-time scene content located within each sub-region of the 3D virtual scene, and identify the real-time scene content within each of the divided sub-regions as a video sub-frame.
[0075] In one embodiment, continue to refer to Figure 3 The mesh area comprises two sub-mesh areas: mesh sub-mesh AFD (mesh sub-mesh 1) and mesh sub-mesh EBCF (mesh sub-mesh 2). Mesh sub-mesh AFD and mesh sub-mesh EBCF are adjacent and share two vertices, E and F. The computer device can spatially divide the rendering area corresponding to the video frame based on the shared vertices E and F in mesh sub-mesh AFD and mesh sub-mesh EBCF, resulting in two sub-regions: pyramid O-AEFD and pyramid O-EBCF. It can be understood that the real-time scene content within pyramid O-AEFD and pyramid O-EBCF constitutes the video sub-frame.
[0076] In the above embodiments, by using the common vertices in multiple mesh sub-faces to spatially divide the rendering area corresponding to the video frame, it can be ensured that subsequent seamless stitching can ultimately synthesize a complete image. Furthermore, by determining the real-time scene content in each of the divided sub-regions as video sub-frames, the accuracy of acquiring video sub-frames can be improved.
[0077] In one embodiment, the method further includes: modeling based on the physical dimensions of the virtual sensor and the number of rendering machines to obtain multiple mesh sub-patterns; wherein the number of mesh sub-patterns is consistent with the number of rendering machines; and the sum of the areas of the multiple mesh sub-patterns is consistent with the area of the virtual sensor.
[0078] It is understandable that the size of the mesh sub-patterns is obtained by dividing the physical size of the virtual sensor evenly.
[0079] In one embodiment, such as Figure 4 As shown, if the physical size of the virtual sensor is 23.76*13.365 and there are two rendering machines, the computer equipment can model two mesh sub-panels with physical sizes of 11.88*13.356 respectively. The computer equipment can synchronously render the video sub-pictures corresponding to these two mesh sub-panels using rendering machine 1 and rendering machine 2 respectively, to obtain rendering sub-picture 1 and rendering sub-picture 2.
[0080] In one embodiment, such as Figure 5 As shown, the computer device can pre-configure the mapping relationship between the network address of the renderer, the mesh sub-patch, and the viewport in the renderer. Specifically, the computer device can bind the network address 192.168.0.6 of renderer 1, the mesh sub-patch 1, and the viewport 1 in renderer 1. The computer device can bind the network address 192.168.0.7 of renderer 2, the mesh sub-patch 2, and the viewport 2 in renderer 2, so that the video sub-picture corresponding to mesh sub-patch 1 can be rendered through renderer 1, and the video sub-picture corresponding to mesh sub-patch 2 can be rendered through renderer 2.
[0081] In the above embodiments, by modeling the physical size of the virtual sensor and the number of rendering machines, multiple mesh sub-panels are obtained, which allows each rendering machine to be responsible for rendering a video sub-frame corresponding to a specific mesh sub-panel, thereby improving the rendering efficiency of the video sub-frames.
[0082] In one embodiment, the method further includes: determining the distance between the viewpoint and the mesh patch based on the focal length of the virtual camera in the rendering engine; and obtaining the relative position between the viewpoint and each vertex in the mesh patch based on the distance.
[0083] Specifically, the computer device can determine the focal length of the virtual camera and, based on the focal length of the virtual camera in the rendering engine, determine the distance between the viewpoint and the mesh surface. Then, based on this distance, the computer device can determine the relative position between the viewpoint and each vertex in the mesh surface.
[0084] In one embodiment, the computer device can calculate the focal length of the virtual camera in the rendering engine and use the calculated distance as the distance between the viewpoint and the mesh patch.
[0085] In one embodiment, the computer device can use the focal length of a virtual camera in the rendering engine directly as the distance between the viewpoint and the mesh patch.
[0086] In one embodiment, since the analog camera is simulated based on the display components for a virtual camera, the distance between the viewpoint and the grid patch in the analog camera is determined based on the focal length of the virtual camera. For example... Figure 6 As shown, the computer device can obtain the current focal length of the virtual camera and use this current focal length as the distance between the viewpoint and the grid patch in the simulated camera. It can be understood that once the focal length of the virtual camera changes, the distance between the viewpoint and the grid patch in the simulated camera will also change accordingly.
[0087] In the above embodiments, the distance between the viewpoint and the mesh is determined by the focal length of the virtual camera in the rendering engine, and the relative position between the viewpoint and each vertex in the mesh is obtained based on the distance. This can improve the accuracy of the relative position between the viewpoint and each vertex in the mesh, thereby determining a more accurate rendering area.
[0088] In one embodiment, the simulated camera is obtained through a display component; the display component is the parent of the viewpoint and the mesh; the method further includes: determining the current position of the virtual camera; assigning the current position of the virtual camera to the display component to obtain the current position of the simulated camera.
[0089] The display component is the component in the rendering engine used to render the screen.
[0090] Specifically, the computer device can simulate a virtual camera using a display component to obtain a simulated camera. The computer device can determine the current position of the virtual camera and assign that position to the display component to obtain the current position of the simulated camera.
[0091] In one embodiment, since the simulated camera is obtained by simulating the virtual camera based on the display components, the current position of the simulated camera in the 3D virtual scene is determined based on the current position of the virtual camera in the 3D virtual scene. For example... Figure 7 As shown, the computer device can obtain the current position of the virtual camera and use this obtained current position as the current position of the analog camera. It can be understood that once the position of the virtual camera in the 3D virtual scene changes, the position of the analog camera in the 3D virtual scene will also change accordingly.
[0092] In the above embodiments, by assigning the current position of the virtual camera to the display component, the current position of the simulated camera can be obtained, thereby enabling the simulated camera to simulate the movement of the virtual camera, thus determining a more accurate video frame.
[0093] In one embodiment, the plurality of rendering machines includes a master rendering machine and at least one slave rendering machine; the master rendering machine is equipped with a synchronization card; the plurality of video sub-frames are synchronously rendered by the plurality of pre-configured rendering machines to obtain rendering sub-frames corresponding to the plurality of video sub-frames, including: receiving a synchronization rendering signal generated by a synchronization signal generator based on a preset target frame rate through the synchronization card in the master rendering machine; synchronizing the synchronization rendering signal to the slave rendering machine through the synchronization card; and controlling the master rendering machine and the slave rendering machine to synchronously render the plurality of video sub-frames by the synchronization rendering signals received by the master rendering machine and the slave rendering machine respectively, to obtain rendering sub-frames corresponding to the plurality of video sub-frames respectively.
[0094] Among them, the synchronous rendering signal is a synchronization signal used to instruct multiple rendering machines to simultaneously render multiple video sub-frames.
[0095] Specifically, the multiple rendering machines include one master rendering machine and at least one slave rendering machine, wherein the master rendering machine is equipped with a synchronization card. The computer equipment also includes a synchronization signal generator, which generates a synchronization rendering signal based on a preset target frame rate. The computer equipment can receive the synchronization rendering signal generated by the synchronization signal generator based on the preset target frame rate through the synchronization card in the master rendering machine. The master rendering machine can synchronize the synchronization rendering signal to each slave rendering machine through the synchronization card. Furthermore, the computer equipment can control the master and slave rendering machines to synchronously render multiple video sub-frames using the synchronization rendering signals received by the master and slave rendering machines respectively, and the rendering commands sent by the master rendering machine, thereby obtaining the rendered sub-frames corresponding to each of the multiple video sub-frames. It should be noted that the synchronization signal generator is a phase synchronization signal generator. Multiple rendering machines can achieve phase-level time alignment based on the synchronization rendering signal.
[0096] In the above embodiments, the synchronization card in the main rendering machine receives the synchronization rendering signal generated by the synchronization signal generator based on a preset target frame rate, and synchronizes the synchronization rendering signal to the slave rendering machine through the synchronization card, so that each rendering machine can receive the same synchronization rendering signal. Furthermore, by using the synchronization rendering signals received by the main and slave rendering machines respectively, and the rendering commands sent by the main rendering machine, the main and slave rendering machines are controlled to synchronously render multiple video sub-frames, obtaining rendered sub-frames corresponding to each of the multiple video sub-frames. This avoids video tearing problems and further improves the quality of the final rendered video.
[0097] In one embodiment, rendering a sub-picture includes rendering sub-picture signals; combining the rendering sub-pictures corresponding to multiple video sub-pictures to obtain a rendering picture corresponding to a video frame includes: when the video signal acquisition card receives a synchronization acquisition signal generated by the synchronization signal generator, synchronously acquiring the rendering sub-picture signals corresponding to multiple video sub-pictures through the video signal acquisition card; and combining the synchronously acquired rendering sub-picture signals corresponding to multiple video sub-pictures to obtain a rendering picture corresponding to a video frame.
[0098] Among them, the synchronous acquisition signal is a synchronization signal used to instruct multiple video signal acquisition cards to synchronously acquire multiple rendering sub-screen signals.
[0099] Specifically, the rendering sub-picture includes the rendering sub-picture signal. A video signal acquisition card is also deployed in the computer equipment. A synchronization signal generator can generate a synchronization acquisition signal based on a preset target frame rate, and the video signal acquisition card can receive the synchronization acquisition signal generated by the synchronization signal generator. When the video signal acquisition card receives the synchronization acquisition signal generated by the synchronization signal generator, the computer equipment can synchronously acquire the rendering sub-picture signals corresponding to multiple video sub-pictures through the video signal acquisition card. Furthermore, the computer equipment can synthesize the rendering sub-picture signals corresponding to the synchronously acquired multiple video sub-pictures to obtain the rendered picture corresponding to the video frame.
[0100] In the above embodiments, when the video signal acquisition card receives the synchronous acquisition signal generated by the synchronous signal generator, the video signal acquisition card synchronously acquires the rendering sub-screen signals corresponding to multiple video sub-screens respectively, and synthesizes the rendering sub-screen signals corresponding to the multiple synchronously acquired video sub-screens to obtain the rendering screen corresponding to the video frame. In this way, by synchronously acquiring multiple rendering sub-screen signals and then synthesizing the synchronously acquired rendering sub-screen signals, the problem of video screen tearing can be further avoided, thereby further improving the quality of the final rendered video screen.
[0101] In one embodiment, the method further includes: if the signal format of the rendered sub-screen signal obtained by the master and slave rendering machines in synchronous rendering is inconsistent with the signal format specified by the video signal acquisition card, then after receiving the synchronization conversion signal through the format converter, the format converter is used to perform synchronous format conversion on the rendered sub-screen signals corresponding to the multiple video sub-screens respectively, so as to obtain the rendered sub-screen signal consistent with the signal format specified by the video signal acquisition card, for the video signal acquisition card to perform synchronous acquisition.
[0102] Among them, the synchronization conversion signal is a synchronization signal used to instruct multiple format converters to perform synchronized format conversion on multiple rendering sub-screen signals.
[0103] Specifically, the computer equipment also deploys multiple format converters, the number of which can be the same as the number of rendering machines. A synchronization signal generator produces a synchronization conversion signal based on a preset target frame rate, and the format converters can receive this synchronization conversion signal. If the signal format of the rendered sub-frame signal obtained from synchronous rendering by the master and slave rendering machines is inconsistent with the signal format specified by the video signal acquisition card, the computer equipment, after receiving the synchronization conversion signal through the format converter, can synchronously convert the format of the rendered sub-frame signals corresponding to multiple video sub-frames to obtain rendered sub-frame signals consistent with the signal format specified by the video signal acquisition card, for synchronous acquisition by the video signal acquisition card.
[0104] In one embodiment, the number of format converters is the same as the number of renderers, and each format converter is responsible for converting and processing the rendered sub-frame signals output by the corresponding renderer. The computer device can use the various format converters to synchronously convert the rendered sub-frame signals corresponding to multiple video sub-frames to obtain rendered sub-frame signals that are consistent with the signal format specified by the video signal acquisition card, so that the video signal acquisition card can perform synchronous acquisition.
[0105] In one embodiment, the signal format of the rendering sub-screen signals output by each rendering machine is HDMI (High Definition Multimedia Interface) format, and the signal format specified by the video signal acquisition card is SDI (Serial Digital Interface) format. Then, after receiving the synchronization conversion signal through the format converter, the computer device can synchronously convert the rendering sub-screen signals corresponding to the multiple HDMI format video sub-screens to obtain rendering sub-screen signals consistent with the SDI format specified by the video signal acquisition card, so that the video signal acquisition card can perform synchronous acquisition.
[0106] In one embodiment, the signal format of the rendering sub-screen signal output by each rendering machine is DP format, and the signal format specified by the video signal acquisition card is SDI format. Then, after receiving the synchronization conversion signal through the format converter, the computer device can use the format converter to synchronously convert the rendering sub-screen signals corresponding to the multiple DP (Display Port) format video sub-screens to obtain rendering sub-screen signals consistent with the SDI format specified by the video signal acquisition card, so that the video signal acquisition card can perform synchronous acquisition.
[0107] In the above embodiments, when the signal format of the rendered sub-picture signal obtained by the master and slave rendering machines synchronously is inconsistent with the signal format specified by the video signal acquisition card, after receiving the synchronization conversion signal through the format converter, the format converter synchronously converts the format of the rendered sub-picture signals corresponding to multiple video sub-pictures to obtain rendered sub-picture signals consistent with the signal format specified by the video signal acquisition card, so that the video signal acquisition card can perform synchronous acquisition. In this way, by synchronously converting the format of multiple rendered sub-picture signals, synchronously acquiring the synchronously converted rendered sub-picture signals, and then synthesizing the synchronously acquired rendered sub-picture signals, the problem of video tearing can be further avoided, thereby further improving the quality of the final rendered video.
[0108] In one embodiment, the video signal acquisition card is deployed on the image compositer; the image compositer also includes a composite video canvas; the compositer combines the rendering sub-image signals corresponding to the multiple synchronously acquired video sub-images to obtain the rendered image corresponding to the video frame image, including: setting the frame rate of the composite video canvas to a target frame rate; and using the composite video canvas that meets the target frame rate, synchronously combining the rendering sub-image signals corresponding to the multiple synchronously acquired video sub-images by the video signal acquisition card to obtain the rendered image corresponding to the video frame image.
[0109] Specifically, the computer equipment also includes a synthesizer, which houses a video signal acquisition card, synthesis software, and a composite video canvas created by the synthesis software. The computer equipment can set the frame rate of the composite video canvas to the same target frame rate as the synchronization signal generator. Furthermore, the computer equipment can synchronously synthesize the rendering sub-frame signals corresponding to multiple video sub-frames synchronously acquired by the video signal acquisition card using the composite video canvas that meets the target frame rate, thereby obtaining the rendered image corresponding to the video frame.
[0110] In the above embodiments, the frame rate of the composite video canvas is set to the same target frame rate as the synchronization signal generator. By using the composite video canvas that meets the target frame rate, the rendering sub-picture signals corresponding to multiple video sub-pictures synchronously acquired by the video signal acquisition card are synchronously synthesized to obtain the rendering picture corresponding to the video frame picture. This can further avoid the problem of video screen tearing and thus further improve the quality of the final rendered video picture.
[0111] In one embodiment, a synchronization signal generator can produce a synchronization signal. This synchronization signal, when received by a rendering machine, becomes a synchronized rendering signal. When received by a format converter, it becomes a synchronized conversion signal. When received by a video signal acquisition card, it becomes a synchronized acquisition signal. It should be noted that the synchronization signal generator is a phase synchronization signal generator. Multiple systems can achieve phase-level time alignment based on the received synchronization signal.
[0112] In one embodiment, such as Figure 8 As shown, the computer equipment integrates a synchronization signal generator, two renderers (Renderer 1 and Renderer 2), two format converters (Format Converter 1 and Format Converter 2), and a synthesizer with a video signal acquisition card. Renderer 1 integrates a synchronization card. The synchronization signal generator can generate synchronization rendering signals, synchronization conversion signals, and synchronization acquisition signals. Multiple video sub-pictures are specifically represented by two video sub-pictures. Renderer 1 can receive the synchronization rendering signal generated by the synchronization signal generator through the synchronization card and synchronize the synchronization rendering signal to Renderer 2. Using the synchronization rendering signals received by Renderer 1 and Renderer 2 respectively, Renderer 1 and Renderer 2 are controlled to synchronously render the two video sub-pictures, obtaining the corresponding rendering sub-picture signals for each of the two video sub-pictures. If the signal format of the rendering sub-picture signal obtained by Renderer 1 and Renderer 2 synchronously renders the signal from Renderer 1, and Format Converter 2 renders the signal from Renderer 2, respectively, to obtain a rendering sub-picture signal consistent with the signal format specified by the video signal acquisition card. When the video signal acquisition card receives the synchronous acquisition signal generated by the synchronous signal generator, it synchronously acquires the rendering sub-screen signals corresponding to the two video sub-screens mentioned above, and then combines the synchronously acquired rendering sub-screen signals corresponding to the two video sub-screens to obtain the rendered screen corresponding to the video frame. It can be understood that the output rendered screen can be applied to multiple business scenarios.
[0113] In one embodiment, such as Figure 9As shown, the computer device determines the rendering area based on the relative positions of the viewpoint in the simulated camera and the vertices in the mesh. Based on the current position of the simulated camera, it determines the real-time video frames to be rendered within the rendering area. For each video frame, the computer device spatially divides the video frame into N sub-frames based on the mesh. The computer device can synchronously render these N sub-frames using N pre-set rendering machines, obtaining the rendered sub-frames corresponding to each of the N video sub-frames. Furthermore, the computer device can composite the rendered sub-frames corresponding to the N video sub-frames using a compositer to obtain the rendered image corresponding to the video frame. Here, N is a constant greater than 2.
[0114] In one embodiment, the video frame includes a real-time image of a virtual object; the video sub-image includes a real-time sub-image; determining the real-time video frame to be rendered within the rendering area based on the current position of the analog camera includes: in a real-time rendering scene of a virtual object, determining the real-time image of the virtual object to be rendered within the rendering area based on the current position of the analog camera; and compositing the rendering sub-images corresponding to multiple video sub-images to obtain the rendering image corresponding to the video frame includes: compositing the rendering sub-images corresponding to multiple real-time sub-images to obtain the rendering image corresponding to the real-time image of the virtual object.
[0115] Among them, the real-time virtual object frame is the video frame determined in the real-time rendering scene of the virtual object. The real-time sub-frame is the video frame obtained after spatially dividing the real-time virtual object frame into regions. The virtual object is a virtual entity object, which may include at least one of virtual characters, virtual animals, and virtual objects.
[0116] Specifically, the computer device can determine the rendering area based on the relative positions of the viewpoint in the simulated camera and the vertices in the mesh. In a real-time rendering scenario of virtual objects, the computer device can determine the real-time image of the virtual object to be rendered within the rendering area based on the current position of the simulated camera. For each real-time image of a virtual object, the computer device can spatially divide the real-time image of the virtual object into multiple real-time sub-images based on the mesh, and simultaneously render these multiple real-time sub-images using multiple pre-set rendering machines to obtain the rendered sub-images corresponding to each real-time sub-image. Furthermore, the computer device can composite the rendered sub-images corresponding to the multiple real-time sub-images to obtain the rendered image corresponding to the real-time image of the virtual object.
[0117] In the above embodiments, in a real-time rendering scenario for virtual objects, the real-time image of the virtual object to be rendered within the rendering area is determined by simulating the current position of the camera, which can improve the accuracy of acquiring the real-time image of the virtual object. By compositing the rendering sub-images corresponding to multiple real-time sub-images respectively, the rendered image corresponding to the real-time image of the virtual object can be obtained, which can improve the rendering instructions in a real-time rendering scenario for virtual objects.
[0118] In one embodiment, such as Figure 10 As shown, both scenes (a) and (b) contain numerous complex scene elements, such as lights and hair. Rendering scenes (a) and (b) using a single renderer would place a heavy burden on the renderer. Therefore, the video rendering method of this application determines the rendering area based on the relative positions of the viewpoint in the simulated camera and the vertices in the mesh. Based on the current position of the simulated camera, the real-time video frames to be rendered within the rendering area are determined. Since the simulated camera is a simulation of a virtual camera in the rendering engine, and the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera and can be used for image splitting, for each video frame, the video frame is spatially split into multiple video sub-frames based on the mesh. Multiple pre-set renderers synchronously render these multiple video sub-frames, resulting in rendered sub-frames corresponding to each video sub-frame. These rendered sub-frames are then combined to obtain the rendered image corresponding to the video frame. Compared to traditional offline rendering methods, this application uses a mesh pattern constructed based on the physical dimensions of the virtual sensors in a virtual camera to spatially divide the video frame into regions. Multiple rendering machines then synchronously render the divided sub-frames, distributing the rendering load across multiple rendering machines. This approach can obtain high-quality real-time video images, meeting the needs of real-time video rendering scenarios.
[0119] like Figure 11 As shown, in one embodiment, a video rendering method is provided. This method can be applied to a computer device, which can be a terminal or a server. The method can be executed independently by the terminal or server, or it can be implemented through interaction between the terminal and the server. This embodiment uses the application of this method to a computer device as an example for illustration. The method specifically includes the following steps:
[0120] Step 1102: Model the virtual sensor based on its physical dimensions and the number of rendering machines to obtain multiple mesh sub-patterns; the number of mesh sub-patterns is consistent with the number of rendering machines; and the sum of the areas of the multiple mesh sub-patterns is consistent with the area of the virtual sensor.
[0121] Step 1104: Determine the distance between the viewpoint and multiple mesh sub-faces based on the focal length of the virtual camera in the rendering engine.
[0122] Step 1106: Based on the distance, obtain the relative positions between the viewpoint and each vertex in the multiple mesh sub-patterns.
[0123] Step 1108: Determine the rendering area based on the relative position between the viewpoint in the simulated camera and each vertex in each mesh sub-face; the simulated camera is obtained by the display component simulating the virtual camera in the rendering engine.
[0124] Step 1110: Determine the current position of the virtual camera, assign the current position of the virtual camera to the display component, and obtain the current position of the simulated camera.
[0125] Step 1112: Based on the current position of the simulated camera, determine the real-time scene content located within the rendering area of the 3D virtual scene, and obtain the real-time video frame image to be rendered.
[0126] Step 1114: For each video frame, based on the common vertices in multiple mesh sub-panels, the rendering area corresponding to the video frame is spatially divided, and the real-time scene content in each sub-region after the division is determined as the video sub-frame.
[0127] Step 1116: Receive the synchronous rendering signal generated by the synchronization signal generator based on the preset target frame rate through the synchronization card in the main rendering machine.
[0128] Step 1118: Synchronize the synchronous rendering signal to each slave renderer via the synchronization card.
[0129] Step 1120: Using the synchronous rendering signals received by the main rendering machine and each of the slave rendering machines, control the main rendering machine and the slave rendering machines to synchronously render multiple video sub-pictures, thereby obtaining the rendered sub-pictures corresponding to the multiple video sub-pictures.
[0130] Step 1122: Combine the rendered sub-pictures corresponding to the multiple video sub-pictures to obtain the rendered picture corresponding to the video frame picture.
[0131] This application also provides an application scenario in which the above-described video rendering method is applied. Specifically, this video rendering method can be applied to a video rendering scenario for live streaming of virtual objects. The computer device can model the virtual sensor based on its physical dimensions and the number of rendering machines, resulting in multiple mesh sub-patterns; wherein the number of mesh sub-patterns is consistent with the number of rendering machines; and the sum of the areas of the multiple mesh sub-patterns is consistent with the area of the virtual sensor. The distance between the viewpoint and the multiple mesh sub-patterns is determined based on the focal length of the virtual camera in the rendering engine. Based on the distance, the relative position between the viewpoint and each vertex in the multiple mesh sub-patterns is obtained. The rendering area is determined based on the relative position between the viewpoint in the simulated camera and each vertex in each mesh sub-pattern; the simulated camera is obtained by the display component simulating the virtual camera in the rendering engine. The current position of the virtual camera is determined and assigned to the display component to obtain the current position of the simulated camera. Based on the current position of the simulated camera, the real-time scene content within the rendering area in the 3D virtual scene is determined, resulting in the real-time live stream of the virtual object to be rendered.
[0132] For each virtual object live stream frame, the computer device can spatially divide the rendering area corresponding to the virtual object live stream frame based on the common vertices in multiple mesh sub-patterns, and determine the real-time scene content in each sub-region as the live stream sub-frame. The main renderer receives the synchronization rendering signal generated by the synchronization signal generator based on a preset target frame rate via the synchronization card. The synchronization rendering signal is then synchronized to each slave renderer via the synchronization card. Using the synchronization rendering signals received by the main renderer and each slave renderer, the main renderer and slave renderers are controlled to synchronously render multiple live stream sub-frames, obtaining rendered sub-frames corresponding to each live stream sub-frame. These rendered sub-frames are then combined to obtain the rendered frame corresponding to the virtual object live stream frame. This application, by constructing mesh patches based on the physical dimensions of the virtual sensors in the virtual camera, spatially divides the virtual object live stream frame into regions, and synchronously renders the divided live stream sub-frames using multiple renderers, thus obtaining high-quality real-time virtual object live stream frames, meeting the requirements of real-time virtual object live stream rendering scenarios.
[0133] This application also provides another application scenario where the aforementioned video rendering method is applied. Specifically, this video rendering method can be applied to video rendering scenarios for XR (Extended Reality) live streaming. Extended Reality (XR) refers to the combination of reality and virtuality through computers to create an interactive virtual environment, providing users with an immersive experience that seamlessly transitions between the virtual and real worlds. Using the video rendering method of this application, a mesh pattern constructed based on the physical dimensions of the virtual sensors in the virtual camera is used to spatially divide the extended reality live stream into regions. Multiple rendering machines then synchronously render the divided live stream sub-images, resulting in high-quality, real-time extended reality live stream images, thus meeting the requirements of real-time extended reality live stream rendering scenarios.
[0134] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially, these steps are not necessarily executed in that order. Unless otherwise expressly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the above embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0135] In one embodiment, such as Figure 12 As shown, a video rendering device 1200 is provided. This device can be a software module, a hardware module, or a combination of both, integrated into a computer device. Specifically, the device includes:
[0136] The determination module 1202 is used to determine the rendering area based on the relative position between the viewpoint in the simulated camera and each vertex in the mesh; and to determine the real-time video frame to be rendered within the rendering area based on the current position of the simulated camera; the simulated camera is obtained by simulating a virtual camera in the rendering engine; the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera;
[0137] The splitting module 1204 is used to split the video frame into multiple video sub-frames in space based on the grid area for each video frame.
[0138] The rendering module 1206 is used to synchronously render multiple video sub-frames using multiple pre-set rendering machines to obtain the rendered sub-frames corresponding to the multiple video sub-frames respectively.
[0139] The compositing module 1208 is used to compose the rendered sub-pictures corresponding to multiple video sub-pictures to obtain the rendered picture corresponding to the video frame picture.
[0140] In one embodiment, the current position of the analog camera is determined based on the current position of the virtual camera in the three-dimensional virtual scene; the determining module 1202 is also used to determine the real-time scene content located within the rendering area in the three-dimensional virtual scene based on the current position of the analog camera, and obtain the real-time video frame image to be rendered.
[0141] In one embodiment, the mesh patch includes multiple mesh sub-patterns; the coordinates of the common vertices of two adjacent mesh sub-patterns are the same; the splitting module 1204 is further configured to, for each video frame, split the rendering area corresponding to the video frame in space according to the common vertices in the multiple mesh sub-patterns, and determine the real-time scene content in each of the split sub-regions as the video sub-frame.
[0142] In one embodiment, the apparatus further includes:
[0143] The building module is used to model the virtual sensor based on its physical dimensions and the number of rendering machines, resulting in multiple mesh sub-patterns. The number of mesh sub-patterns is the same as the number of rendering machines, and the sum of the areas of the multiple mesh sub-patterns is the same as the area of the virtual sensor.
[0144] In one embodiment, the determining module 1202 is further configured to determine the distance between the viewpoint and the mesh patch based on the focal length of the virtual camera in the rendering engine; and obtain the relative position between the viewpoint and each vertex in the mesh patch based on the distance.
[0145] In one embodiment, the simulated camera is obtained through a display component; the display component is the parent of the viewpoint and the mesh; the determination module 1202 is also used to determine the current position of the virtual camera; and assign the current position of the virtual camera to the display component to obtain the current position of the simulated camera.
[0146] In one embodiment, the plurality of rendering machines includes a master rendering machine and at least one slave rendering machine; the master rendering machine is equipped with a synchronization card; the rendering module 1206 is further configured to receive a synchronization rendering signal generated by a synchronization signal generator based on a preset target frame rate through the synchronization card in the master rendering machine; synchronize the synchronization rendering signal to the slave rendering machine through the synchronization card; and control the master rendering machine and the slave rendering machine to synchronously render the plurality of video sub-pictures respectively through the synchronization rendering signals received by the master rendering machine and the slave rendering machine, so as to obtain the rendering sub-pictures corresponding to the plurality of video sub-pictures respectively.
[0147] In one embodiment, the rendering sub-picture includes a rendering sub-picture signal; the compositing module 1208 is further configured to, when the video signal acquisition card receives the synchronous acquisition signal generated by the synchronous signal generator, synchronously acquire the rendering sub-picture signals corresponding to multiple video sub-pictures through the video signal acquisition card; and synthesize the rendering sub-picture signals corresponding to the synchronously acquired multiple video sub-pictures to obtain the rendering picture corresponding to the video frame picture.
[0148] In one embodiment, the apparatus further includes:
[0149] The conversion module is used to convert the rendering sub-screen signals corresponding to multiple video sub-screens into the same format as the signal format specified by the video signal acquisition card when the signal format of the rendering sub-screen signals obtained by the master and slave rendering machines is inconsistent with the signal format specified by the video signal acquisition card. This allows the video signal acquisition card to perform synchronous acquisition.
[0150] In one embodiment, the video signal acquisition card is deployed on the image compositer; the image compositer also includes a composite video canvas; the composite module 1208 is further used to set the frame rate of the composite video canvas to a target frame rate; by using the composite video canvas that meets the target frame rate, the rendering sub-picture signals corresponding to the multiple video sub-pictures synchronously acquired by the video signal acquisition card are synchronously composited to obtain the rendering picture corresponding to the video frame picture.
[0151] In one embodiment, the video frame includes a real-time image of a virtual object; the video sub-image includes a real-time sub-image; the determining module 1202 is further configured to determine the real-time image of the virtual object to be rendered within the rendering area based on the current position of the analog camera in the real-time rendering scene of the virtual object; the compositing module 1208 is further configured to compose the rendering sub-images corresponding to the multiple real-time sub-images respectively to obtain the rendering image corresponding to the real-time image of the virtual object.
[0152] The aforementioned video rendering device determines the rendering area based on the relative positions between the viewpoint in the simulated camera and the vertices in the mesh area. Based on the current position of the simulated camera, it determines the real-time video frames to be rendered within the rendering area. Since the simulated camera is a virtual camera simulated within the rendering engine, and the mesh area is constructed based on the physical dimensions of the virtual sensor in the virtual camera and can be used for image splitting, for each video frame, the video frame is spatially divided into multiple video sub-frames based on the mesh area. Multiple pre-set rendering machines synchronously render these multiple video sub-frames, resulting in rendered sub-frames corresponding to each video sub-frame. These rendered sub-frames are then combined to obtain the rendered image corresponding to the video frame. Compared to traditional offline rendering methods, this application, by constructing a mesh area based on the physical dimensions of the virtual sensor in the virtual camera to spatially split the video frame and synchronously rendering the split sub-frames using multiple rendering machines, can obtain high-quality real-time video images, meeting the needs of real-time video rendering scenarios.
[0153] Each module in the aforementioned video rendering device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0154] In one embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 13 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a video rendering method.
[0155] Those skilled in the art will understand that Figure 13The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0156] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0157] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0158] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0160] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0161] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method of video picture rendering, characterized by, The method includes: The rendering area is determined based on the relative positions between the viewpoint in the simulated camera and each vertex in the mesh; the simulated camera is obtained by simulating a virtual camera in the rendering engine; the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera; Based on the current position of the simulated camera, determine the real-time video frame to be rendered within the rendering area; For each video frame, the video frame is spatially divided into regions based on the grid patches to obtain multiple video sub-frames; By using multiple pre-set rendering machines, the multiple video sub-frames are rendered synchronously to obtain the rendered sub-frames corresponding to the multiple video sub-frames respectively; The rendered sub-pictures corresponding to the multiple video sub-pictures are combined to obtain the rendered picture corresponding to the video frame picture.
2. The method of claim 1, wherein, The current position of the simulated camera is determined based on the current position of the virtual camera in the three-dimensional virtual scene; The step of determining the real-time video frame to be rendered within the rendering area based on the current position of the simulated camera includes: Based on the current position of the simulated camera, the real-time scene content located within the rendering area in the three-dimensional virtual scene is determined, and the real-time video frame to be rendered is obtained.
3. The method of claim 2, wherein, The mesh patch includes multiple mesh sub-patterns; the coordinates of the common vertices of two adjacent mesh sub-patterns are the same; For each video frame, the video frame is spatially divided into regions based on the grid patches to obtain multiple video sub-frames, including: For each video frame, the rendering area corresponding to the video frame is spatially divided according to the common vertices in the multiple mesh sub-panels, and the real-time scene content in each sub-region after the division is determined as the video sub-frame.
4. The method of claim 3, wherein, The method further includes: Modeling is performed based on the physical dimensions of the virtual sensor and the number of rendering machines to obtain the multiple mesh sub-patterns; The number of mesh sub-patterns is the same as the number of rendering machines; the sum of the areas of the multiple mesh sub-patterns is the same as the area of the virtual sensor.
5. The method of claim 2, wherein, The method further includes: The distance between the viewpoint and the mesh is determined based on the focal length of the virtual camera in the rendering engine. Based on the distance, the relative positions between the viewpoint and each vertex in the mesh are obtained.
6. The method according to claim 1, characterized in that, The simulated camera is obtained through a display component; the display component is the parent of the viewpoint and the mesh; the method further includes: Determine the current position of the virtual camera; The current position of the virtual camera is assigned to the display component to obtain the current position of the simulated camera.
7. The method according to claim 1, characterized in that, The plurality of rendering machines includes one master rendering machine and at least one slave rendering machine; the master rendering machine is equipped with a synchronization card; The step of synchronously rendering the multiple video sub-frames using multiple pre-set rendering machines to obtain rendered sub-frames corresponding to each of the multiple video sub-frames includes: The main rendering machine receives a synchronous rendering signal generated by a synchronous signal generator based on a preset target frame rate via a synchronization card. The synchronization rendering signal is synchronized to the slave rendering machine via the synchronization card; By receiving synchronous rendering signals from the main renderer and the slave renderer respectively, the main renderer and the slave renderer are controlled to synchronously render the multiple video sub-pictures to obtain the rendered sub-pictures corresponding to the multiple video sub-pictures respectively.
8. The method according to claim 7, characterized in that, The rendered sub-picture includes a rendered sub-picture signal; the step of combining the rendered sub-pictures corresponding to the plurality of video sub-pictures to obtain the rendered picture corresponding to the video frame includes: When the video signal acquisition card receives the synchronous acquisition signal generated by the synchronous signal generator, the video signal acquisition card synchronously acquires the rendering sub-screen signals corresponding to the multiple video sub-screens respectively. The rendered sub-screen signals corresponding to the multiple video sub-screens acquired synchronously are combined to obtain the rendered screen corresponding to the video frame.
9. The method according to claim 8, characterized in that, The method further includes: If the signal format of the rendered sub-screen signal obtained by the master-slave rendering machine is inconsistent with the signal format specified by the video signal acquisition card, then after receiving the synchronization conversion signal through the format converter, the format converter performs synchronous format conversion on the rendered sub-screen signals corresponding to the multiple video sub-screens respectively, so as to obtain the rendered sub-screen signal consistent with the signal format specified by the video signal acquisition card, for the video signal acquisition card to perform synchronous acquisition.
10. The method according to claim 8, characterized in that, The video signal acquisition card is deployed on the video compositer; the video compositer also includes a composite video canvas; The step of synthesizing the rendering sub-frame signals corresponding to the multiple synchronously acquired video sub-frames to obtain the rendering frame corresponding to the video frame includes: Set the frame rate of the synthesized video canvas to the target frame rate; By using the composite video canvas that meets the target frame rate, the rendering sub-screen signals corresponding to the multiple video sub-screens synchronously acquired by the video signal acquisition card are synchronously synthesized to obtain the rendering screen corresponding to the video frame.
11. The method according to any one of claims 1 to 10, characterized in that, The video frame includes a real-time view of the virtual object; the video sub-view includes a real-time sub-view. The step of determining the real-time video frame to be rendered within the rendering area based on the current position of the simulated camera includes: In a real-time rendering scenario of virtual objects, the real-time image of the virtual object to be rendered within the rendering area is determined based on the current position of the simulated camera. The step of combining the rendered sub-pictures corresponding to the plurality of video sub-pictures to obtain the rendered picture corresponding to the video frame includes: The rendering sub-screens corresponding to the multiple real-time sub-screens are combined to obtain the rendering screen corresponding to the real-time screen of the virtual object.
12. A video image rendering device, characterized in that, The device includes: The determination module is used to determine the rendering area based on the relative position between the viewpoint in the simulated camera and each vertex in the mesh; and to determine the real-time video frame to be rendered within the rendering area based on the current position of the simulated camera; the simulated camera is obtained by simulating a virtual camera in the rendering engine; the mesh is constructed based on the physical dimensions of the virtual sensor in the virtual camera; The splitting module is used to spatially split each video frame into multiple video sub-frames based on the grid patches. The rendering module is used to synchronously render the multiple video sub-frames using multiple pre-set rendering machines to obtain the rendered sub-frames corresponding to the multiple video sub-frames respectively. The compositing module is used to compose the rendered sub-pictures corresponding to the multiple video sub-pictures to obtain the rendered picture corresponding to the video frame picture.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.