Real-time rendering method and device based on visual limitation, equipment and storage medium

By using bounding box technology, rendering scene range determination and rendering removal algorithm in the real-time rendering engine, the problem of inefficient rendering efficiency of the real-time rendering engine is solved, and efficient and good quality real-time rendering effect is achieved.

CN119888055APending Publication Date: 2025-04-25SHENZHEN RENDERBUS TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411742935.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing real-time rendering engine performs complex calculations in a limited time, resulting in low rendering efficiency, and traditional perspective limitation optimization methods have large calculations and poor results.

Method used

Real-time rendering method based on visual limitations is adopted, scene objects in the virtual scene are approximately fitted through bounding box technology, and the rendering scene range is determined. The rendering removal algorithm is used to filter the target rendering object, generate a list to be rendered, and rendered according to the preset rendering method.

Benefits of technology

It reduces the computing load of the rendering engine, optimizes resource allocation, reduces unnecessary rendering work, improves rendering efficiency and image quality, and improves the response efficiency of real-time rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888055A_ABST
    Figure CN119888055A_ABST
Patent Text Reader

Abstract

The invention provides a real-time rendering method and device based on visual limitation, equipment and a storage medium, and relates to the technical field of image processing. According to the method, the scene objects in the virtual scene are approximately fitted through the bounding box technology, unnecessary rendering data calculation is reduced, and therefore the calculation load of a rendering engine is reduced; a rendering scene range is determined through virtual camera parameters and a scene analysis result, resource allocation is further optimized, and unnecessary rendering work is reduced; target rendering objects are screened by using a rendering rejection algorithm to generate a to-be-rendered list, so that the number of the rendering objects is effectively reduced, and the rendering efficiency is improved; and the target object is rendered according to the preset rendering mode, so that the high efficiency and the image quality of the rendering process are ensured, and the response efficiency and the rendering effect of real-time rendering are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a real-time rendering method, device, equipment and storage medium based on visual limitations. Background Art

[0002] In the field of computer graphics and image processing, real-time rendering engine is a widely used technology. Real-time rendering engine is used to quickly render virtual scenes into images to achieve interactive and visual effects in computer games, virtual reality worlds and other fields.

[0003] However, since real-time rendering engines need to perform complex calculations in a limited time and present high-quality images in real-time scenes, optimizing the performance and effect of real-time rendering engines is a challenging problem. View limitation is a method that can limit the rendering range. It can improve the performance of real-time rendering by limiting the visible range around the rendering camera and reducing the computational load of the rendering engine. Although some view limitation optimization methods have been proposed, traditional methods often have problems such as large amount of calculation and poor effect, resulting in low rendering efficiency of real-time rendering engines.

[0004] Therefore, how to improve the rendering efficiency of the real-time rendering engine has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The present application provides a real-time rendering method, apparatus, device and storage medium based on visual limitations, aiming to improve the rendering efficiency of a real-time rendering engine.

[0006] In a first aspect, the present application provides a real-time rendering method based on visual limitations, the real-time rendering method based on visual limitations comprising the following steps:

[0007] Based on the bounding box technology, at least one scene object in the input virtual scene is approximately fitted to obtain a scene analysis result;

[0008] Determining a rendering scene range in the virtual scene based on device parameters of the virtual camera and the scene analysis result;

[0009] Based on the rendering culling algorithm, target rendering objects within the rendering scene are screened to generate a list to be rendered;

[0010] Based on a preset rendering method, each of the target rendering objects in the to-be-rendered list is rendered.

[0011] In a second aspect, the present application further provides a real-time rendering device based on visual limitations, the real-time rendering device based on visual limitations comprising:

[0012] A bounding box approximation analysis module, used to perform approximate fitting on at least one scene object in an input virtual scene based on a bounding box technique to obtain a scene analysis result;

[0013] A range determination module, used for determining a rendering scene range in the virtual scene based on device parameters of the virtual camera and the scene analysis result;

