3D gaussian large scene rendering method and device, electronic equipment and storage medium
By using global indexing and cross-node depth sorting, the visual gap problem at the node intersection in 3D Gaussian large scene rendering is solved, achieving higher rendering accuracy and continuity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN XGRIDS-INNOVATION CO LTD
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies for rendering large 3D Gaussian scenes, the interlacing depth distribution of primitives between nodes leads to visual cracks at node boundaries, affecting the continuity and realism of the rendering results and resulting in low accuracy.
By establishing a global index and uniformly sorting depth across nodes, a global rendering sequence is generated, ensuring that primitives are rendered in the correct order and eliminating visual gaps.
It improves the accuracy of 3D Gaussian large-scale scene rendering, ensures the consistency of the drawing order at scene node boundaries, and eliminates visual gaps.
Smart Images

Figure CN122156342A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D scene modeling technology, and in particular to 3D Gaussian large scene rendering methods, devices, electronic devices and storage media. Background Technology
[0002] 3D scene rendering technology is a core foundation for fields such as digital twins, metaverse, virtual reality, and high-precision mapping. It aims to transform 3D model data into visually realistic 2D images. In recent years, next-generation rendering technologies, represented by 3D Gaussian Splatting (3DGS), have demonstrated significant advantages and application potential in large-scale real-world 3D reconstruction and presentation due to their ability to express complex scenes with compact Gaussian primitives and achieve high-fidelity, real-time visual effects.
[0003] When dealing with large-scale 3D scenes, such as city-level scenes, the number of Gaussian primitives often reaches hundreds of millions, making full rendering impossible at once. Therefore, the scene is typically divided into spatial blocks and loaded on demand. Existing technologies employ a block-based rendering approach, independently sorting and drawing primitives for each node. However, due to the semi-transparent nature of Gaussian primitives and their potential to extend beyond node boundaries, the depth distribution of primitives between nodes overlaps. Since each node only performs local sorting within itself, visual gaps arise at node boundaries due to inconsistent drawing order. This severely impacts the continuity and realism of the rendering results, leading to low accuracy in rendering large 3D Gaussian scenes. Summary of the Invention
[0004] In view of this, the embodiments of this application provide at least a 3D Gaussian large scene rendering method, apparatus, electronic device and storage medium. By establishing a global index and sorting all primitives in the global buffer across nodes in a global depth order, the consistency of the drawing order during the block rendering of the 3D Gaussian large scene is ensured, visual gaps at the boundaries of scene nodes are eliminated, and the accuracy of 3D Gaussian large scene rendering is improved.
[0005] This application mainly includes the following aspects: In a first aspect, embodiments of this application provide a 3D Gaussian large-scene rendering method, the method comprising: Based on the visible range of the current frame obtained by view frustum clipping, multiple scene nodes to be rendered are determined. The primitive data of each of the scene nodes to be rendered is stored in a preset global buffer, and a global index of the current frame that records the storage location of the primitive data is generated. Based on the global index, perform cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer to generate the global drawing sequence of the current frame; Based on the global rendering sequence, all primitive data in the global buffer are rendered.
[0006] Secondly, embodiments of this application also provide a 3D Gaussian large-scene rendering device, the 3D Gaussian large-scene rendering device comprising: The node determination module is used to determine multiple scene nodes to be rendered based on the visible range of the current frame obtained by view frustum clipping. The data storage module is used to store the primitive data of each of the scene nodes to be rendered into a preset global buffer and generate a global index that records the storage location of the primitive data of the current frame. The global sorting module is used to perform cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer based on the global index, and generate the global drawing sequence of the current frame. The scene rendering module is used to render all primitive data in the global buffer based on the global drawing sequence.
[0007] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the 3D Gaussian large scene rendering method as described above.
[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the 3D Gaussian large-scene rendering method described above.
[0009] This application provides a 3D Gaussian large-scene rendering method, apparatus, electronic device, and storage medium. The method includes: determining multiple scene nodes to be rendered based on the visible range of the current frame obtained by view frustum clipping; storing the primitive data of each scene node to be rendered in a preset global buffer and generating a global index of the current frame recording the storage location of the primitive data; performing cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer based on the global index to generate a global rendering sequence for the current frame; and rendering all primitive data in the global buffer based on the global rendering sequence. In this way, by establishing a global index and performing cross-node global depth sorting on all primitives in the global buffer accordingly, the consistency of the rendering order during the block rendering of the 3D Gaussian large scene is ensured, visual gaps at the boundaries of scene nodes are eliminated, and the accuracy of 3D Gaussian large-scene rendering is improved.
[0010] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart of a 3D Gaussian large-scene rendering method provided in an embodiment of this application is shown; Figure 2 This illustration shows one of the functional block diagrams of a 3D Gaussian large-scene rendering device provided in an embodiment of this application; Figure 3 This is a second functional block diagram of a 3D Gaussian large-scene rendering device provided in an embodiment of this application; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0014] To facilitate understanding of this application, the technical solutions provided in this application will be described in detail below with reference to specific embodiments.
[0015] Please see Figure 1 , Figure 1 This is a flowchart illustrating a 3D Gaussian large-scene rendering method provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the 3D Gaussian large-scene rendering method includes the following steps: S101, based on the visible range of the current frame obtained by view frustum clipping, determines multiple scene nodes to be rendered.
[0016] Here, identifying the scene nodes to be rendered is a prerequisite for efficient rendering. The goal is to process only the scene data currently visible to the user, avoiding unnecessary resource consumption. Specifically, the system defines a view frustum in 3D space based on parameters such as the current camera position, orientation, and camera FOV. This view frustum represents the visible range of the current frame.
[0017] In this embodiment, the scene is pre-divided into multiple spatial regions during the preprocessing stage. Each region is called a scene node and has its own 3D bounding box. The system performs an intersection test between the bounding box of each scene node and the current view frustum. All scene nodes that intersect with the view frustum or are completely located within the view frustum are determined to be visible in the current frame and added to the set of scene nodes to be rendered. This process ensures that subsequent operations only apply to data that contributes to the final imaging.
[0018] S102, store the primitive data of each of the scene nodes to be rendered into a preset global buffer, and generate a global index of the current frame that records the storage location of the primitive data.
[0019] To achieve unified data management and access across nodes, a mechanism is needed to centrally store and reference data from all visible nodes. The global buffer is a contiguous or uniformly addressable storage area allocated in the graphics processing unit (GPU) memory, serving as a temporary resident pool for all primitive data to be rendered. The global index is a crucial data structure used to establish the mapping between scene nodes and the physical location of their data within the global buffer.
[0020] In this embodiment, the primitive can specifically be a Gaussian primitive reconstructed using 3D Gaussian Splashing (3DGS) technology, whose attributes include position, color, transparency, scaling factor, rotation factor, and normal. The global buffer is logically divided into multiple fixed-size storage units (tiles). The primitive data (including attributes such as position, color, transparency, scaling factor, rotation factor, and normal) of each scene node to be rendered is loaded into this buffer and occupies one or more contiguous storage units. Simultaneously, an index record is created for each scene node with stored data. This record at least contains the starting memory offset of the node's data in the global buffer and the length of the data it occupies. All such index records in the same frame together constitute the global index of the current frame. Through this index, any primitive in any node can be precisely located and accessed.
[0021] S103, based on the global index, perform cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer to generate the global drawing sequence of the current frame.
[0022] Here, since primitives (semi-transparent primitives) in a 3D scene must be drawn in a certain order (usually from back to front) to achieve the correct blending effect, sorting is a crucial step. Cross-node unified depth sorting means treating all primitives loaded into the global buffer as a whole, regardless of the node to which the primitive belongs, and sorting them all at once according to their distance from the camera.
[0023] In this embodiment, each index record in the global index is traversed. For each scene node corresponding to an index record, the position information of all primitives within that node is read from the global buffer based on the starting offset and length of the record. Subsequently, the depth value (usually the Z value) of each primitive in the view space is calculated according to the current camera view matrix. After obtaining the depth values of all primitives, the system performs a global sorting algorithm (such as radix sort) to arrange all primitives in order from far to near (or from near to far, depending on rendering requirements) according to their depth values. The result of this sorting is stored as a sorted index array (SortedIndex), where each element is a composite index that uniquely identifies a specific primitive. For example, the index may contain two parts of information: first, the identifier of the scene node to which the primitive belongs in the global index (Index); and second, the relative position offset of the primitive within the data block of its node. This sorted index array defines a unique and globally correct order in which all primitives are drawn, i.e., the global drawing sequence of the current frame.
[0024] S104, Render all primitive data in the global buffer based on the global drawing sequence.
[0025] Here, the rendering process requires drawing primitives onto the screen in a strictly correct order. The global drawing sequence already contains this order information, and the rendering engine simply needs to execute them sequentially.
[0026] In this embodiment, the system processes each composite index sequentially according to the global drawing sequence (i.e., the sorted index array) generated in S103. For each index, the system first queries the global index of the current frame based on the node identifier it contains, obtaining the storage range (starting offset and data length) of the node data in the global buffer. Then, combining the primitive internal offset information recorded in the index, the system accurately locates and reads the complete attribute data (position, color, transparency, scaling factor, rotation factor, normal, etc.) of the corresponding primitive from the storage range. Then, the system uses a graphics API (such as OpenGL or DirectX) to submit these primitives to the GPU's rasterization pipeline for drawing. Since the drawing order is determined based on the global depth information of all visible primitives, it fundamentally ensures that primitives at the boundaries of different scene nodes can be mixed in the correct order, thereby eliminating visual gaps that may be caused by independent node sorting, and finally outputting a continuous and correct 3D scene image.
[0027] Furthermore, when the current frame is the first frame of a 3D Gaussian large scene rendering, the step of storing the primitive data of each of the scene nodes to be rendered into a preset global buffer and generating a global index of the current frame recording the storage location of the primitive data includes: Step a1: Divide and encapsulate the primitive data of each scene node to be rendered according to the storage unit size of the global buffer to form multiple data blocks.
[0028] Here, the primitive data of larger nodes is divided and encapsulated to adapt to the basic unit of the global buffer's underlying storage management, ensuring that data can be stored and accessed efficiently and in an orderly manner. This operation is a preprocessing step before data is loaded into the buffer.
[0029] In this embodiment, the global buffer is divided into multiple fixed-size logical storage units during initialization (e.g., each unit is 64KB). After the system obtains the original primitive data of the scene nodes to be rendered, it divides and encapsulates the continuous data stream of each node into a series of data blocks of equal size (the last block may be smaller than the fixed size) according to the fixed size. This process ensures that the size of each data block is aligned with the buffer management granularity, facilitating subsequent space allocation and addressing.
[0030] Step a2: Place the multiple data blocks into the free storage units in the global buffer.
[0031] Here, placing the preprocessed data blocks into the available space of the buffer is a crucial step in completing data loading. The goal is to physically house the scattered node data in a unified storage pool, laying the foundation for building a logical index.
[0032] In this embodiment, for each data block generated during preprocessing, the system allocates a free storage unit from the list and writes the content of the data block into that unit. For example, if a node's data is divided and encapsulated into three data blocks, the system will sequentially find three consecutive free units and write them to each. Data blocks of all nodes visible in the current frame are placed in this manner, thus physically completing the aggregation of data in the global buffer. If the total data length of a node is not an integer multiple of the storage unit size, its last data block will occupy a complete storage unit, and the unused space will be reserved as free.
[0033] Step a3: For each of the scene nodes to be rendered, create an index record; the index record shall at least contain the basic data of the scene node to be rendered, including the starting offset and data length in the global buffer.
[0034] Here, the index record serves as a bridge connecting logical nodes and their physical storage data. It abstracts the details of how data might be stored in blocks, providing the upper layer with a unified linear data view on a node-by-node basis.
[0035] In this embodiment, after all data blocks of a scene node are placed into the global buffer, the system generates an index record for that node. In this record, the starting offset refers to the byte offset of the starting memory address of the node's first data block in the global buffer relative to the buffer's base address. The data length refers to the total byte size of all the node's primitive data. These two fields logically define the contiguous storage range of the node's data within the global buffer.
[0036] Step a4: Based on the index records of each of the scene nodes to be rendered, construct a global index that records the storage locations of all primitive data of the current frame.
[0037] Here, the global index is a collection of all individual node index records, serving as the system's master directory for managing all loaded data in the current frame. It provides a centralized mapping from node identifiers to storage locations.
[0038] In this embodiment, after creating the index record described in step a3 for all scene nodes to be rendered in the current frame, the system organizes these records (e.g., stores them in an array or list) to form a global index of the storage locations of all primitive data in the current frame. Subsequently, any operation requiring access to the primitive data within a node can first query this global index to obtain the storage range description (starting offset and data length) of the node, thereby achieving accurate location and access to data in the global buffer.
[0039] Furthermore, when the current frame is not the first frame of a 3D Gaussian large scene rendering, the step of storing the primitive data of each of the scene nodes to be rendered into a preset global buffer and generating a global index of the current frame recording the storage location of the primitive data includes: Step b1: Based on each scene node to be rendered in the current frame, remove the index records corresponding to scene nodes that are not visible in the current frame from the global index of the previous frame.
[0040] Here, during continuous rendering, the user's perspective changes, causing some nodes that were visible in the previous frame to become invisible in the current frame. To maintain consistency between the global index and the actual data to be rendered in the current frame, and to avoid referencing invalid data, it is necessary to first clean up the indexes left over from the previous frame.
[0041] In this embodiment, after the set of scene nodes to be rendered is determined in the current frame, each index record in the global index of the previous frame is traversed to check whether its corresponding scene node is included in the set to be rendered in the current frame. If a node is not in the set to be rendered in the current frame, it indicates that the node is no longer visible in the current frame, and the system immediately removes the index record corresponding to the node from the global index. This operation ensures that only references to currently valid data are retained in the index.
[0042] Step b2: For each scene node to be rendered, determine whether the primitive data of the scene node already exists in the global buffer.
[0043] Here, to improve rendering efficiency and reduce unnecessary data transfer, the system employs a caching mechanism. For a node that needs to be rendered in the current frame, it first checks whether its data is already cached in the global buffer, thus determining whether it needs to be loaded from slow storage such as main memory.
[0044] In this embodiment, after completing the index cleanup in step b1, the system begins to traverse each scene node to be rendered in the current frame. For each node, the system determines whether its basic metadata already exists in the global buffer by querying the updated metadata in step b1 (or by directly checking the buffer metadata). For example, it can check whether there is a valid storage block tag associated with the node identifier.
[0045] Step b3: If not, then the scene node to be rendered is determined as a new scene node to be rendered.
[0046] Here, nodes identified through caching that have not yet been stored in the global buffer are categorized as newly added scene nodes to be rendered. These nodes are the targets for data loading operations during this frame processing.
[0047] In this embodiment of the application, when the determination result of step b2 is that the primitive data of a certain node does not exist in the global buffer, the system marks the node as a newly added scene node to be rendered. All nodes marked in this way constitute a subset of the data that needs to be loaded from the outside in the current frame.
[0048] Step b4: Divide and encapsulate the primitive data of the newly added scene node to be rendered according to the storage unit size of the global buffer to form multiple data blocks, and place the multiple data blocks into the free storage unit in the global buffer.
[0049] Here, for newly identified scene nodes to be rendered, a data loading operation needs to be performed. This operation includes adapting the node data to the storage granularity of the buffer and physically storing it in the available space of the buffer.
[0050] In this embodiment, for each node identified as a new scene node to be rendered, the system first reads its original primitive data from its storage source (such as system memory). Then, similar to the first frame processing, the data is divided and encapsulated into one or more data blocks according to the fixed size of the global buffer storage unit. Next, the system searches for a sufficient number of contiguous free storage units in the global buffer and writes these data blocks sequentially. If there is insufficient free space, the system may trigger a buffer space reclamation mechanism to free up space.
[0051] Step b5: For each newly added scene node to be rendered, create an index record; the index record shall at least contain the basic data of the newly added scene node to be rendered, including the starting offset and data length in the global buffer.
[0052] Here, an index entry is created for each newly loaded node in the buffer so that the system can access them as if they were existing node data. This is a crucial step in mapping physical storage addresses to logical access interfaces.
[0053] In this embodiment, after the data of a newly added scene node is successfully placed into the global buffer, the system generates a new index record for that node. This record accurately records the starting memory offset of the node's data in the buffer and the total data length. This information defines the logical linear address range of the node's data.
[0054] Step b6: Based on the index records of each of the scene nodes to be rendered, construct a global index that records the storage locations of all primitive data of the current frame.
[0055] Here, the index information of all nodes is integrated to form a global index representing the complete data view of the current frame. This index includes both index records of nodes that are retained from the previous frame and are still visible in the current frame, as well as index records created for newly added nodes in this frame.
[0056] In this embodiment, the system integrates two parts of index records: the first part is the index record retained after the cleanup in step b1, corresponding to nodes that are still visible in the current frame and whose data is already in the buffer; the second part is the index record created for newly loaded nodes in step b5. These two parts of records are organized together into a new data structure, which constitutes the global index of the current frame that fully reflects the data storage layout of all data to be rendered in the current frame.
[0057] Further, placing the plurality of data blocks into the free storage units in the global buffer includes: Step c1: Determine whether there are enough consecutive free storage units in the global buffer to accommodate all the data blocks to be placed.
[0058] This step is a resource check before the data block is actually written to the buffer. Its purpose is to ensure that there is a physically contiguous and sufficiently large storage space so that all data blocks to be written to the node can be received and stored completely and efficiently, avoiding interruption or failure due to insufficient space during the writing process.
[0059] In this embodiment, when a data block of a newly added scene node to be rendered needs to be placed into the global buffer, the system first queries or calculates the total number of data blocks (e.g., N) generated after the node is split. Simultaneously, the system maintains a storage unit usage state graph or free list for the global buffer. Based on this state information, the system determines whether there are at least N contiguous free storage units in the buffer. This determination serves as the basis for subsequent decisions on whether to directly write to the buffer or trigger a space reclamation strategy.
[0060] Step c2, if yes, then the data blocks are sequentially placed into the consecutive free storage units.
[0061] Here, when buffer resources are sufficient, a direct write operation is performed. This is the most ideal and efficient data loading path, requiring no additional data movement or cleanup overhead, and can quickly complete the caching of node data.
[0062] In this embodiment, if the determination result of step c1 is yes, meaning there are enough consecutive free units, the system will lock the contiguous storage space. Then, following the order of data block splitting, the content of the first data block is written to the starting unit of this contiguous space, the second data block is written to the next unit, and so on, until all N data blocks are sequentially and completely copied to the locked contiguous free storage units. After writing is complete, the status of these storage units is updated to occupied.
[0063] Step c3: If not, release the storage units occupied by the data blocks corresponding to scene nodes that are not visible in the current frame from the global buffer, and then place the data blocks into them sequentially after obtaining a sufficient number of consecutive free storage units.
[0064] Here, when buffer resources are insufficient, space reclamation and reallocation operations need to be performed. This is the core of dynamic buffer management, which aims to free up space by cleaning up expired cached data (i.e., data that no longer needs to be rendered) to meet the storage needs of new data, thereby maintaining the continuous operation of the system.
[0065] In this embodiment, if the judgment result of step c1 is negative, meaning there is not enough contiguous free space, the system will select one or more scene nodes from the global buffer whose data has been marked as invisible in the current frame, according to a predetermined strategy (such as based on the least recently used principle, or directly based on the visibility judgment result in step b1). The system marks the storage units occupied by the data blocks corresponding to these nodes as releasable or directly clears their contents, making these units free. This process may involve moving other data to merge free space, thereby forming a sufficiently large contiguous free area. After successfully reclaiming and organizing the required contiguous free storage units, the system then performs the write operation as described in step c2, sequentially storing the data blocks to be placed into the newly obtained free space.
[0066] Further, the step of performing cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer based on the global index to generate the global rendering sequence of the current frame includes: Step d1: Traverse each index record in the global index.
[0067] Here, the traversal operation is the starting point for initiating the global sorting process. Its purpose is to systematically access and aggregate all primitive data stored in the global buffer. The global index contains a summary of the data locations of all scene nodes to be rendered in the current frame. Only a complete traversal can ensure that every primitive to be drawn is processed without omission.
[0068] In this embodiment, the system performs sequential or iterative access to the global index data structure (e.g., an array of index records) of the current frame. For each record in the index, the system reads its contents, which include at least a starting memory address offset pointing to a contiguous storage region in the global buffer, and the data length of that region. By traversing the data, the system can sequentially determine the precise storage location of the data for each visible node.
[0069] Step d2: Based on the starting offset and data length recorded in each index record, read the spatial position data of all primitives of the corresponding scene node to be rendered from the global buffer.
[0070] Here, this step is the data acquisition phase. Its core task is to extract the key information necessary for performing depth sorting from a unified storage pool based on the map provided by the index, namely the position of each primitive in three-dimensional space. This is the crucial step in transforming the logical index into physical data access.
[0071] In this embodiment, for each index record accessed in step d1, the system uses the starting offset recorded therein as the starting address for reading, and reads the attribute data blocks of all primitives owned by the corresponding node from the global buffer, using the data length as the limit. The system parses or extracts the spatial location information (e.g., its 3D world coordinates or model coordinates) of each primitive from this attribute data. In this way, regardless of which scene node the primitive originally belonged to, their location data are collected centrally, preparing for subsequent unified calculations.
[0072] Step d3: Calculate the view space depth value of each primitive based on its spatial location data.
[0073] Here, calculating the depth value is the process of converting a three-dimensional spatial position into a one-dimensional scalar that can be used for sorting. In computer graphics, the view space depth (usually referring to the Z value in the view coordinate system) directly reflects the distance between primitives and the camera, and is a reliable basis for determining the correct rendering order of effects such as semi-transparency.
[0074] In this embodiment, the system obtains the camera view transformation matrix of the current frame. For the spatial position data (such as world coordinates) of each primitive collected in step d2, the system applies this view matrix to transform it to view space (or camera space). After the transformation, each primitive obtains a coordinate in view space, where the Z-coordinate component represents the depth of the primitive relative to the camera's near clipping plane. This Z-value is extracted as the view space depth value of the primitive. The depth values of all primitives constitute a set of values to be sorted.
[0075] Step d4: Sort all primitives from farthest to nearest according to their view space depth values, generate a sorted index array, and determine the sorted index array as the global drawing sequence for the current frame.
[0076] This is the core operation of the sorting phase, and also the direct means to solve the problem of consistent drawing order. By globally sorting the depth values of all primitives and generating an index array indicating the new order, the system obtains a unique and correct list of drawing instructions.
[0077] In this embodiment, the system performs a complete sorting algorithm (e.g., efficient radix sort) on the set of depth values of all primitives calculated in step d3. The sorting rule is to arrange the depth values in descending order (from farthest to nearest). The sorting operation does not directly move the primitive data itself, but generates a new sorted index array (e.g., SortedIndex). Each element of this array is a composite index, and these indices are arranged in order of the depth values of their corresponding primitives. This sorted index array is defined as the global rendering sequence for the current frame. Subsequently, the rendering engine only needs to follow the index order in this sequence to retrieve the primitive data from the global buffer and render it in the correct spatial order, thereby ensuring the consistency of the rendering order throughout the scene, including node boundaries.
[0078] Furthermore, the method also includes: Step e1: At preset time intervals, perform defragmentation operations on the data blocks stored in the global buffer, moving the data blocks to merge the free storage units in the global buffer.
[0079] This step is a periodic maintenance task of the system, designed to address the storage fragmentation problem that may occur in the global buffer during long-term dynamic operation. By actively moving data blocks to consolidate scattered small blocks of free space, a larger and more contiguous available storage area can be formed, thereby improving the efficiency and success rate of subsequent data loading operations and ensuring the long-term stability and performance of the system.
[0080] In this embodiment, the system establishes an independent maintenance thread or timer to trigger a defragmentation operation according to a preset time period (e.g., after every 100 frames rendered) or when the system detects that the fragmentation level of the buffer exceeds a certain threshold. During this operation, the system scans the global buffer, identifies storage units already occupied by data blocks, and calculates the free gaps between them. Subsequently, the system copies one or more selected data blocks from their current location to other locations in the buffer (e.g., compacting them to one end), thereby merging multiple small free units previously separated by these data blocks into a large, contiguous free area. This process optimizes the spatial layout of the buffer.
[0081] Step e2: Update the storage location information of the corresponding index record in the global index according to the new storage location after the data block is moved.
[0082] Here, because the defragmentation operation changes the physical address of the data block in the global buffer, the logical access entry point, i.e., the global index, must be updated synchronously to ensure that the system can correctly find the moved data through the index later. This is a critical step in maintaining data consistency and avoids rendering errors caused by address invalidation.
[0083] In this embodiment, whenever a data block is moved in step e1, the system determines the scene node to which the data block belongs. Then, the system searches the global index of the current frame for the index record corresponding to that scene node. Since all data blocks of a node may be moved as a whole, or the movement may affect the node's initial storage location, the system recalculates the starting offset of the node's data in the global buffer based on the new physical address of the moved data block, and updates the "starting offset" field in the index record accordingly. If the data block movement causes a change in the storage range of the node data, the data length field may also be updated synchronously. Through this update, the global index always accurately points to the latest position of the data in the buffer.
[0084] Furthermore, the global buffer can be a byte data storage block, a texture array, or a sparse texture.
[0085] Here, the global buffer referred to in this application is a logical definition of a unified, addressable storage resource used for centralized storage of primitive data. In actual hardware implementations, this logical concept can be mapped to various different underlying physical or driver-level storage schemes. Byte data storage blocks, texture arrays, or sparse textures are specific types of high-efficiency video memory resources provided by graphics processing units (GPUs). They possess special access characteristics and hardware optimizations, and can serve as efficient carriers for storage pools.
[0086] In this embodiment, the specific implementation of the global buffer can be selected based on performance requirements, hardware support, and scene characteristics. When implemented as a byte data storage block, the global buffer directly utilizes GPU memory resources and is divided into several storage units (tiles) according to a preset size. Primitive data is organized and stored in these storage areas, and efficient reading is performed using hardware memory addressing. When implemented as a texture array, the global buffer directly utilizes the texture array resources supported by the GPU. Each set of texture array elements (a two-dimensional texture) can be used as a storage unit (tile), and primitive data is organized and stored in these textures, and efficient reading is performed using texture sampling hardware. When implemented as a sparse texture (or virtual texture), the global buffer utilizes the GPU's sparse texture management mechanism to dynamically and on-demand map large virtual address spaces to physical memory pages, thereby managing large-scale data more efficiently and reducing the actual physical memory usage. These specific implementation methods all serve the same purpose: to provide a unified and efficient storage pool for 3D scene rendering methods to support subsequent global indexing and sorting operations.
[0087] This application provides a 3D Gaussian large-scene rendering method, comprising: determining multiple scene nodes to be rendered based on the visible range of the current frame obtained by view frustum clipping; storing the primitive data of each scene node to be rendered in a preset global buffer, and generating a global index of the current frame recording the storage location of the primitive data; performing cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer based on the global index, generating a global drawing sequence for the current frame; and rendering all primitive data in the global buffer based on the global drawing sequence. In this way, by establishing a global index and performing cross-node global depth sorting on all primitives in the global buffer accordingly, the consistency of the drawing order during the block rendering of the 3D Gaussian large scene is ensured, visual gaps at the boundaries of scene nodes are eliminated, and the accuracy of 3D Gaussian large-scene rendering is improved.
[0088] Based on the same application concept, this application also provides a 3D Gaussian large scene rendering device corresponding to the 3D Gaussian large scene rendering method provided in the above embodiments. Since the principle of the device in this application is similar to the 3D Gaussian large scene rendering method in the above embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0089] Please see Figure 2 , Figure 2 This is one of the functional block diagrams of a 3D Gaussian large-scene rendering device provided in an embodiment of this application. For example... Figure 2 As shown, the 3D Gaussian large-scene rendering device 200 provided in this application embodiment includes: The node determination module 210 is used to determine multiple scene nodes to be rendered based on the visible range of the current frame obtained by view frustum clipping.
[0090] The data storage module 220 is used to store the primitive data of each of the scene nodes to be rendered into a preset global buffer and generate a global index that records the storage location of the primitive data of the current frame.
[0091] The global sorting module 230 is used to perform cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer based on the global index, and generate the global drawing sequence of the current frame.
[0092] The scene rendering module 240 is used to render all primitive data in the global buffer based on the global drawing sequence.
[0093] Furthermore, when the current frame is the first frame of a 3D Gaussian large scene rendering, the data storage module 220, in storing the primitive data of each of the scene nodes to be rendered into a preset global buffer and generating a global index of the current frame recording the storage location of the primitive data, is specifically used for: The primitive data of each scene node to be rendered is divided and encapsulated according to the storage unit size of the global buffer to form multiple data blocks; Place the plurality of data blocks into the free storage units in the global buffer; For each of the scene nodes to be rendered, an index record is created; the index record contains at least the basic data of the scene node to be rendered, including its starting offset and data length in the global buffer; Based on the index records of each of the scene nodes to be rendered, a global index is constructed to record the storage locations of all primitive data of the current frame.
[0094] Furthermore, when the current frame is a non-first frame of a 3D Gaussian large scene rendering, the data storage module 220, in storing the primitive data of each of the scene nodes to be rendered into a preset global buffer and generating a global index of the current frame recording the storage location of the primitive data, is specifically used for: Based on each scene node to be rendered in the current frame, remove the index records corresponding to scene nodes that are not visible in the current frame from the global index of the previous frame. For each scene node to be rendered, determine whether the primitive data of the scene node already exists in the global buffer; If not, then the scene node to be rendered is determined as a newly added scene node to be rendered; The primitive data of the newly added scene node to be rendered is divided and encapsulated according to the storage unit size of the global buffer to form multiple data blocks, and the multiple data blocks are placed into the free storage unit in the global buffer. For each newly added scene node to be rendered, an index record is created; the index record contains at least the basic data of the newly added scene node, including its starting offset and data length in the global buffer. Based on the index records of each of the scene nodes to be rendered, a global index is constructed to record the storage locations of all primitive data of the current frame.
[0095] Furthermore, when the data storage module 220 places the plurality of data blocks into the free storage units in the global buffer, the data storage module 220 is specifically used for: Determine whether there are enough consecutive free storage units in the global buffer to accommodate all the data blocks to be inserted; If so, the data blocks are sequentially placed into the consecutive free storage units; If not, the storage units occupied by the data blocks corresponding to scene nodes that are not visible in the current frame are released from the global buffer. After obtaining a sufficient number of consecutive free storage units, the data blocks are then placed into them sequentially.
[0096] Furthermore, when the global sorting module 230 performs cross-node unified depth sorting on all primitives of each of the scene nodes to be rendered stored in the global buffer based on the global index to generate the global drawing sequence of the current frame, the global sorting module 230 is specifically used for: Iterate through each index record in the global index; Based on the starting offset and data length recorded in each index record, read the spatial position data of all primitives of the corresponding scene node to be rendered from the global buffer; Calculate the view space depth value of each primitive based on its spatial location data; Sort all primitives from farthest to nearest according to their view space depth values, generate a sorted index array, and determine the sorted index array as the global drawing sequence for the current frame.
[0097] Further, please refer to Figure 3 , Figure 3 This is a second functional block diagram of a three-dimensional scene rendering device provided in an embodiment of this application. Figure 3 As shown, the 3D scene rendering device 200 also includes: The storage defragmentation module 250 is used to perform defragmentation operations on the data blocks stored in the global buffer at preset time intervals, moving data blocks to merge free storage units in the global buffer.
[0098] The index update module 260 is used to update the storage location information of the corresponding index record in the global index according to the new storage location after the data block is moved.
[0099] This application provides a 3D Gaussian large-scene rendering device, comprising: a node determination module, used to determine multiple scene nodes to be rendered based on the visible range of the current frame obtained by view frustum clipping; a data storage module, used to store the primitive data of each scene node to be rendered into a preset global buffer, and generate a global index of the current frame recording the storage location of the primitive data; a global sorting module, used to perform cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer based on the global index, and generate a global drawing sequence for the current frame; and a scene rendering module, used to render all primitive data in the global buffer based on the global drawing sequence. In this way, by establishing a global index and performing cross-node global depth sorting on all primitives in the global buffer accordingly, the consistency of the drawing order during the block rendering of the 3D Gaussian large scene is ensured, visual gaps at the boundaries of scene nodes are eliminated, and the accuracy of 3D Gaussian large-scene rendering is improved.
[0100] Based on the same application concept, please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.
[0101] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 and the memory 420 communicate through the bus 430. When the machine-readable instructions are executed by the processor 410, the steps of the 3D Gaussian large scene rendering method provided in the above embodiment are executed. For specific implementation, please refer to the method embodiment, which will not be repeated here.
[0102] Based on the same concept, this application also provides a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it executes the steps of the 3D Gaussian large scene rendering method provided in the above embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0103] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0104] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0107] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0108] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0109] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A 3D Gaussian large-scene rendering method, characterized in that, The method includes: Based on the visible range of the current frame obtained by view frustum clipping, multiple scene nodes to be rendered are determined. The primitive data of each of the scene nodes to be rendered is stored in a preset global buffer, and a global index of the current frame that records the storage location of the primitive data is generated. Based on the global index, perform cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer to generate the global drawing sequence of the current frame; Based on the global rendering sequence, all primitive data in the global buffer are rendered.
2. The 3D Gaussian large-scene rendering method according to claim 1, characterized in that, When the current frame is the first frame of a 3D Gaussian large scene rendering, the step of storing the primitive data of each of the scene nodes to be rendered into a preset global buffer and generating a global index of the current frame that records the storage location of the primitive data includes: The primitive data of each scene node to be rendered is divided and encapsulated according to the storage unit size of the global buffer to form multiple data blocks; Place the plurality of data blocks into the free storage units in the global buffer; For each of the scene nodes to be rendered, an index record is created; the index record contains at least the basic data of the scene node to be rendered, including its starting offset and data length in the global buffer; Based on the index records of each of the scene nodes to be rendered, a global index is constructed to record the storage locations of all primitive data of the current frame.
3. The 3D Gaussian large-scene rendering method according to claim 1, characterized in that, When the current frame is a non-first frame of a 3D Gaussian large scene rendering, the step of storing the primitive data of each of the scene nodes to be rendered into a preset global buffer and generating a global index of the current frame recording the storage location of the primitive data includes: Based on each scene node to be rendered in the current frame, remove the index records corresponding to scene nodes that are not visible in the current frame from the global index of the previous frame. For each scene node to be rendered, determine whether the primitive data of the scene node already exists in the global buffer; If not, then the scene node to be rendered is determined as a newly added scene node to be rendered; The primitive data of the newly added scene node to be rendered is divided and encapsulated according to the storage unit size of the global buffer to form multiple data blocks, and the multiple data blocks are placed into the free storage unit in the global buffer. For each newly added scene node to be rendered, an index record is created; the index record contains at least the basic data of the newly added scene node, including its starting offset and data length in the global buffer. Based on the index records of each of the scene nodes to be rendered, a global index is constructed to record the storage locations of all primitive data of the current frame.
4. The 3D Gaussian large-scene rendering method according to claim 3, characterized in that, The step of placing the plurality of data blocks into the free storage unit in the global buffer includes: Determine whether there are enough consecutive free storage units in the global buffer to accommodate all the data blocks to be inserted; If so, the plurality of data blocks are sequentially placed into the contiguous free storage units; If not, the storage units occupied by the data blocks corresponding to scene nodes that are not visible in the current frame are released from the global buffer. After obtaining a sufficient number of consecutive free storage units, the multiple data blocks are then placed into them in sequence.
5. The 3D Gaussian large-scene rendering method according to claim 1, characterized in that, The step of performing cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer based on the global index to generate the global rendering sequence of the current frame includes: Iterate through each index record in the global index; Based on the starting offset and data length recorded in each index record, read the spatial position data of all primitives of the corresponding scene node to be rendered from the global buffer; Calculate the view space depth value of each primitive based on its spatial location data; Sort all primitives from farthest to nearest according to their view space depth values, generate a sorted index array, and determine the sorted index array as the global drawing sequence for the current frame.
6. The 3D Gaussian large-scene rendering method according to claim 1, characterized in that, The method further includes: At preset time intervals, defragmentation operations are performed on the data blocks stored in the global buffer, moving the data blocks to merge the free storage units in the global buffer; Update the storage location information of the corresponding index record in the global index according to the new storage location of the data block after it has been moved.
7. The 3D Gaussian large-scene rendering method according to claim 1, characterized in that, The global buffer can be a byte data storage block, a texture array, or a sparse texture.
8. A 3D Gaussian large-scene rendering device, characterized in that, The 3D Gaussian large-scene rendering device includes: The node determination module is used to determine multiple scene nodes to be rendered based on the visible range of the current frame obtained by view frustum clipping. The data storage module is used to store the primitive data of each of the scene nodes to be rendered into a preset global buffer and generate a global index that records the storage location of the primitive data of the current frame. The global sorting module is used to perform cross-node unified depth sorting on all primitives of each scene node to be rendered stored in the global buffer based on the global index, and generate the global drawing sequence of the current frame. The scene rendering module is used to render all primitive data in the global buffer based on the global drawing sequence.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the 3D Gaussian large-scene rendering method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the 3D Gaussian large-scene rendering method as described in any one of claims 1 to 7.