Scene rendering method and device, computing equipment and computer readable storage medium
By dividing the virtual scene into multiple scene levels and dynamically determining the sub-scenes to be rendered and their levels, the resource management and storage optimization problems of small and medium-sized virtual maps are solved, achieving efficient memory and rendering performance improvements.
Patent Information
- Application Number
- CN202511661376.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-01-02
AI Technical Summary
Existing technologies lack fine-grained control over small- to medium-sized virtual maps, leading to problems such as map glitches and character clipping, and also consuming a great deal of resources and failing to effectively optimize memory usage.
By acquiring the position information of virtual characters in the virtual scene and the scene position information of multiple sub-scenes, the scene is divided into multiple scene levels. The sub-scenes to be rendered and their target scene levels are dynamically determined, and only the necessary scene data is loaded and rendered to avoid full loading.
It significantly reduces memory usage and rendering overhead, improves loading efficiency and smoothness of small and medium-sized maps, and achieves fine-grained resource scheduling and rendering control.
Smart Images

Figure CN121243769A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a scene rendering method, a scene rendering device, a computing device, and a computer-readable storage medium. Background Technology
[0002] In modern game development and virtual scene construction, efficient scene management and resource scheduling technologies are crucial for improving rendering performance, optimizing memory usage, and ensuring smooth operation. With the continuous growth of digital content, especially the widespread adoption of open-world games, higher demands are being placed on the loading, unloading, and spatial organization of virtual maps.
[0003] However, most existing technologies are geared towards ultra-large-scale open-world projects. Their optimization logic relies on vast geographical spaces and sparse object distribution, requiring only simple geographical division to achieve streaming effects. They lack the fine-grained control over small- to medium-sized maps. Applying them to small- to medium-sized virtual maps often leads to problems such as map artifacts and character clipping, and consumes a huge amount of memory, wasting resources.
[0004] Therefore, there is an urgent need for a scene optimization technology solution that can adapt to various map sizes in order to achieve resource management and storage optimization for small and medium-sized maps. Summary of the Invention
[0005] In view of this, embodiments of this specification provide a scene rendering method. One or more embodiments of this specification also relate to a scene rendering apparatus, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0006] According to a first aspect of the embodiments of this specification, a scene rendering method is provided, including:
[0007] The system acquires the character position information of a virtual character in a virtual scene, as well as the scene position information of multiple sub-scenes in the virtual scene, wherein any sub-scene is pre-divided into multiple scene levels; based on the character position information and the scene position information of the multiple sub-scenes, it determines the sub-scene to be rendered and the target scene level of the sub-scene to be rendered; it loads the scene data of the target scene level; and it performs rendering based on the scene data to obtain the scene rendering result.
[0008] According to a second aspect of the embodiments of this specification, a scene rendering apparatus is provided, comprising:
[0009] The acquisition module is configured to acquire the character position information of a virtual character in a virtual scene, and the scene position information of multiple sub-scenes in the virtual scene, wherein any sub-scene is pre-divided into multiple scene levels; the determination module is configured to determine the sub-scene to be rendered and the target scene level of the sub-scene to be rendered based on the character position information and the scene position information of the multiple sub-scenes; the loading module is configured to load the scene data of the target scene level; and the rendering module is configured to perform rendering based on the scene data to obtain the scene rendering result.
[0010] The scene rendering method provided in one or more embodiments of this specification obtains the character position information of a virtual character in a virtual scene, as well as the scene position information of multiple sub-scenes in the virtual scene. Each sub-scene is pre-divided into multiple scene layers. Based on the character position information and the scene position information of the multiple sub-scenes, the method determines the sub-scene to be rendered and its target scene layer. It loads the scene data of the target scene layer and renders the scene data to obtain the scene rendering result. By accurately determining the sub-scene to be rendered and its corresponding target scene layer based on the character position information and the scene position information of the multiple sub-scenes, the method avoids the redundant resource preloading problem caused by the full loading of the virtual scene in traditional streaming loading technology. By loading and rendering scene data at the scene layer level based on the determined target scene layer of the sub-scene, the rendering granularity is increased from a single object to the sub-scene at the target scene layer level. This eliminates the need to load detailed level data for each object in the sub-scene, significantly reducing memory usage and GPU memory pressure. Attached Figure Description
[0011] Figure 1 A flowchart illustrating a scene rendering method provided in one embodiment of this specification;
[0012] Figure 2 A partitioning example diagram provided for one embodiment of this specification;
[0013] Figure 3 A system functional diagram provided for one embodiment of this specification;
[0014] Figure 4 A functional example diagram provided for one embodiment of this specification;
[0015] Figure 5 A functional configuration diagram provided for one embodiment of this specification;
[0016] Figure 6 This is yet another functional configuration diagram provided for one embodiment of the present specification;
[0017] Figure 7 A schematic diagram illustrating one embodiment of this specification;
[0018] Figure 8 A system interface diagram provided for one embodiment of this specification;
[0019] Figure 9 A flowchart illustrating the processing steps of a scene rendering method provided in one embodiment of this specification;
[0020] Figure 10 This is a schematic diagram of the structure of a scene rendering device provided in one embodiment of this specification;
[0021] Figure 11 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0022] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0023] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “the,” and “the” used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items. The term “at least one” in one or more embodiments of this application means “one or more,” and “a plurality of” means “two or more.” The term “comprising” is an open-ended description and should be understood as “including but not limiting,” and may include other content in addition to what has been described. It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second, and similarly, second may also be referred to as first, without departing from the scope of one or more embodiments of this specification. Depending on the context, the word “if” as used herein can be interpreted as “when,” “when,” or “in response to a determination.”
[0024] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0025] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0026] Camera Following: This refers to the automatic tracking of the movement of a target object (usually a player character, vehicle, or AI unit) by the "camera" (i.e., the player's perspective) in a game or application, ensuring that the target is always in the appropriate position within the field of view.
[0027] Collision detection is a core technology in fields such as computer graphics, physics simulation, game development, robotics, and virtual reality. Its core task is to determine whether two or more objects are in contact or pass through each other in virtual space.
[0028] Bounding boxes are a fundamental and crucial data structure in computer graphics, game development, physics simulation, and spatial computing. A bounding box represents a geometric object or group of objects by enclosing it, aiming to simplify spatial calculations and improve processing efficiency.
[0029] The graphics pipeline is a core concept in modern computer graphics, describing the complete transformation process from 3D scene data to the final 2D screen image. This process consists of a series of ordered, configurable, or programmable stages, typically executed efficiently on a graphics processing unit (GPU).
[0030] World Streaming Loading System: This is a technique used to create and manage maps in large open-world games. It allows developers to divide a vast game world into multiple smaller map fragments (often called "tiles" or "chunks") and dynamically load and unload these fragments at runtime to optimize performance and resource usage.
[0031] Viewpoint is a crucial concept in computer graphics, virtual reality (VR), augmented reality (AR), game development, photography, and visualization. Simply put, viewpoint is the position and orientation of the observer (or camera) in three-dimensional space. It determines "where to look" and "which direction to look" at the virtual world. Currently, most similar projects on the market also use world-streaming loading systems, but these projects typically involve larger open worlds. Simply dividing the space according to the world-streaming loading system is usually sufficient for optimization. Therefore, they almost always remain at the application level, rarely supporting optimization techniques for maps of general sizes from the engine's underlying layer. Therefore, this specification provides a scene rendering method to address the problems existing in current technologies.
[0032] See Figure 1 , Figure 1 A flowchart of a scene rendering method provided in one embodiment of this specification includes the following steps:
[0033] Step 102: Obtain the character position information of the virtual character in the virtual scene, as well as the scene position information of multiple sub-scenes in the virtual scene. Each sub-scene is pre-divided into multiple scene levels.
[0034] Character position information is data used to characterize the spatial position of a virtual character within a virtual scene, typically represented in coordinate form, such as (x, y, z) coordinates in a 3D world coordinate system. Character position information is used to calculate the spatial relationships between the character and other scene objects, such as distance, orientation, whether the character is within a specific area, or the numerical value of the distance to a given coordinate. It is fundamental data for implementing camera tracking, collision detection, AI behavior decision-making, and viewpoint-based resource scheduling (such as detail level control and rendering activation determination). Character position information can be dynamically generated by the game engine at runtime and updated synchronously as the character moves.
[0035] A virtual scene is a digital spatial environment constructed within a computer system. Virtual scenes can be three-dimensional or two-dimensional, used to present visual content, simulate physical interactions, or support user navigation. They contain virtual objects such as terrain, buildings, characters, lighting, and special effects, and follow a specific spatial coordinate system (such as the world coordinate system). The scene can be divided into multiple sub-scenes for modular management, supporting dynamic loading, rendering, and logical updates. Virtual scenes can be games, virtual reality, augmented reality, digital twins, autonomous driving simulations, and more.
[0036] A sub-scene is an independent block obtained by dividing a large virtual map, which can be based on geographical regions, functional divisions, or performance management requirements. Each sub-scene corresponds to a part of the original map and can be used to implement tile loading, streaming rendering, or local resource management. This division can be done manually in a world streaming loading system or automatically generated based on grid rules. As the basic unit of scene management, sub-scenes are easy to load and unload on demand or set independent rendering strategies, and are often used in open-world games or large-scale virtual environments to reduce memory consumption and improve running efficiency. In one possible scenario, a sub-scene can be set to a size of 256*256, i.e., a small to medium-sized map. Compared to larger maps, small to medium-sized maps have a smaller memory footprint and are more flexible in terms of adjustment. See details... Figure 2 Example, Figure 2 This is a partitioning example diagram provided for one embodiment of this specification. It can be seen in... Figure 2 In the process, a region within a large virtual scene was partitioned into sub-scenes A, B, C, and D. Sub-scene D was configured with the following settings: location (0,0,0), range 12600, 12600, layer name "terrain layer" (the terrain layer configured for the sub-scene), and streaming distance of 13000.
[0037] The scene location information for multiple sub-scenes refers to the spatial location of each sub-scene in the world coordinate system within the virtual scene. This information represents the geographical distribution or logical center point of each sub-scene. It is typically represented by three-dimensional coordinates (x, y, z), and can be the center of the bounding box, the origin, or a representative reference point of the sub-scene. This information is used to calculate the spatial distance between the virtual character and each sub-scene, serving as the basis for determining whether to load, unload, or switch rendering levels. Sub-scenes can be segmented based on geographical division, functional areas, or performance optimization requirements. Their location information is preset and stored in the scene metadata during the scene editing stage and is available for use by the resource scheduling module at runtime.
[0038] In addition, the scene location information of the sub-scene can also include the sub-scene's streaming volume, scene saliency, bounding box, occlusion relationship, etc. Based on the streaming volume, scene saliency, bounding box, occlusion relationship, it can be determined in different ways whether to load and render the sub-scene.
[0039] Scene hierarchy is a hierarchical structure formed by dividing virtual objects within a virtual scene based on their visual salience and / or geometric complexity. Scene hierarchy is determined by the model type of at least one virtual object contained within a virtual scene or sub-scene. See details... Figure 3 Example, Figure 3 This is a system functional diagram provided as an embodiment of the present specification, which can configure the number of scene layers in a virtual scene. In the diagram, the number of scene layers configured is 0.
[0040] Each scene hierarchy contains one or more types of virtual objects, corresponding to different clipping distances and effective rendering distances. This hierarchical structure is used to implement distance-based progressive resource loading and unloading, optimizing memory usage and rendering performance. Virtual objects contained in some scene hierarchy levels of the same virtual scene may overlap; for example, a high-detail scene hierarchy may contain virtual objects from a low-detail scene hierarchy, as shown in the examples below.
[0041] For example, the scene hierarchy could be: buildings as the first level (the virtual character is relatively far from the virtual scene, such as 500-301 meters), trees and buildings as the second level (the virtual character is moderately far from the virtual scene, such as 300-101 meters), and grass, trees, and buildings as the third level (the virtual character is relatively close to the virtual scene, such as within 100 meters). Correspondingly, when the virtual character is 500 meters away from the virtual scene, the first level containing buildings is loaded; when the virtual character is 300 meters away, the second level containing buildings and trees is loaded; and when the virtual character is 100 meters away, the first level containing grass, trees, and buildings is loaded. This can be understood as dividing the virtual scene or sub-scene into multiple scene levels, and during loading, the entire content of the corresponding scene level is directly loaded as the currently used virtual scene or sub-scene.
[0042] There are multiple ways to obtain the position information of a virtual character in a virtual scene, as well as the scene position information of multiple sub-scenes within the virtual scene. The specific method chosen depends on the actual situation, and this specification does not limit the implementation method. In one possible implementation, the position information of the virtual character in the virtual scene can be obtained through the game engine runtime interface, and the preset center coordinates of each sub-scene can be read from the scene configuration file as the scene position information. In another possible implementation, the position information of the virtual character in the virtual scene can be obtained based on the navigation grid path points, and the scene position information of multiple sub-scenes within the virtual scene can be determined by the geometric center of the sub-scene bounding box.
[0043] This step acquires the location information of characters and sub-scenes, and combines it with a pre-defined object hierarchy structure to provide a data foundation for subsequent hierarchical and on-demand loading based on spatial distance. It enables the system to determine the relative location range of the character, thereby determining the rendering level to be activated (e.g., loading only buildings at a distance, loading vegetation at a close distance), achieving fine-grained resource scheduling, avoiding redundant loading of scene data, reducing memory usage and rendering overhead, and improving the loading efficiency and smoothness of small-to-medium-sized maps.
[0044] Step 104: Based on the character position information and the scene position information of multiple sub-scenes, determine the sub-scene to be rendered and the target scene level of the sub-scene to be rendered.
[0045] The sub-scene to be rendered is the sub-scene that needs to participate in the current frame or the next rendering cycle. The sub-scene to be rendered is determined based on the spatial distance relationship between the virtual character's current position and each sub-scene. Generally, when the character enters a sub-scene within a preset relative position threshold, or is located in its vicinity, that sub-scene is considered to be rendered.
[0046] The sub-scenes to be rendered are dynamically changing and updated synchronously with the character's movement. They only contain scene blocks that are currently visually relevant or about to enter the field of view. This is used to achieve streaming loading and on-demand resource scheduling, avoiding invalid rendering of sub-scenes far from the character, thereby optimizing system performance and memory usage.
[0047] For example, a city map is divided into multiple sub-scenes, such as forests and ruins. When a character enters within 500 meters of a sub-scene, that area is marked as a "sub-scene to be rendered." Sub-scenes are further divided into multiple scene levels: the first level contains only buildings and can be rendered beyond 500 meters; the second level contains buildings and trees and is rendered within 300 to 500 meters; the third level contains buildings, trees, and grass and is rendered entirely within 100 meters. Each level is dynamically activated based on the distance between the character and the sub-scene, achieving layered rendering based on distance and on-demand loading, thus optimizing rendering performance.
[0048] The target scene level of the sub-scene to be rendered is the scene level that the sub-scene should currently be loaded and rendered. In this specification, a sub-scene or any virtual scene is used as the object for determining the level of detail. That is, the virtual objects in the sub-scene are pre-classified by model type, and the virtual objects in the sub-scene are divided into terrain, large objects, medium-large objects, medium-small objects, small objects, micro objects, etc. (the specific classification is based on the actual situation and is not limited to the aforementioned levels). Multiple virtual scene detail levels are determined according to the preset rendering distance, and virtual objects of various model types are assigned to the corresponding detail level sub-scenes or virtual scenes. During rendering, the scene rendering result is obtained by loading and rendering the sub-scenes or virtual scenes according to the corresponding detail level.
[0049] Similarly, the sub-scene to be rendered can be dynamically determined. The selection of the target object hierarchy is based on the distance between the character and the sub-scene, ensuring that only necessary objects within the current view distance are loaded, thereby optimizing performance and resource management.
[0050] There are several ways to determine the sub-scene to be rendered and its target scene level based on the character's position information and the scene position information of multiple sub-scenes. One possible way is to determine the relative positions of the multiple sub-scenes based on the character's position information and the scene position information of multiple sub-scenes, and then determine the sub-scene to be rendered and its target object level based on the relative positions.
[0051] Another possible approach is to determine the sub-scene to be rendered and the target scene level of the sub-scene to be rendered based on the character's position information and the streaming volume of multiple sub-scenes.
[0052] Another possible approach is to determine the sub-scene to be rendered and its target object hierarchy based on the character's position information, the character's view frustum information, and the scene position information of multiple sub-scenes. That is, based on the character's position information, the character's view frustum information, and the scene position information of multiple sub-scenes, the sub-scene visible to the character is determined as the sub-scene to be rendered, and the target object hierarchy of the sub-scene to be rendered is determined based on the character's position information and the scene position information of the sub-scenes.
[0053] This step dynamically selects the sub-scenes to be rendered based on their spatial relationship with the characters and sub-scenes, and further determines the target object hierarchy to be loaded. This accurately identifies visually relevant areas and corresponding detail levels within the global scene, providing a basis for subsequent on-demand loading of object data, thereby achieving fine-grained resource scheduling, avoiding redundant loading, and improving rendering performance.
[0054] Step 106: Load scene data at the target scene level.
[0055] Scene data is a collection of information describing a virtual scene or a sub-scene within a virtual scene, including its geometric structure, appearance attributes, spatial transformations, behavioral characteristics, and rendering resources. Specifically, it includes, but is not limited to: 3D model meshes, texture maps, material parameters, position, rotation, scaling, animation states, collider information, and the scene hierarchy. This data is loaded and submitted to the graphics pipeline at runtime to generate the final visual presentation. Scene data is dynamically loaded according to rendering requirements and is fundamental to achieving dynamic and efficient rendering and resource management of virtual scenes.
[0056] There are several ways to load object data of virtual objects to be rendered from the target object hierarchy. One possible way is to load the virtual objects to be rendered from the target object hierarchy into memory. Another possible way is to retrieve the object data of the virtual objects to be rendered from the storage device, filter out the object data of the virtual objects to be rendered from the target object hierarchy, and then load the object data of the virtual objects to be rendered from the target object hierarchy.
[0057] For example, in a virtual scene, there is a sub-scene called "Park," which is divided into three scene levels:
[0058] First level (building): pavilion; Second level (building + trees): pine tree, sycamore tree, pavilion; Third level (building + trees + grass): pine tree, sycamore tree, pavilion, lawn, morning glory.
[0059] When a character enters within 300 meters of the sub-scene, the system determines the target object's level as "Level 2". The system retrieves the scene data corresponding to Level 2 of the sub-scene from storage devices (such as hard drives or resource packs). This scene data includes data for the pavilion, pine trees, and sycamore trees. This scene data is then loaded into memory and submitted for rendering. Therefore, only the scene data corresponding to Level 2 is retained in memory; there is no need to load or render scene data corresponding to other scene levels, which greatly reduces the computational footprint of the central processing unit and memory.
[0060] This step, based on the object data of the virtual objects to be rendered in the target object hierarchy determined by the above scheme, filters and loads the corresponding object data from the storage device into memory, realizing on-demand loading of resources, avoiding redundant loading of data of unrelated hierarchy or distant objects, effectively reducing memory usage, and improving loading efficiency and running performance.
[0061] Step 108: Render based on scene data to obtain scene rendering results.
[0062] Rendering is the process of converting data (geometry, materials, lighting, camera view, etc.) of a virtual scene into an image (two-dimensional or three-dimensional). This process is typically implemented by the graphics pipeline. Within the virtual scene, the rendering system retrieves scene data from the loaded sub-scene to be rendered from memory, performs vertex transformations, lighting calculations, texture mapping, rasterization, and other operations to generate a pixelated image that can be displayed on the screen. Rendering is usually performed in real-time at a rate of multiple frames per second to ensure a continuous and smooth visual experience for the user.
[0063] Scene rendering results refer to the images synthesized by the system based on object data. After loading the scene data, the scene rendering result is obtained by processing all virtual objects (such as buildings and trees) to be rendered in the target scene layer according to their position, material, lighting, and camera viewpoint information through the graphics pipeline. This result only includes the layer content that should be displayed within the current view distance (e.g., displaying buildings and trees at medium to long distances, excluding grass), ensuring visual rationality while avoiding performance waste, achieving efficient, smooth, and detail-adaptive real-time rendering effects.
[0064] This specification's embodiments dynamically determine the sub-scene to be rendered and its target object hierarchy by combining character position and sub-scene position information, enabling on-demand loading of virtual object data at specific levels. This avoids redundant reading of irrelevant resources and memory consumption, significantly reducing memory overhead and GPU load. Especially for medium-sized maps, it provides a fine-grained, layered rendering control mechanism, improving resource scheduling efficiency and screen smoothness. It solves the technical problem of existing technologies lacking low-level optimization support for general-sized maps, offering greater adaptability and performance advantages.
[0065] In one optional embodiment of this specification, based on character position information and scene position information of multiple sub-scenes, the sub-scene to be rendered and the target object hierarchy within the sub-scene to be rendered are determined, including:
[0066] Based on the character's position information and the scene position information of multiple sub-scenes, the relative positions of multiple sub-scenes are determined;
[0067] Based on the relative positions of multiple sub-scenes and a preset relative position threshold, the sub-scene to be rendered is determined from the multiple sub-scenes;
[0068] Based on the relative position of the sub-scene to be rendered and the relative position range of at least one preset scene level, determine the target scene level of the sub-scene to be rendered from at least one preset scene level.
[0069] Relative position refers to the spatial relationship between a virtual character and various sub-scenes. Relative position can be represented by calculating the distance between the character's position information and the sub-scene's position information. This distance reflects how close or far the character is from a particular sub-scene and is the basis for determining whether to render that sub-scene and its object hierarchy.
[0070] The preset relative position threshold is a pre-defined distance threshold used to define the activation range of sub-scenes and determine whether a sub-scene needs to be rendered. For example, "500 meters" can be set as the first threshold, meaning that when the distance between the character and the sub-scene is less than 500 meters, the sub-scene is determined to be a sub-scene to be rendered. This threshold can be configured according to map size, device performance, or visual requirements.
[0071] The preset object hierarchy consists of multiple object levels predefined during the scene construction phase. Each level corresponds to a different set of virtual objects and their activation range. For example, the first level contains only buildings (activation range ≤ 500 meters), the second level contains buildings and trees (activation range ≤ 300 meters), and the third level contains all objects (activation range ≤ 100 meters). The system selects the corresponding preset object hierarchy as its target object hierarchy based on the range into which the relative position of the sub-scene to be rendered falls.
[0072] For example, a virtual character is located at coordinates (0,0,0) and there are three sub-scenes:
[0073] Sub-scene A (center coordinates: 100,0,100), approximately 141 meters away from the character.
[0074] Sub-scene B (center coordinates: 300, 0, 400), approximately 500 meters away.
[0075] Sub-scene C (center coordinates: 800, 0, 600), approximately 1000 meters away.
[0076] Relative position: the distance from the character to each sub-scene, which are 141 meters, 500 meters, and 1000 meters respectively.
[0077] Preset relative position threshold: 500 meters. Only sub-scenes with a distance ≤ 500 meters will be rendered. Therefore, sub-scenes A and B are to be rendered, while C is discarded.
[0078] Preset object hierarchy for sub-scene A:
[0079] Level 1 (≤500 meters): Buildings only;
[0080] Second level (≤300 meters): Buildings + Trees;
[0081] Third level (≤150 meters): Buildings + Trees + Grass;
[0082] The virtual character is 141 meters away from sub-scene A and falls into the third level. Its target scene level is "buildings + trees + grass".
[0083] In one possible scenario, the scene data corresponding to the target scene level may also include at least one object level corresponding to the virtual objects contained in the target scene level. Based on the character position information and the scene position information of the multiple sub-scenes, the sub-scene to be rendered and the target scene level of the sub-scene to be rendered are determined. The method may also include: based on the character position information and the scene position information of the multiple sub-scenes, determining the sub-scene to be rendered and the target scene level of the sub-scene to be rendered, as well as the target object level of the virtual objects contained in the sub-scene to be rendered.
[0084] The object hierarchy of a virtual object refers to the level of detail corresponding to the virtual object, which is used to load and render the object according to different levels of detail.
[0085] For example, after determining that sub-scene A is the sub-scene to be rendered and that the target scene level is the third level, containing virtual objects including "buildings + trees + grass", the system renders the sub-scene to be rendered according to the third level. During this process, the graphics processing unit can further determine the detailed level of each virtual object. For example, if the relative position of the virtual character and sub-scene A is 141 meters, and the effective rendering distance for the trees is 150 meters, then the target object level of the trees at 141 meters is determined, and further rendering of the object level is performed for the trees. If the effective rendering distance for the trees is 120 meters, then it is not necessary to determine the object level of the trees again, and the trees can be rendered directly according to the target scene level.
[0086] This specification's embodiments determine the relative positions of multiple sub-scenes based on character position information and scene position information of multiple sub-scenes; based on the relative positions of multiple sub-scenes and preset relative position thresholds, a sub-scene to be rendered is determined from the multiple sub-scenes; based on the relative positions of the sub-scene to be rendered and the relative position range of at least one preset object level, the target object level of the sub-scene to be rendered is determined from at least one preset scene level. This achieves precise selection of sub-scenes to be rendered, avoiding the invalid loading of sub-scenes outside the viewport in existing technologies. Furthermore, based on matching the relative positions of the sub-scenes to be rendered with the "relative position range of preset object levels," the scene to be loaded is determined, and its target scene level is dynamically determined. This allows the system to load objects such as buildings, trees, and grass in layers according to different relative positions, given the scene to be loaded, achieving fine-grained control from "whole-block loading" to "on-demand layered rendering." This significantly reduces memory usage and rendering overhead, and is especially suitable for medium-sized maps or scenes with high object density. It effectively solves the technical problem of existing technologies lacking underlying optimization support for general-sized maps, improving rendering efficiency and system adaptability.
[0087] In one optional embodiment of this specification, before determining the target scene level of the sub-scene to be rendered from at least one preset scene level based on the relative position of the sub-scene to be rendered and the relative position range of at least one preset scene level, the method further includes:
[0088] Obtain scene data for multiple sub-scenes in a virtual scene, where any sub-scene includes multiple virtual objects of different model types;
[0089] Based on the model type of each virtual object, any sub-scene is divided to obtain multiple scene levels corresponding to the sub-scenes. The model types of virtual objects contained in each scene level are different.
[0090] Based on the maximum model size of each virtual object model type in the same scene layer, set the relative position range corresponding to multiple scene layers.
[0091] Scene data is a collection of information about each sub-scene and its contained virtual objects within a virtual scene. In the embodiments described in this specification, scene data includes, but is not limited to: the spatial location and extent information of the sub-scenes, and the object type (such as buildings, trees, grass, etc.), geometric model, material, position coordinates, and corresponding effective rendering distance of each virtual object. This data is generated and stored during the scene editing stage and is read by the system at runtime for performing object hierarchy division and dynamic rendering scheduling.
[0092] Virtual objects of different model types are specific entities defined within a virtual scene based on their size. The size of a model can be determined by at least one of the following: bounding box, bounding sphere, diagonal length, and the model's span along the coordinate axes. The size of a model affects its geometric complexity, visual saliency, and rendering priority, thus influencing its clipping distance and effective rendering distance. For example, buildings, trees, and grass represent three typical object types: buildings are structural objects with large volumes and high recognizability; trees are medium-complexity environment-filling objects; and grass is a high-density, low-visual-weight detail-decorative object. These types differ in effective rendering distance, resource consumption, and visual contribution, thus requiring categorization and management as the basis for defining scene layers and implementing layered rendering.
[0093] The effective rendering distance is the maximum range within which an object or scene can be loaded and rendered by the system. When a virtual character is outside this range, its visual size is too small or it is invisible, and continuing to render it would waste resources. When it enters this range, it becomes displayable and should be loaded. For example, the effective rendering distance for buildings is 500 meters, for trees it is 300 meters, and for grass it is 100 meters. This distance is determined by the object type, size, and visual weight, and is the core criterion for implementing layered loading based on distance and user visual perception.
[0094] The process of classifying virtual objects within a sub-scene into different scene levels is based on their model types. Alternatively, the classification can be based on visual saliency. That is, one possible approach is to divide any sub-scene based on the visual saliency corresponding to the object types of multiple virtual objects, thus obtaining the object levels corresponding to the object types of the multiple virtual objects.
[0095] There are several ways to divide any sub-scene based on the model type of each virtual object to obtain scene levels corresponding to multiple sub-scenes. One possible way is to classify the virtual objects in any scene level according to their model type, determine multiple size categories, determine the number of scene levels to divide any sub-scene based on the multiple size categories, and divide any sub-scene based on the number of scene levels and the model type of each virtual object to obtain scene levels corresponding to multiple sub-scenes.
[0096] There are several ways to set the relative position ranges corresponding to multiple scene layers based on the maximum model size of each virtual object's model type within the same scene layer. One possible way is to set the relative position ranges corresponding to multiple scene layers based on the maximum model size of each virtual object's model type within the same scene layer.
[0097] The maximum model size is the largest among the model types of virtual objects included in any sub-scene. By analyzing the maximum model size corresponding to each virtual object, the maximum model size is determined as the benchmark for determining the relative position range. This determines the relative position range corresponding to multiple object levels in any sub-scene, enabling fine-grained division of the sub-scene.
[0098] This specification's embodiments divide sub-scenes into scene levels based on the model types of virtual objects, and, combined with the model types of each virtual object, achieve refined and hierarchical management and on-demand loading of virtual scene content. This solution overcomes the limitations of "full loading" or "coarse-grained segmentation" in traditional streaming loading systems, significantly improving resource scheduling efficiency and operational performance.
[0099] In one optional embodiment of this specification, the virtual scene includes at least one terrain feature, and the method further includes:
[0100] Obtain the terrain location information of at least one terrain feature;
[0101] Based on the character's position information and the position information of at least one terrain feature, determine the terrain to be rendered;
[0102] Load the terrain data for the terrain to be rendered;
[0103] Rendering is performed based on terrain data to obtain terrain rendering results.
[0104] Terrain is the basic 3D surface used in a virtual scene to represent the undulating structure of natural or artificial landforms. Terrain data typically includes heightmaps, vertex meshes, material layers (such as grass, sand, and rocks), and vegetation distribution information. In this embodiment, terrain, as a rendering unit independent of sub-scenes, can include various types such as plains, mountains, and hills. The system obtains the terrain location information (such as center coordinates or enclosing areas) of each terrain type, combines it with the character's current position, determines which terrains are "terrains to be rendered," and loads their terrain data for rendering as needed.
[0105] Terrain location information is the spatial identifier of each type of terrain in the virtual scene within the world coordinate system. Terrain location information can be represented by the coordinates of the center point of the terrain region, the bounding box extent, or the grid index. This information is used to determine the geographical distribution of terrain and is the fundamental data for calculating the relative distance between a character and the terrain. The system compares the character's location information with the terrain's location information to determine whether the character has entered the active range of the terrain, and then decides whether to mark it as "terrain to be rendered" and load the corresponding terrain data. This mechanism supports terrain tile management and on-demand loading, making it suitable for efficient rendering optimization in large-scale open scenes.
[0106] The terrain to be rendered is the terrain area that needs to be loaded and rendered. The terrain to be rendered can be dynamically determined based on the virtual character's position information and the terrain's position information.
[0107] The terrain rendering result is a visualization of the terrain generated by the system based on the loaded terrain data to be rendered. The terrain rendering result can also be generated with reference to height maps, materials, lighting, and the virtual camera's perspective. The terrain rendering result includes the terrain area visible within the virtual character's current view distance.
[0108] There are several ways to determine the terrain to be rendered based on the character's position information and the terrain position information of at least one type of terrain. One possible way is to determine the relative position of at least one type of terrain based on the character's position information and the terrain position information of at least one type of terrain; and then determine the terrain to be rendered based on the relative position of at least one type of terrain.
[0109] Another possible approach is to use terrain location information, including terrain streaming volume, specifically by determining the terrain to be rendered based on character location information and the streaming volume of at least one type of terrain.
[0110] This specification's embodiments achieve on-demand terrain rendering by acquiring terrain location information, combining it with the character's position to statically or dynamically determine the terrain to be rendered, and loading the corresponding data. This effectively avoids redundant loading of all scene terrain data, reduces memory usage and rendering overhead, and improves rendering efficiency and screen smoothness. It is particularly suitable for fine-grained management of terrain resources and high-performance visualization generation in small to medium-sized scenes.
[0111] In one optional embodiment of this specification, any terrain includes multiple terrain levels, and each terrain level has a corresponding relative position range;
[0112] Based on the character's position information and the terrain position information of at least one type of terrain, the terrain to be rendered is determined, including:
[0113] Based on the character's position information and the terrain position information of at least one type of terrain, determine the relative position of the virtual character with respect to at least one type of terrain.
[0114] Based on the character's position information and relative position, determine the terrain to be rendered and the target terrain level of the terrain to be rendered from at least one terrain;
[0115] Rendering is performed based on terrain data to obtain terrain rendering results, including:
[0116] Based on the target terrain level, the terrain data is rendered to obtain the terrain rendering result.
[0117] Relative position is the spatial distance between a virtual character and at least one type of terrain. It is obtained by calculating the geometric distance between the character's position information and the center point or boundary of each terrain, and is used to characterize the distance of the virtual character relative to each terrain. This relative position serves as the basis for subsequent determination of whether to activate the corresponding terrain and its target terrain level.
[0118] The target terrain level refers to the specific terrain detail level that needs to be rendered, determined based on the virtual character's position information and the terrain's position information. Each terrain can be divided into multiple terrain levels, each corresponding to a different level of detail or visual precision. Each terrain level also has a preset relative position range, which defines the distance interval from the virtual character to the terrain. Within this range, the terrain level will be activated and loaded.
[0119] The terrain rendering result is the final visualized image or screen displayed on the screen. The terrain rendering result can be a two-dimensional or three-dimensional visualized image. The terrain rendering result is used to display the designed terrain in the virtual scene or sub-scene to the virtual character in a visual form, so as to achieve a simulated virtual scene viewing effect.
[0120] Taking a mountain terrain as an example, this terrain can contain two terrain levels: LOD0 and LOD1. LOD0 is a higher-resolution terrain level, which may include high-precision models and collision volumes. When the player is less than 700 meters away from the terrain's sub-scene, LOD0 can be used. LOD1 is a lower-resolution terrain level, which may only include collision volumes and not visible models. When the player is more than 700 meters away from the terrain's sub-scene, LOD1 can be used. This provides a high-precision display effect for characters when the distance is close and the terrain is clearly visible from their perspective. When the distance is far and the terrain has almost no impact on the character's observation, the terrain can be omitted, and only collision volumes are provided for the virtual scene to perform logical calculations, avoiding clipping.
[0121] This specification's embodiments divide the terrain into multiple terrain layers with different levels of detail and configure a corresponding relative position range for each terrain layer. This enables dynamic selection and on-demand loading of terrain layers based on character position, further achieving layered streaming loading of large-scale terrain surfaces. This avoids all terrain data remaining resident in memory, improving rendering efficiency and scene loading speed. The corresponding layer is activated only when the virtual character enters a specific distance range, avoiding redundant loading of high-precision terrain data over long distances. Simultaneously, multi-layer management is supported, combining the rendering effects and data precision of different layers to achieve an adaptive balance between performance and image quality, enhancing loading flexibility and smooth operation in large-scale terrain scenes. The terrain rendering results are merged with the object-level rendering results of sub-scenes to jointly constitute a complete virtual scene view, achieving efficient and smooth visualization of large-scale terrain.
[0122] In one optional embodiment of this specification, each terrain layer has a corresponding rendering effect. Based on the target terrain layer, terrain data is rendered to obtain a terrain rendering result, including:
[0123] Based on the rendering effect corresponding to the target terrain level, the terrain data is rendered to obtain the terrain rendering result.
[0124] The target terrain level is a terrain rendering detail level (such as LOD0, LOD1, etc.) determined based on the relative distance between the virtual character and the terrain. Alternatively, the target terrain level can be dynamically selected based on the virtual character's or user's field of view, or performance requirements. Each level corresponds to different geometric precision, texture resolution, and rendering effects. The system selects appropriate terrain data for rendering based on this level, optimizing resource consumption while ensuring visual quality, achieving efficient and adaptive terrain rendering.
[0125] For example, consider a mountainous terrain where the topographic hierarchy is designed as follows:
[0126] When the character is less than 700 meters away from the terrain, the terrain level LOD00 is used, and the rendering effect is as follows:
[0127] Detailed Model: Utilizes high-resolution height maps and detailed texture maps to display a detailed model of the mountains, including details such as rocks and vegetation.
[0128] Collision volume setting: Enables precise collision detection to ensure accurate interaction between the player and the environment.
[0129] Example: When a player approaches a mountainous area, the system loads high-precision terrain data for that area, displaying details of every rock and every blade of grass, allowing the player to accurately climb or avoid obstacles.
[0130] When the character is more than 700 meters away from the terrain, terrain level LOD1 is used, and the rendering effect is as follows:
[0131] Rough Model: Does not use heightmaps and texture maps, and does not display the mountain model.
[0132] Collision Detection: Enables simplified collision detection, primarily for visual occlusion and basic spatial awareness, but does not support complex interactions.
[0133] Example: When a player moves away from a mountainous area, the system switches to low-precision terrain data, does not display mountain models, and only provides simple collision detection to reduce the consumption of system resources. At this time, the player cannot perform detailed interactions, such as climbing or hiding behind specific rocks.
[0134] This specification's embodiments, by setting up multiple terrain layers and using different terrain layers to render terrain based on different character position information and relative position information, significantly reduce the geometric complexity and computational overhead of distant terrain, effectively save graphics processing unit resources and memory usage, and improve overall rendering performance; at the same time, it ensures the realism and interactive accuracy of close-up scenes, balances visual quality and operating efficiency, supports smooth loading and real-time rendering of large-scale virtual scenes, and enhances the system's adaptability and user experience.
[0135] One optional embodiment of this specification involves rendering based on scene data to obtain a scene rendering result, including:
[0136] Based on the terrain rendering results, the scene data is rendered to obtain the scene rendering result.
[0137] In one possible scenario, the terrain loading and rendering process takes precedence over the scene data rendering. That is, the terrain to be rendered in the virtual scene or sub-scene is determined first, and the terrain to be rendered is rendered to obtain the terrain rendering result. Furthermore, based on the terrain rendering result, the virtual scene or sub-scene to be rendered is determined, and the terrain where the virtual scene or sub-scene to be rendered is determined. Based on the terrain rendering result, the scene data corresponding to the corresponding virtual scene or sub-scene is rendered to obtain the scene rendering effect.
[0138] There are several ways to render scene data based on terrain rendering results to obtain scene rendering effects. One possible way is to determine the position of the virtual object in the terrain based on the terrain rendering results and scene data, and then render the scene data based on the object position to obtain the scene rendering results.
[0139] This specification's embodiments achieve efficient visual presentation with rich foreground details and simplified backgrounds by dynamically determining the terrain to be rendered and its level of detail based on the character's position, generating terrain rendering results, and then overlaying rendering scene data on top of these results. This method effectively reduces rendering load, optimizes resource scheduling, and significantly improves the performance and user experience of large-scale virtual scenes while ensuring visual smoothness and realism.
[0140] In one optional embodiment of this specification, after rendering based on scene data and obtaining the scene rendering result, the method further includes:
[0141] Receive navigation instructions, wherein the model type navigation instructions include the current position information and current navigation data of the navigation object;
[0142] Based on the current location information of the navigation object of the model type and the current navigation data of the model type, determine the target location information and the target sub-scene corresponding to the target location information of the model type;
[0143] When the target sub-scene corresponding to the target location information of the model type is inconsistent with the current sub-scene corresponding to the current location information of the model type, the scene level corresponding to the target sub-scene of the model type is determined based on the scene level corresponding to the current sub-scene of the model type.
[0144] The target sub-scene of the model type is rendered based on the scene data corresponding to the scene level of the target sub-scene, to obtain the target rendering result, and the target navigation data corresponding to the target sub-scene is loaded.
[0145] When the sub-scene where the model type navigation object is located switches from the current sub-scene of the model type to the target sub-scene of the model type, the model type navigation object is navigated based on the target rendering result of the model type and the target navigation data.
[0146] Navigation commands are control signals for navigation objects, used to drive navigation objects in a virtual scene to move from their current position along a specified route or direction. Navigation commands may include one or more of the following: the navigation object's identifier, the object's current location information, the planned navigation route, and the target location information.
[0147] A navigation object is a virtual entity in a virtual scene that moves along a specified path. It is the guided entity in the entire navigation process; changes in the navigation object's position can drive scene rendering updates, sub-scene switching, and logical state evolution. A navigation object can be any virtual entity in the virtual scene, such as a player character, AI unit, or camera.
[0148] Navigation data is a structured spatial guidance dataset used to drive one or more of the following: navigation behavior of navigation objects, dynamic rendering of virtual scenes, and switching between sub-scenes. Navigation data can be a complete movement trajectory from the current location to the target location, a direct line connecting the current and target locations, or an approximate direction of movement. Navigation data allows for the prediction of the location of a navigation object over a period of time.
[0149] The current navigation data is the navigation data in the current sub-scene, and correspondingly, the target navigation data is the navigation data in the target sub-scene.
[0150] The current location information is the spatial positioning data of the navigation object, used to determine the current coordinates of the navigation object in the virtual scene. The current location information can be the three-dimensional coordinates (X,Y,Z) of the navigation object in the world coordinate system, and can be associated with the current sub-scene, level, or spatial partition number to which it belongs.
[0151] Target location information is the spatial positioning data of the navigation object, used to determine the target coordinates of the navigation object in the virtual scene. The target coordinates can be the destination of the navigation or the navigation's position at a certain moment. Target location information can be the three-dimensional coordinates (X, Y, Z) of the navigation object in the world coordinate system, and can be associated with its corresponding target sub-scene, level, or spatial partition number.
[0152] In large-scale virtual scenes based on level-based streaming, traditional navigation mesh (NavMesh) generation mechanisms typically rely on a single main level to uniformly construct global navigation data, or on a world-streaming system to automatically stitch together local navigation information from various sub-levels. However, when the scene adopts an architecture combining multi-object hierarchies and dynamically loaded chunks, the original navigation system exposes serious flaws: adjacent geographical regions at different levels may contain different collider configurations, causing navigation data to break, misalign, or conflict logically at chunk boundaries, leading to runtime issues such as abnormal path planning for non-player characters, clipping, or freezing.
[0153] By using the current location information, current navigation data, and target location information, we can determine the current sub-scene where the navigation object is currently located, as well as the target sub-scene where the object may be located in the future. If the current sub-scene and the target sub-scene are the same, it means that the navigation object has not crossed sub-scenes, and no additional processing is required.
[0154] When the current sub-scene and the target sub-scene are inconsistent, it means that the navigation object has crossed sub-scenes. At this time, the scene level corresponding to the target sub-scene is determined based on the scene level corresponding to the current sub-scene, and the target sub-scene is rendered based on the scene level corresponding to the target sub-scene. At this time, the scene levels of the current sub-scene and the target sub-scene are consistent, the model level and the collision rules are consistent. When the navigation object crosses sub-scenes, it can be processed based on the same model level and collision rules to avoid possible misalignment, getting stuck or falling off the terrain at the boundary.
[0155] While loading the target sub-scene, target navigation data running within the target sub-scene can also be loaded, maintaining consistency between the scene and navigation data. Simultaneously, the current sub-scene and its current navigation data are unloaded, thereby reducing memory usage and optimizing efficiency.
[0156] For example, see Figure 4 , Figure 4 This is a functional example diagram provided for one embodiment of this specification, where A is the current sub-scene and B is the target sub-scene. When the virtual character is in the current sub-scene A, navigation data 1 is used for navigation. The system synchronously predicts the next position of the virtual character. When the virtual character may cross to the target sub-scene B, the scene data and navigation data 2 in the target sub-scene B are loaded. After the virtual character crosses to the target sub-scene B, the scene data and navigation data of the current sub-scene A are unloaded, and the virtual character is navigated according to the scene data and navigation data 2 in the target sub-scene B.
[0157] This embodiment of the specification receives navigation instructions containing current location information and navigation route, predicts the cross-sub-scene movement behavior of the navigation object based on the target location information, and dynamically determines the matching level of the target sub-scene according to the scene level corresponding to the current sub-scene when the current sub-scene and the target sub-scene are inconsistent. Then, it renders the target sub-scene based on this unified level. This solution effectively solves problems such as boundary breaks, collider misalignment, and path anomalies caused by the independent construction of navigation data in different blocks in traditional level-based streaming systems. It ensures the consistency of model level and collision rules when moving across regions, avoiding runtime errors such as clipping, freezing, or falling off terrain for non-player characters. Simultaneously, by pre-determining and loading the correct scene level of the target sub-scene, seamless connection and logical coherence of sub-scene switching during navigation are achieved, significantly improving the stability, smoothness, and immersion of dynamic navigation in large-scale virtual scenes. Furthermore, the synchronous loading and unloading of navigation data and sub-scenes reduces the occupation of invalid navigation data in memory and optimizes memory space utilization efficiency.
[0158] One optional embodiment of this specification loads object data of the virtual object to be rendered in the target object hierarchy, including:
[0159] When the relative position of the sub-scene to be rendered is determined to be less than the buffer position range, the scene data of the target scene level is loaded, wherein the buffer position range is less than the relative position range of the target object level.
[0160] The buffer location range is a preset spatial area surrounding the sub-scene corresponding to the target object level. Its range is smaller than the complete relative position range of the target object level. It is used to buffer the loading requests of the sub-scene to be rendered based on distance, so as to avoid the virtual character moving repeatedly at the relative position threshold boundary, which would lead to frequent scene data loading and unloading and waste memory resources.
[0161] For example, when the relative position between the virtual character and the sub-scene X is less than a preset relative position threshold, it is determined that the sub-scene X may need to be loaded. The sub-scene X is added to the loading queue, but loading is not performed. When the relative position between the sub-scene X and the virtual character is less than the buffer position range, the system determines that the sub-scene actually needs to be loaded, and then starts the loading and rendering process of the scene data of the sub-scene X.
[0162] For example, Figure 5 This specification provides a functional configuration diagram for one embodiment, showing the configuration data used when configuring relative position thresholds.
[0163] In another optional embodiment, when loading scene data of the virtual scene to be rendered, the scene data can be loaded based on a buffer distance, and the scene data can be unloaded based on a buffer distance. A loading buffer position range and an unloading buffer position range are set for each scene level. The loading buffer position range is less than a preset relative position threshold, while the unloading buffer position range is greater than the preset relative position threshold. When the relative distance between the character and the sub-scene is less than or equal to the loading buffer position range, the loading of scene data for the target scene level of that sub-scene is triggered. When the relative distance between the character and the sub-scene is greater than the unloading buffer position range, the unloading operation of the already loaded scene data is triggered. This avoids frequent loading and unloading caused by repeated small movements of the character.
[0164] This embodiment of the specification effectively avoids the problem of frequent loading and unloading of scene data caused by virtual characters repeatedly moving near the loading boundary by setting a buffer position range as the actual trigger condition for sub-scene loading. This buffering mechanism adopts a two-level distance judgment strategy: when the relative position is less than a preset threshold, it is only marked as pending loading, and loading is only actually performed when it enters a more inner buffer position range. Compared with the traditional single-threshold loading method, this solution significantly reduces invalid memory jitter, reduces system performance overhead, and improves resource management efficiency; at the same time, it ensures that the data of key objects is ready when the user actually approaches the target area, ensuring the smoothness and visual continuity of scene transitions, and enhancing the stability and user experience of large-scale virtual scene operation.
[0165] In one optional embodiment of this specification, after rendering based on object data and obtaining the scene rendering result, the method further includes:
[0166] Based on the character's location information and the scene location information of multiple sub-scenes, the sub-scenes to be uninstalled are determined and added to the uninstall list.
[0167] Get the preset uninstall time for the sub-scene to be uninstalled. After the preset uninstall time, if the list of sub-scenes to be uninstalled contains the sub-scenes to be uninstalled, then uninstall the scene data of the sub-scenes to be uninstalled.
[0168] The preset uninstallation time refers to a delay period set by the system for sub-scenes to be uninstalled. It controls the time threshold for delaying the actual uninstallation operation after the sub-scene data enters the uninstallation queue. The preset uninstallation time can be set according to actual conditions.
[0169] Specifically, when the system determines, based on scene location information, that a sub-scene has moved far away from the virtual character and meets the uninstallation conditions, it does not immediately release its resources. Instead, it first adds the sub-scene to the uninstallation queue and starts a preset uninstallation timer to record the time it enters the list. Only when the sub-scene remains in the list for an extended period beyond the preset uninstallation time will the system actually perform the scene data uninstallation operation.
[0170] For example, Figure 6 This is another functional configuration diagram provided in one embodiment of the present specification, showing the configuration data used when configuring the preset uninstallation time.
[0171] In another optional embodiment, when loading scene data for a sub-scene to be rendered, the scene data can be loaded based on a buffer distance, and the scene data for a sub-scene to be unloaded can be unloaded based on a buffer distance. A preset loading time and a preset unloading time are set for each scene level; when the preset loading time has elapsed since the scene data for the sub-scene to be rendered was added to the loading queue, the sub-scene to be rendered is loaded; when the preset unloading time has elapsed since the scene data for the sub-scene to be unloaded was added to the unloading queue, the sub-scene to be unloaded is unloaded.
[0172] This specification's embodiments introduce a delay control mechanism with a preset unloading time to buffer the unloading operation of sub-scenes over time. Sub-scenes that meet the unloading conditions must remain in the unloading list for more than the preset unloading time before resources are actually released, effectively preventing frequent unloading and reloading caused by characters briefly traveling back and forth in boundary areas. This significantly reduces the frequency of resource scheduling jitter, reduces memory overhead, and improves system stability and smoothness while ensuring the timeliness of scene rendering, making it particularly suitable for large-scale, highly dynamic virtual scene environments.
[0173] In one optional embodiment of this specification, the method further includes:
[0174] In response to an update operation on scene data, the virtual scene and at least one virtual object contained in the virtual scene are updated based on the logical layer to obtain updated scene data, wherein the update includes at least one of creation, query, modification and deletion.
[0175] The update allows for dynamic modification of the structure, attributes, or behavior of virtual scenes and their internal virtual objects. This operation can modify the model, position, and state of virtual scenes and objects, driven by logical layers, to achieve content changes deeply integrated with the game control mechanism (Gameplay layer).
[0176] The Create function is used to add one or more virtual objects to a scene. For example, when designing an additional house in a virtual scene, a building model is added based on a logical layer, and interaction logic is bound to it.
[0177] A query (Read / Query) is an operation that retrieves the status information of a specific object or region, such as querying the interaction logic of virtual objects in a scene based on a logical layer.
[0178] Update is an operation that modifies the properties, position, state, or associated logic of an object, such as changing the position of the model corresponding to a door in a virtual scene based on a logical layer.
[0179] The Delete operation removes objects and their associated data from a scene, such as deleting the model and related data of a building in a virtual scene based on a logical layer.
[0180] Traditional world-streaming loading systems lack structured hierarchical management capabilities for sub-level organization. Designers can only operate through a flat list of sub-levels, and can only add or delete logical layers—that is, directly add or delete logical layers—without being able to modify or query data within already uploaded logical layers. This manual addresses this issue by implementing CRUD (Create, Read, Update, Query) functionality for data within logical layers. (See...) Figure 7 , Figure 7 This is a schematic diagram illustrating one embodiment of the present specification.
[0181] This specification's embodiments further enhance project management flexibility and construction efficiency by manipulating objects within logical layers. This solution is not only applicable to large-scale projects but also provides refined content management capabilities for general-scale maps, improving the planning-friendly nature of streaming loading systems.
[0182] In a typical world-streaming loading system, while scene data is being loaded, the world-streaming loading system automatically loads logic data to achieve synchronous rendering of scene data and logic data. However, in some cases, synchronous loading of logic data may lead to premature or late loading of logic, redundant loading, and logic interruption. It also makes it impossible to flexibly switch logic during the use of a character, resulting in an overly rigid processing method.
[0183] In one optional embodiment of this specification, before rendering based on object data and obtaining the scene rendering result, the following steps are also included:
[0184] Load the logical data of the virtual object to be rendered;
[0185] Rendering is performed based on object data to obtain scene rendering results, including:
[0186] Rendering is performed based on object data and logical data to obtain scene rendering results.
[0187] Logical data consists of non-rendered information related to the behavior, interaction rules, and runtime state of virtual objects, such as AI scripts (Artificial Intelligence Scripts), collision attributes, trigger events, physical parameters, animation logic, or interactive flags. For example, while rendering a door (object data), its "whether it can be opened" and "open / close animation logic" are loaded simultaneously.
[0188] Scene rendering results refer to the complete virtual scene output generated by the system after the joint loading of object data and logical data, which integrates visual presentation and interactive capabilities. This result not only includes 3D visualizations of objects such as buildings and trees, but also integrates the runtime behavior logic of each object (such as interactivity, animation response, physical collision, etc.), enabling users to trigger and participate in dynamic interactions while observing the scene.
[0189] This manual supports three methods for dynamically loading and unloading sub-levels, each suitable for different scenario requirements, such as... Figure 8 , Figure 8 This is a system interface diagram provided for one embodiment of this specification.
[0190] 1. Disable Layer (must be within the world streaming system directory)
[0191] This solution is used to manage sub-levels that require dynamic loading / unloading but should not be controlled by the world streaming system. It achieves this "visible but not automatically streaming" effect by creating a special disabled layer within a directory supported by the world streaming system, placing the target sub-level within this layer, and setting it to not participate in the Streaming Distance distance calculation logic.
[0192] 2.bDisableDistanceStreaming (must be within the world streaming system directory)
[0193] Obtain configuration information for multiple sub-levels in a virtual game scene, where at least one sub-level is marked as "non-distance driven".
[0194] Place the target sub-level in a directory path supported by World Composition (such as / Maps / Levels / ...) so that it can be recognized by the world streaming loading system and participate in the large map stitching;
[0195] Assign this sub-level to a dedicated logical layer in the editor, for example, name it "DisableLayer";
[0196] Set the bDisableDistanceStreaming property of the sublevel or its Layer to true to instruct the system to disable the automatic loading / unloading of the level or tile based on player distance;
[0197] At runtime, the system calls the following decision function to determine whether a sub-level should be distance-driven:
[0198]
[0199]
[0200] UWorldComposition: This is a class that is typically used to manage "WorldComposition," which is the process of dividing a map into multiple "Tiles" for loading in a large open world.
[0201] IsDistanceDependentLevel: Function name, meaning "whether it is a distance-dependent level".
[0202] int32 TileIdx: Input parameter representing the index of the tile.
[0203] const: indicates that the function will not modify the object's data members.
[0204] Return value: bool, returns true or false.
[0205] INDEX_NONE: A constant defined in Unreal Engine, typically with a value of -1, indicating an invalid index.
[0206] If TileIdx is valid (not -1), then continue the evaluation.
[0207] This expression consists of two conditions:
[0208] Tiles[TileIdx].Info.Layer.DistanceStreamingEnabled
[0209] Check if the "Distance Streaming" feature is enabled in the "Layer" to which the tile belongs.
[0210] In other words: Should this tile be automatically loaded / unloaded based on the player's distance?
[0211] ! TilesStreaming[TileIdx]
[0212] Check if the tile is currently not being streamed (i.e., not activated, not loaded into memory).
[0213] TilesStreaming is likely a boolean array that marks whether each tile is being streamed.
[0214] bDisableDistanceStreaming is a boolean flag. When set to true, it disables the automatic loading / unloading of the level or tile based on the player's distance; when set to false, it allows dynamic loading based on distance.
[0215] When bDisableDistanceStreaming is true, DistanceStreamingEnabled returns false, causing this function to return false, thus preventing the world streaming system from automatically loading or unloading the sub-level based on distance;
[0216] 3. LevelInstance (must be outside the world streaming system directory)
[0217] This solution enables dynamic loading entirely controlled by game logic, suitable for non-space-driven scenarios such as task triggering, event refreshing, and non-player character spawning. It allows developers to create dynamically loaded LevelInstances outside the world-streaming loading system and explicitly invoke loading and unloading operations via a script interface.
[0218] Implementation: Store the target sub-level resources in a directory outside the scanning range of the world streaming loading system (such as / Game / Levels / LogicScenes / ); use the ULevelStreamingDynamic::LoadLevelInstance interface to load the sub-level.
[0219] This specification's embodiments decouple the rendering system and logic system of the world streaming loading system, allowing rendering-type content (such as terrain and buildings) to still achieve efficient streaming scheduling through the world streaming loading system, while logic-type content can be loaded on demand through an independent mechanism; this improves the flexibility of level design and the ability to support gameplay complexity; it avoids logic anomalies and resource conflicts caused by the unified scheduling strategy of the world streaming loading system, and enhances the stability and scalability of the system.
[0220] In one embodiment of this specification, any scene level includes at least one virtual object, and loading the logical data of the virtual object to be rendered includes:
[0221] In response to the logical data loading instruction, obtain the preset index parameters corresponding to the logical data of the virtual object to be rendered;
[0222] Logical data is retrieved and loaded based on preset index parameters.
[0223] Logical data loading instructions are control signals issued by the system to trigger the loading of logical data for virtual objects. They are usually generated and sent by the scene management system, task system, streaming controller, or gameplay subsystem. Instructions can be triggered by changes in spatial location, updates to task status, object instantiation requests, or data layer activation events.
[0224] The preset index parameter is a virtual address predefined before system operation or during object configuration, used to uniquely locate logical data in the storage medium.
[0225] In typical world-streaming loading systems, a built-in system index is defined. Scene data and logic data are usually stored in this index. When loading a scene, the scene and logic data are loaded directly based on the world-streaming loading system. However, in actual game development, there exists a type of sub-level content strongly related to the logic data control unit, the gameplay layer (a logical grouping unit in a virtual scene, whose controllable content includes, but is not limited to, interactive behavior scripts, AI controllers and behavior trees, task triggers and story events, physical response rules, network synchronization configurations, and dynamic object generation rules; this layer can be loaded, activated, paused, or unloaded independently of rendering data to achieve flexible game logic control). Examples include task triggering areas, non-player character (NPC) spawn points, dynamic event scenes, dungeon entrances, or phased gameplay modules. The loading timing of these sub-levels should not be determined by spatial distance but should be driven by logical conditions such as the game's running state, task progress, or player behavior.
[0226] If these logic-driven sub-levels are uniformly included in the world-stream loading system's management directory, their loading behavior will not be as expected: they may fail to load in advance because the character has not yet entered the geographical area, or they may be forcibly unloaded by the world-stream loading system because the character has briefly left, resulting in problems such as logic interruption, loss of non-player characters, or event failure. Therefore, the existing world-stream loading system mechanism cannot meet the loading requirements of "non-space-driven" dynamic content, limiting the design flexibility of complex gameplay.
[0227] Therefore, in one optional embodiment of this specification, the logical data of the virtual object is saved according to preset index parameters, thereby decoupling the loading process of the logical data from the dynamic level streaming loading mechanism controlled by the world streaming loading system, and thus supporting the independent loading and unloading of logic-driven sub-levels. See Figure 8 , Figure 8 This is another system functional diagram provided as an embodiment of this specification. As shown in the dashed box, after configuration according to this specification, preset index parameters can be configured in the selected location to instruct scene data or logic data to be loaded according to the preset index parameters, avoiding the problem of single path and inability to customize configuration caused by loading through the default address of the world streaming loading system.
[0228] For example, sub-level resources related to the game control mechanism (gameplay) logic can be stored in an independent path (such as / Game / Levels / LogicScenes / ) outside the world streaming loading system's mapping directory, so that they are not automatically scanned and managed by the world streaming loading system; the game logic system (such as the task system, event manager, or behavior tree) can explicitly call the level streaming loading interface (such as LoadLevelInstance or a custom StreamingManager) at runtime to dynamically load the target sub-level according to preset trigger conditions (such as the player completing a task, reaching a specified level, entering a specific state, etc.); and when the conditions end or the logic is completed, the resources can be released by explicitly calling the unload interface.
[0229] This embodiment of the specification loads logical data according to preset index parameters, enabling the game control mechanism to independently control the loading and unloading of logical data. This decouples the game logic from the world-streaming loading system, effectively solving the logic failure caused by the traditional world-streaming loading system forcing logical data to follow scene data loading / unloading. This improves the flexibility, stability, and design freedom of the game control mechanism.
[0230] Furthermore, in an optional embodiment of this specification, the preset index parameters are obtained by configuring the index directory of the scene configuration tool.
[0231] The scene configuration system is a comprehensive technical framework for defining, organizing, and managing virtual scene content and its loading behavior. It includes configuration capabilities during the editing phase as well as runtime control logic, with the core objective of achieving modularization, configurability, and on-demand loading of scene content.
[0232] This embodiment configures the index directory of the scene configuration tool and calls logical data according to independent preset index parameters, thereby freeing the loading process of logical data from the dynamic level streaming loading mechanism controlled by the world streaming loading system, and thus supporting the independent loading and unloading of logic-driven sub-levels.
[0233] The following is in conjunction with the appendix Figure 9 Taking the scene rendering method provided in this manual as an example in the application of a virtual game scene, the scene rendering method will be further explained. Figure 9 A flowchart illustrating the process of a scene rendering method provided in one embodiment of this specification includes the following steps:
[0234] Step 902: Obtain the character position information of the game character in the virtual game scene, and the scene position information of multiple sub-scenes in the virtual game scene, wherein any sub-scene is pre-divided into multiple object levels.
[0235] Character position information refers to the three-dimensional spatial coordinates of a game character within a virtual game scene, typically represented in (x, y, z) form within the world coordinate system. This information is dynamically generated by the game engine at runtime and updates in real-time as the character moves. It forms the basis for subsequent calculations of spatial relationships such as relative distance, azimuth, and view distance, and is widely used in camera tracking, AI behavior decision-making, collision detection, and viewpoint-based resource scheduling strategies (such as detail level control and rendering activation determination). For example, in open-world games, the character's position determines which areas need to be loaded or unloaded.
[0236] Each sub-scene is an independent block segmented from a large virtual map based on geographical division, functional zoning, or performance management requirements. It can correspond to functional units such as forest areas, city blocks, or ruins. Scene location information refers to the spatial positioning data of the sub-scene in the world coordinate system, typically represented by the coordinates of its bounding box center point, origin, or representative reference point. This information is used to measure the spatial distance between the game character and each sub-scene, serving as a key basis for deciding whether to include it in the current rendering process.
[0237] Each sub-scene is pre-divided into multiple scene levels during the preprocessing stage. The scene levels are a hierarchical structure organized based on the visual salience, geometric complexity, and rendering priority of game objects. Each level contains one or more types of game objects (such as buildings, trees, grass, vehicles, etc.) and sets corresponding activation conditions—that is, they are only loaded and rendered within a specific distance range. For example:
[0238] Tier 1 (Long Distance): Contains only large buildings;
[0239] Second tier (mid distance): Buildings + Trees;
[0240] Third level (close range): buildings + trees + grass.
[0241] The significance of this step lies in establishing the spatial awareness foundation for the entire rendering scheduling mechanism. By collecting position data of characters and sub-scenes, and combining it with a predefined object hierarchy structure, it provides accurate data support for subsequent distance-based hierarchical filtering, avoiding memory waste and performance bottlenecks caused by indiscriminate loading across the entire scene.
[0242] Step 904: Based on the character position information and the scene position information of multiple sub-scenes, determine the sub-scene to be rendered and the target scene level of the sub-scene to be rendered.
[0243] Calculate the spatial distance between the game character's current position and the position of each sub-scene; compare this distance with a preset relative position threshold. If the distance is less than or equal to the threshold, mark the sub-scene as a "sub-scene to be rendered"; otherwise, consider it a far-off area and do not load it.
[0244] Each sub-scene has several preset scene levels set during the editing phase. Each scene level is associated with a relative position range (e.g., ≤500m, ≤300m, ≤100m), indicating the activation conditions for all game objects contained in the sub-scene of that scene level. The system determines which level to activate based on which range the current character's distance from the sub-scene falls into.
[0245] For example, a character is located at (0,0,0), the center of sub-scene A is at (100,0,100), approximately 141 meters away; sub-scene B is at (300,0,400), approximately 500 meters away; and sub-scene C is at (800,0,600), approximately 1000 meters away. If the threshold is set to 500 meters, then A and B are sub-scenes to be rendered, and C is discarded. For sub-scene A, if its third-level activation range is ≤150 meters, then since 141 < 150, the target scene level is "buildings + trees + grass".
[0246] This step enables fine-grained control over the transition from "bulk loading" to "on-demand layered rendering." Through a dual filtering mechanism (first selecting sub-scenes, then determining the layer), the system can minimize unnecessary object loading while ensuring visual continuity, thereby improving resource utilization and operational smoothness.
[0247] Step 906: Load the scene data of the game scene to be rendered in the target scene layer.
[0248] After determining the sub-scene to be rendered and its corresponding target object hierarchy, the relevant resources of the game object to be rendered belonging to the target object hierarchy can be extracted from the storage medium and fully loaded into the runtime memory for subsequent rendering pipeline calls.
[0249] Loading is the process of reading, decoding, and writing pre-stored game scene data (such as models, textures, and materials) from external storage devices (such as hard drives, SSDs, resource packs, or remote servers) into the system's main memory (RAM) or video memory (VRAM). This process is crucial for achieving on-demand rendering, ensuring that only visually relevant object data that meets the activation criteria resides in memory, thus preventing irrelevant resources from consuming valuable memory space.
[0250] In the embodiments of this specification, loading may only load the scene data of the game scene to be rendered in the target scene level, while the scene data of the game scene to be rendered outside the target scene level is not loaded. By accurately filtering and loading the data of the game scene to be rendered in the target object level into memory, a fine-grained, on-demand resource management strategy is realized, which significantly reduces memory peaks and memory overhead, and lays a data foundation for efficient real-time rendering.
[0251] Step 908: Render based on object data to obtain the game scene rendering result.
[0252] Rendering is the process of feeding loaded game scene data (including geometry, materials, lighting, camera view, etc.) into the graphics pipeline, and converting it into a two-dimensional image through operations such as vertex transformation, rasterization, and pixel shading. This process is typically performed in real time at a rate of 30 to 60 frames per second to ensure that users have a continuous and immersive visual experience.
[0253] In addition, to support interactive functions, additional logical data (such as AI scripts, trigger events, physical parameters, and interactive flags) can be loaded before rendering and submitted to the rendering and logic modules in conjunction with object data, so that the rendering results have both visual expressiveness and behavioral responsiveness.
[0254] The solution in this embodiment uses a two-level filtering mechanism from sub-scene to object level. Based on determining the area to be rendered, it further limits the loading to only game object data in the target object level, avoiding redundant loading of objects with low visual effects, effectively reducing the amount of resources in memory, reducing memory waste, and improving system stability. Furthermore, by combining object level division and detail level control, it achieves multi-level adjustment of the rendering precision of the object to be rendered from confirmation and generation, ensuring the display stability of the object in small and medium-sized maps and improving the user's actual gameplay experience.
[0255] Corresponding to the above method embodiments, this specification also provides embodiments of a scene rendering apparatus. Figure 10 This is a schematic diagram of a scene rendering apparatus provided in one embodiment of this specification. Figure 10 As shown, the device includes:
[0256] The acquisition module 1002 is configured to acquire the character position information of the virtual character in the virtual scene and the scene position information of multiple sub-scenes in the virtual scene, wherein any sub-scene is pre-divided into multiple scene levels.
[0257] The first determining module 1004 is configured to determine the sub-scene to be rendered and the target scene level of the sub-scene to be rendered based on the character position information and the scene position information of multiple sub-scenes.
[0258] The first loading module 1006 is configured to load scene data at the target scene level.
[0259] The first rendering module 1008 is configured to render based on scene data to obtain scene rendering results.
[0260] Optionally, the first determining module 1004 is further configured to determine the relative positions of multiple sub-scenes based on the character position information and the scene position information of multiple sub-scenes; determine the sub-scene to be rendered from the multiple sub-scenes based on the relative positions of the multiple sub-scenes and a preset relative position threshold; and determine the target scene level of the sub-scene to be rendered from at least one preset scene level based on the relative positions of the sub-scene to be rendered and the relative position range of at least one preset scene level.
[0261] Optionally, the scene rendering device further includes a setting module configured to acquire scene data of multiple sub-scenes in a virtual scene, wherein any sub-scene includes multiple virtual objects of different model types; based on the model type of each virtual object, any sub-scene is divided to obtain scene levels corresponding to multiple sub-scenes, wherein the model types of virtual objects contained in each scene level are different; and based on the model type of each virtual object in the same scene level, the relative position ranges corresponding to multiple scene levels are set.
[0262] Optionally, the scene rendering apparatus further includes a second rendering module, configured to acquire terrain location information of at least one terrain; determine the terrain to be rendered based on the character location information and the terrain location information of at least one terrain; load the terrain data of the terrain to be rendered; and render based on the terrain data to obtain the terrain rendering result.
[0263] Optionally, the first determining module 1004 is further configured to determine the relative position of the virtual character and at least one terrain based on the character's position information and the terrain position information of at least one terrain; and to determine the terrain to be rendered and the target terrain level of the terrain to be rendered from the at least one terrain based on the character's position information and the relative position.
[0264] Optionally, the first rendering module 1008 is further configured to render the terrain data based on the target terrain level to obtain the terrain rendering result.
[0265] Optionally, the first rendering module 1008 is further configured to render the terrain data based on the rendering effect corresponding to the target terrain level, and obtain the terrain rendering result.
[0266] Optionally, the first rendering module 1008 is further configured to render scene data based on the terrain rendering results to obtain scene rendering results.
[0267] Optionally, the scene rendering apparatus also includes a second loading module configured to load the logical data of the virtual object to be rendered.
[0268] Optionally, the first rendering module 1008 is further configured to render based on object data and logical data to obtain scene rendering results.
[0269] Optionally, the scene rendering device also includes a second loading module, which is further configured to, in response to a logical data loading instruction, obtain a preset index parameter corresponding to the logical data of the virtual object to be rendered; and, based on the preset index parameter, obtain and load the logical data.
[0270] Optionally, the scene rendering apparatus also includes a configuration module, configured to obtain preset index parameters by configuring the index directory of the scene configuration tool.
[0271] Optionally, the scene rendering apparatus further includes an update module configured to update the virtual scene and at least one virtual object contained in the virtual scene based on a logical layer in response to an update operation on the scene data, thereby obtaining updated scene data, wherein the update includes at least one of creation, query, modification, and deletion.
[0272] Optionally, the scene rendering device further includes a navigation module configured to receive navigation instructions, wherein the navigation instructions include the current position information and current navigation data of a navigation object; determine target position information and a target sub-scene corresponding to the target position information based on the current position information and the current navigation data; when the target sub-scene corresponding to the target position information is inconsistent with the current sub-scene corresponding to the current position information, determine the scene level corresponding to the target sub-scene based on the scene level corresponding to the current sub-scene; render the target sub-scene based on the scene data corresponding to the scene level corresponding to the target sub-scene to obtain a target rendering result, and load the target navigation data corresponding to the target sub-scene; when the sub-scene where the navigation object is located switches from the current sub-scene to the target sub-scene, navigate the navigation object based on the target rendering result and the target navigation data.
[0273] Optionally, the first loading module 1006 is further configured to load scene data of the target scene level when it is determined that the relative position of the sub-scene to be rendered is less than the buffer position range, wherein the buffer position range is less than the relative position range of the target object level.
[0274] Optionally, the scene rendering device also includes an unloading module, which is configured to determine the sub-scene to be unloaded based on the character position information and the scene position information of multiple sub-scenes, add the sub-scene to be unloaded to the unload list, obtain the preset unloading time of the sub-scene to be unloaded, and after the preset unloading time, if the unload list contains the sub-scene to be unloaded, then unload the scene data of the sub-scene to be unloaded.
[0275] This specification's embodiments dynamically determine the sub-scene to be rendered and its target object hierarchy by combining character position and sub-scene position information, enabling on-demand loading of virtual object data at specific levels. This avoids redundant reading of irrelevant resources and memory consumption, significantly reducing memory overhead and graphics processing unit load. Especially for medium-sized maps, it provides a fine-grained, layered rendering control mechanism, improving resource scheduling efficiency and screen smoothness. It solves the technical problem of existing technologies lacking underlying optimization support for general-sized maps, and has greater adaptability and performance advantages.
[0276] The above is an illustrative scheme of a scene rendering apparatus according to this embodiment. It should be noted that the technical solution of this scene rendering apparatus and the technical solution of the scene rendering method described above belong to the same concept. For details not described in detail in the technical solution of the scene rendering apparatus, please refer to the description of the technical solution of the scene rendering method described above.
[0277] Figure 11 This is a structural block diagram of a computing device according to one embodiment of this specification. The components of the computing device 1100 include, but are not limited to, a memory 1110 and a processor 1120. The processor 1120 is connected to the memory 1110 via a bus 1130, and a database 1150 is used to store data.
[0278] The computing device 1100 also includes an access device 1140, which enables the computing device 1100 to communicate via one or more networks 1160. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 1140 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Networks (WLAN) interface, a Wi-MAX (World Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0279] In one embodiment of this specification, the aforementioned components of the computing device 1100 and Figure 11 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 11 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0280] The computing device 1100 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 1100 can also be a mobile or stationary server.
[0281] The processor 1120 is used to execute computer programs / instructions, which, when executed by the processor, implement the steps of the above-described scene rendering method.
[0282] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the scene rendering method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the scene rendering method described above.
[0283] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described scene rendering method.
[0284] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the scene rendering method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the scene rendering method described above.
[0285] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described scene rendering method.
[0286] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the scene rendering method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the scene rendering method described above.
[0287] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0288] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0289] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0290] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0291] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A scene rendering method, characterized in that, include: Obtain the character position information of a virtual character in a virtual scene, as well as the scene position information of multiple sub-scenes in the virtual scene, wherein any sub-scene is pre-divided into multiple scene levels; Based on the character position information and the scene position information of the multiple sub-scenes, the sub-scene to be rendered and the target scene level of the sub-scene to be rendered are determined. Load the scene data at the target scene level; Rendering is performed based on the scene data to obtain the scene rendering result.
2. The method according to claim 1, characterized in that, The step of determining the sub-scene to be rendered and the target scene level within the sub-scene based on the character position information and the scene position information of the multiple sub-scenes includes: Based on the character position information and the scene position information of the multiple sub-scenes, the relative positions of the multiple sub-scenes are determined; Based on the relative positions of the multiple sub-scenes and a preset relative position threshold, the sub-scene to be rendered is determined from the multiple sub-scenes; Based on the relative position of the sub-scene to be rendered and the relative position range of at least one preset scene level, the target scene level of the sub-scene to be rendered is determined from the at least one preset scene level.
3. The method according to claim 2, characterized in that, Before determining the target scene level of the sub-scene to be rendered from the at least one preset scene level based on the relative position of the sub-scene to be rendered and the relative position range of at least one preset scene level, the method further includes: Obtain scene data for multiple sub-scenes in the virtual scene, wherein any sub-scene includes multiple virtual objects of different model types; Based on the model type of each virtual object, any sub-scene is divided to obtain multiple scene levels corresponding to the sub-scenes, wherein the model types of the virtual objects contained in each scene level are different. Based on the model type of each virtual object in the same scene layer, the relative position ranges corresponding to multiple scene layers are set.
4. The method according to claim 1, characterized in that, The virtual scene includes at least one terrain feature; before determining the sub-scene to be rendered and the target scene level of the sub-scene based on the character position information and the scene position information of the plurality of sub-scenes, the method further includes: Obtain the terrain location information of at least one terrain feature; Based on the character's position information and the terrain position information of at least one terrain feature, the terrain to be rendered is determined; Load the terrain data of the terrain to be rendered; The terrain data is used for rendering to obtain the terrain rendering result.
5. The method according to claim 4, characterized in that, Any terrain includes multiple terrain levels, and each terrain level has a corresponding relative location range; The step of determining the terrain to be rendered based on the character's position information and the terrain position information of at least one type of terrain includes: Based on the character's position information and the terrain position information of the at least one type of terrain, the relative position of the virtual character and the at least one type of terrain is determined; Based on the character position information and the relative position, determine the terrain to be rendered and the target terrain level of the terrain to be rendered from the at least one terrain; The rendering based on the terrain data to obtain the terrain rendering result includes: Based on the target terrain level, the terrain data is rendered to obtain the terrain rendering result.
6. The method according to claim 5, characterized in that, Each terrain level has a corresponding rendering effect; The process of rendering the terrain data based on the target terrain level to obtain a terrain rendering result includes: Based on the rendering effect corresponding to the target terrain level, the terrain data is rendered to obtain the terrain rendering result.
7. The method according to claim 4, characterized in that, The rendering based on the scene data to obtain the scene rendering result includes: Based on the terrain rendering results, the scene data is rendered to obtain the scene rendering results.
8. The method according to claim 1, characterized in that, After rendering based on the scene data to obtain the scene rendering result, the process further includes: Receive navigation instructions, wherein the navigation instructions include the current location information and current navigation data of the navigation object; Based on the current location information of the navigation object and the current navigation data, determine the target location information and the target sub-scene corresponding to the target location information; When the target sub-scene corresponding to the target location information is inconsistent with the current sub-scene corresponding to the current location information, the scene level corresponding to the target sub-scene is determined based on the scene level corresponding to the current sub-scene; The target sub-scene is rendered based on the scene data corresponding to the scene level of the target sub-scene to obtain the target rendering result, and the target navigation data corresponding to the target sub-scene is loaded. When the sub-scene where the navigation object is located switches from the current sub-scene to the target sub-scene, the navigation object is navigated based on the target rendering result and the target navigation data.
9. The method according to claim 2, characterized in that, The loading of scene data at the target scene level includes: When it is determined that the relative position of the sub-scene to be rendered is less than the buffer position range, the scene data of the target scene level is loaded, wherein the buffer position range is less than the relative position range of the target object level.
10. The method according to claim 1, characterized in that, The process of rendering based on the scene data to obtain the scene rendering result further includes: Based on the character location information and the scene location information of the multiple sub-scenes, the sub-scenes to be uninstalled are determined and added to the uninstall list. Obtain the preset uninstallation time of the sub-scene to be uninstalled. After the preset uninstallation time, if the sub-scene to be uninstalled is included in the list of sub-scenes to be uninstalled, then uninstall the scene data of the sub-scene to be uninstalled.
11. The method according to claim 1, characterized in that, The method further includes: In response to an update operation on scene data, the virtual scene and at least one virtual object contained in the virtual scene are updated based on the logical layer to obtain updated scene data, wherein the update includes at least one of creation, query, modification, and deletion.
12. The method according to any one of claims 1-11, characterized in that, The method further includes: Load the logical data of the virtual object to be rendered; The rendering based on the scene data to obtain the scene rendering result includes: Rendering is performed based on the scene data and the logical data to obtain the scene rendering result.
13. The method according to claim 12, characterized in that, The logical data for loading the virtual object to be rendered includes: In response to the logical data loading instruction, the preset index parameters corresponding to the logical data of the virtual object to be rendered are obtained; Based on the preset index parameters, the logical data is obtained and loaded.
14. The method according to claim 13, characterized in that, The preset index parameters are obtained by configuring the index directory of the scene configuration tool.
15. A scene rendering device, characterized in that, include: The acquisition module is configured to acquire the character position information of a virtual character in a virtual scene, as well as the scene position information of multiple sub-scenes in the virtual scene, wherein any sub-scene is pre-divided into multiple scene levels; The determination module is configured to determine the sub-scene to be rendered and the target scene level of the sub-scene to be rendered based on the character position information and the scene position information of the multiple sub-scenes; The loading module is configured to load scene data at the target scene level; The rendering module is configured to render based on the scene data to obtain the scene rendering result.
16. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that, The device stores a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 14.
18. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 14.
Citation Information
Cited By
Virtual shooting scene optimization method and system, electronic device and storage medium
CN122457750A