[0014] A rendering culling module, used for screening target rendering objects within the rendering scene range based on a rendering culling algorithm, and generating a list to be rendered;

[0015] The object rendering module is used to render each of the target rendering objects in the to-be-rendered list based on a preset rendering method.

[0016] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the real-time rendering method based on visual limitations as described above are implemented.

[0017] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the real-time rendering method based on visual limitations as described above are implemented.

[0018] The present application provides a real-time rendering method, device, computer equipment and storage medium based on visual limitations. The method of the present application includes approximating at least one scene object in an input virtual scene based on bounding box technology to obtain a scene analysis result; determining the rendering scene range in the virtual scene based on the device parameters of the virtual camera and the scene analysis result; screening the target rendering objects within the rendering scene range based on the rendering culling algorithm to generate a list to be rendered; and rendering each of the target rendering objects in the list to be rendered based on a preset rendering method. Through the above-mentioned method, the present application approximates the scene objects in the virtual scene through the bounding box technology, reduces unnecessary rendering data calculations, and thus reduces the computing load of the rendering engine; determines the rendering scene range through virtual camera parameters and scene analysis results, further optimizes resource allocation, and reduces unnecessary rendering work; uses the rendering culling algorithm to screen the target rendering objects, generates a list to be rendered, effectively reduces the number of rendering objects, and improves rendering efficiency; renders the target objects according to the preset rendering method to ensure the efficiency and image quality of the rendering process, and improves the response efficiency and rendering effect of real-time rendering. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 A flowchart of a first embodiment of a real-time rendering method based on visual limitations provided by the present application;

[0021] Figure 2 A schematic diagram of a real-time rendering process based on visual limitations provided in an embodiment of the present application;

[0022] Figure 3 A flowchart of a second embodiment of a real-time rendering method based on visual limitations provided by the present application;

[0023] Figure 4 It is a structural schematic diagram of a first embodiment of a real-time rendering device based on visual limitations provided by the present application;

[0024] Figure 5 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0025] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0028] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0029] Please refer to Figure 1 , Figure 1 A flowchart of a first embodiment of a real-time rendering method based on visual limitations provided by the present application.

[0030] like Figure 1 As shown, the real-time rendering method based on visual limitations includes steps S101 to S104.

[0031] S101, performing approximate fitting on at least one scene object in an input virtual scene based on a bounding box technology to obtain a scene analysis result;

[0032] In one embodiment, if Figure 2 As shown in the figure, for the input virtual scene, the scene analysis is first performed, including the extraction of information such as the position, size, shape, etc. of the scene objects. The bounding box and other methods are used to quickly approximate the scene to improve the efficiency of subsequent calculations.

[0033] Furthermore, the virtual scene is analyzed to obtain scene distribution information in the virtual scene; and the scene distribution information is approximately fitted based on the bounding box technology to obtain the scene analysis result.

[0034] The scene object information includes the distribution position, object size, object shape, etc. of the scene objects.

[0035] In one embodiment, the input virtual scene is analyzed to extract the location, size, shape and other information of the scene objects, which will be used for subsequent calculations and optimizations. In order to improve the calculation efficiency, a method such as a bounding box can be used to quickly approximate the scene. A bounding box is a minimum cube or minimum sphere that can tightly surround the scene objects. The bounding box can be used to quickly determine whether the object is within the viewing angle. Using the bounding box technology, most of the objects that do not need to be rendered can be excluded in advance, reducing the load of subsequent calculations.

[0036] In one embodiment, the bounding box technique is a method for solving the optimal bounding control of a discrete point set, that is, using a geometric body (called a bounding box) with a slightly larger volume and simpler characteristics to approximately replace a complex geometric object. The bounding box technique can use bounding box algorithms including AABB bounding box (Axis-aligned bounding box), Sphere, Oriented bounding box OBB, and Fixed directions hull FDH (Fixed directions hulls or k-DOP).

