Rendering method and corresponding device
By restoring multi-directional color values in large-scale real scenes and using compressed texture information, combined with spherical uniform sampling and texture compression technology, the problem of rendering efficiency and quality in the existing technology is solved, and efficient and realistic rendering effects are achieved.
Patent Information
- Application Number
- PCT/CN2024/083162
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-30
- Filing Date
- 2024-03-22
- Publication Date
- 2024-10-03
AI Technical Summary
In high-fidelity real-time rendering of large-scale real scenes, it is difficult for existing technologies to balance rendering efficiency and quality. The mesh texture optimization method has high rendering efficiency but insufficient quality, while the neural radiation field method has a slow rendering speed.
By obtaining the user's perspective, the color value in multiple directions is restored for each pixel, using compressed texture information for rendering, using the traditional rendering pipeline for rendering, and combining spherical uniform sampling and texture compression technology to reduce storage requirements and improve rendering. speed.
It achieves high-quality, highly realistic real-time rendering of large-scale scenes in a small storage space, improving rendering speed and efficiency.
Smart Images

Figure CN2024083162_03102024_PF_FP_ABST
Abstract
Description
Rendering method and corresponding device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 30, 2023, with application number 202310375539.4 and invention name “A rendering method and corresponding device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of image processing technology, and in particular to a rendering method and corresponding device. Background Art
[0003] Currently, mesh texture optimization methods and neural radiance field (NeRF) methods are commonly used for high-fidelity real-time rendering of large-scale real scenes.
[0004] Among them, the mesh texture optimization method, based on the standard graphics rendering pipeline, has a clear advantage in rendering efficiency, but it has difficulty guaranteeing rendering quality. The neural radiance field method, on the other hand, can achieve more realistic new perspective rendering effects through high-precision representation of the scene, but the rendering speed is slower.
[0005] Therefore, how to achieve real-time rendering while ensuring high realism has become an urgent problem to be solved.
[0006] Summary of the Invention
[0007] This application provides a rendering method for achieving high-fidelity real-time rendering. This application also provides corresponding devices, systems, computer-readable storage media, and computer program products.
[0008] A first aspect of the present application provides a rendering method, comprising: obtaining the perspective of a user browsing a target scene; for each pixel in a first image, restoring the color value of each pixel in each of P corresponding directions based on compressed texture information; wherein the first image is an image to be rendered corresponding to the target scene of the perspective, the P directions corresponding to each pixel are directions for sampling color values from a radiation field model of the target scene, P is an integer greater than 1, and the compressed texture information includes compressed information of the color values in the P directions corresponding to each pixel; rendering the first image according to the color value of each pixel in each of the P directions corresponding to each pixel in the first image to obtain a rendered second image.
[0009] The rendering method provided in this application can be applied to the rendering of large-scale real scenes, such as three-dimensional maps or other industrial applications. The rendering process can be executed on the cloud side or on the end side. When executed on the cloud side, one method can be: the cloud side can obtain the user's viewing angle of the target scene from the end side, and after rendering the second image, transmit the second image back to the end side for display. Another method can be: the cloud side renders according to the user's viewing angle of the target scene pre-set by the developer.
[0010] In this application, the target scene can be a city, island, or village that can be viewed on a 3D map. Of course, the target scene can also be an industrial application scene such as equipment in a factory or shelves in a warehouse. This application does not limit the target scene; any scene that requires rendering can use the rendering solution provided by this application.
[0011] In this application, perspective may include position and direction. Perspective refers to the perspective provided by a user or a virtual camera. The perspective can be provided by an input device such as a mouse, keyboard, screen, or virtual reality (VR) / augmented reality (AR) device, or can be obtained through inertial measurement unit (IMU) positioning.
[0012] In the present application, the first image and the second image are both images of the target scene that can be seen from the viewing angle. The difference is that the first image is an unrendered image, and the second image is a rendered image.
[0013] In this application, the radiation field model of the target scene refers to the radiation field model obtained through the point cloud and image of the target scene. The radiation field model is a function of the three-dimensional coordinate points, direction, color, transparency and other information of the target scene in space.
[0014] In this application, texture refers to color values. The brightness of pixels on an image corresponding to different viewing angles is usually different, so even pixels at the same location may have different corresponding color values at different viewing angles.
[0015] From the first aspect, it can be seen that when the texture of the target scene is sampled, the color values of each pixel in multiple directions will be obtained from the radiation field model of the target scene. This can retain more light field information, which is conducive to subsequent high-quality and high-fidelity rendering. In addition, in the solution provided by this application, compressed texture information is saved, and the color values of the pixels of the corresponding perspective are restored when needed. This can reduce storage requirements. Moreover, when rendering, it is only necessary to render according to the color value, and the traditional rendering pipeline can be used for rendering, which greatly improves the rendering speed. From the above, it can be seen that the solution provided by this application can achieve high-fidelity real-time rendering of large-scale scenes with a smaller storage space.
[0016] In one possible implementation, the P directions corresponding to each pixel point are the directions closest to the first direction determined from the M directions, the M directions are the directions for texture sampling of the radiation field model of the target scene determined by spherical uniform sampling, the first direction is the direction from the position of the viewing angle to the three-dimensional coordinate point corresponding to each pixel point, M>P, and M is an integer.
[0017] In this possible implementation, spherical uniform sampling refers to uniformly determining multiple directions for texture sampling on the spherical surface, such as 64 directions, or more or fewer directions. The first direction is the direction from the three-dimensional coordinate point in space corresponding to the pixel point on the first image to the position of the viewing angle, which can also be understood as the direction from the position of the viewing angle to the three-dimensional coordinate point. The closest direction refers to the P direction with the smallest angle with the first direction among the M directions. The smallest angle in this application refers to the P angles ranked in the top P in order of angles from small to large. The meaning of the closest is not limited to the one with the greatest degree of proximity, but can also be the top P angles ranked in order of proximity from large to small. In this application, the P directions are the directions closest to the first direction. In this way, for the corresponding pixel point, the color values of the P directions are the closest to the color value of the pixel point, which can improve the accuracy of rendering the pixel point.
[0018] In one possible implementation, each of the M directions corresponds to a sampled texture map, and the sampled texture map is used to represent the color values of N texture pixels in the corresponding direction, where N is an integer greater than 1.
[0019] In this possible implementation, pixels on a texture sampling map are called texels. Texture sampling can be performed in M directions for the target scene. Each direction corresponds to a sampled texture map that records the color value of each sampled pixel. The M sampled texture maps all have the same number of texels and are arranged in the same position.
[0020] In one possible implementation, the compressed texture information includes a standard texture map, K compressed feature texture maps, and a weight matrix corresponding to the K feature texture maps; the standard texture map, the K feature texture maps, and the weight matrix corresponding to the K feature texture maps are obtained through M sampled texture maps, K is a positive integer, and (1+K)<M.
[0021] In this possible implementation, the standard texture image is the one that retains the most complete color information, and can be thought of as a color texture image. The feature texture image is a compressed texture image, and can be thought of as a texture image that only retains some grayscale information. Processing M sampled texture images into one standard texture image and K feature texture images can reduce storage space requirements and facilitate subsequent rendering.
[0022] In one possible implementation, the color value of each texture pixel in the standard texture image is obtained by averaging the color values of texture pixels at the same position in M sampled texture images.
[0023] In this possible implementation, a standard texture map is obtained by averaging the color values of texture pixels at the same position in M sampled texture maps, which can retain the most complete color information and facilitate subsequent high-quality rendering.
[0024] In one possible implementation, the weight matrices corresponding to the K feature texture maps and the K texture maps are obtained by dimensionality reduction compression of an M*N matrix, where the M*N matrix is the color value of each texture pixel in the M sampled texture maps minus the color value of the texture pixel at the same position in the standard texture map.
[0025] In this possible implementation, M sampled texture images are subtracted from the standard texture image, and then the M*N matrix obtained by the subtraction is subjected to dimensionality reduction compression (also known as low-rank compression), which can reduce the amount of data and help save storage space.
[0026] In one possible implementation, the color value of each pixel in each of the P directions is obtained by multiplying the weight matrix corresponding to the K feature texture images and the K*N matrix formed by the N texture pixels on each feature texture image, and then adding it to the 1*N matrix corresponding to the standard texture image.
[0027] In this possible implementation, the color value of each pixel in each of the P directions during sampling can be restored through K feature texture maps, the corresponding weight matrix, and the standard texture map. In this way, this information is in a compressed state when not in use, and the corresponding color value can be restored when used, which does not take up too much storage space and can also achieve high-quality rendering.
[0028] In one possible implementation, the second image is obtained by rendering the first image based on the color value of each pixel in the first image in its corresponding first direction, and the color value of each pixel in its corresponding first direction is obtained by interpolating the color value of each pixel in each of the P corresponding directions.
[0029] In this possible implementation, because the brightness and other information of the same position at different viewing angles may be different, the color values of the same position at different viewing angles may be different. Therefore, when rendering the image, color values are obtained from multiple directions closest to the first direction, and then the color value of the first direction is determined. This can obtain a high-fidelity image that is more consistent with the viewing angle, which is conducive to improving the rendering quality.
[0030] In one possible implementation, different positions of the second image are rendered using textures at different levels, where the textures at different levels are obtained by downsampling a standard texture map and K feature texture maps to different degrees of sparsity.
[0031] In this possible implementation, when looking at different positions of the target scene from the same perspective, some positions may be relatively clear, while some positions may be relatively blurry, so different positions have different importance during rendering. In this way, different positions can be rendered according to different levels of textures, which can improve rendering efficiency.
[0032] In a possible implementation, the M sampling texture maps corresponding to the M directions are obtained by performing texture sampling on the radiation field model of the target scene according to the two-dimensional texture pixel map.
[0033] In one possible implementation, the two-dimensional texture pixel map is obtained by UV parameterizing the three-dimensional grid of the radiation field model.
[0034] In this possible implementation, the radiation field model of the target scene can be gridded. In this way, the radiation field model of the target scene will correspond to a three-dimensional grid. The three-dimensional grid indicates the position of the coordinate points of the target scene in the three-dimensional space. The three-dimensional grid is UV parameterized to obtain a two-dimensional texture pixel map. The two-dimensional texture pixel map will include N texture pixel points. Then, for these texture pixel points, the radiation field model of the target scene is texture sampled from different directions in M directions to obtain M sampled texture maps.
[0035] A second aspect of the present application provides a rendering device that implements the rendering method of the first aspect or any possible implementation of the first aspect. This functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the aforementioned functionality, such as an acquisition unit, a processing unit, and a rendering unit.
[0036] The third aspect of the present application provides an electronic device, including a communication interface, a processor and a memory, wherein the communication interface and the processor are coupled to the memory, and the memory is used to store programs or instructions. When the programs or instructions are executed by the processor, the electronic device executes the method as described in the first aspect or any possible implementation of the first aspect.
[0037] In the present application, the processor may include at least one of a central processing unit (CPU) and a graphics processing unit (GPU); wherein both the CPU and the GPU may execute the image rendering process described in the above-mentioned first aspect or any possible implementation of the first aspect, or the CPU and the GPU cooperate to execute the image rendering process described in the above-mentioned first aspect or any possible implementation of the first aspect.
[0038] In a fourth aspect, the present application provides a chip system comprising one or more interface circuits and one or more processors; the interface circuits and the processors are interconnected by lines; the interface circuits are used to receive signals from a memory of an electronic device and send signals to the processor, the signals comprising computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes a method as described in the first aspect or any possible implementation of the first aspect, wherein the processor is at least one of a CPU and a GPU.
[0039] In a fifth aspect, the present application provides a computer-readable storage medium having instructions stored therein. When the instructions are executed on an electronic device, the electronic device executes a method as described in the first aspect or any possible implementation of the first aspect.
[0040] In a sixth aspect, the present application provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the method of the first aspect or any possible implementation of the first aspect.
[0041] In a seventh aspect, the present application provides a rendering system, including a cloud-side device and an end-side device, wherein the end-side device is used to send the user's perspective of browsing the target scene to the cloud-side device; the cloud-side device is used to execute the method of the above-mentioned first aspect or any possible implementation method of the first aspect; the end-side device is used to receive a second image returned by the cloud-side device and display the second image.
[0042] In an eighth aspect, the present application provides a rendering system, including: an electronic device, the electronic device is used to execute the method of the above-mentioned first aspect or any possible implementation method of the first aspect, and the electronic device is a cloud-side device or a terminal-side device.
[0043] The relevant features and effects of the second to eighth aspects of this application can be understood by referring to the corresponding introduction in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] FIG1A is a schematic diagram of an architecture of a rendering system provided by an embodiment of the present application;
[0045] FIG1B is another schematic diagram of the architecture of the rendering system provided in an embodiment of the present application;
[0046] FIG1C is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0047] FIG2 is a schematic diagram of an embodiment of a rendering method provided in an embodiment of the present application;
[0048] FIG3 is a schematic diagram of another embodiment of the rendering method provided in an embodiment of the present application;
[0049] FIG4A is a schematic diagram illustrating an example of initializing a radiation field model provided by an embodiment of the present application;
[0050] FIG4B is a schematic diagram of an example of a three-dimensional grid model provided in an embodiment of the present application;
[0051] FIG4C is a schematic diagram illustrating an example of UV parameterization provided in an embodiment of the present application;
[0052] FIG4D is a schematic diagram illustrating an example of a sampling direction provided in an embodiment of the present application;
[0053] FIG4E is a schematic diagram of an example of texture compression provided by an embodiment of the present application;
[0054] 5A to 5C are comparative diagrams of the effects provided by the embodiments of the present application;
[0055] FIG6 is a schematic structural diagram of a rendering device provided in an embodiment of the present application;
[0056] FIG7 is a schematic structural diagram of a rendering device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The following describes the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present application, rather than all the embodiments. Those skilled in the art will appreciate that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0058] The terms "first," "second," and the like in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0059] This application provides a rendering method for achieving high-fidelity real-time rendering. This application also provides corresponding devices, systems, computer-readable storage media, and computer program products. These are described in detail below.
[0060] The rendering method provided in this application can be applied to various rendering scenarios, such as filmmaking, video games, commercial advertising, smart homes, augmented reality (AR) and virtual reality (VR), and many other fields. It is particularly suitable for rendering large-scale real-world scenes, such as 3D maps or industrial applications such as factory inspections.
[0061] The rendering method provided in this application can be executed on the cloud side or on the terminal side. When executed on the cloud side, one option is: the cloud side can obtain the user's perspective of browsing the target scene from the terminal side, and after rendering the first image to obtain the second image, transmit the second image back to the terminal side for display. Another option is: the cloud side renders through the perspective pre-set by the developer. When executed on the terminal side, the entire rendering process does not require the participation of the cloud side. After the terminal side responds to the user's perspective of browsing the target scene, it can execute the rendering process of this application, and then display the second image obtained by rendering the first image.
[0062] In summary, the rendering method provided in this application can be implemented by an end-cloud collaborative rendering system, or by a non-end-cloud collaborative rendering system. The architectures of these two rendering systems are introduced below.
[0063] FIG1A is a schematic diagram of the architecture of a terminal-cloud collaborative rendering system provided in an embodiment of the present application.
[0064] As shown in FIG1A , the end-cloud collaborative rendering system provided in an embodiment of the present application includes a cloud-side device and an end-side device, and the cloud-side device and the end-side device communicate through a network.
[0065] Various types of applications can be installed on the end-side device. Taking the application of a three-dimensional map as an example, when a user browses a target scene, the end-side device can receive the user's perspective of browsing the target scene provided by the user through an input device such as a mouse, keyboard, screen, or virtual reality (VR) / augmented reality (AR) device. The end-side device can then transmit the user's perspective of browsing the target scene to the cloud-side device through the network. The cloud-side device can restore the color value of each pixel point on the first image to be rendered in each of the multiple directions corresponding to the user's perspective of browsing the target scene and the compressed texture information. The multiple directions corresponding to each pixel point are the directions of sampling color values from the radiation field model of the target scene. The second image is then rendered based on the color value of each pixel point in each of the multiple directions corresponding to the first image, and the second image is returned to the end-side device. After receiving the second image, the end-side device can display the second image.
[0066] The cloud-side device can be a working node in the cloud system. The cloud system also includes a scheduling node. After the scheduling node receives a rendering request from the end-side device (including the user's perspective of browsing the target scene), it can generate a rendering task based on the rendering request and assign it to one or more working nodes in the cloud system for execution.
[0067] The function of the scheduling node can be implemented by software or hardware.
[0068] As an example of a software functional unit, a scheduling node may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, a scheduling node may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0069] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Inter-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0070] As an example of a hardware functional unit, a scheduling node may include at least one computing device, such as a server. Alternatively, the scheduling node may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0071] The multiple computing devices included in a scheduling node can be distributed in the same zone or in different zones. The multiple computing devices included in a scheduling node can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in a scheduling node can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0072] A worker node can be a physical machine, a virtual machine (VM), or a container. It can include one or more central processing units (CPUs) and graphics processing units (GPUs). A worker node can also be a CPU or a GPU.
[0073] The end-side device may be a terminal device. A terminal device, also known as user equipment (UE), mobile station (MS), mobile terminal (MT), etc., is a device that includes wireless communication functions (providing voice / data connectivity to users), for example, a handheld device with wireless connection functions. Currently, some examples of terminal devices include: mobile phones, tablet computers, laptops, PDAs, notebook computers, wireless routers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in the Internet of Vehicles, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, or wireless terminals in smart homes. For example, wireless terminals in the Internet of Vehicles (IoV) can be onboard devices, complete vehicle equipment, onboard modules, or vehicles. Wireless terminals in industrial control can be robots, for example. For example, wireless terminals in autonomous driving can be drones. These terminal devices can run Android, iOS, Windows, or other operating systems. These terminal devices can run applications that require rendering of application scenes to generate two-dimensional images, such as gaming applications, lock screen applications, or map applications.
[0074] The cloud system in Figure 1A, as shown in Figure 1B, includes a cloud platform and basic resources. The cloud platform includes a cloud platform manager, and the scheduling node described above can be the cloud platform manager in Figure 1B. The basic resources can include multiple servers, each of which can be a worker node, or each server can include multiple worker nodes.
[0075] The working node in FIG1B may be a computing device card or a virtual machine (VM), wherein the computing device card may be at least one of a central processing unit (CPU), a graphics processing unit (GPU), and a neural network processing unit (NPU).
[0076] The cloud platform manager maintains or regularly collects information about each worker node in the underlying resources, such as resource usage (resource utilization rate or resource idle rate) on each worker node. This information can be used as auxiliary decision-making information when allocating rendering tasks.
[0077] The cloud platform manager can receive a rendering request from the end-side device, which includes the user's perspective for browsing the target scene, and then generate one or more rendering tasks based on the rendering request and assign them to one or more working nodes to perform the corresponding rendering tasks.
[0078] After the worker node completes the rendering task, the cloud platform manager can return the rendered image to the user.
[0079] The rendering system of the non-end-cloud system may include an electronic device, which may be a cloud-side device or an end-side device. When the electronic device is a cloud-side device, it can render according to the perspective pre-set by the developer. When the electronic device is an end-side device, the entire rendering process does not require cloud-side participation. After the end-side device responds to the user's perspective of browsing the target scene, it can execute the rendering process of the present application and then display the second image obtained by rendering the first image.
[0080] The structure of the electronic device can be understood with reference to FIG1C . In one possible embodiment, as shown in FIG1C , the electronic device 1000 may include a central processing unit 1001, a graphics processing unit 1002, a display device 1003, and a memory 1004. Optionally, the electronic device 1000 may further include at least one communication bus (not shown in FIG1C ) for enabling connection and communication between various components.
[0081] It should be understood that the various components in the electronic device 1000 may also be coupled via other connectors, which may include various interfaces, transmission lines, or buses. The various components in the electronic device 1000 may also be connected in a radial manner centered around the central processing unit 1001. In various embodiments of the present application, coupling refers to mutual electrical connection or communication, including direct connection or indirect connection through other devices.
[0082] There are many ways to connect the CPU 1001 and the GPU 1002, and they are not limited to the one shown in Figure 1C. The CPU 1001 and the GPU 1002 in the electronic device 1000 can be located on the same chip or on separate chips.
[0083] The functions of the central processing unit 1001 , the graphics processing unit 1002 , the display device 1003 and the memory 1004 are briefly introduced below.
[0084] Central processing unit 1001: used to run operating system 1005 and application 1006. Application 1006 can be a graphics application, such as a game, video player, etc. Operating system 1005 provides a system graphics library interface. Application 1006 generates an instruction stream for rendering graphics or image frames and the required related rendering data through this system graphics library interface and the driver provided by operating system 1005, such as the graphics library user-mode driver and / or the graphics library kernel-mode driver. The system graphics library includes, but is not limited to, system graphics libraries such as OpenGL ES (Open Graphics Library for Embedded Systems), the Khronos platform graphics interface, or Vulkan (a cross-platform graphics application program interface). The instruction stream contains a series of instructions, which are generally calls to the system graphics library interface.
[0085] Optionally, the central processing unit 1001 may include at least one of the following types of processors: an application processor, one or more microprocessors, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor.
[0086] The CPU 1001 may further include necessary hardware accelerators, such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or an integrated circuit for implementing logic operations. The CPU 1001 may be coupled to one or more data buses for transmitting data and instructions between the various components of the electronic device 1000.
[0087] Graphics processor 1002: Receives the graphics instruction stream sent by CPU 1001, generates a rendering target through a rendering pipeline, and displays the rendering target on display device 1003 through the operating system's layer synthesis display module. A rendering pipeline, also known as a rendering pipeline, pixel pipeline, or pixel pipeline, is a parallel processing unit within graphics processor 1002 for processing graphics signals. Graphics processor 1002 may include multiple rendering pipelines, which can independently and concurrently process graphics signals. For example, a rendering pipeline may perform a series of operations during the rendering of graphics or image frames. Typical operations may include vertex processing, primitive processing, rasterization, fragment processing, and so on.
[0088] Alternatively, the graphics processor 1002 may include a general-purpose graphics processor that executes software, such as a GPU or other type of dedicated graphics processing unit.
[0089] Display device 1003 : used to display various images generated by electronic device 1000 , which may be a graphical user interface (GUI) of an operating system or image data (including still images and video data) processed by graphics processor 1002 .
[0090] Optionally, the display device 1003 may include any suitable type of display screen, such as a liquid crystal display (LCD), a plasma display, or an organic light-emitting diode (OLED) display.
[0091] The memory 1004 is a transmission channel between the CPU 1001 and the GPU 1002 and can be a double data rate synchronous dynamic random access memory (DDR SDRAM) or other types of cache.
[0092] It should be noted that, when the electronic device is a cloud-side device, the electronic device may not include the display device 1003 .
[0093] The above introduces the rendering system provided by the embodiment of the present application, as well as the possible structure of the electronic device. The rendering method provided by the embodiment of the present application is described below. The content of the rendering method involving the execution of the cloud-side device can be executed by the cloud-side device, or by a component of the cloud-side device (such as a processor, chip, or chip system, etc.). Similarly, the content involving the execution of the end-side device can be executed by the end-side device, or by a component of the end-side device (such as a processor, chip, or chip system, etc.).
[0094] FIG2 is a schematic diagram of an embodiment of a rendering method provided in an embodiment of the present application.
[0095] As shown in FIG2 , in combination with the aforementioned end-cloud collaborative rendering system, an embodiment of the rendering method provided in the present application includes:
[0096] 201. The terminal-side device sends the user's viewing angle of the target scene. Correspondingly, the cloud-side device obtains the user's viewing angle of the target scene.
[0097] In this application, the target scene can be a city, island, or village that can be viewed on a 3D map. Of course, the target scene can also be an industrial application scene such as equipment in a factory or shelves in a warehouse. This application does not limit the target scene; any scene that requires rendering can use the rendering solution provided by this application.
[0098] 202. The cloud-side device restores the color value of each pixel in each of the corresponding P directions based on the compressed texture information for each pixel in the first image.
[0099] Among them, the first image is the image to be rendered corresponding to the target scene from the perspective, the P directions corresponding to each pixel point are the directions of sampling color values from the radiation field model of the target scene, P is an integer greater than 1, and the compressed texture information includes compressed information of the color values in the P directions corresponding to each pixel point.
[0100] In this application, the radiation field model of the target scene refers to the radiation field model obtained through the point cloud and image of the target scene. The radiation field model is a function of the three-dimensional coordinate points, direction, color, transparency and other information of the target scene in space.
[0101] In this application, texture refers to color values. The brightness of pixels on an image corresponding to different viewing angles is usually different, so even pixels at the same location may have different corresponding color values at different viewing angles.
[0102] 203. The cloud-side device renders the first image according to the color value of each pixel point in each of the P corresponding directions in the first image to obtain a rendered second image.
[0103] In the present application, the first image and the second image are both images of the target scene that can be seen from the viewing angle. The difference is that the first image is an unrendered image, and the second image is a rendered image.
[0104] 204. The cloud-side device sends the second image. Correspondingly, the client-side device receives the second image.
[0105] 205. The terminal-side device displays the second image.
[0106] The technical solution provided by the present application, when sampling the texture of the target scene, will obtain the color values of each pixel in multiple directions from the radiation field model of the target scene, so that more light field information can be retained, which is conducive to subsequent high-quality and high-fidelity rendering. In addition, in the solution provided by the present application, compressed texture information is saved, and the color values of the pixels of the corresponding perspective are restored when needed, which can reduce storage requirements. Moreover, when rendering, it is only necessary to render according to the color value, and the traditional rendering pipeline can be used for rendering, which greatly improves the rendering speed. From the above, it can be seen that the solution provided by the present application can achieve high-fidelity real-time rendering of large-scale scenes with a smaller storage space.
[0107] If the rendering method provided in this embodiment of the present application is combined with a rendering system that does not utilize end-cloud collaboration, and the rendering method is executed solely by a cloud-side device, the cloud-side device executes the above-mentioned steps of the cloud-side device obtaining the user's viewing angle for browsing the target scene, as well as steps 202 and 203, as described in the embodiment corresponding to FIG2 . If the rendering method provided in this embodiment of the present application is executed solely by an end-side device, the end-side device executes the above-mentioned steps of the end-side device obtaining the user's viewing angle for browsing the target scene, as well as steps 202, 203, and 205, as described in the embodiment corresponding to FIG2 .
[0108] As described above, in order to achieve high-fidelity real-time rendering of the target scene, the embodiment of the present application can make the following preparations before rendering, which will be introduced below in conjunction with Figure 3.
[0109] As shown in FIG3 , the preparation before rendering provided by the embodiment of the present application may include:
[0110] 301. Radiation field model initialization;
[0111] As shown in FIG4A , in an embodiment of the present application, pictures and point clouds of a target scene taken from different perspectives may be input into a radiation field generation model to obtain a radiation field model of the target scene.
[0112] The radiation field model is a function of the target scene's three-dimensional coordinates, direction, color, transparency and other information in space.
[0113] 302. Grid extraction;
[0114] The radiation field model of the target scene may be gridded, so that the radiation field model of the target scene corresponds to a three-dimensional grid, and the three-dimensional grid indicates the positions of the coordinate points of the target scene in the three-dimensional space.
[0115] An example diagram of the gridded radiation field model of the target scene can be understood by referring to FIG4B .
[0116] 303.UV parameterization;
[0117] A two-dimensional texture pixel map can be obtained by performing UV parameterization on a three-dimensional grid. The two-dimensional texture pixel map includes N texture pixel points, such as 4096*4096 pixels.
[0118] The above process of UV parameterizing the three-dimensional mesh can be understood by referring to FIG4C . As shown in FIG4C , for the convenience of representation, a local image on the three-dimensional mesh is captured for UV parameterization, and the spatial coordinates on the three-dimensional mesh are converted into pixel points on the two-dimensional space of the UV coordinate axis.
[0119] 304. Multi-directional texture extraction;
[0120] For these texture pixel points in the two-dimensional texture pixel map, texture sampling can be performed on the radiation field model of the target scene from different directions in M directions, so as to obtain M sampled texture maps.
[0121] In the embodiment of the present application, the M directions can be determined from the directions of points at different positions on the sphere and the center of the sphere. The M points can be determined by uniformly sampling the sphere. The M directions can be understood by referring to FIG4D.
[0122] As shown in Figure 4D, the solid center 401 represents the center of the sphere, and the hollow center 402 on the sphere represents the sampling point. There can be many sampling points (represented by M) determined by uniform sampling on the sphere. Figure 4D only illustrates a few of them. The direction from each hollow center 402 on the sphere to the center of the sphere 401 is each of the M directions introduced above.
[0123] Then, for each of the M directions, by obtaining the corresponding color value from the radiation field model for each texel in the two-dimensional texel map in Figure 4C (i.e., extracting the texture of the texel), M sampled texture maps are obtained. The M directions correspond one-to-one to the M sampled texture maps. The M sampled texture maps have the same number of texels and the same arrangement positions. The sampled texture maps are used to represent the color values of the N texels in the corresponding directions.
[0124] M can be balanced between controlling the computational effort and maintaining authenticity, and can be set between 40 and 100.
[0125] 305. Texture compression;
[0126] During the texture compression process, the M sampled texture maps obtained in step 304 can be compressed by using a singular value decomposition (SVD) decomposition to obtain a standard texture map C, K feature texture maps, and a weight matrix W corresponding to the K feature texture maps, where K is a positive integer and (1+K)<M. For example, in this application, 84 sampled texture maps can be compressed into 15 feature texture maps. In this application, the standard texture map C, the K feature texture maps, and the weight matrix W corresponding to the K feature texture maps can also be referred to as compressed texture information.
[0127] In this embodiment, a standard texture map is a texture map that retains the most complete color information and can be understood as a color texture map. A feature texture map is a compressed texture map that can be understood as a texture map that only retains some grayscale information. Processing M sampled texture maps into one standard texture map and K feature texture maps can reduce storage space requirements and facilitate subsequent rendering.
[0128] The color value of each texture pixel in the standard texture map is obtained by averaging the color values of texture pixels at the same position in the M sampled texture maps.
[0129] The weight matrices corresponding to the K feature texture maps and the K texture maps are obtained by dimensionality reduction compression of an M*N matrix, where the M*N matrix is the matrix obtained by subtracting the color value of the texture pixel at the same position in the standard texture map from the color value of each texture pixel in the M sampled texture maps.
[0130] Subtracting M sampled texture images from the standard texture image, and then performing dimensionality reduction compression (also called low-rank compression) on the M*N matrix obtained by the subtraction can reduce the amount of data and help save storage space.
[0131] In the embodiment of the present application, the process of obtaining a standard texture map from M sampled texture maps, as well as a schematic diagram of an M*N matrix before dimensionality reduction and compression, can be understood by referring to FIG4E . As shown in FIG4E , there are four sampled texture maps, corresponding to four different directions, namely, sampled texture map 1, sampled texture map 2, sampled texture map 3, and sampled texture map 4. The standard texture map is obtained by averaging the color values of the texture pixels at the same position in these four sampled texture maps. Subtracting the color value of each texture pixel in the sampled texture image 1 from the color value of the texture pixel at the same position in the standard texture image can obtain pixel difference texture image 1, subtracting the color value of each texture pixel in the sampled texture image 2 from the color value of the texture pixel at the same position in the standard texture image can obtain pixel difference texture image 2, subtracting the color value of each texture pixel in the sampled texture image 3 from the color value of the texture pixel at the same position in the standard texture image can obtain pixel difference texture image 3, and subtracting the color value of each texture pixel in the sampled texture image 4 from the color value of the texture pixel at the same position in the standard texture image can obtain pixel difference texture image 4, and then performing dimensionality reduction compression on these four pixel difference texture images to obtain a feature texture image. For example, the four pixel difference texture images in Figure 4E can be compressed to obtain one feature texture image after dimensionality reduction.
[0132] 306. Model Hierarchy;
[0133] In an embodiment of the present application, when viewing different positions of the target scene from the same perspective, some positions may be relatively clear, while some positions may be relatively blurred, so different positions have different importance during rendering. In order to improve rendering efficiency, the present application may perform multi-level of detail (LOD) processing on the mesh model used during rendering based on the standard texture map and K feature texture maps obtained in step 305, wherein the first level may use the standard texture map and K feature texture maps, and the subsequent different levels may be obtained by downsampling the standard texture map and K feature texture maps to different degrees of sparsity. In this way, when rendering different positions of the target scene, textures may be obtained from different levels and the corresponding positions may be rendered, thereby improving rendering efficiency.
[0134] 307. Custom shaders;
[0135] According to the traditional texture grid rendering pipeline, for each pixel to be rendered, the pipeline can provide texture coordinates and viewing direction. The present application can determine the P directions closest to the viewing direction from M directions (e.g., P = 3), then restore the color value of the pixel in each of these P directions using K feature texture maps and a weight matrix W, and then use Barycentric coordinates to interpolate the P colors to obtain the color value of the pixel. Because the interpolated color value of the pixel is derived from the color values of multiple directions, using the interpolated color value of the pixel to render the pixel can improve rendering quality.
[0136] In this embodiment of the present application, the supplier collects city-level aerial images and stores them on distributed servers in the cloud. Steps 301 to 307 can then be performed. The model or compressed texture information obtained in the above process can be stored in the cloud as an open scene graph binary (OSGB) file for delivery of rendering services.
[0137] Users of this service can open a browser on their device to preview the city from above. Specifically, by simply moving the mouse, the browser transmits the user's viewing angle back to the cloud, which then renders the image and returns it to the user's browser for viewing.
[0138] 308. This application rendering process.
[0139] The rendering process of the present application can be understood by referring to steps 202 and 203 in the embodiment corresponding to the previous Figure 2, wherein the P directions corresponding to each pixel point are directions closest to the first direction determined from the M directions, the M directions are directions for texture sampling of the radiation field model of the target scene determined by spherical uniform sampling, the first direction is the direction from the position of the viewing angle to the three-dimensional coordinate point corresponding to each pixel point, M>P, and M is an integer.
[0140] Regarding spherical uniform sampling and the direction of M, you can refer to the schematic and introduction of the previous Figure 4D part for understanding. Among them, the first direction is the direction from the three-dimensional coordinate point in space corresponding to the pixel point on the first image to the position of the viewing angle, which can also be understood as the direction from the position of the viewing angle to the three-dimensional coordinate point. The closest direction refers to the P direction with the smallest angle with the first direction among the M directions. The smallest angle in this application refers to the P angles ranked in order of angles from small to large. The meaning of the closest is not limited to the one with the greatest degree of proximity, but can also be the first P angles ranked in order of proximity from large to small. In this application, the P directions are the directions closest to the first direction. In this way, for the corresponding pixel point, the color values of the P directions are the closest to the color value of the pixel point, which can improve the accuracy of rendering the pixel point.
[0141] In step 202, the color value of each pixel in each of the P corresponding directions is restored based on the compressed texture information. The color value of each pixel in each of the P directions is obtained by multiplying the weight matrix corresponding to the K feature texture maps by the K*N matrix formed by the N texture pixels on each feature texture map, and then adding the result to the 1*N matrix corresponding to the standard texture map. This can be expressed as: W*T+C, where C represents the 1*N matrix corresponding to the standard texture map, W represents the weight matrix (M*K matrix) corresponding to the K feature texture maps, T represents the K*N matrix corresponding to the K feature texture maps, and N is the number of texture pixels on the feature texture map.
[0142] In an embodiment of the present application, the color value of each pixel in each of the P directions during sampling can be restored through K feature texture maps, the corresponding weight matrix, and the standard texture map. In this way, this information is in a compressed state when not in use, and the corresponding color value can be restored when used, which does not take up too much storage space and can also achieve high-quality rendering.
[0143] After restoring the color value of each pixel in each of the P directions corresponding to each pixel through step 202, step 203 can be executed to obtain the second image. In the embodiment of the present application, the second image is obtained by rendering the first image according to the color value of each pixel in the first image in the first direction corresponding to each pixel, and the color value of each pixel in the first direction corresponding to each pixel is obtained by interpolating the color value of each pixel in each of the P directions corresponding to each pixel. Taking into account that the brightness and other information of the same position may be different at different viewing angles, the color value of the same position may be different at different viewing angles. Therefore, when rendering the image, the color values are obtained from multiple directions closest to the first direction, and then the color value of the first direction is determined. This can obtain a high-fidelity image that is more in line with the viewing angle, which is conducive to improving the rendering quality.
[0144] In the embodiment of the present application, different locations of the second image are rendered using different levels of textures. These different levels of texture are obtained by downsampling the standard texture map and K feature texture maps to varying degrees of sparsity. Considering that when viewing different locations of the target scene from the same perspective, some locations may be relatively clear while others may be relatively blurry, different locations have different degrees of importance during rendering. Thus, different locations can be rendered using different levels of textures, which can improve rendering efficiency.
[0145] The rendering method provided by the embodiments of this application supports the universal OSGB file format and can achieve an interactive frame rate (60 frames per second, fps) for real-world large-scale scenes on ordinary graphics cards. In terms of rendering quality, compared to the texture grid method, the rendering results of this application are more uniform in overall color, exhibit highly realistic lighting and shadow effects, and have more beautiful texture details.
[0146] The above-mentioned effects of the rendering method provided by the present application relative to the rendering of the texture grid method can be understood by referring to FIG. 5A , FIG. 5B and FIG. 5C .
[0147] From the preceding introduction to the rendering scheme of this application, it can be seen that this application proposes a new renderable model based on compressed directional textures, combining the advantages of the high efficiency of the texture grid method with the high quality of the neural radiation field. This application converts complex neural radiation field models into customized renderable texture models by performing multi-directional texture extraction on the radiation field model. Compared to the texture grid method, which only generates a standard texture map, the multi-directional texture extraction method retains richer scene information. This application further utilizes feature texture compression to achieve lightweight representation of large scenes. Compared to the texture grid method, this step does not significantly increase memory requirements. Compared to the neural radiation field method, this application significantly improves rendering efficiency by combining display radiation field technology with a standard rendering pipeline, while customized view-dependent shaders ensure high-quality rendering results. Overall, this application has excellent storage requirements and rendering quality, enabling fast, high-quality rendering of large-scale real-world scenes. In addition, due to the low data dependency and low storage requirements of the technical method of this application, it can be used not only on the cloud side, but also on end-to-end devices to implement the aforementioned rendering process.
[0148] The above describes the rendering method provided by the embodiment of the present application. The following describes the rendering device provided by the embodiment of the present application with reference to the accompanying drawings.
[0149] As shown in FIG6 , the rendering device 60 provided in an embodiment of the present application includes:
[0150] The acquisition unit 601 is used to acquire the viewing angle of the user browsing the target scene.
[0151] Processing unit 602 is configured to restore, for each pixel in the first image, the color value of each pixel in each of P corresponding directions based on the compressed texture information. The first image is a to-be-rendered image corresponding to the target scene from a viewing angle, the P corresponding directions of each pixel are directions in which color values are sampled from a radiation field model of the target scene, P is an integer greater than 1, and the compressed texture information includes compressed information of the color values in the P corresponding directions of each pixel. Processing unit 602 can be configured to perform step 202 in the above-described method embodiment.
[0152] The rendering unit 603 is configured to render the first image according to the color value of each pixel in each of the P corresponding directions to obtain a rendered second image. The rendering unit 603 can be used to perform step 203 in the above method embodiment.
[0153] The technical solution provided by the present application, when sampling the texture of the target scene, will obtain the color values of each pixel in multiple directions from the radiation field model of the target scene, so that more light field information can be retained, which is conducive to subsequent high-quality and high-fidelity rendering. In addition, in the solution provided by the present application, compressed texture information is saved, and the color values of the pixels of the corresponding perspective are restored when needed, which can reduce storage requirements. Moreover, when rendering, it is only necessary to render according to the color value, and the traditional rendering pipeline can be used for rendering, which greatly improves the rendering speed. From the above, it can be seen that the solution provided by the present application can achieve high-fidelity real-time rendering of large-scale scenes with a smaller storage space.
[0154] Optionally, the P directions corresponding to each pixel point are the directions closest to the first direction determined from the M directions, the M directions are the directions for texture sampling of the radiation field model of the target scene determined by spherical uniform sampling, the first direction is the direction from the position of the viewing angle to the three-dimensional coordinate point corresponding to each pixel point, M>P, and M is an integer.
[0155] Optionally, each of the M directions corresponds to a sampled texture map, and the sampled texture map is used to represent the color values of N texture pixels in the corresponding direction, where N is an integer greater than 1.
[0156] Optionally, the compressed texture information includes a standard texture map, K compressed feature texture maps, and a weight matrix corresponding to the K feature texture maps; the standard texture map, K feature texture maps, and the weight matrix corresponding to the K feature texture maps are obtained through M sampled texture maps, K is a positive integer, and (1+K)<M.
[0157] Optionally, the color value of each texture pixel in the standard texture image is obtained by averaging the color values of texture pixels at the same position in the M sampled texture images.
[0158] Optionally, the weight matrices corresponding to the K feature texture maps and the K texture maps are obtained by performing dimensionality reduction compression on an M*N matrix, where the M*N matrix is a matrix obtained by subtracting the color value of the texture pixel at the same position in the standard texture map from the color value of each texture pixel in the M sampled texture maps.
[0159] Optionally, the color value of each pixel in each of the P directions is obtained by multiplying the weight matrix corresponding to the K feature texture images and the K*N matrix formed by the N texture pixels on each feature texture image, and then adding it to the 1*N matrix corresponding to the standard texture image.
[0160] Optionally, the second image is obtained by rendering the first image based on the color value of each pixel in the first image in its corresponding first direction, and the color value of each pixel in its corresponding first direction is obtained by interpolating the color value of each pixel in each of the P directions corresponding to each pixel.
[0161] Optionally, different positions of the second image are obtained by rendering using textures of different levels, and the textures of different levels are obtained by downsampling the standard texture map and K feature texture maps to different degrees of sparsity.
[0162] Optionally, the M sampling texture maps corresponding to the M directions are obtained by performing texture sampling on the radiation field model of the target scene according to the two-dimensional texture pixel map.
[0163] Optionally, the two-dimensional texture pixel map is obtained by performing UV parameterization processing on the three-dimensional grid of the radiation field model.
[0164] The rendering device provided in the embodiment of the present application can be understood by referring to the corresponding content of the method embodiment part introduced above, and will not be repeated here.
[0165] Please refer to FIG. 7 , which is a schematic structural diagram of another rendering device 70 provided in this application, as described below.
[0166] The rendering device 70 may include a processor 701 and a memory 702. The processor 701, the memory 702, and the communication interface 703 are interconnected via a bus 704. The memory 702 stores program instructions and data.
[0167] The program instructions and data corresponding to the steps in Figures 1A to 5C are stored in the memory 702. More specifically, the processor may be a processor for processing images, such as a GPU or a CPU for processing images.
[0168] The processor 701 is configured to execute the method steps performed by the rendering device shown in any of the embodiments in FIG. 1A to FIG. 5C .
[0169] Optionally, the communication interface 703 is used to receive or send data.
[0170] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a program, which, when executed on a computer, enables the computer to execute the steps of the method described in the embodiment shown in the aforementioned Figures 1A to 5C.
[0171] Optionally, the rendering device shown in the aforementioned FIG. 7 is a chip.
[0172] An embodiment of the present application also provides a rendering device, which can also be called a digital processing chip or chip. The chip includes a processing unit and a communication interface. The processing unit obtains program instructions through the communication interface, and the program instructions are executed by the processing unit. The processing unit is used to execute the method steps shown in any of the embodiments described in Figures 1A to 5C above.
[0173] The present application also provides a digital processing chip. The digital processing chip integrates circuitry and one or more interfaces for implementing the aforementioned processor 701 or the functions of processor 701. When the digital processing chip integrates memory, the digital processing chip can perform the method steps of any one or more of the aforementioned embodiments. When the digital processing chip does not integrate memory, it can be connected to an external memory via a communication interface. The digital processing chip implements the steps of the method described in any of the embodiments described in Figures 1A to 5C based on program code stored in the external memory.
[0174] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on an electronic device, the electronic device executes the steps in the method described in any of the embodiments in Figures 1A to 5C above.
[0175] An embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the steps of the method described in any of the embodiments in FIG. 1A to FIG. 5C .
[0176] The image processing device provided in the embodiment of the present application may be a chip, and the chip includes: a processing unit and a communication unit, wherein the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit, etc. The processing unit may execute the computer execution instructions stored in the storage unit so that the chip in the server executes the rendering method described in the embodiment shown in Figures 1A to 5C above. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0177] Specifically, the aforementioned processing unit or processor may include a central processing unit (CPU), a neural-network processing unit (NPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0178] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0179] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware, and of course can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., including a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0180] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0181] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a server, or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A rendering method, characterized in that: include: Get the user's perspective when browsing the target scene; For each pixel in the first image, according to the compressed texture information, the color value of each pixel in each of the P directions corresponding to each pixel is restored; wherein the first image is an image to be rendered corresponding to the target scene at the viewing angle, the P directions corresponding to each pixel are directions for sampling color values from the radiation field model of the target scene, P is an integer greater than 1, and the compressed texture information includes compressed information of the color values in the P directions corresponding to each pixel; The first image is rendered according to the color value of each pixel in the first image in each of the P directions corresponding to each pixel, to obtain a rendered second image.
2. The method according to claim 1, characterized in that The P directions corresponding to each pixel point are directions determined from the M directions that are closest to the first direction, the M directions are directions for texture sampling of the radiation field model of the target scene determined by spherical uniform sampling, the first direction is the direction from the position of the viewing angle to the three-dimensional coordinate point corresponding to each pixel point, M>P, and M is an integer.
3. The method according to claim 2, characterized in that Each of the M directions corresponds to a sampled texture map, and the sampled texture map is used to represent the color values of N texture pixels in the corresponding direction, where N is an integer greater than 1.
4. The method according to claim 3, characterized in that The compressed texture information includes a standard texture map, K compressed feature texture maps, and weight matrices corresponding to the K feature texture maps; The standard texture map, the K feature texture maps and the weight matrices corresponding to the K feature texture maps are obtained through the M sampled texture maps, K is a positive integer, and (1+K)<M.
5. The method according to claim 4, characterized in that The color value of each texture pixel in the standard texture map is obtained by averaging the color values of the texture pixels at the same position in the M sampled texture maps.
6. The method according to claim 4 or 5, characterized in that: The weight matrices corresponding to the K feature texture maps and the K texture maps are obtained by dimensionality reduction compression of an M*N matrix, where the M*N matrix is a matrix obtained by subtracting the color value of the texture pixel at the same position in the standard texture map from the color value of each texture pixel in the M sampled texture maps.
7. The method according to claim 6, characterized in that The color value of each pixel point in each of the P directions is obtained by multiplying the weight matrix corresponding to the K feature texture images and the K*N matrix formed by the N texture pixels on each feature texture image, and then adding it to the 1*N matrix corresponding to the standard texture image.
8. The method according to any one of claims 2 to 7, characterized in that: The second image is obtained by rendering the first image according to the color value of each pixel in the first image in the corresponding first direction, and the color value of each pixel in the corresponding first direction is obtained by interpolating the color value of each pixel in each of the P corresponding directions.
9. The method according to any one of claims 4 to 7, characterized in that: Different positions of the second image are obtained by rendering using textures of different levels, and the textures of different levels are obtained by downsampling the standard texture map and the K feature texture maps at different sparsity levels.
10. The method according to any one of claims 4 to 9, characterized in that: The M sampling texture maps corresponding to the M directions are obtained by performing texture sampling on the radiation field model of the target scene according to the two-dimensional texture pixel map.
11. The method according to claim 10, characterized in that The two-dimensional texture pixel map is obtained by performing UV parameterization processing on the three-dimensional grid of the radiation field model.
12. The method according to any one of claims 1 to 11, characterized in that: The target scene is a large-scale real scene.
13. A rendering device, characterized in that: An acquisition unit, used to acquire the viewing angle of the user browsing the target scene; A processing unit, configured to restore, for each pixel in the first image, the color value of each pixel in each of P directions corresponding to each pixel according to the compressed texture information; wherein the first image is an image to be rendered corresponding to the target scene at the viewing angle, the P directions corresponding to each pixel are directions for sampling color values from a radiation field model of the target scene, P is an integer greater than 1, and the compressed texture information includes compressed information of the color values in the P directions corresponding to each pixel; A rendering unit, configured to render, according to the color value of each pixel point in the first image in each of the P directions corresponding to each pixel point, The first image is rendered into a second image.
14. The device according to claim 13, characterized in that The P directions corresponding to each pixel point are directions determined from the M directions that are closest to the first direction, the M directions are directions for texture sampling of the radiation field model of the target scene determined by spherical uniform sampling, the first direction is the direction from the position of the viewing angle to the three-dimensional coordinate point corresponding to each pixel point, M>P, and M is an integer.
15. The device according to claim 14, characterized in that Each of the M directions corresponds to a sampled texture map, and the sampled texture map is used to represent the color values of N texture pixels in the corresponding direction, where N is an integer greater than 1.
16. The device according to claim 15, characterized in that The compressed texture information includes a standard texture map, K compressed feature texture maps, and weight matrices corresponding to the K feature texture maps; The standard texture map, the K feature texture maps and the weight matrices corresponding to the K feature texture maps are obtained through the M sampled texture maps, K is a positive integer, and (1+K)<M.
17. The device according to claim 16, characterized in that The color value of each texture pixel in the standard texture map is obtained by averaging the color values of the texture pixels at the same position in the M sampled texture maps.
18. The device according to claim 16 or 17, characterized in that The weight matrices corresponding to the K feature texture maps and the K texture maps are obtained by dimensionality reduction compression of an M*N matrix, where the M*N matrix is a matrix obtained by subtracting the color value of the texture pixel at the same position in the standard texture map from the color value of each texture pixel in the M sampled texture maps.
19. The device according to claim 18, characterized in that The color value of each pixel point in each of the P directions is obtained by multiplying the weight matrix corresponding to the K feature texture images and the K*N matrix formed by the N texture pixels on each feature texture image, and then adding it to the 1*N matrix corresponding to the standard texture image.
20. An electronic device, characterized in that: include: A communication interface, a processor and a memory, wherein the communication interface and the processor are coupled to the memory, and the memory is used to store programs or instructions. When the programs or instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 12.
21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 12.
22. A computer program product, characterized in that The computer program product comprises a computer program code, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 12.
23. A chip system, characterized in that: The chip system includes one or more interface circuits and one or more processors; the interface circuits and the processors are interconnected through lines; the interface circuits are used to receive signals from the memory of the electronic device and send signals to the processor, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 12, and the processor is at least one of a central processing unit or a graphics processing unit.
24. A rendering system, characterized in that: Including cloud-side devices and end-side devices, The terminal-side device is used to send the user's viewing angle of the target scene to the cloud-side device; The cloud-side device is used to perform the method described in any one of claims 1 to 12 above; The terminal-side device is used to receive the second image returned by the cloud-side device and display the second image.
25. A rendering system, characterized in that: include: An electronic device, wherein the electronic device is used to execute the method as described in any one of claims 1 to 12, and the electronic device is a cloud-side device or a terminal-side device.
Citation Information
Patent Citations
Rendering method and corresponding device
CN118736086A
Game model rendering method and device
CN110689626A
Explicit radiation field processing method and device and storage medium
CN115661403A
Scene rendering method and device, electronic equipment and storage medium
CN115761100A
Spatially varying convolution for rendering effects
WO2009018487A1
Cited By
Material warehouse position automatic calibration method and system, electronic equipment and storage medium
CN115588050A
Data compression method and device for oblique photography model, equipment and storage medium
CN119313750A
