Virtual scene rendering method and device
By generating virtual scene rendering reference information and rendering the scene, the problem of smooth running of the game on mobile devices is solved, achieving smooth running on mobile devices and visual effects on computers while maintaining high quality.
Patent Information
- Application Number
- CN202510218969.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-02
AI Technical Summary
The existing technology is difficult to keep games running smoothly on mobile devices while maintaining high quality, resulting in the limitation of the visual effects of games on computer platforms.
By obtaining the scene information to be rendered and the scene rendering configuration information of the target device, virtual scene rendering reference information is generated, and the scene is rendered based on this information, and the target virtual scene image for the target device is obtained.
It realizes smooth running of computer-level image quality resources on mobile devices, and allows the computer to call more complex rendering methods to maintain its better visual effects.
Smart Images

Figure CN119909374A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a virtual scene rendering method. Background Art
[0002] As graphics technology continues to advance, game developers are able to achieve higher-quality visual effects on PC platforms, which brings players a more immersive gaming experience. However, this also brings new challenges, namely how to keep the quality high while making the game run smoothly on mobile devices.
[0003] Currently, a commonly used technical solution is to sacrifice some high-end visual effects and develop in a rendering environment suitable for multiple platforms, thereby ensuring that the game can run on both the computer and mobile terminals. However, this method will limit the visual effects of the game on the computer platform and fail to give full play to its hardware advantages. Therefore, in order to solve the above shortcomings, a virtual scene rendering method is urgently needed. Summary of the invention
[0004] In view of this, an embodiment of the present specification provides a virtual scene rendering method. One or more embodiments of the present specification also relate to a virtual scene rendering device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a virtual scene rendering method is provided, comprising: Obtain the scene information to be rendered and the scene rendering configuration information corresponding to the target device; Generate virtual scene rendering reference information based on the scene rendering configuration information and the scene information to be rendered; The scene information to be rendered is rendered according to the virtual scene rendering reference information to obtain a target virtual scene image for the target device.
[0006] According to a second aspect of an embodiment of this specification, a virtual scene rendering device is provided, comprising: An acquisition module is configured to acquire scene information to be rendered and scene rendering configuration information corresponding to a target device; A generating module, configured to generate virtual scene rendering reference information based on the scene rendering configuration information and the scene information to be rendered; The rendering module is configured to render the scene information to be rendered according to the virtual scene rendering reference information, and obtain a target virtual scene image for the target device.
[0007] According to a third aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above-mentioned virtual scene rendering method are implemented.
[0008] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned virtual scene rendering method are implemented.
[0009] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which implements the steps of the above-mentioned virtual scene rendering method when executed by a processor.
[0010] By applying the solution of the embodiments of this specification, the adapted virtual scene rendering reference information is automatically generated by adapting the scene rendering configuration information of different devices, so as to realize normal rendering of the rendering information in the target device to obtain the target virtual scene image, thereby enabling the mobile terminal to smoothly run the computer-level image quality resources while maintaining a unified resource system, while allowing the computer to call more complex rendering methods to maintain its better visual effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a flow chart of a virtual scene rendering method provided by an embodiment of this specification; Figure 2 is a process flow chart of a game scene rendering method provided by an embodiment of this specification; Figure 3 It is a structural schematic diagram of a virtual scene rendering device provided by an embodiment of this specification; Figure 4 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0012] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0013] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0014] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0015] In addition, 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, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0016] First, the terms involved in one or more embodiments of this specification are explained.
[0017] Universal Render Pipeline (URP): is a rendering pipeline suitable for multiple hardware platforms, designed to provide high-performance and high-quality graphics rendering. It uses physically based rendering technology, supports dynamic lighting and post-processing effects, and can achieve excellent picture quality while maintaining a high frame rate. URP is designed to provide the best performance for low-end to high-end devices, especially for mobile games or virtual reality applications.
[0018] High Definition Render Pipeline (HDRP): is a rendering pipeline designed for high-end platforms to provide high-fidelity graphics and complex visual effects. It uses physically based lighting and materials, supports high-precision realistic effects, and is widely used in high-quality games, architectural visualization, and automotive simulation. HDRP relies on compute shader technology, has high requirements on the computing power of the device, and usually runs on high-end devices.
[0019] Percentage Closer Filtering (PCF): is a technique used to soften the edges of shadows. It reduces the jaggedness of shadows by sampling the shadow map multiple times and calculating the average depth value, making the shadow edges smoother. PCF technology is widely used in real-time rendering, which can improve the visual effect of shadows while ensuring performance, especially in the case of low-resolution shadow maps.
[0020] Vertex Shader (VS): It is a programmable stage in the graphics rendering pipeline that is responsible for processing vertex data. It is usually used to perform spatial transformation of vertices, lighting calculations, and other vertex-related operations. The output of VS is passed to the subsequent geometry processing stage. It is an indispensable part of the rendering process and can achieve complex vertex deformation and animation effects.
[0021] Pixel Shader (PS): It is a programmable stage in the graphics rendering pipeline for processing pixel colors. It receives data from the rasterization stage and calculates the final color of each pixel based on information such as lighting, materials, and textures. PS plays a key role in achieving complex material effects (such as reflection, refraction, and bump mapping) and is one of the core components of high-quality graphics rendering.
[0022] Compute Shader (CS): A general-purpose computing unit that can perform parallel computing tasks outside the graphics rendering pipeline. It is not limited to graphics processing and can be used for tasks such as physical simulation, image processing, and data compression. The advantage of CS lies in its flexibility and efficiency, and its ability to fully utilize the parallel computing capabilities of modern hardware, but some platforms have limited support for it and may need to be optimized to adapt to different devices.
[0023] Shader Storage Buffer Object (SSBO): A storage buffer object used to store large amounts of data in the graphics pipeline for shader programs to read and write. It can provide a large storage space, facilitate the processing of complex data structures and the interaction of large amounts of data, and is suitable for scenarios that require frequent updates and access to data, providing flexible data storage support for graphics rendering and computing tasks.
[0024] Uniform Buffer Object (UBO): is a buffer object used to store uniform variables in shader programs. It allows multiple uniform variables to be grouped together and efficiently transmitted and updated through buffers. UBO is often used to store data such as matrices and vectors in graphics rendering. It can reduce the repeated definition and update overhead of variables in shader programs, improve rendering efficiency, and is suitable for storing relatively stable uniform variable data that needs to be updated in batches.
[0025] In this specification, a virtual scene rendering method is provided. This specification also relates to a virtual scene rendering device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0026] Normally, virtual scene projects are based on URP (Universal Render Pipeline), but due to the increasing demand for improved graphics on the PC side, HDRP (High Definition Render Pipeline) was added as the PC side pipeline. The reason for choosing to proceed at the same time is that HDRP does not natively support mobile platforms at present.
[0027] See also Figure 1 , Figure 1 A flowchart of a virtual scene rendering method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0028] Step 102: Obtain the scene information to be rendered and the scene rendering configuration information corresponding to the target device.
[0029] In actual applications, the scene information to be rendered is the scene data that needs to be rendered; the target device is the device on which the rendering result will be displayed; and the scene rendering configuration information is the rendering parameters and process set according to the characteristics of the target device.
[0030] The scene information to be rendered can be understood as a collection of data such as all objects, light sources, materials, etc. that need to be rendered during the graphics rendering process. This information usually includes the geometric shapes, textures, lighting conditions, etc. in the scene. For example, in a virtual reality application, the scene information to be rendered may include all objects and their properties in the user's virtual environment, such as the color of the walls, the texture of the floor, the brightness and color of the lights, etc. These data are the basis for the rendering engine to generate the final image.
[0031] The target device can be understood as the device where the rendering results are finally displayed. Its hardware performance and display characteristics will affect the specific configuration of the rendering process. Different devices, such as game consoles, mobile terminals, etc., have different computing capabilities, memory sizes, and display resolutions. For example, on mobile terminals, due to limited hardware resources, the rendering configuration may need to simplify the shadow algorithm or reduce the texture resolution to ensure a smooth user experience. On the computer side, more complex lighting effects and post-processing techniques can be enabled to provide higher quality images.
[0032] Scene rendering configuration information can be understood as specific rendering parameters and processes set according to the characteristics and performance requirements of the target device. These configuration information determines how the rendering engine processes the scene information to be rendered to generate the final image. Scene rendering configuration information may include the implementation method of the lighting process, the generation method of the buffer table, the sampling method of the reflection probe, the selection of the shadow filtering algorithm, and the switch of the post-processing effect. These configuration information needs to be optimized according to the hardware capabilities of the target device to ensure a balance between rendering effect and performance.
[0033] Furthermore, the scene information to be rendered and the scene rendering configuration information corresponding to the target device are obtained, including: Obtaining a target device type corresponding to the target device; Based on the target device type, scene rendering configuration information corresponding to the target device is determined.
[0034] In actual applications, the target device type is the device category corresponding to the scene information to be rendered; the target device type can be understood as the specific device category targeted when rendering the scene. These device categories may include first-class devices, second-class devices, and so on. Each device type has its own unique hardware characteristics and performance limitations, which directly affect the way and effect of scene rendering. For example, first-class devices usually have lower performance, while second-class devices have higher performance. Therefore, understanding the target device type is a key step in determining how to efficiently render the scene.
[0035] The scene rendering configuration information can be understood as a series of rendering parameters and settings determined by the target device type. These configuration information include resolution, frame rate, texture quality, lighting effects, etc. Different device types require different rendering configurations to ensure that the scene can be presented in the best state on different devices.
[0036] Further, based on the target device type, determining the scene rendering configuration information corresponding to the target device includes: In the case where the target device type is a first type device, determining that the scene rendering configuration information corresponding to the target device is performance scene rendering configuration information, wherein the first type device is a device whose device performance is less than a preset threshold; In the case that the target device type is a second-category device, it is determined that the scene rendering configuration information corresponding to the target device is quality scene rendering configuration information, wherein the second-category device is a device whose device performance is greater than or equal to a preset threshold.
[0037] In actual applications, the first category of devices is a device whose performance is less than a preset threshold; the second category of devices is a device whose performance is greater than or equal to the preset threshold; the performance scene rendering configuration information is a rendering setting optimized for the first category of devices; the quality scene rendering configuration information is a rendering setting optimized for the second category of devices; the preset threshold is a standard value used to distinguish device performance.
[0038] The first type of device can be understood as a device whose performance is lower than the preset threshold in the rendering scene. This type of device usually includes some mobile terminals or low-configuration computer devices. In order to achieve smooth rendering effects on these devices, performance scene rendering configuration information is usually adopted. For example, on the mobile terminal, the details of the shadows may be reduced, the resolution of the texture may be reduced, or some high-cost post-processing effects may be turned off to ensure stable rendering performance.
[0039] The second type of device can be understood as a device whose performance is higher than or equal to the preset threshold in the rendering scene. This type of device usually includes a computer or a game console. For these devices, quality scene rendering configuration information can be used to give full play to the performance advantages of the device. For example, on the computer, high-precision shadows, high-resolution textures, and complex lighting effects may be enabled to provide a higher quality visual experience.
[0040] Performance scene rendering configuration information can be understood as a collection of rendering settings optimized for the first type of devices. These settings are designed to reduce the computing burden of the device by simplifying or adjusting the rendering process, thereby achieving smooth rendering effects on performance-constrained devices.
[0041] The quality scene rendering configuration information can be understood as a collection of rendering settings optimized for the second type of devices. These settings are designed to fully utilize the computing power of high-performance devices to provide higher quality visual performance. For example, on the computer side, complex shadow filtering algorithms, high-precision ambient occlusion, and dynamic global illumination effects may be enabled to achieve more realistic rendering effects.
[0042] The preset threshold can be understood as a standard value used to distinguish device performance. This value is usually determined based on the device's hardware parameters (such as processor performance, memory capacity, etc.) or actual rendering performance test results. By using the preset threshold, devices can be effectively divided into first-class devices and second-class devices, thereby allocating appropriate scene rendering configuration information to devices with different performance. For example, the preset threshold can be set based on the device's frame rate performance or rendering load capacity to ensure the rationality and adaptability of the rendering configuration.
[0043] Through the above method, adaptive rendering configuration can be provided for devices with different performance, while ensuring performance and improving rendering quality as much as possible.
[0044] Step 104: Generate virtual scene rendering reference information based on the scene rendering configuration information and the scene information to be rendered.
[0045] In practical applications, virtual scene rendering reference information is rendering guidance data generated based on the scene rendering configuration information of the target device and the information of the scene to be rendered; virtual scene rendering reference information can be understood as a kind of guiding data generated according to the hardware characteristics and rendering requirements of the target device. It combines the original information of the scene to be rendered and the rendering configuration of the target device to optimize the rendering process and effect. For example, on the mobile terminal, the virtual scene rendering reference information may adjust the lighting process from a complex calculation method to an implementation method more suitable for the mobile terminal to adapt to the performance limitations of the mobile terminal. At the same time, it may also simplify the shadow filtering algorithm or turn off some post-processing effects to strike a balance between performance and visual effects.
[0046] Further, the scene rendering configuration information includes performance scene rendering configuration information; Based on the scene rendering configuration information and the scene information to be rendered, generating virtual scene rendering reference information includes: Parsing the performance scene rendering configuration information, obtaining light and shadow rendering configuration sub-information and surface material configuration sub-information; Generate virtual scene light and shadow rendering information based on the scene information to be rendered and the light and shadow rendering configuration sub-information; Generate virtual scene object material rendering information according to the scene information to be rendered and the surface material configuration sub-information; Based on the virtual scene light and shadow rendering information and the virtual scene object material rendering information, virtual scene rendering reference information is generated.
[0047] In actual applications, the light and shadow rendering configuration sub-information is a set of parameters used to define the lighting effects in the virtual scene; the surface material configuration sub-information is a set of parameters used to define the surface material of objects in the virtual scene; the virtual scene light and shadow rendering information is the scene lighting rendering data generated based on the light and shadow rendering configuration sub-information; the virtual scene object material rendering information is the object material rendering data generated based on the surface material configuration sub-information.
[0048] The lighting and shadow rendering configuration sub-information can be understood as a set of parameters used to define the lighting effects in the virtual scene. These parameters include lighting type (such as parallel light, point light, spotlight), lighting intensity, shadow algorithm, reflection probe configuration, etc. For example, on mobile devices, the lighting and shadow rendering configuration sub-information may use a simplified shadow algorithm, such as PCF (Percentage Closer Filtering) shadow filtering; and a lightweight reflection probe sampling method to reduce the computational load and improve rendering performance. On high-performance devices, more complex lighting effects (such as dynamic global illumination or high-precision shadow mapping) may be enabled.
[0049] The surface material configuration sub-information can be understood as a set of parameters used to define the surface material of objects in the virtual scene. These parameters include base color, normal information, metalness, roughness, etc. For example, on mobile devices, the surface material configuration sub-information may optimize the way buffer tables are generated, reduce the number of buffer tables, and reduce memory usage by compressing normal information and metalness data. On high-performance devices, higher-precision material parameters and more complex material models may be used to achieve more realistic surface effects.
[0050] Virtual scene lighting and shadow rendering information can be understood as scene lighting rendering data generated based on lighting and shadow rendering configuration sub-information. These data include lighting calculation results, shadow maps, reflection probe data, etc. For example, on mobile devices, virtual scene lighting and shadow rendering information may use a simplified lighting process, such as using VS (Vertex Shader) and PS (Pixel Shader) instead of CS (Compute Shader) to achieve lighting rendering, so as to reduce the computing burden of the target device. On high-performance devices, more complex lighting data (such as dynamic shadows and high-quality reflection effects) may be generated to provide a more realistic visual experience.
[0051] Virtual scene object material rendering information can be understood as object material rendering data generated based on the surface material configuration sub-information. These data include material property calculation results (such as base color, normal, metalness, etc.) and the interaction between material and lighting. For example, on mobile devices, virtual scene object material rendering information may optimize the storage and access methods of material data to improve cache hit rate and reading performance. On high-performance devices, more complex material rendering data (such as high-precision normal maps and complex lighting reflection models) may be generated to achieve higher quality material performance.
[0052] In the above manner, the light and shadow rendering configuration sub-information and the surface material configuration sub-information together constitute the core part of the scene rendering configuration information. Based on these configuration information, virtual scene light and shadow rendering information and virtual scene object material rendering information that are adapted to the performance of different devices can be generated, thereby achieving a balance between performance and quality.
[0053] Furthermore, based on the scene information to be rendered and the light and shadow rendering configuration sub-information, virtual scene light and shadow rendering information is generated, including: Determining target light and shadow rendering rule information corresponding to the target device based on the light and shadow rendering configuration sub-information; Generate target shadow rendering information according to the to-be-rendered scene information and the light and shadow rendering configuration sub-information; Based on the target light and shadow rendering rule information and the target shadow rendering information, virtual scene light and shadow rendering information is acquired.
[0054] In practical applications, the target light and shadow rendering rule information is a set of parameters used to define the lighting rendering process in the virtual scene; the target shadow rendering information is shadow rendering data generated based on the light and shadow rendering configuration sub-information.
[0055] The target lighting and shadow rendering rule information can be understood as a set of parameters used to define the lighting rendering process in the virtual scene. These parameters include lighting type (such as parallel light, point light, spotlight), lighting intensity, reflection probe configuration, etc. For example, on mobile devices, the target lighting and shadow rendering rule information may adopt a simplified lighting process (such as using vertex shaders and pixel shaders instead of compute shaders to achieve deferred lighting) to reduce the computational burden and improve rendering performance. On high-performance devices, more complex lighting effects (such as dynamic global illumination or high-precision reflection probe sampling) may be enabled to provide a higher quality visual experience.
[0056] The target shadow rendering information can be understood as the shadow rendering data generated based on the light and shadow rendering configuration sub-information. These data include shadow maps, shadow filtering algorithm results, etc. For example, on mobile devices, the target shadow rendering information may use a simplified shadow filtering algorithm (such as percentage progressive filtering) to reduce the target device computing resource consumption and balance performance and effect. On high-performance devices, more complex shadow data (such as high-quality soft shadows or dynamic shadow mapping) may be generated to achieve more realistic shadow effects.
[0057] In the above manner, the target light and shadow rendering rule information and the target shadow rendering information together constitute the core part of the virtual scene light and shadow rendering information. Based on this information, the lighting and shadow rendering data adapted to the performance of different devices can be generated, thereby achieving a balance between performance and quality.
[0058] Furthermore, generating virtual scene object material rendering information according to the to-be-rendered scene information and the surface material configuration sub-information includes: Determining a basic color buffer rule, a material attribute buffer rule, and a material property buffer rule based on the surface material configuration sub-information; Processing the to-be-rendered scene information based on the basic color buffer rule, the material attribute buffer rule, and the material property buffer rule, respectively, to generate a basic color buffer table, a material attribute buffer table, and a material property buffer table; The virtual scene object material rendering information is generated according to the basic color buffer table, the material attribute buffer table and the material property buffer table.
[0059] In practical applications, basic color buffer rules are rules that determine how to store and process the basic colors of object surfaces; material attribute buffer rules are rules that define how to store and process material attributes (such as normals and metallicity); material property buffer rules are rules that describe how to store and process material properties (such as reflective characteristics); basic color buffer table is a table for storing basic color data generated according to basic color buffer rules; material attribute buffer table is a table for storing material attribute data generated according to material attribute buffer rules; material property buffer table is a table for storing material property data generated according to material property buffer rules.
[0060] The basic color buffer rule can be understood as a rule for determining how to store and process the basic color of an object surface. It defines the storage format and processing method of basic color data. For example, as mentioned in the reference paragraph, the basic color buffer rule changes the original way of storing diffuse color to storing basic color and removes the influence of metalness information. This change in rule can optimize data storage, reduce redundant information, and ensure the consistency of rendering effects.
[0061] The material attribute buffer rule can be understood as a rule that defines how to store and process material attributes such as normals and metalness. It determines the storage format and encoding method of material attribute data. For example, as mentioned in the reference paragraph, the material attribute buffer rule adjusts the storage of normal information from higher precision to lower precision, and uses the saved storage space to store metalness information. This rule design can reduce memory usage and bandwidth consumption while ensuring visual effects.
[0062] The material property buffer rule can be understood as a rule for describing how to store and process material properties (such as reflectance). It defines the storage method and processing logic of material property data. For example, as mentioned in the reference paragraph, the buffer rule originally used to store data such as reflectance properties has been simplified, some information (such as coating masks) has been directly removed, and other information has been restored through base color and metalness. This change in the rule can further optimize storage space while maintaining the visual performance of the material.
[0063] The base color buffer table can be understood as a table that stores base color data generated according to the base color buffer rules. It is a data structure used to store the base color of the object surface in the rendering process. For example, in the reference paragraph, the base color buffer table stores the base color information of the object, removing the influence of metalness, thereby simplifying data storage and improving rendering efficiency.
[0064] The material attribute buffer table can be understood as a table for storing material attribute data generated according to the material attribute buffer rules. It is used to store the material attribute information of the object, such as normal and metalness. For example, as mentioned in the reference paragraph, the material attribute buffer table achieves more efficient data utilization in limited storage space by adjusting the storage accuracy of normal information and using the saved space to store metalness information.
[0065] The material property buffer table can be understood as a table that stores material property data generated according to the material property buffer rules. It is used to store material property information of objects, such as reflection characteristics. For example, as mentioned in the reference paragraph, the material property buffer table reduces the use of storage space by simplifying the storage content and removing unnecessary characteristic information, while restoring the necessary material properties through other data (such as base color and metalness). This design optimizes rendering performance while ensuring visual effects.
[0066] Step 106: Render the scene information to be rendered according to the virtual scene rendering reference information to obtain a target virtual scene image for the target device.
[0067] In practical applications, the target virtual scene image is the final rendering result generated according to the rendering configuration information of the target device and the scene information to be rendered; the target virtual scene image can be understood as the final image generated after processing the scene information to be rendered through the virtual scene rendering reference information. It is the final output of the rendering process and is presented directly to the user. For example, on a mobile phone platform, the target virtual scene image may be achieved by simplifying the shadow filtering algorithm, adjusting the lighting process, and optimizing the generation method of the buffer table to ensure that good visual effects can be presented under limited performance. At the same time, the switch of post-processing effects and the application of image super-resolution technology will also have an important impact on the quality of the target virtual scene image.
[0068] Considering that some data is frequently accessed during the rendering process, if the above data is determined as read-only information, the reading performance can be optimized. Before rendering the scene information to be rendered according to the virtual scene rendering reference information and obtaining the target virtual scene image for the target device, the method further includes: Determine scene rendering read-only information according to the scene rendering configuration information and the scene information to be rendered; The scene information to be rendered is rendered according to the scene rendering read-only information and the virtual scene rendering reference information to obtain a target virtual scene image for the target device.
[0069] In practical applications, scene rendering read-only information is data that is frequently accessed and does not need to be modified during the rendering process; scene rendering read-only information can be understood as data that is frequently accessed but does not need to be modified during the rendering process. These data usually include static material properties, lighting information, or other rendering-related configuration data. By setting these data to read-only information, you can optimize reading performance, reduce cache consistency issues on the target device, and improve rendering efficiency. For example, as mentioned in the reference paragraph, adjusting some frequently accessed data structures from read-write to read-only, such as from SSBO (ShaderStorage Buffer Object) to UBO (Uniform Buffer Object), can significantly improve rendering performance, especially in scenes that require fast access to static data.
[0070] Further, rendering the scene information to be rendered according to the virtual scene rendering reference information to obtain a target virtual scene image for the target device includes: Rendering the scene information to be rendered according to the virtual scene rendering reference information to obtain an initial virtual scene image for the target device, wherein the image resolution corresponding to the initial virtual scene image is a first image resolution; A target virtual scene image is generated according to the initial virtual scene image, wherein an image resolution corresponding to the target virtual scene image is a second image resolution, and the second image resolution is greater than the first image resolution.
[0071] In practical applications, the initial virtual scene image is the original image rendered according to the virtual scene rendering reference information; the first image resolution is the resolution of the initial virtual scene image; and the second image resolution is the resolution of the target virtual scene image processed by super-resolution technology.
[0072] The initial virtual scene image can be understood as the original image generated by rendering according to the virtual scene rendering reference information. These images are usually generated based on the rendering capabilities of the target device and the scene requirements, and the resolution may be low to meet performance requirements. For example, on a mobile device, the initial virtual scene image may use a lower resolution (such as 720p) to reduce the computing burden of the computing device and improve rendering performance. Although this image has a low resolution, it already contains the core visual information of the scene, providing a basis for subsequent super-resolution processing.
[0073] The first image resolution can be understood as the resolution of the initial virtual scene image. This resolution is usually determined based on the performance requirements of the target device and the complexity of the scene. For example, on a performance-constrained device, the first image resolution may be set to a lower value (such as below 1080p) to balance rendering performance and visual effects. On a high-performance device, it may be set to a higher resolution (such as 2K or 4K) to fully utilize hardware performance and improve image quality.
[0074] The second image resolution can be understood as the resolution of the target virtual scene image after being processed by super-resolution technology. This resolution is usually higher than the resolution of the initial virtual scene image, and is intended to improve the image's detail performance and visual quality. For example, on a mobile device, the resolution of the initial virtual scene image may be 720p, and after being processed by super-resolution technology, the resolution of the target virtual scene image may be increased to 1080p or higher, thereby providing clearer visual effects without significantly increasing the rendering load.
[0075] In the above manner, the initial virtual scene image, the first image resolution, and the second image resolution together constitute the core link of virtual scene rendering. The initial virtual scene image provides basic data for the rendering process, the first image resolution ensures the balance between rendering performance and quality, and the second image resolution further improves the visual performance of the image through super-resolution technology. For example, on mobile devices, by generating a lower resolution initial virtual scene image and combining super-resolution technology to generate a high-resolution target virtual scene image, high-quality rendering effects can be achieved with limited hardware resources. On high-performance devices, higher initial resolution and more complex super-resolution algorithms can be used to give full play to hardware performance and provide a more realistic visual experience.
[0076] The scheme of the embodiment of this specification is applied to automatically match the rendering strategy of performance priority or image quality priority through device type identification and performance grading mechanism, provide dynamic light source simplification and material compression algorithm for low-performance devices, and retain physical lighting calculation and multi-layer material superposition characteristics for high-performance devices. The light and shadow and material processing flow is disassembled based on hardware capabilities, and standardized rendering data is generated through basic color buffering, attribute layered analysis and multi-level buffering rules, so that the mobile terminal can maintain the sense of material detail while reducing the real-time computing load. Combined with the resolution adaptive mechanism, efficient downsampling rendering of low-power devices and super-resolution enhanced output of high-performance devices are achieved under the unified resource architecture, so that cross-platform projects do not need to produce multiple sets of model maps, so that the mobile terminal can smoothly run computer-level image quality resources, while allowing the computer to call more complex rendering methods to maintain its good visual effects.
[0077] The following combination Figure 2 Taking the application of the virtual scene rendering method provided in this specification in game scene rendering as an example, the virtual scene rendering method is further described. Figure 2 A processing flow chart of a game scene rendering method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0078] Step 202: Obtain the target device type corresponding to the target device.
[0079] Step 204: When the target device type is a first type device, determine that the scene rendering configuration information corresponding to the target device is performance scene rendering configuration information.
[0080] Step 206: parse the performance scene rendering configuration information, and obtain the light and shadow rendering configuration sub-information and the surface material configuration sub-information.
[0081] Step 208: Determine the target light and shadow rendering rule information corresponding to the target device based on the light and shadow rendering configuration sub-information.
[0082] Step 210: Generate target shadow rendering information according to the scene information to be rendered and the light and shadow rendering configuration sub-information.
[0083] Step 212: Based on the surface material configuration sub-information, determine the basic color buffer rule, material attribute buffer rule and material property buffer rule.
[0084] Step 214: Process the scene information to be rendered based on the basic color buffer rule, the material attribute buffer rule, and the material property buffer rule, respectively, to generate a basic color buffer table, a material attribute buffer table, and a material property buffer table.
[0085] Step 216: Generate virtual scene object material rendering information according to the basic color buffer table, the material attribute buffer table and the material property buffer table.
[0086] Step 218: Combine the above-mentioned target light and shadow rendering rule information, target shadow rendering information, basic color buffer table, material attribute buffer table and material property buffer table to generate lighting rendering information, and render the image based on the lighting rendering information to obtain an initial virtual scene image.
[0087] Step 220: Super-resolution the initial virtual scene image to obtain a target virtual scene image with a higher resolution.
[0088] The scheme of the embodiment of this specification is applied to trigger the differentiated rendering pipeline through the device type judgment mechanism. When it is identified as a low-performance device, dynamic light source clipping and material attribute channel compression technology are automatically enabled to remove high-energy subsurface scattering effects while maintaining basic diffuse reflection and normal details. Based on the surface material configuration sub-information, multi-level buffer rules are implemented to separate the basic color, metalness, and roughness, so that the mobile terminal can avoid performance fluctuations caused by real-time reflection probe updates by pre-calculating the material attribute buffer table. The mobile terminal can smoothly run computer-level image quality resources, while allowing the computer to call more complex rendering methods to maintain its better visual effects.
[0089] Corresponding to the above method embodiment, this specification also provides a virtual scene rendering device embodiment, Figure 3 FIG. 1 is a schematic diagram showing the structure of a virtual scene rendering device provided by an embodiment of the present specification. Figure 3 As shown, the device comprises: An acquisition module 302 is configured to acquire scene information to be rendered and scene rendering configuration information corresponding to a target device; A generating module 304 is configured to generate virtual scene rendering reference information based on the scene rendering configuration information and the scene information to be rendered; The rendering module 306 is configured to render the scene information to be rendered according to the virtual scene rendering reference information, and obtain a target virtual scene image for the target device.
[0090] Optionally, the acquisition module 302 is further configured to: Obtaining a target device type corresponding to the target device; Based on the target device type, scene rendering configuration information corresponding to the target device is determined.
[0091] Optionally, the acquisition module 302 is further configured to: In a case where the target device type is a first type device, determining that the scene rendering configuration information corresponding to the target device is performance scene rendering configuration information; In a case where the target device type is a second type device, it is determined that the scene rendering configuration information corresponding to the target device is quality scene rendering configuration information.
[0092] Optionally, the scene rendering configuration information includes performance scene rendering configuration information; The generating module 304 is further configured to: Parsing the performance scene rendering configuration information, obtaining light and shadow rendering configuration sub-information and surface material configuration sub-information; Generate virtual scene light and shadow rendering information based on the scene information to be rendered and the light and shadow rendering configuration sub-information; Generate virtual scene object material rendering information according to the scene information to be rendered and the surface material configuration sub-information; Based on the virtual scene light and shadow rendering information and the virtual scene object material rendering information, virtual scene rendering reference information is generated.
[0093] Optionally, the generating module 304 is further configured to: Determining target light and shadow rendering rule information corresponding to the target device based on the light and shadow rendering configuration sub-information; Generate target shadow rendering information according to the to-be-rendered scene information and the light and shadow rendering configuration sub-information; Based on the target light and shadow rendering rule information and the target shadow rendering information, virtual scene light and shadow rendering information is acquired.
[0094] Optionally, the generating module 304 is further configured to: Determining a basic color buffer rule, a material attribute buffer rule, and a material property buffer rule based on the surface material configuration sub-information; Processing the to-be-rendered scene information based on the basic color buffer rule, the material attribute buffer rule, and the material property buffer rule, respectively, to generate a basic color buffer table, a material attribute buffer table, and a material property buffer table; The virtual scene object material rendering information is generated according to the basic color buffer table, the material attribute buffer table and the material property buffer table.
[0095] Optionally, the rendering module 306 is further configured to: Rendering the scene information to be rendered according to the virtual scene rendering reference information to obtain an initial virtual scene image for the target device, wherein the image resolution corresponding to the initial virtual scene image is a first image resolution; A target virtual scene image is generated according to the initial virtual scene image, wherein an image resolution corresponding to the target virtual scene image is a second image resolution, and the second image resolution is greater than the first image resolution.
[0096] Optionally, the virtual scene rendering device further includes a read-only information confirmation module, which is configured to: Determine scene rendering read-only information according to the scene rendering configuration information and the scene information to be rendered; The scene information to be rendered is rendered according to the scene rendering read-only information and the virtual scene rendering reference information to obtain a target virtual scene image for the target device.
[0097] The above is a schematic scheme of a virtual scene rendering device of this embodiment. It should be noted that the technical scheme of the virtual scene rendering device and the technical scheme of the virtual scene rendering method described above belong to the same concept, and the details not described in detail in the technical scheme of the virtual scene rendering device can be referred to the description of the technical scheme of the virtual scene rendering method described above.
[0098] The scheme of the embodiment of this specification is applied to automatically match the rendering strategy of performance priority or image quality priority through device type identification and performance grading mechanism, provide dynamic light source simplification and material compression algorithm for low-performance devices, and retain physical lighting calculation and multi-layer material superposition characteristics for high-performance devices. The light and shadow and material processing flow is disassembled based on hardware capabilities, and standardized rendering data is generated through basic color buffering, attribute layered analysis and multi-level buffering rules, so that the mobile terminal can maintain the sense of material detail while reducing the real-time computing load. Combined with the resolution adaptive mechanism, efficient downsampling rendering of low-power devices and super-resolution enhanced output of high-performance devices are achieved under the unified resource architecture, so that cross-platform projects do not need to produce multiple sets of model maps, so that the mobile terminal can smoothly run computer-level image quality resources, while allowing the computer to call more complex rendering methods to maintain its good visual effects.
[0099] Figure 4 The structure block diagram of a computing device 400 provided according to an embodiment of the present specification is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.
[0100] The computing device 400 also includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0101] In one embodiment of the present specification, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0102] The computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile terminals, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 400 may also be a mobile or stationary server.
[0103] The processor 420 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned virtual scene rendering method.
[0104] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the virtual scene rendering method described above are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the virtual scene rendering method described above.
[0105] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned virtual scene rendering method.
[0106] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the virtual scene rendering method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the virtual scene rendering method described above.
[0107] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned virtual scene rendering method when executed by a processor.
[0108] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the virtual scene rendering method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program can be found in the description of the technical scheme of the virtual scene rendering method described above.
[0109] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0110] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0111] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0112] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0113] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A virtual scene rendering method, characterized in that: include: Obtain the scene information to be rendered and the scene rendering configuration information corresponding to the target device; Generate virtual scene rendering reference information based on the scene rendering configuration information and the scene information to be rendered; The scene information to be rendered is rendered according to the virtual scene rendering reference information to obtain a target virtual scene image for the target device.
2. The method according to claim 1, characterized in that Get the scene information to be rendered and the scene rendering configuration information corresponding to the target device, including: Obtaining a target device type corresponding to the target device; Based on the target device type, scene rendering configuration information corresponding to the target device is determined.
3. The method according to claim 2, characterized in that Based on the target device type, determining scene rendering configuration information corresponding to the target device includes: In the case where the target device type is a first type device, determining that the scene rendering configuration information corresponding to the target device is performance scene rendering configuration information, wherein the first type device is a device whose device performance is less than a preset threshold; In the case that the target device type is a second-category device, it is determined that the scene rendering configuration information corresponding to the target device is quality scene rendering configuration information, wherein the second-category device is a device whose device performance is greater than or equal to a preset threshold.
4. The method according to claim 1, characterized in that The scene rendering configuration information includes performance scene rendering configuration information; Based on the scene rendering configuration information and the scene information to be rendered, generating virtual scene rendering reference information includes: Parsing the performance scene rendering configuration information, obtaining light and shadow rendering configuration sub-information and surface material configuration sub-information; Generate virtual scene light and shadow rendering information based on the scene information to be rendered and the light and shadow rendering configuration sub-information; Generate virtual scene object material rendering information according to the scene information to be rendered and the surface material configuration sub-information; Based on the virtual scene light and shadow rendering information and the virtual scene object material rendering information, virtual scene rendering reference information is generated.
5. The method according to claim 4, characterized in that Generating virtual scene light and shadow rendering information based on the scene information to be rendered and the light and shadow rendering configuration sub-information, including: Determining target light and shadow rendering rule information corresponding to the target device based on the light and shadow rendering configuration sub-information; Generate target shadow rendering information according to the to-be-rendered scene information and the light and shadow rendering configuration sub-information; Based on the target light and shadow rendering rule information and the target shadow rendering information, virtual scene light and shadow rendering information is acquired.
6. The method according to claim 4, characterized in that Generating virtual scene object material rendering information according to the scene information to be rendered and the surface material configuration sub-information, including: Determining a basic color buffer rule, a material attribute buffer rule, and a material property buffer rule based on the surface material configuration sub-information; Processing the to-be-rendered scene information based on the basic color buffer rule, the material attribute buffer rule, and the material property buffer rule, respectively, to generate a basic color buffer table, a material attribute buffer table, and a material property buffer table; The virtual scene object material rendering information is generated according to the basic color buffer table, the material attribute buffer table and the material property buffer table.
7. The method according to claim 1, characterized in that Rendering the scene information to be rendered according to the virtual scene rendering reference information to obtain a target virtual scene image for the target device includes: Rendering the scene information to be rendered according to the virtual scene rendering reference information to obtain an initial virtual scene image for the target device, wherein the image resolution corresponding to the initial virtual scene image is a first image resolution; A target virtual scene image is generated according to the initial virtual scene image, wherein an image resolution corresponding to the target virtual scene image is a second image resolution, and the second image resolution is greater than the first image resolution.
8. The method according to any one of claims 1 to 7, characterized in that: Before rendering the scene information to be rendered according to the virtual scene rendering reference information to obtain a target virtual scene image for the target device, the method further includes: Determine scene rendering read-only information according to the scene rendering configuration information and the scene information to be rendered; The scene information to be rendered is rendered according to the scene rendering read-only information and the virtual scene rendering reference information to obtain a target virtual scene image for the target device.
9. A virtual scene rendering device, characterized in that: include: An acquisition module is configured to acquire scene information to be rendered and scene rendering configuration information corresponding to a target device; A generating module, configured to generate virtual scene rendering reference information based on the scene rendering configuration information and the scene information to be rendered; The rendering module is configured to render the scene information to be rendered according to the virtual scene rendering reference information, and obtain a target virtual scene image for the target device.
10. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer-readable storage medium storing a computer program / instruction, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Illumination data processing method
CN121330157A