[0037] Among them, AABB is defined as the smallest hexahedron that contains the object and whose sides are parallel to the coordinate axes. The bounding sphere is defined as the smallest sphere that contains the object. To determine the bounding sphere, it is first necessary to calculate the mean of the x, y, and z coordinates of the vertices of all elements in the set of basic geometric elements that make up the object to determine the center of the bounding sphere, and then determine the radius r from the distance between the center and the point determined by the three maximum coordinates, and then construct the bounding sphere. OBB is the smallest rectangular parallelepiped that contains the object and has any direction relative to the coordinate axis. FDH is defined as the convex hull that contains the object and whose normal vectors of all its faces are taken from a fixed set of directions.

[0038] S102, determining a rendering scene range in the virtual scene based on device parameters of the virtual camera and the scene analysis result;

[0039] In one embodiment, the viewing angle range of the camera is calculated based on the position and viewing angle parameters of the virtual camera in combination with the scene analysis result.

[0040] Exemplarily, the viewing angle range of the camera can be calculated by the focal length, field of view (FOV) of the camera, and the position of the camera in the virtual scene. For example, if the FOV of the camera is 90 degrees and the focal length is 50 mm, the horizontal and vertical viewing angle ranges can be calculated by the field of view calculation formula.

[0041] Furthermore, based on the device parameters of the virtual camera, the viewing angle range of the virtual camera is calculated, and the device parameters include device distribution position and viewing angle parameters; based on the viewing angle range and the scene analysis result, the rendering scene range in the virtual scene is determined.

[0042] Generally, the calculation of the viewing angle of a camera mainly involves the determination of the horizontal field of view angle and the vertical field of view angle.

[0043] Exemplarily, the calculation formula of the horizontal field of view angle (α) can be expressed as:

[0044]

[0045] Among them, ω is the field of view width, f is the focal length of the virtual camera lens;

[0046] The calculation formula of vertical field of view angle (β) can be expressed as:

[0047]

[0048] Among them, h is the field of view height, and f is the focal length of the virtual camera lens.

[0049] Through the above calculation formulas for the horizontal field of view angle and the vertical field of view angle, the viewing angle range of the virtual camera can be calculated according to the device parameters of the virtual camera, such as the device distribution position (such as device coordinates, orientation, imaging center coordinates, etc.) and viewing angle parameters (such as image sensor size, imaging size, focal length, pixel size, resolution, etc.).

[0050] In one embodiment, the viewing angle range of the virtual camera is calculated based on the position and viewing angle parameters of the virtual camera. The viewing angle range of the camera determines the range of objects that need to be rendered. In order to accurately calculate the rendering scene range, the relationship between the scene objects and the camera needs to be considered.

[0051] In one embodiment, in a complex virtual scene, considering the relationship between scene objects and the camera, in order to improve rendering efficiency, multi-level subdivision (such as octree) and spatial data structure construction can be used to quickly determine which objects are within the camera's field of view, thereby determining the objects that need to be rendered within the field of view, rather than the entire scene.

[0052] S103, based on a rendering culling algorithm, screening target rendering objects within the rendering scene range, and generating a list to be rendered;

[0053] In one embodiment, the rendering culling algorithm may be a view cone culling algorithm, which determines whether a scene object is inside a view cone through a predefined view cone (determined by parameters such as camera position and viewing angle), and adds the objects inside the view cone to the rendering list.

[0054] In one embodiment, objects outside the viewing angle range are removed based on the calculated viewing angle range of the virtual camera in combination with methods such as a frustum culling algorithm, hierarchical decomposition and a fast culling algorithm.

[0055] Among them, the frustum culling algorithm is mainly used to determine whether the object is within the viewing angle. If it is beyond the viewing angle, it can be directly culled without subsequent rendering processing. Hierarchical subdivision is a method of organizing scene objects in a hierarchical manner. The culling efficiency can be improved by accessing and culling objects layer by layer. The fast culling algorithm is an optimization method based on spatial data structure. By constructing spatial layering, regional space culling and other technologies, the number of objects that need to be rendered can be further reduced. Through rendering culling, the number of objects that need to be rendered can be greatly reduced, and the efficiency of the rendering engine can be improved.

