Method and apparatus for generating hierarchical detailed models
By filtering and removing occluded resources from the model resources to be processed in the HLOD model, a layered and detailed model is generated, which solves the problem of low running efficiency of the HLOD model and achieves efficient model rendering.
Patent Information
- Application Number
- CN202111447634.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2041-11-30
AI Technical Summary
How to improve the efficiency of HLOD runtime while ensuring the quality of HLOD models, especially how to reduce the number of facets in a cluster of multiple models to improve runtime performance.
By acquiring multiple model resources to be processed, rendering the target scene, filtering out occluded model resources, and removing these resources, layered and detailed model resources are generated, reducing the complexity of the model.
While ensuring model quality, it improves operating efficiency and reduces the consumption of computing resources.
Smart Images

Figure CN114119846B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a method and apparatus for generating hierarchical detailed models. Background Technology
[0002] Hierarchical Levels of Detail (HLOD) technology builds upon Levels of Detail (LOD) technology. Instead of dynamically simplifying individual models, it generates proxy models as clusters of multiple models. By merging the models within a cluster, an HLOD model can be generated; the models in the cluster can be LOD models. The number of faces in an HLOD model typically affects its performance. Generally, the more models merged in an HLOD model, the higher the face count and the lower its performance. Improving the efficiency of HLOD runtime while maintaining model quality remains a major challenge. Summary of the Invention
[0003] This disclosure provides at least one method and apparatus for generating hierarchical detail models.
[0004] In a first aspect, embodiments of this disclosure provide a method for generating a hierarchical level detail model, including:
[0005] Acquire multiple model resources to be processed;
[0006] Based on the model resources to be processed, the target scene is rendered to obtain the rendered target scene.
[0007] Based on the rendered target scene image and the target observation area in the target scene image, the model resources to be processed are filtered to determine the first occluded model resource.
[0008] Based on the first model resource, the model resource to be processed is filtered to obtain the second model resource after removing the first model resource;
[0009] Based on the second model resource, a hierarchical detailed model resource corresponding to the target scene is generated.
[0010] In one optional implementation, the target observation area is determined through the following steps:
[0011] Obtain the trigger distance range in the target scene that triggers the switching of the hierarchical detail model resources;
[0012] Based on the trigger distance range, the target trigger area in the target scene image is determined;
[0013] The movable area of the character in the target scene is obtained, and the target observation area in the target scene is determined based on the movable area of the character and the target trigger area.
[0014] In one optional implementation, based on the rendered target scene image and the target observation area in the target scene image, the model resources to be processed are filtered to determine the first occluded model resource, including:
[0015] Based on the target space granularity, multiple target observation points are determined in the rendered target scene image;
[0016] The target scene is observed at each of the target observation points to obtain scene observation information corresponding to each of the target observation points;
[0017] Based on the scene observation information corresponding to each of the target observation points, occlusion detection is performed on the model resource to be processed to determine the first model resource that is occluded at each of the target observation points.
[0018] In one optional implementation, determining multiple target observation points in the rendered target scene image based on target spatial granularity includes:
[0019] Determine multiple horizontal coordinates in the horizontal plane of the target scene image at the target spatial granularity;
[0020] For any of the horizontal coordinates, based on the horizontal coordinates and the collision information in the target scene image, determine the vertical coordinates corresponding to the horizontal coordinates;
[0021] The target observation point is determined based on the horizontal coordinates and their corresponding vertical coordinates.
[0022] In one optional implementation, the step of performing occlusion detection on the model resource to be processed based on the scene observation information corresponding to each of the target observation points, and determining a first model resource that is occluded at each of the target observation points, includes:
[0023] For each scene observation information, based on the scene observation information, the occlusion removal process is performed on the model resources to be processed to determine the occluded model resources in each scene observation information;
[0024] The target model resource is determined based on the occluded model resources corresponding to the observation information of each scene.
[0025] In one optional implementation, the step of filtering the model resources to be processed based on the first model resources to obtain second model resources after excluding the first model resources includes:
[0026] Based on the aforementioned trigger distance range, a baseline distance is determined;
[0027] Based on the farthest visible distance of each of the model resources to be processed and the benchmark distance, a third model resource is determined whose farthest visible distance is greater than or equal to the benchmark distance;
[0028] The first model resource is removed from the third model resource to obtain the second model resource.
[0029] In one optional implementation, the method further includes:
[0030] When the user's observation position is detected to be within the target observation area, the rendering screen of the model resource to be processed displayed in the target scene is replaced with the rendering screen of the layered detail model resource.
[0031] Secondly, embodiments of this disclosure also provide a hierarchical detail model generation apparatus, comprising:
[0032] The acquisition module is used to acquire multiple model resources to be processed.
[0033] The rendering module is used to render the target scene image based on the model resource to be processed, so as to obtain the rendered target scene image.
[0034] The determination module is used to filter the model resources to be processed based on the rendered target scene image and the target observation area in the target scene image, and determine the first occluded model resource.
[0035] The filtering module is used to filter the model resources to be processed based on the first model resources to obtain the second model resources after removing the first model resources.
[0036] The generation module is used to generate a hierarchical detailed model resource corresponding to the target scene based on the second model resource.
[0037] In an optional implementation, the determining module is further configured to:
[0038] Obtain the trigger distance range in the target scene that triggers the switching of the hierarchical detail model resources;
[0039] Based on the trigger distance range, the target trigger area in the target scene image is determined;
[0040] The movable area of the character in the target scene is obtained, and the target observation area in the target scene is determined based on the movable area of the character and the target trigger area.
[0041] In one optional implementation, the determining module is specifically used for:
[0042] Based on the target space granularity, multiple target observation points are determined in the rendered target scene image;
[0043] The target scene is observed at each of the target observation points to obtain scene observation information corresponding to each of the target observation points;
[0044] Based on the scene observation information corresponding to each of the target observation points, occlusion detection is performed on the model resource to be processed to determine the first model resource that is occluded at each of the target observation points.
[0045] In an optional implementation, when determining multiple target observation points in the rendered target scene image based on target spatial granularity, the determining module is used to:
[0046] Determine multiple horizontal coordinates in the horizontal plane of the target scene image at the target spatial granularity;
[0047] For any of the horizontal coordinates, based on the horizontal coordinates and the collision information in the target scene image, determine the vertical coordinates corresponding to the horizontal coordinates;
[0048] The target observation point is determined based on the horizontal coordinates and their corresponding vertical coordinates.
[0049] In an optional implementation, the determining module, based on the scene observation information corresponding to each of the target observation points, performs occlusion detection on the model resource to be processed, and determines a first model resource where all target observation points are occluded, is used to:
[0050] For each scene observation information, based on the scene observation information, the occlusion removal process is performed on the model resources to be processed to determine the occluded model resources in each scene observation information;
[0051] The target model resource is determined based on the occluded model resources corresponding to the observation information of each scene.
[0052] In one optional implementation, the filtering module is specifically used for:
[0053] Based on the aforementioned trigger distance range, a baseline distance is determined;
[0054] Based on the farthest visible distance of each of the model resources to be processed and the benchmark distance, a third model resource is determined whose farthest visible distance is greater than or equal to the benchmark distance;
[0055] The first model resource is removed from the third model resource to obtain the second model resource.
[0056] In one optional implementation, the device further includes a replacement module for:
[0057] When the user's observation position is detected to be within the target observation area, the rendering screen of the model resource to be processed displayed in the target scene is replaced with the rendering screen of the layered detail model resource.
[0058] Thirdly, embodiments of this disclosure also provide an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.
[0059] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.
[0060] The hierarchical detail model generation method and apparatus provided in this disclosure first acquire multiple model resources to be processed; second, based on the model resources to be processed, a target scene image is rendered to obtain a rendered target scene image; then, based on the rendered target scene image and the target observation area in the target scene image, the model resources to be processed are filtered to determine the first occluded model resource; subsequently, based on the first model resource, the model resources to be processed are filtered to obtain a second model resource after removing the first model resource; finally, based on the second model resource, the hierarchical detail model resource corresponding to the target scene is generated. This disclosure reduces the complexity of the hierarchical detail model resource by filtering the model resources to be processed to determine the second model resource and removing the occluded first model resource, thereby improving operational efficiency while ensuring the quality of the hierarchical detail model resource.
[0061] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0062] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0063] Figure 1 A flowchart of a hierarchical detail model generation method provided in an embodiment of this disclosure is shown;
[0064] Figure 2 A schematic diagram of a hierarchical detail model generation apparatus provided in an embodiment of this disclosure is shown;
[0065] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present disclosure is shown. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0067] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0068] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0069] To address the technical challenge of balancing quality and performance in HLOD (High-Level Modeling), this disclosure provides a method and apparatus for generating hierarchical detail models. By screening the model resources to be processed, determining the second model resources, and removing the occluded first model resources, the complexity of the hierarchical detail model resources is reduced, thereby improving operational efficiency while ensuring the quality of the hierarchical detail model resources.
[0070] To facilitate understanding of this embodiment, a detailed description of the hierarchical model of detail generation method disclosed in this disclosure will be provided first. The execution entity of the hierarchical model of detail generation method provided in this disclosure is generally a computer device with certain computing capabilities, such as a terminal device, a server, or other processing device. In some possible implementations, the hierarchical model of detail generation method can be implemented by a processor calling computer-readable instructions stored in memory.
[0071] See Figure 1 The diagram shows a flowchart of a hierarchical detail model generation method provided in this embodiment of the present disclosure. The method includes steps S101 to S105, wherein:
[0072] S101. Obtain multiple model resources to be processed.
[0073] In this step, the model resources to be processed can be model resources within the target virtual region. By merging the model resources within the target virtual region, the HLOD model corresponding to the target virtual region can be obtained. When the distance between the user's observation position and the target virtual region is within a preset range, the HLOD is rendered to save the computing resources of the rendering screen.
[0074] Here, the model resources to be processed can be resources of various objects in the scene, such as tree model resources, building model resources, character model resources, etc.
[0075] S102. Based on the model resources to be processed, the target scene is rendered to obtain the rendered target scene.
[0076] In this step, each model resource to be processed can be rendered into the target scene image to obtain the rendered target scene image, which can include each rendered model resource to be processed.
[0077] S103. Based on the rendered target scene image and the target observation area in the target scene image, the model resources to be processed are filtered to determine the first occluded model resource.
[0078] In this step, the model resources to be processed that cannot be observed in the target observation area can be identified, namely the first model resources mentioned above. The target observation area is the area in the target scene where each model resource to be processed can be observed. If a model resource to be processed cannot be observed from the target observation area, it can be omitted from rendering.
[0079] In one possible implementation, the target observation area can be determined through the following steps:
[0080] Obtain the trigger distance range in the target scene that triggers the switching of the hierarchical detail model resources;
[0081] Based on the trigger distance range, the target trigger area in the target scene image is determined;
[0082] The movable area of the character in the target scene is obtained, and the target observation area in the target scene is determined based on the movable area of the character and the target trigger area.
[0083] In this step, the trigger distance range for switching layered detail model resources can be obtained first. When the distance between the virtual camera and the HLOD model resource is within the trigger distance range, the higher-precision model resource to be processed is replaced with the HLOD model resource, thereby reducing the computational load. Using the two ends of the trigger distance range as boundaries, a ring-shaped target trigger area can be obtained. If the virtual camera is within this area, the HLOD model resource needs to be displayed. Therefore, the first model resource can be selected within the target trigger area.
[0084] However, there are usually various models in the target trigger area. Some models have collision volumes, and the virtual camera cannot move into the interior of the collision volume. Therefore, the target observation area can be determined by using the character's movable area and the target trigger area in the target scene, so that the target observation area is as small as possible, thereby reducing the amount of computation required to determine the first model resource and improving the accuracy of screening the first model resource.
[0085] In determining the first model resource, multiple target observation points in the rendered target scene can be determined based on the target space granularity. Since the target observation area is a continuous area, it is impossible to determine the observation results at each location in the target observation area. Therefore, multiple target observation points can be determined based on the target space granularity to reduce the amount of computation.
[0086] Specifically, multiple horizontal coordinates can be determined in the horizontal plane of the target scene image at the target spatial granularity; then, for any horizontal coordinate, a vertical coordinate corresponding to the horizontal coordinate is determined based on the horizontal coordinate and the collision information in the target scene image; finally, the target observation point is determined based on the horizontal coordinate and its corresponding vertical coordinate.
[0087] Subsequently, the target scene can be observed at each of the target observation points to obtain scene observation information corresponding to each target observation point. For example, the surrounding environment can be observed from the target observation point. Multiple horizontal observation angles can be set, and each observation angle corresponds to a scene observation information. For example, the observation angle can be set to 60 degrees, so that a target observation point corresponds to a total of 6 scene observation information.
[0088] Finally, based on the scene observation information corresponding to each of the target observation points, occlusion detection can be performed on the model resource to be processed to determine the first model resource that is occluded at each of the target observation points.
[0089] Specifically, for each scene observation, occlusion culling can be performed on the model resources to be processed based on the scene observation information to determine the occluded model resources in each scene observation. Occlusion culling can remove invisible virtual models by consuming a small portion of the CPU's computing resources, reducing the load on the graphics processor without changing the final rendered image. Then, the target model resources can be determined based on the occluded model resources corresponding to each scene observation.
[0090] S104. Based on the first model resource, the model resource to be processed is filtered to obtain the second model resource after removing the first model resource.
[0091] In this step, the first model resource can be filtered out from the model resources to be processed, resulting in the second model resource. The second model resource is the model in the cluster used to generate the HLOD model resource.
[0092] Specifically, a baseline distance can be determined based on the trigger distance range. This baseline distance can be within the trigger distance range, at the maximum boundary of the trigger distance range, or slightly above the maximum boundary. After obtaining the baseline distance, a third model resource whose maximum visible distance is greater than or equal to the baseline distance can be determined based on the farthest visible distance of each of the model resources to be processed and the baseline distance. Finally, the first model resource is removed from the third model resource to obtain the second model resource. The maximum visible distance can be one of the attributes of the model resource to be processed.
[0093] In this way, model resources with a maximum visible distance lower than the baseline distance can also be filtered out from the model resources to be processed, thereby further reducing the number of model resources.
[0094] S105. Based on the second model resource, generate a hierarchical detail model resource corresponding to the target scene.
[0095] In this step, the selected second model resources can be used to generate hierarchical detailed model resources, so that the resulting HLOD model has fewer faces and requires less computational resources, while ensuring the quality of HLOD.
[0096] The hierarchical detail model generation method provided in this disclosure first acquires multiple model resources to be processed; second, based on the model resources to be processed, a target scene image is rendered to obtain a rendered target scene image; then, based on the rendered target scene image and the target observation area in the target scene image, the model resources to be processed are filtered to determine the first occluded model resource; subsequently, based on the first model resource, the model resources to be processed are filtered to obtain a second model resource after removing the first model resource; finally, based on the second model resource, the hierarchical detail model resource corresponding to the target scene is generated. This disclosure reduces the complexity of the hierarchical detail model resource by filtering the model resources to be processed to determine the second model resource and removing the occluded first model resource, thereby improving operational efficiency while ensuring the quality of the hierarchical detail model resource.
[0097] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0098] Based on the same inventive concept, this disclosure also provides a hierarchical level detail model generation device corresponding to the hierarchical level detail model generation method. Since the principle of the device in this disclosure for solving the problem is similar to the hierarchical level detail model generation method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0099] Reference Figure 2 The diagram shown is a schematic of a hierarchical detail model generation apparatus provided in an embodiment of this disclosure, comprising:
[0100] Module 210 is used to acquire multiple model resources to be processed;
[0101] The rendering module 220 is used to render the target scene image based on the model resource to be processed, so as to obtain the rendered target scene image.
[0102] The determination module 230 is used to filter the model resources to be processed based on the rendered target scene image and the target observation area in the target scene image, and determine the first occluded model resource.
[0103] The filtering module 240 is used to filter the model resources to be processed based on the first model resources to obtain the second model resources after removing the first model resources;
[0104] The generation module 250 is used to generate a hierarchical detail model resource corresponding to the target scene based on the second model resource.
[0105] In an optional implementation, the determining module 230 is further configured to:
[0106] Obtain the trigger distance range in the target scene that triggers the switching of the hierarchical detail model resources;
[0107] Based on the trigger distance range, the target trigger area in the target scene image is determined;
[0108] The movable area of the character in the target scene is obtained, and the target observation area in the target scene is determined based on the movable area of the character and the target trigger area.
[0109] In one optional implementation, the determining module 230 is specifically used for:
[0110] Based on the target space granularity, multiple target observation points are determined in the rendered target scene image;
[0111] The target scene is observed at each of the target observation points to obtain scene observation information corresponding to each of the target observation points;
[0112] Based on the scene observation information corresponding to each of the target observation points, occlusion detection is performed on the model resource to be processed to determine the first model resource that is occluded at each of the target observation points.
[0113] In an optional implementation, when determining multiple target observation points in the rendered target scene image based on target spatial granularity, the determining module 230 is used to:
[0114] Determine multiple horizontal coordinates in the horizontal plane of the target scene image at the target spatial granularity;
[0115] For any of the horizontal coordinates, based on the horizontal coordinates and the collision information in the target scene image, determine the vertical coordinates corresponding to the horizontal coordinates;
[0116] The target observation point is determined based on the horizontal coordinates and their corresponding vertical coordinates.
[0117] In an optional implementation, the determining module 230, based on the scene observation information corresponding to each of the target observation points, performs occlusion detection on the model resource to be processed, and determines a first model resource where all the target observation points are occluded, is used to:
[0118] For each scene observation information, based on the scene observation information, the occlusion removal process is performed on the model resources to be processed to determine the occluded model resources in each scene observation information;
[0119] The target model resource is determined based on the occluded model resources corresponding to the observation information of each scene.
[0120] In one optional implementation, the filtering module 240 is specifically used for:
[0121] Based on the aforementioned trigger distance range, a baseline distance is determined;
[0122] Based on the farthest visible distance of each of the model resources to be processed and the benchmark distance, a third model resource is determined whose farthest visible distance is greater than or equal to the benchmark distance;
[0123] The first model resource is removed from the third model resource to obtain the second model resource.
[0124] In one optional implementation, the device further includes a replacement module for:
[0125] When the user's observation position is detected to be within the target observation area, the rendering screen of the model resource to be processed displayed in the target scene is replaced with the rendering screen of the layered detail model resource.
[0126] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0127] Corresponding to Figure 1 The method for generating hierarchical detail models in the present disclosure also provides an electronic device 300, such as... Figure 3 The diagram shown is a structural schematic of an electronic device 300 provided in an embodiment of this disclosure, including:
[0128] The system includes a processor 31, a memory 32, and a bus 33. The memory 32 stores execution instructions and includes main memory 321 and external memory 322. The main memory 321, also called internal memory, temporarily stores the computational data in the processor 31, as well as data exchanged with external memory such as a hard disk. The processor 31 exchanges data with the external memory 322 through the main memory 321. When the electronic device 300 is running, the processor 31 communicates with the memory 32 through the bus 33, causing the processor 31 to execute the following instructions:
[0129] Acquire multiple model resources to be processed;
[0130] Based on the model resources to be processed, the target scene is rendered to obtain the rendered target scene.
[0131] Based on the rendered target scene image and the target observation area in the target scene image, the model resources to be processed are filtered to determine the first occluded model resource.
[0132] Based on the first model resource, the model resource to be processed is filtered to obtain the second model resource after removing the first model resource;
[0133] Based on the second model resource, a hierarchical detailed model resource corresponding to the target scene is generated.
[0134] In an optional implementation, the processor 31 is further configured to perform:
[0135] Obtain the trigger distance range in the target scene that triggers the switching of the hierarchical detail model resources;
[0136] Based on the trigger distance range, the target trigger area in the target scene image is determined;
[0137] The movable area of the character in the target scene is obtained, and the target observation area in the target scene is determined based on the movable area of the character and the target trigger area.
[0138] In one optional implementation, the instructions executed by the processor 31 include filtering the model resources to be processed based on the rendered target scene image and the target observation area in the target scene image to determine the first occluded model resource, including:
[0139] Based on the target space granularity, multiple target observation points are determined in the rendered target scene image;
[0140] The target scene is observed at each of the target observation points to obtain scene observation information corresponding to each of the target observation points;
[0141] Based on the scene observation information corresponding to each of the target observation points, occlusion detection is performed on the model resource to be processed to determine the first model resource that is occluded at each of the target observation points.
[0142] In one optional implementation, the instructions executed by the processor 31, including determining multiple target observation points in the rendered target scene image based on target spatial granularity, include:
[0143] Determine multiple horizontal coordinates in the horizontal plane of the target scene image at the target spatial granularity;
[0144] For any of the horizontal coordinates, based on the horizontal coordinates and the collision information in the target scene image, determine the vertical coordinates corresponding to the horizontal coordinates;
[0145] The target observation point is determined based on the horizontal coordinates and their corresponding vertical coordinates.
[0146] In an optional implementation, the instructions executed by the processor 31, including the step of performing occlusion detection on the model resource to be processed based on the scene observation information corresponding to each of the target observation points, and determining a first model resource that is occluded at each of the target observation points, include:
[0147] For each scene observation information, based on the scene observation information, the occlusion removal process is performed on the model resources to be processed to determine the occluded model resources in each scene observation information;
[0148] The target model resource is determined based on the occluded model resources corresponding to the observation information of each scene.
[0149] In an optional implementation, the instructions executed by the processor 31, wherein filtering the model resources to be processed based on the first model resources to obtain second model resources after excluding the first model resources, includes:
[0150] Based on the aforementioned trigger distance range, a baseline distance is determined;
[0151] Based on the farthest visible distance of each of the model resources to be processed and the benchmark distance, a third model resource is determined whose farthest visible distance is greater than or equal to the benchmark distance;
[0152] The first model resource is removed from the third model resource to obtain the second model resource.
[0153] In an optional implementation, the processor 31 is further configured to perform:
[0154] When the user's observation position is detected to be within the target observation area, the rendering screen of the model resource to be processed displayed in the target scene is replaced with the rendering screen of the layered detail model resource.
[0155] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the hierarchical detail model generation method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0156] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the hierarchical detail model generation method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0157] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0158] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0159] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0160] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0161] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0162] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for generating hierarchical detailed models, characterized in that, include: Acquire multiple model resources to be processed; Based on the model resources to be processed, the target scene is rendered to obtain the rendered target scene. Based on the rendered target scene image and the target observation area in the target scene image, the model resources to be processed are filtered to determine the first occluded model resource. Based on the first model resource, the model resource to be processed is filtered to obtain the second model resource after removing the first model resource; Based on the second model resource, a hierarchical detailed model resource corresponding to the target scene is generated. The step of filtering the model resources to be processed based on the rendered target scene image and the target observation area in the target scene image to determine the first occluded model resource includes: Based on the target space granularity, multiple target observation points are determined in the rendered target scene image; The target scene image is observed at each of the target observation points to obtain scene observation information corresponding to each target observation point; and Based on the scene observation information corresponding to each of the target observation points, occlusion detection is performed on the model resource to be processed to determine the first model resource that is occluded at all the target observation points. The step of filtering the model resources to be processed based on the first model resources to obtain the second model resources after excluding the first model resources includes: Based on the trigger distance range that triggers the switching of the hierarchical detail model resources in the target scene, a baseline distance is determined; Based on the farthest visible distance of each of the aforementioned model resources to be processed and the reference distance, a third model resource is determined whose farthest visible distance is greater than or equal to the reference distance; and The first model resource is removed from the third model resource to obtain the second model resource.
2. The method according to claim 1, characterized in that, The target observation area is determined by the following steps: Obtain the trigger distance range in the target scene that triggers the switching of the hierarchical detail model resources; Based on the trigger distance range, the target trigger area in the target scene image is determined; The movable area of the character in the target scene is obtained, and the target observation area in the target scene is determined based on the movable area of the character and the target trigger area.
3. The method according to claim 1, characterized in that, The determination of multiple target observation points in the rendered target scene image based on target spatial granularity includes: Determine multiple horizontal coordinates in the horizontal plane of the target scene image at the target spatial granularity; For any of the horizontal coordinates, based on the horizontal coordinates and the collision information in the target scene image, determine the vertical coordinates corresponding to the horizontal coordinates; The target observation point is determined based on the horizontal coordinates and their corresponding vertical coordinates.
4. The method according to claim 1, characterized in that, The step of performing occlusion detection on the model resource to be processed based on the scene observation information corresponding to each of the target observation points, and determining the first model resource that is occluded at each of the target observation points, includes: For each scene observation information, based on the scene observation information, the occlusion removal process is performed on the model resources to be processed to determine the occluded model resources in each scene observation information; The target model resource is determined based on the occluded model resources corresponding to the observation information of each scene.
5. The method according to claim 1, characterized in that, The method further includes: When the user's observation position is detected to be within the target observation area, the rendering screen of the model resource to be processed displayed in the target scene is replaced with the rendering screen of the layered detail model resource.
6. A device for generating hierarchical detailed models, characterized in that, include: The acquisition module is used to acquire multiple model resources to be processed. The rendering module is used to render the target scene image based on the model resource to be processed, so as to obtain the rendered target scene image. The determination module is used to filter the model resources to be processed based on the rendered target scene image and the target observation area in the target scene image, and determine the first occluded model resource. The filtering module is used to filter the model resources to be processed based on the first model resources to obtain the second model resources after removing the first model resources. The generation module is used to generate a hierarchical detail model resource corresponding to the target scene based on the second model resource. The step of filtering the model resources to be processed based on the rendered target scene image and the target observation area in the target scene image to determine the first occluded model resource includes: Based on the target space granularity, multiple target observation points are determined in the rendered target scene image; The target scene image is observed at each of the target observation points to obtain scene observation information corresponding to each target observation point; and Based on the scene observation information corresponding to each of the target observation points, occlusion detection is performed on the model resource to be processed to determine the first model resource that is occluded at all the target observation points. The step of filtering the model resources to be processed based on the first model resources to obtain the second model resources after excluding the first model resources includes: Based on the trigger distance range that triggers the switching of the hierarchical detail model resources in the target scene, a baseline distance is determined; Based on the farthest visible distance of each of the aforementioned model resources to be processed and the reference distance, a third model resource is determined whose farthest visible distance is greater than or equal to the reference distance; and The first model resource is removed from the third model resource to obtain the second model resource.
7. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the hierarchical detail model generation method as described in any one of claims 1 to 5 are performed.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the hierarchical detail model generation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Scene rendering method and device, computer readable storage medium and computer equipment
CN111105491A