Object baking method, object rendering method and device
By employing a baking strategy that groups virtual object models and manages their level of detail, lightweight baked model data is generated, solving the problem of high rendering computational overhead in large-scale virtual scenes and improving rendering performance and smoothness.
Patent Information
- Application Number
- CN202511742052.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-17
AI Technical Summary
Traditional rendering techniques suffer from excessive computational overhead in large-scale virtual scenes due to the increased number of objects, which affects system performance and scalability.
By grouping virtual object models and setting a baking strategy based on model size, type, and camera distance to determine the level of detail, lightweight baked model data is generated and loaded and rendered in real time according to camera distance.
It significantly reduces memory usage and rendering load, improves the loading speed and smoothness of large-scale virtual scenes, and achieves high-efficiency rendering performance.
Smart Images

Figure CN121544774A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of digital cultural products, and in particular to an object baking method, an object rendering method, an object baking apparatus, and an object rendering apparatus. Background Technology
[0002] In the construction of large-scale virtual scenes, real-time rendering technology plays a crucial role. Excellent scene rendering solutions can enhance visual realism, ensure smooth interaction, and improve the user's immersive experience, providing users with a high-quality virtual environment access and operation experience. However, as scene complexity continues to increase and the number of 3D objects contained in the scene grows dramatically, traditional rendering optimization technologies are facing severe pressure.
[0003] Traditional scene detail level techniques typically perform detail level determination and pruning decisions on a per-object basis. In dense scenes with a large number of objects, this approach results in extremely high computational overhead for scene detail level updates and pruning, severely limiting the overall system performance and scalability. Summary of the Invention
[0004] In view of this, embodiments of this specification provide an object baking method and an object rendering method. One or more embodiments of this specification also relate to an object baking apparatus and an object 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.
[0005] According to a first aspect of the embodiments of this specification, an object baking method is provided, comprising: The process involves: acquiring initial model data for multiple virtual sub-scenes and virtual object models within those sub-scenes; grouping virtual object models based on model size and object type to obtain at least one object model group within the multiple virtual sub-scenes; determining the level of detail for each object model group based on camera distance and setting the corresponding object baking strategy for that level of detail; baking each initial model data based on the corresponding object baking strategy for that level of detail to obtain baked model data for at least one object model group within the multiple virtual sub-scenes, wherein the baked model data for the target level of detail is determined based on the virtual character's current camera distance to the current virtual sub-scene, and is loaded and rendered in real-time.
[0006] According to a second aspect of the embodiments of this specification, an object rendering method is provided, including: Obtain the current camera distance of the virtual character relative to the current virtual sub-scene; based on the current camera distance, determine the target detail level of at least one object model group in the current virtual sub-scene; load the baked model data of the target detail level of at least one object model group, wherein the baked model data of the target detail level is obtained by baking according to the above object baking method; render the baked model data to obtain the rendering result.
[0007] According to a third aspect of the embodiments of this specification, an object baking apparatus is provided, comprising: The first acquisition module is configured to acquire initial model data of multiple virtual sub-scenes and virtual object models of multiple virtual sub-scenes; the grouping module is configured to group virtual object models based on model size and object type to obtain at least one object model group in multiple virtual sub-scenes; the first determination module is configured to determine the level of detail corresponding to each object model group based on camera distance and set the object baking strategy corresponding to the level of detail; the baking module is configured to bake each initial model data based on the object baking strategy corresponding to the level of detail to obtain baked model data of at least one object model group in multiple virtual sub-scenes, wherein the baked model data of the target level of detail is determined based on the current camera distance of the virtual character relative to the current virtual sub-scene, and is loaded and rendered in real time.
[0008] According to a fourth aspect of the embodiments of this specification, an object rendering apparatus is provided, comprising: The second acquisition module is configured to acquire the current camera distance of the virtual character relative to the current virtual sub-scene; the second determination module is configured to determine the target detail level of at least one object model group in the current virtual sub-scene based on the current camera distance; the loading module is configured to load baked model data of the target detail level of at least one object model group, wherein the baked model data of the target detail level is obtained by baking according to the above object baking method; and the rendering module is configured to render the baked model data to obtain the rendering result.
[0009] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: 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 above-mentioned object baking method or object rendering method.
[0010] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the object baking method or object rendering method described above.
[0011] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the object baking method or object rendering method described above.
[0012] The scene rendering method provided in one or more embodiments of this specification involves: acquiring initial model data of multiple virtual sub-scenes and virtual object models of multiple virtual sub-scenes; grouping the virtual object models based on model size and object type to obtain at least one object model group in the multiple virtual sub-scenes; determining the level of detail corresponding to each object model group based on camera distance and setting an object baking strategy corresponding to the level of detail; baking each initial model data based on the object baking strategy corresponding to the level of detail to obtain baked model data of at least one object model group in the multiple virtual sub-scenes, wherein the baked model data of the target level of detail is determined based on the current camera distance of the virtual character for the current virtual sub-scene, and is loaded and rendered in real time. Grouping virtual object models based on model size and object type forms object model groups with geometric similarity and consistent processing; dividing the level of detail according to a preset camera distance and configuring a corresponding object baking strategy for each level of detail to achieve refined level of detail management; determining the object baking strategy based on the object model group and the corresponding level of detail to generate optimized baked model data for each object model group at different levels of detail, thus realizing level of detail control and baking from the model level to the group level. While ensuring visual continuity with high precision in the near and reasonable simplification in the far, it significantly reduces memory usage and rendering load, and improves the loading speed, smoothness of operation and rendering performance of large-scale virtual scenes. Attached Figure Description
[0013] Figure 1 A flowchart illustrating an object baking method provided in one embodiment of this specification; Figure 2 A flowchart illustrating an object rendering method provided in one embodiment of this specification; Figure 3 This is a schematic diagram of the structure of an object baking apparatus provided in one embodiment of this specification; Figure 4 This is a schematic diagram of the structure of an object rendering apparatus provided in one embodiment of this specification; Figure 5 This is a structural block diagram of a computing device provided for one embodiment of this specification. Detailed Implementation
[0014] 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.
[0015] 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 the one or more embodiments of this specification. The singular forms “a,” “described,” 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.
[0016] 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 without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0017] 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, data stored, data displayed, etc.) involved in one or more embodiments of this specification are obtained through open-source datasets or public datasets that comply with their license agreements, or are obtained with full authorization from the relevant parties. Moreover, the collection, use and processing of the relevant 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.
[0018] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0019] Level of Detail (LOD) is a key optimization technique in computer graphics, game development, and 3D visualization. Its core idea is to dynamically use models of varying complexity to represent the same object based on its importance in the scene (primarily its distance from the camera). In other words, it's about "seeing details up close and outlines from a distance." When an object is far from the camera, its fine geometric features are indistinguishable to the human eye, so a simplified model with fewer vertices and faces is used; as the object gets closer, a more detailed and complex model is used.
[0020] Baking is an optimization technique that preprocesses and solidifies certain dynamic or complex calculation results of a 3D model into texture, geometry, or data files during the offline phase. In this solution, baking specifically refers to the multi-level detail preprocessing of virtual object models. Its core objective is to generate lightweight, high-performance rendering resources to support efficient loading and hierarchical rendering at runtime.
[0021] Rendering refers to the process of converting loaded virtual object model data, such as meshes, materials, textures, and lighting information, into a two-dimensional image or three-dimensional visual display that can be presented on a display device through the graphics processing pipeline. In this solution, rendering specifically refers to the graphical rendering of baked model data with target detail levels determined and loaded based on camera distance, ultimately generating a scene with realistic feel, correct spatial relationships, and visual effects.
[0022] UV coordinates: UV coordinates are a crucial concept in 3D computer graphics. They serve as a bridge, precisely wrapping 2D images (texture maps) onto the surface of a 3D model. You can think of them as the "skin map" or "tailor's pattern" of a 3D model. In 3D space, we use X, Y, Z coordinates to represent the position of a point in the three-dimensional world. In 2D texture space, we use U and V coordinates to represent the position of a point on the texture image, thus avoiding confusion with 3D space coordinates.
[0023] A curve editor is a widely used visualization tool in computer software that allows users to precisely control and adjust various values that change over time or other variables by manipulating one or more two-dimensional curves. Essentially, it's the core editing interface for keyframe animation, but its applications extend far beyond that. A curve editor can be imagined as a "drawing board of numerical changes," with the horizontal axis typically representing time or a parameter, and the vertical axis representing the value of an attribute.
[0024] Draw Call: A core performance metric in computer graphics, especially in real-time 3D rendering (such as games, virtual reality, and WebGL applications). Understanding Draw Calls is crucial for optimizing application performance. Simply put, a Draw Call is a "rendering instruction" issued by the CPU to the GPU, telling the GPU: "Start drawing this specific object or a group of objects using the same state."
[0025] State Change: State change is a key performance concept in computer graphics, especially real-time 3D rendering. It refers to the operations and overhead required for a graphics processing unit (or its driver) to switch from one rendering configuration to another during the rendering process. State change can be understood as changing production molds on a factory assembly line: when the assembly line needs to switch from producing "cars" to producing "phones," it must first stop, remove the old car mold, replace it with the new phone mold, and then restart. This process itself does not produce products, but it is essential and time-consuming.
[0026] It should be noted that the object baking method or object rendering method provided in this manual can be applied to multiple industries or scenarios, such as virtual reality processing software, digital cultural product production software, digital cultural creative software, digital cultural creative design, education, news, cultural content industry software, digital publishing software, digital music development and production, and digital mobile multimedia development and production.
[0027] See Figure 1 , Figure 1 A flowchart of an object baking method provided in one embodiment of this specification specifically includes the following steps: Step 102: Obtain the initial model data of multiple virtual sub-scenes and the virtual object models of multiple virtual sub-scenes.
[0028] A virtual sub-scene is a local area divided within a large virtual environment. Each virtual sub-scene contains specific 3D virtual objects and has its own spatial extent. Virtual sub-scenes are used to determine the spatial characteristics of each local area, such as defining the virtual sub-scene's position, size, and 3D bounding volume in the global coordinate system, reflecting the number of virtual object models within the area, geometric complexity (number of mesh faces), total amount of texture resources, and measuring the overall level of detail, etc.
[0029] For example, a virtual sub-scene can be multiple game partitions within a complete game scene, with each game partition containing various types of virtual object models such as trees, grass, buildings, and rocks.
[0030] A virtual object model is a 3D model corresponding to a 3D object entity in a virtual scene, such as a building, vehicle, tree, furniture, or person. Virtual object models are renderable and / or interactive, providing 3D geometry, materials, textures, and other data to give the virtual environment a realistic appearance and spatial form, enabling realistic virtual interaction.
[0031] The initial model data is a collection of raw, unoptimized virtual object models. This initial model data can be obtained from raw modeling tools or data sources and serves as the foundational input for all subsequent rendering optimizations, detail level generation, and runtime scheduling.
[0032] There are several ways to obtain the initial model data of multiple virtual sub-scenes and their virtual object models. One possible method is to acquire the virtual scene, divide it into sub-scenes, and obtain the initial model data of multiple virtual object models. Another possible method is to directly acquire the sub-scene data of the pre-divided virtual sub-scenes and obtain the initial model data of the virtual object models of the multiple virtual sub-scenes.
[0033] This step involves acquiring initial model data for multiple virtual sub-scenes and their virtual object models. This is the starting point and foundational step of the entire rendering optimization process, providing a complete and structured data foundation for subsequent group management, detail level determination, baking processing, and efficient rendering.
[0034] Step 104: Based on model size and object type, group the virtual object models to obtain at least one object model group in multiple virtual sub-scenes.
[0035] Model size refers to the geometric dimensions or spatial footprint of a virtual object model in three-dimensional space. Model size can be used to measure the visual salience and spatial impact of a virtual object model. In rendering optimization, scene management, and interaction design, model size is a key criterion for spatial determination.
[0036] Object type is a classification identifier for virtual object models in a virtual scene, used to describe the characteristic classification of virtual object models. Object types are classified according to the geometric features, visual behavior, and usage scenarios of virtual object models. Object types can be divided into rock types (these objects severely occlude each other, and a large part of them are underground), basic scene objects, vegetation (these objects have complex and diverse material effects and are not easy to replace or merge), building objects (usually large in scale, highly visually prominent, and can be displayed in the camera from a distance), main building structures and large outdoor objects, and curved objects (such as roads, which are objects generated by the curve editor, are long, and may continuously span multiple virtual sub-scenes), etc.
[0037] Object model grouping is the process of clustering multiple virtual object models into a single management unit within a virtual scene based on specific rules. These rules include object type, model size, spatial location, and functional semantics. In this specification, object model grouping is the basic management unit for detailed level control, baking strategy settings, and rendering scheduling. Each object model group can contain multiple virtual object models of the same object type or similar model sizes. For example, a sub-scene may contain multiple object model groups, such as a rock model group, a grass model group, basic scene model objects, etc. During the rendering phase, rendering can be performed based on the characteristics of these multiple object model groups.
[0038] There are several ways to group virtual object models based on model size and object type to obtain at least one object model group in multiple virtual sub-scenes. One possible way is to group virtual object models based on model size to obtain multiple model size groups, and to group virtual object models based on object type to obtain multiple model type groups. Based on model size grouping and model type grouping, at least one object model group in multiple virtual sub-scenes can be determined.
[0039] Grouping virtual object models based on model size and object type can organize discrete virtual object models in a scene into a set of virtual object models with the same object type or similar model size. This improves the computational granularity of rendering optimization, reduces the number of detail level determinations and resource scheduling, lowers system overhead, and lays the foundation for subsequent unified detail level control, batch baking, and efficient rendering by group.
[0040] Step 106: Based on the camera distance, determine the level of detail corresponding to each object model group, and set the object baking strategy corresponding to the level of detail.
[0041] Camera distance is a pre-defined threshold distance between the camera (or viewpoint) and the target object. It can be a single distance or a group of distances. It's used during the virtual scene baking optimization process to determine the level of detail for each object model group, allowing for processing of each object model group based on its level of detail. Multiple preset camera distances can form a hierarchical judgment system during the rendering stage. The system dynamically selects the appropriate model precision for rendering based on the actual distance from the current viewpoint to the object, improving performance while maintaining visual quality. These preset camera distances can be automatically split by the system based on the object type corresponding to each object model group, or they can be manually set by the designer based on each object model group. The primary basis for their generation is the number of levels of detail required for each object model group.
[0042] The object baking strategy corresponding to each level of detail is a differentiated image computation preprocessing scheme used for the same virtual object model or a group of the same object models at different levels of detail (LOD0, LOD1, LOD2, etc.). The object baking strategy is used to set the baking scheme for virtual object models or groups of object models at different levels of detail.
[0043] For example, the object model of the scene is grouped into object models of the base object. Multiple preset camera distances can be 100 meters, 150 meters, and 300 meters. The 100-meter camera distance is used to determine LOD0 in the detail level, which is the finest detail level. The detail level between 100 meters and 150 meters is the detail level corresponding to LOD0. Correspondingly, the 150-meter camera distance is used to determine LOD1 in the detail level, and the detail level switches to LOD1 between 100 and 150 meters. The 300-meter camera distance is used to determine LOD2 in the detail level, and the detail level switches to LOD2 between 150 and 300 meters, etc., to achieve a smooth transition from high detail to simplification, balancing rendering efficiency and image quality.
[0044] Each level corresponds to a specific object baking strategy. For example, under the object model grouping of basic objects, meshes and materials can be merged directly by partition. LOD0 can adopt the object baking strategy of merging meshes but not materials, LOD1 can adopt the object baking strategy of merging meshes after reducing the number of faces but not materials, and LOD2 can adopt the object baking strategy of merging meshes after reducing the number of faces and merging materials.
[0045] There are several ways to determine the level of detail for each object model group based on multiple preset camera distances and set the object baking strategy for each level of detail. One possible way is to determine the level of detail for each object model group based on camera distances and set the object baking strategy for each level of detail. This can be done by determining the level of detail for each object model group based on multiple preset camera distances and setting the object baking strategy for each level of detail.
[0046] Another possible approach is to determine multiple positional relationships between each object model group and the virtual character based on multiple preset camera distances, determine the level of detail corresponding to each object model group based on multiple positional relationships, and set the object baking strategy corresponding to the level of detail.
[0047] By determining the level of detail for each object model group and the object baking strategy corresponding to each level of detail through multiple preset camera distances, the system can perform targeted optimization processing on models of different precision levels. While ensuring the continuity of visual effects at various distances, it significantly reduces geometric complexity, material overhead and rendering load, thereby generating efficient baked model data suitable for multi-level detail display. This provides key support for dynamically loading models of appropriate levels according to camera distance and achieving high-performance rendering.
[0048] Step 108: Based on the object baking strategy corresponding to the detail level, bake each initial model data to obtain baked model data of at least one object model group in multiple virtual sub-scenes. Among them, the baked model data of the target detail level is determined based on the current camera distance of the virtual character in the current virtual sub-scene, and is loaded and rendered in real time.
[0049] Baked model data is a 3D model resource package generated through pre-calculation and optimization, suitable for a specific level of detail. Baked model data is characterized by its lightweight and high performance. It is generated from raw high-poly model data through a series of optimization operations, including geometric simplification, material merging, lighting baking, texture compression, and grouping, making it a dataset that can be directly used for efficient rendering. Rendering based on baked model data can produce rendering results of virtual object models or groups of object models, i.e., 2D and 3D objects displayed in virtual space.
[0050] There are several ways to bake baked model data for at least one object model group in multiple virtual sub-scenes based on the object baking strategy corresponding to the detail level. One possible way is to bake baked model data for at least one object model group in multiple virtual sub-scenes based on the object baking strategy corresponding to multiple detail levels.
[0051] In one possible scenario, each group of object models at each level of detail has corresponding baked model data, which can significantly shorten rendering time and reduce the computational resources required for rendering without affecting rendering quality, thereby achieving efficient and high-quality graphics rendering.
[0052] Taking the aforementioned object model grouping of basic objects as an example, based on the object baking strategy corresponding to multiple detail levels, the initial model data of each initial model is baked to obtain baked model data of at least one object model group and multiple detail levels in multiple virtual sub-scenes. This can be done by merging the initial model data of the same type (basic object) in the object model group based on the LOD0 level object baking strategy, while not processing the materials, and baking the object model group to obtain baked model data.
[0053] Specifically, the above process can involve extracting the geometric information (vertices, normals, UV coordinates, etc.) of virtual object models within the same object model group. The vertex coordinates are adjusted based on the spatial location of the geometric information to ensure the relative position of the merged model in virtual space remains unchanged. This geometric data is then merged into a new mesh. Simultaneously, no material processing or merging is performed; the original material properties of each initial model data are preserved, including material color, texture mapping, and transparency settings. If applicable, lightmap baking can be applied to the merged mesh. Baking lighting can help reduce dynamic lighting calculations at runtime, but for static objects, this step can be skipped if the material and lighting effects are already good enough. The merged mesh, unmodified material information, and any possible lightmap baking information are packaged into a format suitable for real-time rendering. This data will serve as the baked model data for the LOD0 object detail level.
[0054] Baking model data is generated and saved in units of object model groups and detail levels, achieving data modularity. This means that when a model or lighting within a group changes, only the data package for that group needs to be rebaked and updated, without affecting other unaffected areas. This significantly reduces actual baking time. Simultaneously, during runtime, the system can load only the relevant group data based on the player's current location, avoiding extensive mesh calculations and material calls based on objects, effectively reducing memory usage.
[0055] This specification describes an embodiment that acquires initial model data of multiple virtual sub-scenes and virtual object models of multiple virtual sub-scenes; groups the virtual object models based on model size and object type to obtain at least one object model group in multiple virtual sub-scenes; determines the level of detail corresponding to each object model group based on multiple preset camera distances, and sets object baking strategies corresponding to multiple levels of detail; bakes each initial model data based on the object baking strategies corresponding to multiple levels of detail to obtain baked model data of at least one object model group in multiple virtual sub-scenes at multiple levels of detail, wherein the baked model data of the target level of detail is determined based on the current camera distance of the virtual character for the current virtual sub-scene, and is loaded and rendered in real time. Grouping virtual object models based on model size and object type forms object model groups with geometric similarity and consistent processing; dividing the level of detail according to multiple preset camera distances and configuring corresponding object baking strategies for each level achieves refined level of detail management; determining the object baking strategy based on the object model group and the corresponding level of detail generates optimized baked model data for each object model group at different levels of detail, realizing level of detail control and baking from the model level to the group level. While ensuring visual continuity with high precision in the near and reasonable simplification in the far, it significantly reduces memory usage and rendering load, and improves the loading speed, smoothness of operation and rendering performance of large-scale virtual scenes.
[0056] In one optional embodiment of this specification, obtaining initial model data of multiple virtual sub-scenes and virtual object models of multiple virtual sub-scenes includes: obtaining scene data of a virtual scene, wherein the virtual scene includes virtual object models, and the scene data includes initial model data of virtual object models; and dividing the scene data of the virtual scene based on the model size and scene position of the virtual object models to obtain multiple virtual sub-scenes and initial model data of virtual object models of multiple virtual sub-scenes.
[0057] Scene data in a virtual scene is a collection of digital information that constitutes a 3D virtual scene. Scene data can include meshes, geometric data, texture maps, materials, lighting data, and so on. Scene data is used to describe the scene modeling of the virtual scene and the existence of virtual object models within the virtual scene, including the spatial transformations, hierarchical relationships, visibility status, and so on of the virtual object models.
[0058] Initial model data is a collection of raw, unoptimized virtual object model data. It can be obtained from original modeling tools or data sources and serves as the fundamental input for all subsequent rendering optimizations, detail level generation, and runtime scheduling. Initial model data primarily includes the model's geometric topology (such as vertices and faces), spatial dimensions in its own coordinate system (such as bounding box size), UV mapping coordinates, skeletal structure (if applicable), and material references. It defines the model's original form and basic characteristics, providing the basis for subsequent instantiation, placement, and scene partitioning within the scene. In a virtual scene, there can be one or more virtual object models; similarly, the initial model data can be the initial model data of one virtual object model or the initial model data of multiple virtual object models.
[0059] Model size refers to the spatial extent occupied by a 3D model in a local coordinate system, and is a key geometric attribute describing its physical size. Model size can be obtained in several ways; one possibility is that it can be predefined by the algorithm's input parameters. For example, in a script used to generate a cylinder, the "radius" and "height" are the core input parameters, and these two values directly determine the final size of the generated model. Therefore, the size of such virtual object models can be obtained by acquiring the algorithm's input parameters.
[0060] In another possibility, the model dimensions can be derived from the designer's input. For example, when creating a furniture model, the designer might precisely model it with its actual length, width, and height. Once the model is complete, the software automatically calculates and extracts the smallest cuboid that can completely enclose the model, known as the "bounding box." The difference between the maximum and minimum values of the bounding box on the X, Y, and Z axes directly gives the model's three-dimensional dimensions. Therefore, the dimensions of such virtual object models can be directly obtained from the designer's input.
[0061] Scene position refers to the specific spatial coordinates of the virtual object model within the global coordinate system of the entire virtual scene. In one possibility, scene position defines the absolute position of the virtual object model relative to the scene origin (usually coordinates (0,0,0)). In another possibility, scene position can also be the relative position of the virtual object model relative to a preset coordinate system; the choice depends on the specific circumstances.
[0062] By acquiring scene data containing initial model data of virtual object models and dividing the virtual scene based on model size and scene location, rapid segmentation of virtual sub-scenes can be achieved. This method enables spatially adjacent and scale-similar objects to be reasonably clustered into the same sub-scene, laying a structured foundation for subsequent fine-grained rendering scheduling by region, detailed level control, resource streaming loading, and memory optimization, effectively improving the rendering efficiency, manageability, and smoothness of large-scale virtual scenes.
[0063] In one optional embodiment of this specification, after dividing the scene data of the virtual scene based on the model size and scene position of the virtual object model to obtain multiple virtual sub-scenes and initial model data of the virtual object models of the multiple virtual sub-scenes, the method further includes: setting an initial clipping distance based on the scene size of the multiple virtual sub-scenes, wherein the initial clipping distance is used to clip the virtual object models in the virtual sub-scenes to avoid rendering.
[0064] The initial clipping distance is a distance threshold that determines how to render a virtual subscene or virtual object model. It typically refers to the distance from the camera to the center point or edge of the virtual subscene or virtual object model. The initial clipping distance is used to determine whether to render the virtual subscene and the virtual object models within it.
[0065] There are several ways to set the initial clipping distance based on the scene sizes of multiple virtual sub-scenes. One possible approach is to determine the visible distance of each virtual sub-scene based on its scene size, and then set the initial clipping distance accordingly. Another possible approach is to set the initial clipping distance based on the scene sizes of multiple virtual sub-scenes and a pre-defined correspondence between scene sizes and initial clipping distances.
[0066] For example, when the center (or boundary) of a virtual sub-scene is more than the initial clipping distance from the camera, the system can determine that the sub-scene is "too far away and requires no processing" (including not loading virtual object model data in the virtual sub-scene, not submitting the model data of virtual object models in the virtual sub-scene to the rendering pipeline, and not performing any visibility calculations for virtual object models in the virtual sub-scene, etc. That is, excluding it at the very beginning of the rendering process), or "too far away and should be unloaded."
[0067] By setting the initial clipping distance based on the size differences of each virtual sub-scene, it is possible to more accurately remove distant sub-scenes outside the field of view, effectively avoid invalid rendering of virtual object models within them, significantly reduce the load on graphics processing units, central processing units and memory, and improve rendering efficiency and running performance.
[0068] In one optional embodiment of this specification, virtual object models are grouped based on model size and object type to obtain at least one object model group among multiple virtual sub-scenes, including: dividing virtual object models into at least one of large object model group, medium object model group, and small object model group based on model size; and dividing virtual object models into at least one of basic scene object model group, occlusion object model group, complex material object model group, architectural object model group, and curve object model group based on object type.
[0069] Model size refers to the spatial extent occupied by a 3D model in a local coordinate system, and is a key geometric attribute describing its physical size. Object type is a classification identifier for virtual object models in a virtual scene, used to describe the feature classification of virtual object models.
[0070] Grouping based on model size can be categorized into model size groups. Large object model groups are formed by classifying virtual object models with larger model sizes; medium object model groups are formed by classifying virtual object models with moderate model sizes; and small object model groups are formed by classifying virtual object models with smaller model sizes.
[0071] Within different model size groups, virtual object models can be assigned partition sizes based on their visual salience. For example, virtual object models in large object model groups can be assigned partitions of 128x128 pixels, those in medium-sized groups of 64x64 pixels, and those in small object model groups of 32x32 pixels. These object model partitions can be used to determine which virtual object models can be merged within a virtual sub-scene.
[0072] Grouping based on object type can be categorized into model type groups. Specifically: the Basic Scene Object Model group categorizes virtual object models based on the object type as basic scene objects; the Occlusion Object Model group categorizes virtual object models of the occlusion type (which includes virtual object models with numerous occlusion relationships, such as rocks, mountains, etc.); the Complex Material Object Model group categorizes virtual object models of the complex material type (which includes virtual object models with diverse and complex materials that are difficult to merge, such as grass, flowers, leaves, etc.; due to their diverse types and small size, complex material virtual object models are difficult to merge); the Building Object Model group categorizes virtual object models of the building type; and the Curve Object Model group categorizes virtual object models of the curve type (which includes virtual object models generated by the curve editor, such as rivers and roads spanning different regions).
[0073] Grouping based on object type is used to identify virtual object models of the same type in virtual sub-scenes. Since virtual object models of the same type have the same mesh, material properties or shader properties, the processing is the same, and they can be merged for processing. This reduces computational resource consumption and improves processing efficiency without affecting quality.
[0074] This specification's embodiments divide virtual object models into large, medium, or small object model groups based on model size, and further divide them into basic scene objects, occlusion objects, complex material objects, architectural objects, or curve objects based on object type. This achieves multi-dimensional and refined classification management of virtual object models in virtual scenes. This enables the system to formulate differentiated level control of details according to grouping for virtual sub-scenes, effectively reduce rendering load and resource waste through baking optimization, and significantly improve the rendering efficiency, memory utilization, and overall smoothness of large-scale virtual scenes.
[0075] In one embodiment of this specification, the object baking strategy corresponding to any detail level includes at least one of the following: For virtual object models in the object model group, perform mesh merging at the corresponding detail level; For virtual object models in the object model group, merge the materials at the corresponding detail level; For virtual object models in the object model group, perform mesh reduction at the corresponding detail level; For virtual object models belonging to the building object model group, establish the association relationship between the main building type parts and the internal object type parts; For virtual object models belonging to the curve object model group, the model is clipped according to the scene position of the virtual object model.
[0076] Mesh merging is an optimization technique that combines multiple independent meshes in a scene into one or a few larger meshes. In real-time rendering, the overhead of the graphics processing unit (GPU) drawing objects depends not only on the complexity of the objects themselves but also on the number of rendering batches or draw calls. Each draw call requires the central processing unit (CPU) to send instructions to the GPU, a process that incurs significant GPU overhead. When there are hundreds or thousands of independent small objects (such as rocks, grass, or debris) in a scene, even if each object has only a few triangles, it can generate a large number of draw calls, leading to a CPU bottleneck. Mesh merging reduces the original N draw calls to one or a few by merging multiple static small meshes using the same material and texture into one large mesh, greatly alleviating the CPU load.
[0077] For example, a stone structure might consist of 50 individual, identically sized stone slabs. Without merging, each slab is an independent 3D model (mesh). Therefore, for each slab rendered, the CPU needs to send a draw call to the GPU. With 50 individual slabs, this results in a total of 50 draw calls. However, with mesh merging, developers can use the engine's mesh merging tool to combine these 50 slabs into a single, larger mesh. The merged scene now contains only one "merged cobblestone path" mesh object. It still uses the same "stone texture" material and "slab texture" map. This larger mesh contains all the vertices and faces of the original 50 slabs. Now, rendering the entire path requires only one draw call. The CPU sends a single instruction to the GPU: "Use the 'stone texture' shader, bind the 'slab texture' map, and then draw this 'merged cobblestone path' mesh." The GPU then draws all 50 slabs at once.
[0078] Material merging is an optimization technique that combines or optimizes multiple different, similar, or identical materials into a smaller number of materials. Its core goal is the same as mesh merging: to reduce rendering batches and the number of draw calls, thereby improving real-time rendering performance. Material merging primarily achieves this by packaging multiple small textures (such as brick walls or ground textures of different colors) into a large texture atlas. Specifically, a "super material" can be created that uses this atlas texture. Then, by adjusting the UV coordinates of each model, it samples only the corresponding parts from the atlas. Thus, an object that originally required 10 different materials (10 textures) now only needs 1 material (1 texture), reducing 10 draw calls to 1 (when mesh merging is also used).
[0079] Mesh reduction is a technique that reduces the geometric complexity of a 3D model by decreasing the number of vertices, edges, and faces while preserving as much of the model's original shape, outline, and visual characteristics as possible. Mesh reduction transforms a high-poly model with a high face count into a low-poly model with fewer face counts, significantly reducing the number of meshes that need to be rendered and thus reducing the number of rendering calls.
[0080] For example, suppose there is an office building model with 100,000 faces. We can reduce the face count by meshing it. In LOD0 (0–100m), we can use the original 100,000 face count model. In LOD1 (100–300m), we can reduce the face count to 40,000 face counts with the same appearance. In LOD2 (>300m), we can further reduce it to 10,000 face counts, keeping only the window arrangement and roof outline.
[0081] In comparison, mesh reduction reduces the geometric complexity of a single high-polygon model by removing redundant vertices and triangles, thereby reducing the computational burden on the graphics processing unit. It is often used to generate simplified models with different levels of detail. Mesh merging, on the other hand, combines the mesh data of multiple independent but related objects (such as multiple streetlights or flower pots) into a whole, thereby reducing the number of draw calls and improving rendering efficiency.
[0082] In one embodiment of this specification, any mesh has a corresponding shader; performing mesh merging at the corresponding level of detail for virtual object models in the object model group includes: performing mesh merging at the corresponding level of detail for virtual object models in the object model group with the same shader.
[0083] Shaders are programs that run on the graphics processing unit (GPU) and implement specific algorithms for graphics rendering. They determine the visual effects of objects in a scene, such as color, shadows, and texture mapping. Shaders can be used to control different stages in the rendering pipeline, mainly including vertex shaders, fragment shaders (also known as pixel shaders), and geometry shaders.
[0084] During rendering, the graphics processing unit (GPU) needs to maintain a stable rendering state (shaders, materials, textures, etc.). If two objects use different shaders and their rendering logic is completely different (e.g., one calculates metallic reflections, and the other calculates translucency), the GPU must first "clean up" the current state and then "set" the new state. This process, called state switching, is extremely expensive. Only when the rendering states of multiple objects are completely consistent (i.e., using the same shaders and materials) can they be considered a "batch-processable" whole. The CPU can tell the GPU at once: "Use this shader and material to render this large mesh containing all the objects."
[0085] There are several ways to perform mesh merging of virtual object models in the object model group at the corresponding level of detail and using the same shader. One possible way is to determine the shader data corresponding to the virtual object model based on the initial model data of the virtual object model, and then perform mesh merging of virtual object models in the object model group at the corresponding level of detail and using the same shader.
[0086] In the embodiments of this specification, when merging the meshes of virtual object models in the object model group at the corresponding level of detail, meshes using the same or compatible shaders are merged first. This ensures that the merged meshes can share the same material and rendering state during rendering, avoiding additional drawing calls or rendering interruptions caused by shader switching. This simplifies the geometric structure while maximizing rendering efficiency and achieving synergistic optimization of performance and visual consistency.
[0087] In one possible scenario, for Cliff rocks, since these objects severely occlude each other and a large portion is underground, the first step is to clip the unseen surfaces (such as those beneath the terrain or occluding each other), and then perform mesh merging and material merging according to the defined partitions. This involves different levels of detail: a. LOD0: Perform mesh merging at the LOD0 detail level, but do not perform material merging at the LOD0 detail level. b. LOD1: Perform polygon reduction on the LOD1 detail level mesh, and then perform mesh merging at the LOD1 detail level on the reduced mesh, but do not perform material merging at the LOD1 detail level. c. LOD2: Perform polygon reduction on the LOD2 detail level mesh, and then perform material merging at the LOD2 detail level.
[0088] For basic scene objects, no additional consideration is needed; mesh and material merging is performed directly by partitioning. For different detail levels: a. LOD0: Mesh merging is performed at the LOD0 detail level, but material merging is not performed at the LOD0 detail level. b. LOD1: The LOD1 detail level mesh is reduced in polygon count, and the resulting mesh is merged at the LOD1 detail level, but material merging is not performed at the LOD1 detail level. c. LOD2: The LOD2 detail level mesh is reduced in polygon count, and material merging is performed at the LOD2 detail level. For vegetation, due to the complexity of vegetation material effects and the diversity of mesh and material types, uniqueness needs to be emphasized. Mesh and material merging is usually not performed, but for different detail levels: a. LOD0: No processing is done on the initial model data. b. LOD1: The LOD1 detail level mesh in polygon count is reduced. c. LOD2: The LOD2 detail level mesh in polygon count is reduced.
[0089] The relationship between the main building type and the internal object type is the connection between them. This relationship can be established through building object model components. Relationships include spatial affiliation, installation dependency, functional correspondence, hierarchical nesting, attribute inheritance, etc. After establishing these relationships, building objects are treated as individual buildings without fixed-size partitions. Therefore, the different detail levels of interior objects and exterior attachments are: a. LOD0: Perform mesh merging at the LOD0 level of detail. b. LOD1: Perform mesh reduction at the LOD1 level of detail, and then perform mesh merging at the LOD1 level of detail on the reduced mesh. c. Establish the association between main building type parts and internal object type parts. For main building parts and large outdoor objects: a. LOD0: Perform mesh merging at the LOD0 level of detail. b. LOD1: Perform mesh merging at the LOD1 level of detail. c. LOD2: Perform mesh merging at the LOD1 level of detail with the same shader. d. LOD3: Perform mesh merging at the LOD2 level of detail with the same shader.
[0090] Mesh merging is the process of combining multiple objects using the same shader into a single mesh to minimize draw calls. By integrating the geometric data (vertices and triangles) of all scattered 3D models using the same shader program into a single, massive mesh object through a program or tool, the rendering instruction overhead of the central processing unit is greatly reduced, resulting in a qualitative leap in performance.
[0091] For spline objects, such as roads generated by the curve editor, which are typically long, narrow, and span multiple virtual sub-scenes, special processing is required: a. Divide the curve objects into segments according to medium-sized object partitions, cutting the complete road into different segments. b. LOD0: Do not process the segmented curve objects. c. LOD1: Reduce the number of facets in the mesh of the segmented curve objects.
[0092] The embodiments in this specification employ differentiated optimization strategies (including mesh merging, material merging, mesh reduction, and establishing relationships between objects inside and outside the building) at different detail levels for different types of objects (such as Cliff rocks, buildings, vegetation, and curved objects). While ensuring visual effects, these strategies significantly reduce the draw calls and geometric complexity required for rendering, thereby significantly improving real-time rendering efficiency and system performance in a refined manner.
[0093] Based on the object baking strategy corresponding to the detail level, each initial model data is baked to obtain baked model data of at least one object model group in multiple virtual sub-scenes. The method further includes configuring a corresponding link component for the baked model data of the detail level. The link component stores a reference to the baked model data of at least one object model group in multiple virtual sub-scenes, so that the baked model data of the target detail level is dynamically loaded during object rendering.
[0094] The link component is a lightweight data structure for managing the loading path of multi-level baking model data. It can also manage the hierarchical relationships between these multi-level data sets. The link component can store references to baking model data generated at different detail levels for the same object model group, and dynamically trigger the loading and switching of corresponding level models based on runtime camera distance or system strategies. In one possible scenario, the link component can act as a storage link, pointer, or reference to the baking model data.
[0095] Linking components allow baked model data to be referenced indirectly at any time, rather than being placed directly into the scene. One possible approach is to associate the baked model data with the scene through indirect references, that is, to use the Dynamic Detail Level (DynamicLOD) component to associate the baked model data of different levels of detail with each virtual object model in the scene, instead of directly placing the baked data into the scene.
[0096] One possible approach to configuring corresponding link components for baking model data at different detail levels is to configure corresponding link components for baking model data at multiple detail levels.
[0097] This specification's embodiments manage the baked model data at the detail level through indirect references by configuring link components, achieving flexibility in resource loading and dynamic scheduling capabilities at runtime. The system does not need to load all detail level data during scene initialization, but instead loads the target level model on demand based on camera distance or performance strategies, effectively reducing memory consumption and startup overhead. At the same time, as a lightweight reference structure, the link components support quick switching between detail levels, facilitate hot resource updates and remote loading, and avoid the coupling and redundancy problems caused by directly embedding model data, significantly improving the rendering efficiency, maintainability, and scalability of virtual scenes.
[0098] In one possible embodiment of this specification, after baking each initial model data based on an object baking strategy corresponding to the detail level to obtain baked model data for at least one group of object models in multiple virtual sub-scenes, the method further includes: Based on the baked model data at the level of detail, configuration data for multiple virtual sub-scenes is generated. The configuration data includes loading distance and / or target clipping distance. The loading distance is the camera distance used to determine the loading of the baked model data at the target level of detail. The target clipping distance is used to clip the virtual object models in the virtual sub-scene at the target level of detail to avoid rendering.
[0099] There are several ways to generate configuration data for multiple virtual sub-scenes based on baking model data at multiple detail levels. One possible approach is to generate configuration data for multiple virtual sub-scenes based on baking model data at multiple detail levels.
[0100] Load distance is a threshold distance between the camera and virtual objects or virtual sub-scenes, used to determine which level of detail's baked model data should be loaded. Target clipping distance is a threshold at which virtual object models exceeding this distance will be discarded by the system, used to avoid invalid rendering of invisible or irrelevant objects. Taking trees as an example, when generating configuration data for virtual sub-scenes based on baked model data from multiple levels of detail, reasonable load distances and target clipping distances can be set for "tree object model grouping": The loading distance can be set as follows: LOD0 (original object): set the loading distance to 0~80 meters, used when the camera distance is ≤80 meters; LOD1 (model after reducing the number of faces in the mesh): set the loading distance to 80~200 meters, used to switch when the distance exceeds 80 meters; LOD2 (model after further reducing the number of faces in the mesh): set the loading distance to 200~500 meters, used to display the outline at a distance.
[0101] Target clipping distance: Set to 500 meters. This means that when the distance between the camera and the tree instance exceeds this value, the system will remove it from the temporary cache pool, stop loading or rendering, and avoid invalid processing of distant trees that are outside the field of view or invisible.
[0102] This specification's embodiments generate configuration data including loading distance and target clipping distance by baking model data based on detail levels. This enables fine-grained control over model loading and rendering behavior in virtual sub-scenes. Loading distance ensures that models of appropriate precision are loaded at the right time, avoiding resource waste; target clipping distance further eliminates visually irrelevant objects, reducing invalid rendering. The two work together to achieve hierarchical management of virtual sub-scenes, significantly improving memory efficiency, rendering performance, and smoothness of large-scale virtual scenes, providing crucial support for realizing intelligent, dynamic, and scalable visualization systems.
[0103] Accordingly, the following is in conjunction with the appendix Figure 2 This section explains the object rendering methods corresponding to the object baking methods. Figure 2 A flowchart of an object rendering method provided in one embodiment of this specification includes the following steps: Step 202: Obtain the current camera distance of the virtual character relative to the current virtual sub-scene.
[0104] The current camera distance is the spatial distance from the camera (or viewing angle) controlled by the virtual character to the target virtual object or the current virtual sub-scene. This distance changes dynamically as the virtual character moves. The current camera distance serves as the core criterion for determining rendering accuracy. Based on the current camera distance between the virtual character and the virtual sub-scene or object model group, it can be determined whether to load the baked model data corresponding to the object model group, and the level of detail to be loaded, thereby triggering the loading and rendering of the corresponding baked model data, achieving adaptive, high-performance hierarchical rendering based on viewpoint position.
[0105] There are several ways to obtain the current camera distance of a virtual character relative to the current virtual sub-scene. One possible way is to calculate the geometric distance between the position of the camera controlled by the virtual character in the world coordinate system and the center point or representative reference point of the current virtual sub-scene, and use the geometric distance as the current camera distance.
[0106] This step obtains the real-time spatial relationship between the virtual character and the current virtual sub-scene, i.e., the current camera distance, providing foundational data support for subsequent dynamic determination of rendering accuracy. As the starting point of the adaptive rendering workflow, this step, by collecting distance information between the camera and the scene, enables the system to perceive changes in the viewing angle, thereby driving intelligent switching of the LOD level. This ensures that appropriate model details are loaded at different viewing distances, achieving a balance between performance and image quality.
[0107] Step 204: Based on the current camera distance, determine the target detail level of at least one object model group in the current virtual sub-scene.
[0108] The target detail level is the detail level of the selected object model group corresponding to the current camera conditions. The system dynamically determines the target detail level that best balances rendering performance and visual quality based on the current camera distance between the virtual character and the virtual sub-scene, combined with a preset loading distance range. This target detail level is determined for each object model group, allowing the system to load and render based on these groups, significantly reducing the burden of drawing calls, loading, and rendering during the processing and improving overall rendering efficiency.
[0109] There are several ways to determine the target detail level of at least one object model group in the current virtual sub-scene based on the current camera distance. One possible way is to determine the target detail level of at least one object model group in the current virtual sub-scene based on the current camera distance and loading distance.
[0110] Another possible approach is to determine at least one object model group to be rendered based on the current camera distance and the initial clipping distance, and to determine the target detail level of at least one object model group in the current virtual sub-scene based on the current camera distance and loading distance of at least one object model group.
[0111] Step 206: Load baked model data of the target detail level of at least one object model group, wherein the baked model data of the target detail level is obtained by baking according to the object baking method described above.
[0112] Loading is the process of reading and loading the baked model data at the target level of detail into the runtime system's memory. Loading includes the process of loading baked model data stored on the local disk or a remote server into memory, making the baked model data accessible and processable by the rendering engine. The baked model data at the target level of detail is obtained by baking using the object baking method described above.
[0113] There are several ways to load baked model data of at least one object model group at the target detail level. One possible approach is to load the baked model data of at least one object model group at the target detail level into memory. Another possible approach is to load the baked model data of at least one object model group at the target detail level into a temporary cache pool in memory.
[0114] Meanwhile, the loading method can be synchronous or asynchronous. That is, one possible way is to synchronously load the baked model data of the target detail level of at least one object model group; another possible way is to asynchronously load the baked model data of the target detail level of at least one object model group.
[0115] This step loads the target detail level model data generated by baking based on the aforementioned method into memory, realizing the dynamic loading of an optimized model adapted to the current viewing distance on demand. This not only ensures visual quality but also effectively controls memory usage and rendering overhead, improving system operating efficiency and the smoothness of scene rendering.
[0116] Step 208: Render the baking model data to obtain the rendering result.
[0117] The rendering result is a visual output generated in virtual space after the loaded baked model data is graphically processed through step 208. Specifically, the rendering result is a 3D scene displayed on a display device, containing accurate geometry, material representation, lighting effects, and spatial relationships. This result, based on the target detail level determined by the current camera distance, ensures an optimal balance between visual realism and rendering performance at different viewing distances, providing users with a continuous, smooth, and high-quality immersive experience.
[0118] This specification's embodiments achieve refined, adaptive, and hierarchical rendering at the object model grouping granularity by obtaining the current camera distance of the virtual character relative to the current virtual sub-scene and dynamically determining the target detail level of each object model group based on this distance. It then loads the baked model data for the corresponding level and renders it. Since the baked model data has already undergone geometric simplification, material merging, and lighting optimization offline, only a lightweight model adapted to the current view distance needs to be loaded on demand at runtime, effectively reducing memory usage and drawing calls and the rendering load on the graphics rendering unit. Simultaneously, combined with grouped management and a dynamic switching mechanism for detail layers, it avoids over-drawing and resource waste. While ensuring high image quality in close-up and reasonable simplification in distant areas, it significantly improves the rendering efficiency, system response speed, and overall smoothness of large-scale virtual scenes, providing reliable technical support for high-performance real-time visualization applications.
[0119] In one possible embodiment of this specification, after rendering the baked model data and obtaining the rendering result, the method further includes: continuing to execute the step of obtaining the current camera distance of the virtual character relative to the current virtual sub-scene; unloading the baked model data of the target detail level of at least one object model group when the current camera distance changes; and continuing to execute the step of determining the target detail level of at least one object model group in the current virtual sub-scene based on the current camera distance.
[0120] A change in the current camera distance refers to a change in the camera distance of the virtual character. This could be due to the virtual character moving or a change in the current virtual sub-scene. A change in the current camera distance indicates that the relationship between the virtual character's camera and the current virtual sub-scene needs to be redefined.
[0121] Unloading is the process of releasing and removing baked model data that has been loaded into the runtime system memory. In virtual scene rendering, when a virtual character moves away from a certain object model group or the current camera distance exceeds the loading range of the target detail level, the system will trigger an unloading operation for the model data at that level to reclaim memory resources and avoid invalid resident data.
[0122] There are several ways to obtain the current camera distance of a virtual character relative to the current virtual sub-scene. One possible way is to calculate the current camera distance of the virtual character relative to the current virtual sub-scene based on the geometric distance between the virtual character's position and the center position of the current virtual sub-scene.
[0123] The method to determine the target detail level of at least one object model group in the current virtual sub-scene can be by comparing the current camera distance with the preset loading distance of each detail level, thereby determining the target detail level of at least one object model group to be loaded.
[0124] One possible scenario is that during system runtime, a dynamic level of detail (LMD) component is applied. When the LMD component is enabled, the system loads a baked new scene instead of the original scene. The LMD component dynamically loads the LMD data for the corresponding category and group of objects based on configuration data (such as loading distance and clipping distance) and the current camera position. When the camera position changes, the system calculates the LMD data for different blocks frame by frame, for example, 20 blocks per frame. If the LMD level of a block changes, a resource loading request for the new LMD level is submitted first. After the new LMD resource is loaded, a release request for the old LMD resource is submitted. LMD resources are loaded / unloaded asynchronously, while resource reference counting is used to ensure the correct release and loading of reusable objects.
[0125] This embodiment of the specification achieves continuous response to changes in the virtual character's perspective and dynamic closed-loop management of rendering resources by cyclically acquiring camera distance, dynamically judging the target detail level, and unloading baked model data that is no longer needed. When the camera distance changes, redundant high-detail model data at long distances is unloaded in time to avoid memory waste, and a suitable level model adapted to the new perspective is reloaded to ensure a real-time balance between rendering accuracy and performance. This mechanism significantly improves resource utilization efficiency, reduces peak memory usage, and enhances the stability and smoothness of large-scale virtual scenes during continuous interaction and movement, achieving true adaptive, high-performance hierarchical rendering.
[0126] In an optional embodiment of this specification, after unloading the baked model data of the target detail level of at least one object model group, the method further includes: placing the baked model data of the target detail level of at least one object model group into a temporary cache pool and triggering a timer, wherein the timer is used to remove the baked model data from the temporary cache pool after the timer expires. Loading baked model data of the target detail level of at least one object model group includes: loading baked model data of the target detail level of at least one object model group from a temporary cache pool, and removing the baked model data from the temporary cache pool.
[0127] A temporary cache pool is a high-speed data cache area in runtime memory used to temporarily store baked model data (such as meshes, materials, lightmaps, etc.) of recently loaded or potentially reused object model groups to improve resource access efficiency.
[0128] The timing function, also known as the cache time, is used to remove the baking model data from the temporary cache pool after the timing is completed. The timing function can control the time that the baking model data is in the temporary cache pool, avoiding the baking model data being in the temporary cache pool for too short or too long. Too short a time may lead to frequent loading of the temporary cache pool, wasting computing resources, while too long a time may lead to the baking model data being stored in the temporary cache pool for a long time without being used, occupying the temporary cache pool and compressing the space of the baking model data that is in use.
[0129] Removing data from the temporary cache pool is the process of deleting or releasing loaded baking model data from the temporary cache pool. Removing data from the temporary cache pool can prevent baking model data from occupying cache resources.
[0130] This embodiment places baked model data at the target detail level of at least one object model group into a temporary cache pool and triggers a timer. This allows the data to be temporarily stored in memory for a controllable period. If it is not accessed again after the timer expires, it is automatically removed, avoiding long-term memory occupation. During subsequent loading, the data is preferentially read from the temporary cache pool for fast response. After loading is complete, it is immediately removed from the cache pool to ensure that resources are used on demand and released immediately after use. This mechanism balances loading efficiency and memory control, improving performance through caching and preventing memory leaks through time-sensitivity management, achieving efficient reuse and safe reclamation of baked model data in high-frequency switching scenarios.
[0131] In one possible embodiment of this specification, after loading baked model data of the target detail level of at least one object model group from a temporary cache pool, the method further includes: if loading fails, loading baked model data of the target detail level of at least one object model group from a storage medium.
[0132] Storage media are the physical data storage carriers for baking model data, used to persistently store the baking model data in the virtual scene. Storage media can include: local storage: such as hard disks (HDDs), solid-state drives (SSDs), and built-in storage of mobile devices; network storage: such as remote servers, cloud storage, and CDN distribution nodes; and embedded resource packages: such as resource files within game or application installation packages.
[0133] In one possible embodiment of this specification, after loading baked model data of the target detail level of at least one object model group from a temporary cache pool, if loading fails, the baked model data is further read and loaded again from the storage medium. This scheme, by introducing a cache degradation loading mechanism, effectively addresses situations such as cache misses, data anomalies, or memory release, ensuring that target model data can be reliably obtained under various operating conditions. This improves the system's fault tolerance and the robustness of the rendering process, avoids model display loss or rendering interruption due to temporary cache unavailability, and guarantees the continuity of the virtual scene and the stability of the user experience.
[0134] In one possible embodiment of this specification, the virtual object model includes a building object model, which includes internal object type parts and external object type parts; before rendering the baked model data and obtaining the rendering result, the method further includes: removing the baked model data from the temporary cache pool when the current camera angle of the virtual character relative to the current virtual sub-scene changes and the current camera distance of the virtual character relative to the internal object type parts exceeds a preset threshold. If the current camera angle of the virtual character changes in relation to the current virtual sub-scene, and the current camera distance of the virtual character to the internal object type part does not exceed a preset threshold, determine whether it is visible. If not, hide the internal object type part.
[0135] The current camera angle represents the orientation of the camera controlled by the virtual character within the virtual scene. It can be composed of horizontal rotation (yaw), vertical pitch, and roll, describing the orientation and posture of the viewing angle. In virtual scene rendering, the current camera angle can be used to determine the content seen by the user, predict the potentially visible area in the next frame by combining camera distance and angle, preload relevant baked model data, and, in conjunction with camera distance, achieve more precise switching of detail levels in viewpoint-based detail level control.
[0136] If the current camera angle of the virtual character in relation to the current virtual sub-scene changes, and the current camera distance of the virtual character to the internal object type part exceeds a preset threshold, it can be determined that the internal object type part is no longer visible in the current camera of the virtual character, and the invisible state will not change for a certain period of time. Therefore, the baked model data is moved out of the temporary cache pool to reduce memory resource consumption and improve the loading and rendering efficiency of other data.
[0137] If the current camera angle of the virtual character relative to the current virtual sub-scene changes, and the current camera distance of the virtual character relative to the internal object type part does not exceed a preset threshold, it is impossible to directly determine whether the internal object type part is visible in the virtual character's current camera view. Therefore, it is determined whether the internal object type part is visible. If it is, no processing is performed on the internal object type part, and the subsequent rendering process proceeds normally. If not, the internal object type part is hidden, that is, no rendering is performed on the internal object type part, thus optimizing scene data usage. At the same time, since the current camera distance of the virtual character relative to the internal object type part does not exceed the preset threshold, the visibility state of the internal object type part may change in a short period of time. Therefore, the baked model data of the internal object type part is not removed from the temporary cache pool to avoid frequent processing of the data of the internal object type part.
[0138] Hiding is an operation that removes the baked model data of internal object type parts from the rendering queue. Hiding can avoid rendering the baked model data of internal object type parts without affecting the baked model data of internal object type parts in memory.
[0139] There are several ways to determine whether an internal object type is visible. One possible method is to use view frustum clipping to determine whether the internal object type is located within the view frustum formed by the camera's current orientation. If the bounding box of the internal object type is completely outside the view frustum, it is determined to be invisible and requires no further processing; if it is partially or entirely within the view frustum, it may be visible.
[0140] If the object is planar (such as a display screen or door sign), the angle between the normal of the internal object type part and the camera's line of sight vector can be determined. If the angle is close to 180° (facing away from the camera), it is considered invisible; if the angle is small (facing the camera), the internal object type part may be visible.
[0141] Before rendering the baked model data, this embodiment dynamically manages the visibility of internal object types by combining the current camera angle change and camera distance of the virtual character: when the camera angle changes and the camera distance exceeds a preset threshold, it is determined that the internal object is outside the observation range, and its baked model data is removed from the temporary cache pool to release memory resources and avoid invalid resident data; when the camera distance does not exceed the threshold, it is further determined whether it is actually visible from the current viewpoint. If it is visible, the normal rendering state is maintained; if it is not visible, the object is actively hidden. This mechanism achieves fine-grained visibility control based on viewpoint position and orientation, effectively reducing redundant drawing and memory occupation while ensuring visual realism, and significantly improving rendering efficiency and system resource utilization.
[0142] It should be noted that the object baking or object rendering methods provided in this manual can be applied to various industries or scenarios, including virtual reality processing software, home entertainment product software, digital cultural product production software, digital cultural creative software, digital cultural creative design, education, news, cultural content industry software, digital publishing software, game and animation software; digital music development and production, digital mobile multimedia development and production, etc. In some cases, they can also be applied to animation and game production engine software and development systems, game and animation software, animation and game production engine software and development systems, game and animation software, animation and game production engine software and development systems, animation and game digital content services, digital film and television development and production, digital performance development and production, etc.
[0143] Corresponding to the above method embodiments, this specification also provides embodiments of an object baking apparatus. Figure 3 A schematic diagram of an object baking apparatus according to one embodiment of this specification is shown. Figure 3 As shown, the device includes: The first acquisition module 302 is configured to acquire initial model data of multiple virtual sub-scenes and virtual object models of multiple virtual sub-scenes.
[0144] Grouping module 304 is configured to group virtual object models based on model size and object type to obtain at least one object model group in multiple virtual sub-scenes.
[0145] The first determining module 306 is configured to determine the level of detail corresponding to each object model group based on the camera distance, and set the object baking strategy corresponding to the level of detail.
[0146] Baking module 308 is configured to bake each initial model data based on an object baking strategy corresponding to multiple detail levels, and obtain baked model data of at least one object model group in multiple virtual sub-scenes. The baked model data of the target detail level is determined based on the current camera distance of the virtual character relative to the current virtual sub-scene, and is loaded and rendered in real time.
[0147] Optionally, the first acquisition module 302 is further configured to acquire scene data of a virtual scene, wherein the virtual scene includes a virtual object model, and the scene data includes the initial model data of the virtual object model; based on the model size and scene position of the virtual object model, the scene data of the virtual scene is divided to obtain multiple virtual sub-scenes and the initial model data of the virtual object models of the multiple virtual sub-scenes.
[0148] Optionally, the object baking apparatus also includes a settings module configured to set an initial clipping distance based on the scene size of multiple virtual sub-scenes, wherein the initial clipping distance is used to clip virtual object models in the virtual sub-scenes to avoid rendering.
[0149] Optionally, the grouping module 304 is further configured to divide the virtual object model into at least one of a large object model group, a medium object model group, and a small object model group based on the model size; and to divide the virtual object model into at least one of a basic scene object model group, an occlusion object model group, a complex material object model group, a building object model group, and a curve object model group based on the object type.
[0150] Optionally, the object baking device also includes a strategy module configured to perform mesh merging at the corresponding level of detail for virtual object models in the object model group; perform material merging at the corresponding level of detail for virtual object models in the object model group; perform mesh reduction at the corresponding level of detail for virtual object models in the object model group; establish the association between the main building type parts and the internal object type parts for virtual object models belonging to the building object model group; and perform model trimming based on the scene position of the virtual object models for virtual object models belonging to the curve object model group.
[0151] Optionally, the strategy module is further configured to perform mesh merging of virtual object models in the object model grouping with the same shader at the corresponding level of detail.
[0152] Optionally, the object baking apparatus also includes a linking component configured to correspond to the baking model data at the level of detail, wherein the linking component stores references to the baking model data of at least one group of object models in multiple virtual sub-scenes, enabling the target level of detail baking model data to be dynamically loaded during object rendering.
[0153] Optionally, the object baking apparatus also includes a generation module configured to generate configuration data for multiple virtual sub-scenes based on baked model data at multiple levels of detail. The configuration data includes a loading distance and / or a target clipping distance. The loading distance is the camera distance used to determine the loading of baked model data at the target level of detail, and the target clipping distance is used to clip virtual object models in the virtual sub-scenes at the target level of detail to avoid rendering.
[0154] This specification describes an embodiment that acquires initial model data of multiple virtual sub-scenes and virtual object models of multiple virtual sub-scenes; groups the virtual object models based on model size and object type to obtain at least one object model group in multiple virtual sub-scenes; determines the level of detail corresponding to each object model group based on camera distance and sets the object baking strategy corresponding to the level of detail; bakes each initial model data based on the object baking strategy corresponding to the level of detail to obtain baked model data of at least one object model group in multiple virtual sub-scenes, wherein the baked model data of the target level of detail is determined based on the current camera distance of the virtual character for the current virtual sub-scene, and is loaded and rendered in real time. Grouping virtual object models based on model size and object type forms object model groups with geometric similarity and consistent processing; dividing the level of detail according to multiple preset camera distances and configuring corresponding object baking strategies for each level to achieve refined level of detail management; determining the object baking strategy based on the object model group and the corresponding level of detail to generate optimized baked model data for each object model group at different levels of detail, thus realizing level of detail control and baking from the model level to the group level. While ensuring visual continuity with high precision in the near and reasonable simplification in the far, it significantly reduces memory usage and rendering load, and improves the loading speed, smoothness of operation and rendering performance of large-scale virtual scenes.
[0155] The above is a schematic representation of an object baking apparatus according to this embodiment. It should be noted that the technical solution of this object baking apparatus and the technical solution of the object baking method described above belong to the same concept. Details not described in detail in the technical solution of the object baking apparatus can be found in the description of the technical solution of the object baking method described above.
[0156] Corresponding to the above method embodiments, this specification also provides embodiments of object rendering apparatus. Figure 4 A schematic diagram of an object rendering apparatus according to one embodiment of this specification is shown. Figure 4 As shown, the device includes: The second acquisition module 402 is configured to acquire the current camera distance of the virtual character relative to the current virtual sub-scene.
[0157] The second determining module 404 is configured to determine the target detail level of at least one object model group in the current virtual sub-scene based on the current camera distance.
[0158] The first loading module 406 is configured to load baked model data of the target detail level of at least one object model group, wherein the baked model data of the target detail level is obtained by baking according to the object baking method described above.
[0159] Rendering module 408 is configured to render the baked model data and obtain the rendering result.
[0160] Optionally, the object rendering apparatus further includes a first dynamic module configured to continue performing the step of obtaining the current camera distance of the virtual character relative to the current virtual sub-scene; unloading baked model data of the target detail level of at least one object model group if the current camera distance changes; and continuing to perform the step of determining the target detail level of at least one object model group in the current virtual sub-scene based on the current camera distance.
[0161] Optionally, the object rendering apparatus further includes a caching module configured to place baked model data of the target detail level of at least one object model group into a temporary cache pool and trigger a timer, wherein the timer is used to remove the baked model data from the temporary cache pool after the timer expires.
[0162] Optionally, the first loading module is further configured to load baked model data of at least one object model group at the target detail level from a temporary cache pool, and remove the baked model data from the temporary cache pool.
[0163] Optionally, the object rendering apparatus further includes a second loading module configured to load baked model data of the target detail level of at least one object model group from a temporary cache pool, and remove the baked model data from the temporary cache pool.
[0164] Optionally, the object rendering apparatus further includes a second dynamic module configured to remove baked model data from a temporary cache pool when the current camera angle of the virtual character relative to the current virtual sub-scene changes and the current camera distance of the virtual character relative to the internal object type part exceeds a preset threshold; and to determine whether the internal object type part is visible when the current camera angle of the virtual character relative to the current virtual sub-scene changes and the current camera distance of the virtual character relative to the internal object type part does not exceed the preset threshold. If not, the internal object type part is hidden.
[0165] This specification's embodiments achieve refined, adaptive, and hierarchical rendering at the object model grouping granularity by obtaining the current camera distance of the virtual character relative to the current virtual sub-scene and dynamically determining the target detail level of each object model group based on this distance. It then loads the baked model data for the corresponding level and renders it. Since the baked model data has already undergone geometric simplification, material merging, and lighting optimization offline, only a lightweight model adapted to the current view distance needs to be loaded on demand at runtime, effectively reducing memory usage and drawing calls and the rendering load on the graphics rendering unit. Simultaneously, combined with grouped management and a dynamic switching mechanism for detail layers, it avoids over-drawing and resource waste. While ensuring high image quality in close-up and reasonable simplification in distant areas, it significantly improves the rendering efficiency, system response speed, and overall smoothness of large-scale virtual scenes, providing reliable technical support for high-performance real-time visualization applications.
[0166] The above is a schematic scheme of an object rendering apparatus according to this embodiment. It should be noted that the technical solution of this object rendering apparatus and the technical solution of the object rendering method described above belong to the same concept. For details not described in detail in the technical solution of the object rendering apparatus, please refer to the description of the technical solution of the object rendering method described above.
[0167] Figure 5 This is a structural block diagram of a computing device provided in one embodiment of this specification. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.
[0168] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. 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 540 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.
[0169] In one embodiment of this specification, the above-described components of the computing device 500 and Figure 5 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 5 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.
[0170] The computing device 500 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 500 can also be a mobile or stationary server.
[0171] The processor 520 is used to execute computer programs / instructions, which, when executed by the processor, implement the steps of the object baking method or object rendering method described above.
[0172] 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 belongs to the same concept as the technical solution of the object baking method or object rendering method described above. 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 object baking method or object rendering method described above.
[0173] 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 object baking method or object rendering method described above.
[0174] 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 belongs to the same concept as the technical solution of the object baking method or object rendering method described above. 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 object baking method or object rendering method described above.
[0175] 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 object baking method or object rendering method.
[0176] 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 belongs to the same concept as the technical solution of the object baking method or object rendering method described above. 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 object baking method or object rendering method described above.
[0177] 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.
[0178] 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.
[0179] 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.
[0180] 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 of other embodiments.
[0181] 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 method of roasting an object, characterized by, The method comprises the following steps: acquiring a plurality of virtual sub-scenes and initial model data of virtual object models of the plurality of virtual sub-scenes; grouping the virtual object models based on model size and object type to obtain at least one object model group in the plurality of virtual sub-scenes; determining a detail level corresponding to each object model group based on a lens distance and setting an object baking strategy corresponding to the detail level; baking each initial model data based on the object baking strategy corresponding to the detail level to obtain baked model data of at least one object model group in the plurality of virtual sub-scenes, wherein the baked model data of a target detail level is determined based on a current lens distance of a virtual character with respect to a current virtual sub-scene, loaded and rendered in real time.
2. The method of claim 1, wherein, The method comprises the following steps: acquiring scene data of a virtual scene, wherein the virtual scene comprises virtual object models, and the scene data comprises initial model data of the virtual object models; dividing the scene data of the virtual scene based on model size and scene position of the virtual object models to obtain a plurality of virtual sub-scenes and initial model data of virtual object models of the plurality of virtual sub-scenes.
3. The method of claim 2, wherein, After the step of dividing the scene data of the virtual scene based on model size and scene position of the virtual object models to obtain a plurality of virtual sub-scenes and initial model data of virtual object models of the plurality of virtual sub-scenes, the method further comprises the following steps: setting an initial clipping distance based on scene size of the plurality of virtual sub-scenes, wherein the initial clipping distance is used to clip virtual object models in the virtual sub-scenes to avoid rendering.
4. The method according to any one of claims 1 to 3, characterized in that, The step of grouping the virtual object models based on model size and object type to obtain at least one object model group in the plurality of virtual sub-scenes comprises the following steps: dividing the virtual object models into at least one of a large object model group, a medium object model group and a small object model group based on model size; dividing the virtual object models into at least one of a basic scene object model group, an occlusion object model group, a complex material object model group, a building object model group and a curve object model group based on object type.
5. The method of claim 4, wherein, The object baking strategy corresponding to any detail level comprises at least one of the following: performing mesh merging of virtual object models in the object model group at a corresponding detail level; performing material merging of virtual object models in the object model group at a corresponding detail level; performing mesh decimation of virtual object models in the object model group at a corresponding detail level; establishing an association relationship between a building main type part and an internal object type part for virtual object models belonging to the building object model group; performing model clipping of virtual object models belonging to the curve object model group based on scene position of the virtual object models.
6. The method of claim 5, wherein, Any mesh has a corresponding shader. The step of performing mesh merging of virtual object models in the object model group at a corresponding detail level comprises the following steps: perform mesh merging of the virtual object models in the object model group with the same shader corresponding to the detail level.
7. The method of claim 1, wherein, After the baking model data of at least one object model group in the plurality of virtual sub-scenes is obtained by baking each initial model data based on the object baking strategy corresponding to the detail level, the method further includes: configuring a corresponding link component for the baking model data of the detail level, wherein the link component stores a reference to the baking model data of at least one object model group in the plurality of virtual sub-scenes, so that the baking model data of the target detail level is dynamically loaded during object rendering.
8. The method of claim 1, wherein, After the baking model data of at least one object model group in the plurality of virtual sub-scenes is obtained by baking each initial model data based on the object baking strategy corresponding to the detail level, the method further includes: generating configuration data of the plurality of virtual sub-scenes based on the baking model data of the detail level, wherein the configuration data includes a loading distance and / or a target clipping distance, the loading distance is a lens distance for determining to load the baking model data of the target detail level, and the target clipping distance is used to clip virtual object models in the virtual sub-scene at the target detail level to avoid rendering.
9. A method of object rendering, characterized by, includes: obtaining a current lens distance of a virtual character with respect to a current virtual sub-scene; determining a target detail level of at least one object model group in the current virtual sub-scene based on the current lens distance; loading baking model data of the target detail level of the at least one object model group, wherein the baking model data of the target detail level is obtained according to the method of any one of claims 1-8; rendering the baking model data to obtain a rendering result.
10. The method of claim 9, wherein, After the rendering of the baking model data to obtain a rendering result, the method further includes: continuing to perform the step of obtaining a current lens distance of a virtual character with respect to a current virtual sub-scene; in the case where the current lens distance changes, unloading the baking model data of the target detail level of the at least one object model group; and continuing to perform the step of determining a target detail level of at least one object model group in the current virtual sub-scene based on the current lens distance.
11. The method of claim 10, wherein, After the unloading of the baking model data of the target detail level of the at least one object model group, the method further includes: placing the baking model data of the target detail level of the at least one object model group into a temporary cache pool and triggering a timer, wherein the timer is used to remove the baking model data from the temporary cache pool after the timer expires; the loading of the baking model data of the target detail level of the at least one object model group includes: loading the baking model data of the target detail level of the at least one object model group from the temporary cache pool and removing the baking model data from the temporary cache pool.
12. The method of claim 11, wherein, After the loading of the baking model data of the target detail level of the at least one object model group from the temporary cache pool, the method further includes: If the loading fails, a baked model data of a target detail level of the at least one object model group is loaded from the storage medium.
13. The method of claim 9, wherein, The virtual object model comprises a building object model, and the building object model comprises an internal object type part and an external object type part; Before the rendering of the baked model data is performed to obtain a rendering result, the method further comprises: In a case where the current camera angle of the virtual character for the current virtual sub-scene changes and the current camera distance of the virtual character for the internal object type part exceeds a preset threshold, the baked model data is removed from the temporary cache pool; In a case where the current camera angle of the virtual character for the current virtual sub-scene changes and the current camera distance of the virtual character for the internal object type part does not exceed a preset threshold, it is determined whether the internal object type part is visible, and if not, the internal object type part is hidden.
14. A computing device, comprising: comprise: a memory and a processor; the memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, so as to implement the steps of the method in any one of claims 1 to 13.
15. A computer-readable storage medium, characterized in that, The computer programs / instructions are stored, and when executed by the processor, implement the steps of the method in any one of claims 1 to 13.