[0056] Specifically, the objects in the scene are culled from the viewing cone to determine whether they are within the viewing cone, and the objects within the viewing cone are added to the rendering list; fast culling algorithms (such as Occlusion Culling) are used to cull objects that are not visible outside the viewing range to reduce the number of objects that need to be processed.

[0057] Furthermore, based on the rendering culling algorithm, the relative position relationship between the rendering scene range and the scene object is determined; if the scene object is within the rendering scene range, the scene object is determined to be the target rendering object; and based on at least one of the target rendering objects, the to-be-rendered list is generated.

[0058] Generally speaking, rendering culling algorithms are mainly divided into visibility culling and occlusion culling. Visibility culling culls objects by judging the distance between the object and the camera or whether it is within the camera's frustum. Occlusion culling culls objects by judging whether the object is blocked by other objects within the visible range of the camera.

[0059] In one embodiment, the relationship between the objects in the scene and the camera also determines which objects need to be rendered. For example, if an object is completely occluded by another object, then it does not need to be rendered. Through the spatial data structure, the occlusion relationship between objects can be effectively managed and queried.

[0060] Specifically, by using the viewing angle of the camera and the spatial position of the object, an algorithm such as ray casting or frustum is used to determine whether the object intersects with the viewing angle of the camera, thereby determining which objects are within the viewing angle.

[0061] Ray casting determines whether to render an object by judging whether it is blocked by other objects. It can be based on the occlusion query of the entire object or the occlusion query at the pixel level. Frustum culling is a culling technology in the application stage. It excludes objects outside the visible range according to the camera's field of view, the distance of the near clipping plane, and the far clipping plane to reduce rendering consumption.

[0062] S104: Render each of the target rendering objects in the to-be-rendered list based on a preset rendering method.

[0063] In one embodiment, after determining the object to be rendered, the rendering process can be further optimized. For example, the level of detail (LOD) technology can be used to adjust the model details of the object according to the distance between the object and the camera to balance the rendering quality and performance.

[0064] Specifically, before rendering, it is necessary to set the rendering parameters of each target rendering object according to a preset rendering method, including setting the lighting model, material properties, shadow generation method, post-processing effects, etc.

[0065] For example, the lighting effects of objects can be calculated based on the lighting conditions of the scene, including ambient light, diffuse light, specular light, etc., and shadows can be generated to enhance the realism of the scene. Preset materials and textures can be applied to each object to define the appearance and surface characteristics of the object, such as color, roughness, metallicity, etc. The appropriate level of detail model can be selected for rendering based on the distance of the object from the camera to balance performance and visual effects. For transparent or translucent objects, transparency and blending modes need to be handled correctly to ensure the correct rendering order and blending effects. Post-processing effects such as tone mapping, blur, anti-aliasing, ambient occlusion, etc. are applied to enhance visual effects.

[0066] In real-time rendering applications, such as virtual studios, camera tracking protocols (such as the Free-D protocol) can be used to transmit real-time data from cameras to a virtual synthesis system, thereby achieving synchronization between virtual scenes and real camera movements.

[0067] In one embodiment, in order to improve the performance of the real-time rendering engine, the embodiment of the present application may adopt a storage optimization method. Through techniques such as spatial layering and view vector culling, the number of objects that need to be stored and processed is reduced, thereby reducing the computational load.

[0068] Specifically, a storage optimization technology used in the embodiments of the present application is spatial stratification: according to the viewing angle range and rendering requirements, the scene is organized in a spatial stratification manner, and the scene is divided into multiple spatial levels, each of which contains objects of different granularity and importance. By selecting in the appropriate spatial level according to the viewing angle range and rendering requirements, the number of objects to be processed can be reduced and the rendering efficiency can be improved.

[0069] Specifically, another storage optimization technology that can be used in the embodiments of the present application is view vector culling, which calculates the view vector according to the camera position and viewing angle parameters to determine visible objects and cull invisible objects. During the rendering process, only objects visible to the camera are processed and rendered, and other invisible objects are ignored, thereby reducing calculation and storage overhead.

[0070] In this embodiment, an efficient and high-quality real-time rendering engine is realized through the steps of scene analysis, perspective calculation, rendering culling and storage optimization. Through the steps of scene analysis and perspective calculation, accurate perspective limitation range calculation is realized, and the effect of real-time rendering is improved; through storage optimization, the system's memory usage and computing load can be reduced, and the performance and efficiency of the real-time rendering engine can be improved. Combining multiple technical means, optimization for different scenes is realized, and the flexibility and adaptability of the real-time rendering engine are improved.

[0071] This embodiment provides a real-time rendering method based on visual limitations. The method of the present application uses bounding box technology to approximate scene objects in a virtual scene, thereby reducing unnecessary rendering data calculations and thus reducing the computing load of a rendering engine; determines the rendering scene range through virtual camera parameters and scene analysis results, further optimizes resource allocation, and reduces unnecessary rendering work; uses a rendering culling algorithm to screen target rendering objects and generate a list to be rendered, thereby effectively reducing the number of rendering objects and improving rendering efficiency; renders the target object according to a preset rendering method, thereby ensuring the efficiency and image quality of the rendering process and improving the response efficiency and rendering effect of real-time rendering.

[0072] Please refer to Figure 3 , Figure 3 A flowchart of a second embodiment of a real-time rendering method based on visual limitations provided in the present application.

[0073] In this embodiment, Figure 3 As shown, based on the above Figure 1 In the illustrated embodiment, before S104, the following steps are further included:

[0074] S201, obtaining an object identification code corresponding to each target rendering object;

[0075] In one embodiment, a deep learning model, such as a Faster R-CNN target detector, can be used to perform object recognition and assign codes. For example, codes can be generated based on features such as the object's physical properties, shape, material, or position in the scene, thereby uniquely identifying scene objects in a virtual scene.

[0076] In one embodiment, the object identification code corresponding to the target rendering object can be obtained according to the characteristics of the target rendering object, or can be obtained by directly performing a matching query in a rendering parameter list of preset values.

[0077] In one embodiment, before obtaining the object identification code corresponding to each target rendering object, it also includes: obtaining the rendering requirements of each scene object in the virtual scene, and assigning a uniquely identifiable object identification code to each scene object in the virtual scene; based on the rendering requirements corresponding to each scene object, presetting the rendering parameters of each scene object, and determining the preset rendering method corresponding to each scene object; based on the object identification code corresponding to each scene object and the preset rendering method, generating a rendering parameter list.

[0078] In one embodiment, in a virtual scene, each scene object can be identified and distinguished through identifiers such as in three-dimensional modeling software, physical tags, or by using a machine learning algorithm, and a unique object identification code can be assigned to each scene object.

[0079] Exemplarily, the object identification code may be a number, a letter, or a combination of the two. The coding system needs to ensure the uniqueness and scalability of the code so that as the complexity of the scene increases, new objects can be added without duplication of the code.

[0080] Exemplarily, for each scene object in the virtual scene, its physical properties (such as material, lighting, transparency, etc.) and visual requirements (such as shadow, reflection, texture mapping, etc.) are analyzed to determine its rendering requirements. And according to the properties of the object and the lighting conditions of the scene, the rendering requirements are classified, such as static objects, dynamic objects, transparent objects, etc.

[0081] For example, according to the rendering requirements of each scene object, the corresponding rendering parameters are preset. For example, for metal objects, high reflectivity and specular highlights may need to be set; for transparent objects, transparency and refractive index need to be set. Select a suitable rendering technology, such as ray tracing, rasterization, or physically based rendering (PBR), and preset parameters for each technology.

[0082] In one embodiment, a detailed rendering parameter list is generated based on the object recognition code and the preset rendering mode. The rendering parameter list will contain all rendering parameters of each scene object for the convenience of use by the rendering engine.

[0083] Exemplarily, the rendering parameter list may be stored in a tree structure or in a key-value pair format for ease of management and access.

[0084] By pre-configuring the rendering parameters of each scene object in the virtual scene, the graphics processing unit (GPU) and central processing unit (CPU) resources can be allocated more effectively, thereby improving the overall rendering performance. The pre-configured parameters enable the rendering engine to respond more quickly to user operations and scene changes, which can improve the rendering efficiency and effect of real-time rendering.

[0085] S202: Based on the object identification codes, matching rendering parameters corresponding to the target rendering objects in a preconfigured rendering parameter list to obtain the preset rendering modes corresponding to the target rendering objects.

[0086] In one embodiment, according to the object identification codes corresponding to the target rendering objects, these object identification codes are matched in the pre-configured rendering parameter list, so as to obtain the rendering parameters corresponding to each target rendering object, such as lighting, material, shadow, etc.

[0087] The matching process can be implemented through a lookup table or a database query, and each object identification code is associated with a set of preset rendering parameters.

[0088] In one embodiment, based on the matched rendering parameters, a preset rendering mode for each object may be determined. This may include determining whether the object uses real-time lighting, pre-baked lighting, transparent rendering, reflection rendering, etc. The selection of the preset rendering mode depends on the characteristics of the object and the requirements of the scene.

[0089] It is understandable that, in the actual rendering process, the rendering parameters of the target rendering object can be dynamically adjusted according to performance feedback and visual quality requirements to optimize the rendering effect and performance.

[0090] This embodiment can significantly improve the rendering efficiency and effect of virtual scenes by pre-configuring and matching object recognition codes and rendering parameters, ensuring that objects are presented in the most optimized manner, while reducing computing resource consumption, improving user experience, and providing rapid response to dynamic scene changes.

[0091] See also Figure 4 , Figure 4 It is a structural schematic diagram of a first embodiment of a real-time rendering device based on visual limitations provided by the present application. The real-time rendering device based on visual limitations is used to execute the aforementioned real-time rendering method based on visual limitations.

[0092] like Figure 4 As shown, the real-time rendering device 300 based on visual limitations includes: a bounding box approximation analysis module 301 , a range determination module 302 , a rendering culling module 303 and an object rendering module 304 .

[0093] The bounding box approximation analysis module 301 is used to perform approximate fitting on at least one scene object in the input virtual scene based on the bounding box technology to obtain a scene analysis result;

[0094] A range determination module 302, configured to determine a rendering scene range in the virtual scene based on device parameters of the virtual camera and the scene analysis result;

[0095] A rendering culling module 303, used for screening target rendering objects within the rendering scene range based on a rendering culling algorithm, and generating a list to be rendered;

[0096] The object rendering module 304 is used to render each of the target rendering objects in the to-be-rendered list based on a preset rendering method.

[0097] In one embodiment, the bounding box approximation analysis module 301 includes:

[0098] A scene analysis unit, used to analyze the virtual scene and obtain scene distribution information in the virtual scene;

[0099] An approximate fitting unit is used to perform approximate fitting on the scene distribution information based on the bounding box technology to obtain the scene analysis result.

[0100] In one embodiment, the scene object information includes the distribution position, object size and object shape of the scene object.

[0101] In one embodiment, the rendering culling module 303 includes:

[0102] A relative position determination unit, used to determine the relative position relationship between the rendering scene range and the scene objects based on a rendering culling algorithm;

[0103] a target rendering object determining unit, configured to determine that the scene object is the target rendering object if the scene object is within the rendering scene range;

[0104] The to-be-rendered list generating unit is configured to generate the to-be-rendered list based on at least one of the target rendering objects.

[0105] In one embodiment, the range determination module 302 includes:

[0106] A viewing angle range calculation unit, configured to calculate the viewing angle range of the virtual camera based on device parameters of the virtual camera, wherein the device parameters include device distribution positions and viewing angle parameters;

[0107] A range determination unit is used to determine a rendering scene range in the virtual scene based on the viewing angle range and the scene analysis result.

[0108] In one embodiment, the real-time rendering device 300 based on visual limitations further includes a rendering parameter pre-configuration module, including:

[0109] An identification code acquisition unit, used to acquire an object identification code corresponding to each of the target rendering objects;

[0110] The rendering mode determining unit is used to match the rendering parameters corresponding to each of the target rendering objects in the preconfigured rendering parameter list based on each of the object identification codes to obtain the preset rendering mode corresponding to each of the target rendering objects.

[0111] In one embodiment, the rendering parameter preconfiguration module further includes:

[0112] A rendering requirement acquisition unit, used to acquire the rendering requirement of each scene object in the virtual scene, and to assign a uniquely identifiable object identification code to each scene object in the virtual scene;

[0113] A rendering parameter configuration unit, configured to preset rendering parameters of each of the scene objects based on the rendering requirements corresponding to each of the scene objects, and determine the preset rendering mode corresponding to each of the scene objects;

[0114] A rendering parameter list generating unit is used to generate the rendering parameter list based on the object identification code corresponding to each of the scene objects and the preset rendering mode.

[0115] It should be noted that technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned embodiment of the real-time rendering method based on visual limitations, and will not be repeated here.

[0116] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 5 Runs on the computer device shown.

[0117] See also Figure 5 , Figure 5 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0118] See also Figure 5 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0119] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any real-time rendering method based on visual limitations.

[0120] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0121] The internal memory provides an environment for the operation of a computer program in a non-volatile storage medium. When the computer program is executed by a processor, the processor can execute any real-time rendering method based on visual limitations.

[0122] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0123] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0124] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0125] Based on the bounding box technology, at least one scene object in the input virtual scene is approximately fitted to obtain a scene analysis result;

[0126] Determining a rendering scene range in the virtual scene based on device parameters of the virtual camera and the scene analysis result;

[0127] Based on the rendering culling algorithm, target rendering objects within the rendering scene are screened to generate a list to be rendered;

[0128] Based on a preset rendering method, each of the target rendering objects in the to-be-rendered list is rendered.

[0129] In one embodiment, when the processor implements the bounding box technology to perform approximate fitting on at least one scene object in the input virtual scene to obtain the scene analysis result, it is used to implement:

[0130] Analyzing the virtual scene to obtain scene distribution information in the virtual scene;

[0131] The scene distribution information is approximately fitted based on the bounding box technology to obtain the scene analysis result.

[0132] In one embodiment, the scene object information includes the distribution position, object size and object shape of the scene object.

[0133] In one embodiment, when the processor implements the rendering culling algorithm to screen the target rendering objects within the rendering scene and generate a list to be rendered, it is configured to implement:

[0134] Based on a rendering culling algorithm, determining a relative position relationship between the rendering scene range and scene objects;

[0135] If the scene object is within the rendering scene range, determining that the scene object is the target rendering object;

[0136] The to-be-rendered list is generated based on at least one of the target rendering objects.

[0137] In one embodiment, when the processor determines the rendering scene range in the virtual scene based on the device parameters of the virtual camera and the scene analysis result, it is used to implement:

[0138] Calculating the viewing angle range of the virtual camera based on device parameters of the virtual camera, wherein the device parameters include device distribution positions and viewing angle parameters;

[0139] Based on the viewing angle range and the scene analysis result, a rendering scene range in the virtual scene is determined.

[0140] In one embodiment, before implementing the rendering of each of the target rendering objects in the to-be-rendered list based on the preset rendering mode, the processor is further configured to implement:

[0141] Obtaining an object identification code corresponding to each of the target rendering objects;

[0142] Based on the object identification codes, the rendering parameters corresponding to the target rendering objects are matched in a preconfigured rendering parameter list to obtain the preset rendering modes corresponding to the target rendering objects.

[0143] In one embodiment, before obtaining the object identification code corresponding to each of the target rendering objects, the processor is further configured to implement:

[0144] Obtaining rendering requirements of each of the scene objects in the virtual scene, and assigning a uniquely identifiable object identification code to each of the scene objects in the virtual scene;

[0145] Based on the rendering requirements corresponding to the scene objects, preset rendering parameters for the scene objects, and determine the preset rendering methods corresponding to the scene objects;

[0146] The rendering parameter list is generated based on the object identification code corresponding to each of the scene objects and the preset rendering method.

[0147] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any real-time rendering method based on visual limitations provided in an embodiment of the present application.

[0148] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0149] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A real-time rendering method based on visual limitations, characterized in that: The method comprises: Based on the bounding box technology, at least one scene object in the input virtual scene is approximately fitted to obtain a scene analysis result; Determining a rendering scene range in the virtual scene based on device parameters of the virtual camera and the scene analysis result; Based on the rendering culling algorithm, target rendering objects within the rendering scene are screened to generate a list to be rendered; Based on a preset rendering method, each of the target rendering objects in the to-be-rendered list is rendered.

2. The real-time rendering method based on visual limitations according to claim 1, characterized in that: The method of performing approximate fitting on at least one scene object in the input virtual scene based on the bounding box technology to obtain a scene analysis result includes: Analyzing the virtual scene to obtain scene distribution information in the virtual scene; The scene distribution information is approximately fitted based on the bounding box technology to obtain the scene analysis result.

3. The real-time rendering method based on visual limitations according to claim 2, characterized in that: The scene object information includes the distribution position, object size and object shape of the scene objects.

4. The real-time rendering method based on visual limitations according to claim 1, characterized in that: The method of screening target rendering objects within the rendering scene range based on the rendering culling algorithm and generating a list to be rendered includes: Based on a rendering culling algorithm, determining a relative position relationship between the rendering scene range and scene objects; If the scene object is within the rendering scene range, determining that the scene object is the target rendering object; The to-be-rendered list is generated based on at least one of the target rendering objects.

5. The real-time rendering method based on visual limitations according to claim 1, characterized in that: The determining of the rendering scene range in the virtual scene based on the device parameters of the virtual camera and the scene analysis result includes: Calculating the viewing angle range of the virtual camera based on device parameters of the virtual camera, wherein the device parameters include device distribution positions and viewing angle parameters; Based on the viewing angle range and the scene analysis result, a rendering scene range in the virtual scene is determined.

6. The real-time rendering method based on visual limitations according to claim 1, characterized in that: Before rendering each of the target rendering objects in the to-be-rendered list based on the preset rendering mode, the method further includes: Obtaining an object identification code corresponding to each of the target rendering objects; Based on the object identification codes, the rendering parameters corresponding to the target rendering objects are matched in a preconfigured rendering parameter list to obtain the preset rendering modes corresponding to the target rendering objects.

7. The real-time rendering method based on visual limitations according to claim 6, characterized in that: Before obtaining the object identification code corresponding to each of the target rendering objects, the method further includes: Obtaining rendering requirements of each of the scene objects in the virtual scene, and assigning a uniquely identifiable object identification code to each of the scene objects in the virtual scene; Based on the rendering requirements corresponding to the scene objects, preset rendering parameters for the scene objects, and determine the preset rendering methods corresponding to the scene objects; The rendering parameter list is generated based on the object identification code corresponding to each of the scene objects and the preset rendering method.

8. A real-time rendering device based on visual limitations, characterized in that: The real-time rendering device based on visual limitations includes: A bounding box approximation analysis module, used to perform approximate fitting on at least one scene object in an input virtual scene based on a bounding box technique to obtain a scene analysis result; A range determination module, used for determining a rendering scene range in the virtual scene based on device parameters of the virtual camera and the scene analysis result; A rendering culling module, used for screening target rendering objects within the rendering scene range based on a rendering culling algorithm, and generating a list to be rendered; The object rendering module is used to render each of the target rendering objects in the to-be-rendered list based on a preset rendering method.

9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the real-time rendering method based on visual limitations as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the real-time rendering method based on visual limitations as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Real-time dynamic light and shadow rendering optimization method based on unreal engine

    CN120747334A