Method and device for producing layered level detail resources

By generating and integrating layered hierarchical detail model resources and surface expansion diagrams, the problem of difficult performance and quality of HLOD resource production in the prior art is solved, and efficient resource generation and optimization are achieved.

CN114155333BActive Publication Date: 2025-03-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111444581.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-03-18
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

In the prior art, it is difficult to balance operating performance and resource quality when producing layered and hierarchical details (HLOD) resources.

Method used

By obtaining the virtual model layout information and resources of the target virtual area, a layered hierarchical detail model resource is generated, and the virtual model resource is expanded, the surface expansion diagram is integrated, the target surface expansion diagram is generated, and the layered hierarchical detail map resource is finally generated based on environmental parameters.

Benefits of technology

The correlation between layered and hierarchical detailed map resources and environmental parameters is improved, resource quality is ensured, and performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114155333B_ABST
    Figure CN114155333B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for producing layered detail resources. The method integrates multiple surface expansion maps into a target surface expansion map corresponding to the layered detail model resources based on the layered detail model resources and the virtual map resources corresponding to the surface expansion map, so that the target surface expansion map is more in line with the characteristics of the layered detail model resources, and generates layered detail map resources according to environmental parameters, the target surface expansion map and the virtual map resources, so that the layered detail map resources are related to the environmental parameters, thereby improving performance while ensuring the quality of the layered detail map resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for producing hierarchical level detail resources. Background Art

[0002] The multi-level of detail (LOD) technology refers to the allocation of object rendering resources based on the location and importance of the object model's nodes in the display environment, reducing the number of faces and detail of unimportant objects, thereby achieving efficient rendering operations. The hierarchical level of detail (HLOD) technology is based on the LOD technology. Instead of dynamically simplifying a single model, it generates proxy models in clusters to achieve further optimization. The process of making HLOD resources usually requires consideration of the performance and effect of HLOD when it is used. Summary of the invention

[0003] The disclosed embodiments at least provide a method and device for producing hierarchical level detail resources.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for producing hierarchical level detail resources, including:

[0005] Acquire virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources;

[0006] Based on the virtual model layout information and the virtual model resource, generating a hierarchical level of detail model resource in the hierarchical level of detail resource;

[0007] Performing surface development processing on each of the virtual model resources to obtain a surface development diagram of each of the virtual model resources;

[0008] Based on the hierarchical level detail model resource and the virtual map resource corresponding to the surface development map, integrating a plurality of the surface development maps into a target surface development map corresponding to the hierarchical level detail model resource;

[0009] A hierarchical level of detail map resource in the hierarchical level of detail resource is generated based on the target surface unfolding map, the virtual map resource and the input environment parameters.

[0010] In an optional implementation, the step of integrating the plurality of surface development maps into a target surface development map corresponding to the layered level detail model resource based on the layered level detail model resource and the virtual map resource corresponding to the surface development map comprises:

[0011] Based on the virtual texture resource, deduplication is performed on the surface expansion map to obtain a deduplication surface expansion map;

[0012] Based on the virtual texture resource, each surface expansion image after deduplication is textured with other surface expansion images in each surface expansion image after deduplication. Figure 1 The area detection is done to obtain the deduplication of each surface expansion map. Figure 1 To regional information;

[0013] Based on the sticker Figure 1 According to the regional information, the surface development images after deduplication are rearranged and integrated in the integrated space to obtain the integrated surface development image;

[0014] Each target area in the integrated surface development map is associated with each surface of the hierarchical level of detail model resource to obtain the target surface development map.

[0015] In an optional implementation, deduplicating the surface expansion map based on the virtual texture resource to obtain the deduplicated surface expansion map includes:

[0016] For each surface unfolded image, determining a first similarity between the surface unfolded image and each other surface unfolded image in the currently remaining surface unfolded images; and determining, based on rendering strategy information corresponding to the surface unfolded image, whether a virtual texture resource corresponding to the surface unfolded image is affected by pose information of a virtual model resource corresponding to the surface unfolded image;

[0017] If the virtual texture resource of the surface expansion map is not affected by the pose information, and there is at least one other surface expansion map whose first similarity is higher than or equal to the first preset similarity in the currently remaining surface expansion maps, then the surface expansion map is removed from the currently remaining surface expansion maps;

[0018] For each surface expansion map in the currently remaining surface expansion maps, determining a second similarity between a virtual texture resource corresponding to the surface expansion map and virtual texture resources of each other surface expansion map in the currently remaining surface expansion maps;

[0019] If the virtual texture resource of the surface unfolded map is not affected by the pose information, and there is at least one other surface unfolded map whose second similarity is higher than or equal to the second preset similarity in the currently remaining surface unfolded maps, then the surface unfolded map is removed from the currently remaining surface unfolded maps to obtain the deduplicated surface unfolded map.

[0020] In an optional implementation, the step of generating the hierarchical level detail map resource in the hierarchical level detail resource based on the target surface unfolded image, the virtual map resource and the input environment parameter includes:

[0021] Based on the environmental parameters, determining a first resolution that the hierarchical level of detail model resource is expected to occupy on the screen;

[0022] Determining a second resolution of the layered level detail map resource based on the first resolution;

[0023] Based on the mapping relationship between the virtual texture resource and the surface unfolding map, the virtual texture resource is integrated into the target surface unfolding map to obtain the hierarchical level detail texture resource of the second resolution.

[0024] In an optional implementation manner, the Figure 1 The surface expansion diagrams after deduplication are rearranged and integrated in the integrated space to obtain the integrated surface expansion diagram, including:

[0025] Determine a target percentage of each surface unfolded image after deduplication to the surface area of ​​the hierarchical level of detail model resource;

[0026] Scaling each of the deduplicated surface development images based on the target size of the target surface development image and the target percentage to obtain a scaled surface development image;

[0027] Based on the sticker Figure 1 According to the regional information, each scaled surface expansion map is rearranged and integrated in the integrated space to obtain an integrated surface expansion map.

[0028] In an optional implementation manner, the method further includes:

[0029] Determining a target surface in the hierarchical level of detail model resource based on a visual effect of the hierarchical level of detail model resource;

[0030] The target surface is deleted from the hierarchical level of detail model resource, and the target surface is replaced by a preset surface to obtain a hierarchical level of detail model resource after surface reduction.

[0031] In an optional implementation manner, the method further includes:

[0032] Based on the hierarchical level of detail model resource, determining a plurality of resource reuse surfaces in the hierarchical level of detail model resource;

[0033] Based on the position information of the resource reuse surface in the hierarchical level detail map resource and the positional relationship between the resource reuse surfaces, a plurality of the resource reuse surfaces are merged into a standard surface to obtain a hierarchical level detail model resource after surface reduction.

[0034] In a second aspect, the embodiment of the present disclosure further provides a hierarchical detail resource production device, including:

[0035] An acquisition module, used to acquire virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources;

[0036] A first generating module, configured to generate a hierarchical level detail model resource in the hierarchical level detail resource based on the virtual model layout information and the virtual model resource;

[0037] A surface development module, used to perform surface development processing on each of the virtual model resources to obtain a surface development diagram of each of the virtual model resources;

[0038] An integration module, for integrating a plurality of the surface development maps into a target surface development map corresponding to the layered level detail model resource based on the layered level detail model resource and the virtual map resource corresponding to the surface development map;

[0039] The second generating module is used to generate the hierarchical level detail map resource in the hierarchical level detail resource based on the target surface unfolding map, the virtual map resource and the input environment parameters.

[0040] In an optional implementation manner, the display surface module is specifically used for:

[0041] Based on the virtual texture resource, deduplication is performed on the surface expansion map to obtain a deduplication surface expansion map;

[0042] Based on the virtual texture resource, each surface expansion image after deduplication is textured with other surface expansion images in each surface expansion image after deduplication. Figure 1 The area detection is done to obtain the deduplication of each surface expansion map. Figure 1 To regional information;

[0043] Based on the sticker Figure 1 According to the regional information, the surface development images after deduplication are rearranged and integrated in the integrated space to obtain the integrated surface development image;

[0044] Each target area in the integrated surface development map is associated with each surface of the hierarchical level of detail model resource to obtain the target surface development map.

[0045] In an optional implementation manner, when the surface development module deduplicates the surface development map based on the virtual texture resource to obtain the deduplicated surface development map, it is used to:

[0046] For each surface unfolded image, determining a first similarity between the surface unfolded image and each other surface unfolded image in the currently remaining surface unfolded images; and determining, based on rendering strategy information corresponding to the surface unfolded image, whether a virtual texture resource corresponding to the surface unfolded image is affected by pose information of a virtual model resource corresponding to the surface unfolded image;

[0047] If the virtual texture resource of the surface expansion map is not affected by the pose information, and there is at least one other surface expansion map whose first similarity is higher than or equal to the first preset similarity in the currently remaining surface expansion maps, then the surface expansion map is removed from the currently remaining surface expansion maps;

[0048] For each surface expansion map in the currently remaining surface expansion maps, determining a second similarity between a virtual texture resource corresponding to the surface expansion map and virtual texture resources of each other surface expansion map in the currently remaining surface expansion maps;

[0049] If the virtual texture resource of the surface unfolded map is not affected by the pose information, and there is at least one other surface unfolded map whose second similarity is higher than or equal to the second preset similarity in the currently remaining surface unfolded maps, then the surface unfolded map is removed from the currently remaining surface unfolded maps to obtain the deduplicated surface unfolded map.

[0050] In an optional implementation manner, the second generating module is specifically configured to:

[0051] Based on the environmental parameters, determining a first resolution that the hierarchical level of detail model resource is expected to occupy on the screen;

[0052] Determining a second resolution of the layered level detail map resource based on the first resolution;

[0053] Based on the mapping relationship between the virtual texture resource and the surface unfolding map, the virtual texture resource is integrated into the target surface unfolding map to obtain the hierarchical level detail texture resource of the second resolution.

[0054] In an optional implementation manner, the display surface module is based on the sticker Figure 1 The regional information is used to rearrange and integrate the surface expansion images after deduplication in the integrated space. When the integrated surface expansion image is obtained, it is used for:

[0055] Determine a target percentage of each surface unfolded image after deduplication to the surface area of ​​the hierarchical level of detail model resource;

[0056] Scaling each of the deduplicated surface development images based on the target size of the target surface development image and the target percentage to obtain a scaled surface development image;

[0057] Based on the sticker Figure 1 According to the regional information, each scaled surface expansion map is rearranged and integrated in the integrated space to obtain an integrated surface expansion map.

[0058] In an optional implementation, the device further includes a first surface reduction module, configured to:

[0059] Determining a target surface in the hierarchical level of detail model resource based on a visual effect of the hierarchical level of detail model resource;

[0060] The target surface is deleted from the hierarchical level of detail model resource, and the target surface is replaced by a preset surface to obtain a hierarchical level of detail model resource after surface reduction.

[0061] In an optional implementation, the device further includes a second surface reduction module, configured to:

[0062] Based on the hierarchical level of detail model resource, determining a plurality of resource reuse surfaces in the hierarchical level of detail model resource;

[0063] Based on the position information of the resource reuse surface in the hierarchical level detail map resource and the positional relationship between the resource reuse surfaces, a plurality of the resource reuse surfaces are merged into a standard surface to obtain a hierarchical level detail model resource after surface reduction.

[0064] In a third aspect, an optional implementation of the present disclosure further provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions perform the steps in the above-mentioned first aspect, or any possible implementation of the first aspect.

[0065] In a fourth aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.

[0066] The method and device for producing hierarchical detail resources provided by the embodiments of the present disclosure first obtain virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources; secondly, based on the virtual model layout information and the virtual model resources, hierarchical detail model resources in the hierarchical detail resources are generated; then, surface development processing is performed on each of the virtual model resources to obtain a surface unfolding diagram of each of the virtual model resources; thereafter, based on the hierarchical detail model resources and the virtual texture resources corresponding to the surface unfolding diagram, a plurality of the surface unfolding diagrams are integrated into a target surface unfolding diagram corresponding to the hierarchical detail model resources; finally, based on the target surface unfolding diagram, the virtual texture resources and the input environmental parameters, a hierarchical detail texture resource in the hierarchical detail resource is generated. The disclosed embodiment integrates multiple surface expansion maps into a target surface expansion map corresponding to the layered detail model resources based on the layered detail model resources and the virtual map resources corresponding to the surface expansion map, so that the target surface expansion map is more in line with the characteristics of the layered detail model resources, and generates layered detail map resources according to environmental parameters, the target surface expansion map and the virtual map resources, so that the layered detail map resources are related to the environmental parameters, thereby improving performance while ensuring the quality of the layered detail map resources.

[0067] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0069] Figure 1 A flowchart of a method for producing hierarchical level detail resources provided by an embodiment of the present disclosure is shown;

[0070] Figure 2 One of the schematic diagrams of the UV space provided by the embodiment of the present disclosure is shown;

[0071] Figure 3 The second schematic diagram of the UV space provided by the embodiment of the present disclosure is shown;

[0072] Figure 4 The third schematic diagram of the UV space provided by the embodiment of the present disclosure is shown;

[0073] Figure 5 A fourth schematic diagram of the UV space provided by an embodiment of the present disclosure is shown;

[0074] Figure 6 A schematic diagram of a hierarchical level detail resource production device provided by an embodiment of the present disclosure is shown;

[0075] Figure 7 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0077] In order to solve the technical problem that it is difficult to balance the running performance and resource quality in the production of HLOD resources in the prior art, the embodiments of the present disclosure propose a method and device for producing layered level detail resources. Based on layered level detail model resources and virtual map resources corresponding to the surface expansion map, multiple surface expansion maps are integrated into a target surface expansion map corresponding to the layered level detail model resources, so that the target surface expansion map is more in line with the characteristics of the layered level detail model resources, and layered level detail map resources are generated according to environmental parameters, the target surface expansion map and the virtual map resources, so that the layered level detail map resources are related to the environmental parameters, thereby improving performance while ensuring the quality of the layered level detail map resources.

[0078] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0079] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0080] To facilitate understanding of this embodiment, a method for producing hierarchical level detail resources disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the method for producing hierarchical level detail resources provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example, a terminal device or a server or other processing device. In some possible implementations, the method for producing hierarchical level detail resources can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0081] The following describes the method for producing hierarchical level detail resources provided by the embodiment of the present disclosure by taking the execution subject as an example of producing hierarchical level detail resources.

[0082] See also Figure 1 As shown, it is a flowchart of a method for producing hierarchical level detail resources provided by an embodiment of the present disclosure, the method comprising steps S101 to S105, wherein:

[0083] S101, obtaining virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources.

[0084] Among them, the virtual model layout information may include virtual model resource information set in the target virtual area, position information of each set virtual model resource and size information of each virtual model resource, posture information of each virtual model resource, and whether the texture information of each virtual model resource is affected by the position information and posture information.

[0085] The virtual resources may include virtual model resources and virtual texture resources corresponding to the virtual model resources. The virtual texture resources are resources rendered on the surface of the virtual model resources and used for rendering materials, colors, etc. The virtual model resources may be resources of virtual objects in the target virtual area, such as tree model resources, building model resources, character model resources, etc.

[0086] S102: Generate a hierarchical level of detail model resource in a hierarchical level of detail resource based on the virtual model layout information and the virtual model resource.

[0087] In this step, various virtual model resources may be rendered into the virtual space based on the virtual model layout information, and then the rendered virtual model resources may be merged to obtain a hierarchical level detail model resource.

[0088] S103: Perform surface development processing on each of the virtual model resources to obtain a surface development diagram of each of the virtual model resources.

[0089] In this step, after obtaining the layered level detail model resources, each virtual model resource can be subjected to surface development processing to obtain a surface development map of each virtual model resource, and the surface development map can be stored in a texture coordinate space. The texture coordinates usually have two coordinate axes, U and V, so they can be called UV coordinates. The texture coordinate space can be called UV space.

[0090] As Figure 2 and Figure 3 The figures show schematic diagrams 1 and 2 of the UV space provided in the embodiments of the present disclosure. Figure 2 It includes a surface development diagram of a rectangular virtual model resource, including 6 surface development diagrams in total; Figure 3 Included is a surface unfolding diagram of a cylinder virtual model resource, a total of 3 surface unfolding diagrams.

[0091] S104: Based on the layered level detail model resource and the virtual map resource corresponding to the surface development map, a plurality of the surface development maps are integrated into a target surface development map corresponding to the layered level detail model resource.

[0092] In this step, multiple surface unfolding maps may be merged and integrated into a target surface unfolding map based on the layered level detail model resources and the virtual map resources corresponding to the surface unfolding map.

[0093] Specifically, step S104 may include:

[0094] Based on the virtual texture resource, the surface expansion map is deduplicated to obtain a deduplicated surface expansion map; based on the virtual texture resource, each deduplicated surface expansion map is mapped with other surface expansion maps in each deduplicated surface expansion map; Figure 1 The area detection is done to obtain the deduplication of each surface expansion map. Figure 1 To regional information; based on the post Figure 1 According to the regional information, the surface expansion diagrams after deduplication are rearranged and integrated in the integrated space to obtain the integrated surface expansion diagram; each target area in the integrated surface expansion diagram is associated with each surface of the hierarchical level detail model resource to obtain the target surface expansion diagram.

[0095] When you start deduplication, you can put each surface unfolded map in the same UV space for easy subsequent processing.

[0096] In this step, since the virtual texture resources of the faces of some virtual model resources are highly similar or identical to the virtual texture resources of other faces, the surface unfolding diagram can be deduplicated. For example, there are virtual model resources A and virtual model resources B in the target virtual area. The two virtual model resources are obtained by scaling virtual model resource C. The virtual texture resources and surface unfolding diagrams of the three are exactly the same except for the size. In this case, the virtual model resources A and virtual model resources B can be associated with virtual model resource C, and the surface unfolding diagrams of virtual model resources A and virtual model resources B can be deleted. Similarly, if the similarity between the virtual texture resources of virtual model resources A and virtual model resources B and the virtual texture resources of virtual model resource C is higher than the preset similarity, since the layered level detail model resource is a solution adopted when the distance is far, it is within an acceptable range, so it can be considered that the virtual texture resources of virtual model resources A and virtual model resources B are the same as the virtual texture resources of virtual model resource C, and the surface unfolding diagrams of virtual model resources A and virtual model resources B are deleted.

[0097] However, there are some special cases. If the pose information of the virtual model resource affects the virtual texture resource of the virtual model resource, even if the virtual texture resources of the two virtual model resources are similar or the same, the rendering results may be greatly different due to the influence of the pose information in the rendering strategy information. In this case, it is impossible to directly deduplicate them. Specifically, the following steps can be used to obtain the deduplicated surface expansion map:

[0098] For each surface unfolded image, determining a first similarity between the surface unfolded image and each other surface unfolded image in the currently remaining surface unfolded images; and determining, based on rendering strategy information corresponding to the surface unfolded image, whether a virtual texture resource corresponding to the surface unfolded image is affected by pose information of a virtual model resource corresponding to the surface unfolded image;

[0099] If the virtual texture resource of the surface expansion map is not affected by the pose information, and there is at least one other surface expansion map whose first similarity is higher than or equal to the first preset similarity in the currently remaining surface expansion maps, then the surface expansion map is removed from the currently remaining surface expansion maps;

[0100] For each surface expansion map in the currently remaining surface expansion maps, determining a second similarity between a virtual texture resource corresponding to the surface expansion map and virtual texture resources of each other surface expansion map in the currently remaining surface expansion maps;

[0101] If the virtual texture resource of the surface unfolded map is not affected by the pose information, and there is at least one other surface unfolded map whose second similarity is higher than or equal to the second preset similarity in the currently remaining surface unfolded maps, then the surface unfolded map is removed from the currently remaining surface unfolded maps to obtain the deduplicated surface unfolded map.

[0102] In this way, the surface unfolding graph can be simplified without deleting the surface unfolding graph affected by the posture information.

[0103] After deduplication, the deduplication surface expansion map can be pasted Figure 1 The area detection is consistent with the surface expansion map. Figure 1 To regional information. Figure 4 As shown, it is the third schematic diagram of the UV space provided by the embodiment of the present disclosure, Figure 4 The surface development diagram a, surface development diagram b, and surface development diagram c are included, wherein the dotted line area x in the surface development diagram a and the surface development diagram b is the sticker Figure 1 To the region.

[0104] In getting the sticker Figure 1 After receiving the regional information, you can Figure 1 The information is used to rearrange and integrate the surface expansion map after insect repellent to obtain the integrated surface expansion area.

[0105] For details, please visit the Figure 1 After sending the regional information, Figure 1 The surface expansion map is rearranged according to the region information so that the surface expansion map after rearrangement is smooth. Figure 1 The consistent areas overlap, while the inconsistent areas do not intersect each other. For example, Figure 5 As shown, it is a fourth schematic diagram of the UV space provided in the embodiment of the present disclosure. Figure 5 The surface development diagram a and the surface development diagram b are pasted together. Figure 1 After rearrangement, the rearranged surface development graphs can be integrated to form an integrated surface development graph, and the total area of ​​the integrated surface development graph is minimized. For example, some irregular surface development graphs can be integrated into a surface development graph group, such as Figure 5 As shown in , the surface development diagram a and the surface development diagram b intersect with each other, so the two can be integrated into the surface development diagram group d and then the various Ian development diagram groups and the surface development diagrams that do not form a surface development diagram group can be rearranged to minimize the gaps between the various surface development diagram groups or surface development diagrams to obtain the integrated surface development diagram.

[0106] Afterwards, each target area in the integrated surface development map may be associated with each surface of the hierarchical level of detail model resource to obtain a target surface development map.

[0107] In this way, the target surface unfolding map can store fewer useless gaps and more mapping information at a certain resolution.

[0108] S105 . Generate a hierarchical level detail map resource in the hierarchical level detail resource based on the target surface unfolded image, the virtual map resource, and the input environment parameters.

[0109] In this step, the hierarchical detail map resource in the hierarchical detail resource can be generated based on the target surface unfolding map, the virtual map resource and the input environmental parameters. Specifically, the first resolution that the hierarchical detail model resource is expected to occupy in the screen can be determined based on the environmental parameters; wherein the environmental parameters may include the posture information of the virtual camera in the target virtual area, the farthest observation distance and the closest observation distance corresponding to the hierarchical detail model resource, the target scene resolution, the percentage of the hierarchical detail model in the scene and other information. Through these environmental parameters, the first resolution that the hierarchical detail model is expected to occupy can be determined. After determining the first resolution, the second resolution of the hierarchical detail map resource can be determined based on the first resolution; exemplarily, the resolution interval of the first resolution can be determined, and then the second resolution can be selected from the resolution interval according to a preset strategy. Afterwards, the virtual map resource can be integrated into the target surface unfolding map based on the mapping relationship between the virtual map resource and the surface unfolding map to obtain the hierarchical detail map resource of the second resolution.

[0110] In this way, the layered level detail map resources can be maintained at the second resolution, and the second resolution is determined based on the first resolution that the layered level detail model resources are expected to occupy on the screen, so that the layered level detail map resources of the second resolution can improve the rendering performance as much as possible while ensuring a certain quality.

[0111] In a possible implementation manner, based on the sticker Figure 1 According to the regional information, the deduplicated surface expansion diagrams are rearranged and integrated in the integrated space to obtain the integrated surface expansion diagram, and the target percentage of the surface area of ​​the hierarchical level detail model resource occupied by the deduplicated surface expansion diagrams can be determined first; then, based on the target size of the target surface expansion diagram and the target percentage, the deduplicated surface expansion diagrams are scaled to obtain the scaled surface expansion diagram, and finally, based on the texture Figure 1According to the regional information, each scaled surface expansion map is rearranged and integrated in the integrated space to obtain an integrated surface expansion map.

[0112] In this way, each surface unfolding diagram can maintain the scale ratio with the whole, reducing the probability of different fineness of each part in the layered level of detail model.

[0113] After obtaining the hierarchical level detail resource, the hierarchical level detail resource can be further optimized. For example, based on the visual effect of the hierarchical level detail model resource, the target surface in the hierarchical level detail model resource that will not be observed by the user can be determined; and the target surface can be deleted from the hierarchical level detail model resource, and replaced with a preset surface to obtain the hierarchical level detail model resource after face reduction. In this way, the number of faces of the hierarchical level detail model resource can be reduced, thereby reducing the resources required for rendering the hierarchical level detail model.

[0114] Furthermore, based on the hierarchical level detail model resource, multiple resource reuse surfaces in the hierarchical level detail model resource can be determined; the resource reuse surface can be the same surface as the virtual map resource; then, based on the position information of the resource reuse surface in the hierarchical level detail map resource and the positional relationship between the resource reuse surfaces, the multiple resource reuse surfaces can be merged into a standard surface, thereby reducing the number of faces of the hierarchical level detail model resource and obtaining the hierarchical level detail model resource with reduced faces.

[0115] The method for producing hierarchical level detail resources provided by the embodiment of the present disclosure first obtains virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources; secondly, based on the virtual model layout information and the virtual model resources, hierarchical level detail model resources in the hierarchical level detail resources are generated; then, surface development processing is performed on each of the virtual model resources to obtain a surface unfolding diagram of each of the virtual model resources; thereafter, based on the hierarchical level detail model resources and the virtual texture resources corresponding to the surface unfolding diagram, a plurality of the surface unfolding diagrams are integrated into a target surface unfolding diagram corresponding to the hierarchical level detail model resources; finally, based on the target surface unfolding diagram, the virtual texture resources and the input environmental parameters, a hierarchical level detail texture resource in the hierarchical level detail resource is generated. The disclosed embodiment integrates multiple surface expansion maps into a target surface expansion map corresponding to the layered detail model resources based on the layered detail model resources and the virtual map resources corresponding to the surface expansion map, so that the target surface expansion map is more in line with the characteristics of the layered detail model resources, and generates layered detail map resources according to environmental parameters, the target surface expansion map and the virtual map resources, so that the layered detail map resources are related to the environmental parameters, thereby improving performance while ensuring the quality of the layered detail map resources.

[0116] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0117] Based on the same inventive concept, a hierarchical detail resource production device corresponding to the hierarchical detail resource production method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned hierarchical detail resource production method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0118] Reference Figure 6 FIG. 1 is a schematic diagram of a device for producing hierarchical level detail resources provided by an embodiment of the present disclosure, wherein the device comprises:

[0119] The acquisition module 610 is used to acquire virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources;

[0120] A first generating module 620, configured to generate a hierarchical level detail model resource in the hierarchical level detail resource based on the virtual model layout information and the virtual model resource;

[0121] The surface development module 630 is used to perform surface development processing on each of the virtual model resources to obtain a surface development diagram of each of the virtual model resources;

[0122] An integration module 640, configured to integrate a plurality of the surface development maps into a target surface development map corresponding to the layered level detail model resource based on the layered level detail model resource and the virtual map resource corresponding to the surface development map;

[0123] The second generating module 650 is used to generate a hierarchical level detail map resource in the hierarchical level detail resource based on the target surface unfolding map, the virtual map resource and the input environment parameters.

[0124] In an optional implementation manner, the display surface module 630 is specifically used for:

[0125] Based on the virtual texture resource, deduplication is performed on the surface expansion map to obtain a deduplication surface expansion map;

[0126] Based on the virtual texture resource, each surface expansion image after deduplication is textured with other surface expansion images in each surface expansion image after deduplication. Figure 1 The area detection is done to obtain the deduplication of each surface expansion map. Figure 1 To regional information;

[0127] Based on the sticker Figure 1 According to the regional information, the surface development images after deduplication are rearranged and integrated in the integrated space to obtain the integrated surface development image;

[0128] Each target area in the integrated surface development map is associated with each surface of the hierarchical level of detail model resource to obtain the target surface development map.

[0129] In an optional implementation manner, when the surface development module 630 deduplicates the surface development map based on the virtual texture resource to obtain the deduplicated surface development map, it is used to:

[0130] For each surface unfolded image, determining a first similarity between the surface unfolded image and each other surface unfolded image in the currently remaining surface unfolded images; and determining, based on rendering strategy information corresponding to the surface unfolded image, whether a virtual texture resource corresponding to the surface unfolded image is affected by pose information of a virtual model resource corresponding to the surface unfolded image;

[0131] If the virtual texture resource of the surface expansion map is not affected by the pose information, and there is at least one other surface expansion map whose first similarity is higher than or equal to the first preset similarity in the currently remaining surface expansion maps, then the surface expansion map is removed from the currently remaining surface expansion maps;

[0132] For each surface expansion map in the currently remaining surface expansion maps, determining a second similarity between a virtual texture resource corresponding to the surface expansion map and virtual texture resources of each other surface expansion map in the currently remaining surface expansion maps;

[0133] If the virtual texture resource of the surface unfolded map is not affected by the pose information, and there is at least one other surface unfolded map whose second similarity is higher than or equal to the second preset similarity in the currently remaining surface unfolded maps, then the surface unfolded map is removed from the currently remaining surface unfolded maps to obtain the deduplicated surface unfolded map.

[0134] In an optional implementation manner, the second generating module 650 is specifically configured to:

[0135] Based on the environmental parameters, determining a first resolution that the hierarchical level of detail model resource is expected to occupy on the screen;

[0136] Determining a second resolution of the layered level detail map resource based on the first resolution;

[0137] Based on the mapping relationship between the virtual texture resource and the surface unfolding map, the virtual texture resource is integrated into the target surface unfolding map to obtain the hierarchical level detail texture resource of the second resolution.

[0138] In an optional implementation manner, the display surface module 630 is based on the sticker Figure 1 The regional information is used to rearrange and integrate the surface expansion images after deduplication in the integrated space. When the integrated surface expansion image is obtained, it is used for:

[0139] Determine a target percentage of each surface unfolded image after deduplication to the surface area of ​​the hierarchical level of detail model resource;

[0140] Scaling each of the deduplicated surface development images based on the target size of the target surface development image and the target percentage to obtain a scaled surface development image;

[0141] Based on the sticker Figure 1 According to the regional information, each scaled surface expansion map is rearranged and integrated in the integrated space to obtain an integrated surface expansion map.

[0142] In an optional implementation, the device further includes a first surface reduction module, configured to:

[0143] Determining a target surface in the hierarchical level of detail model resource based on a visual effect of the hierarchical level of detail model resource;

[0144] The target surface is deleted from the hierarchical level of detail model resource, and the target surface is replaced by a preset surface to obtain a hierarchical level of detail model resource after surface reduction.

[0145] In an optional implementation, the device further includes a second surface reduction module, configured to:

[0146] Based on the hierarchical level of detail model resource, determining a plurality of resource reuse surfaces in the hierarchical level of detail model resource;

[0147] Based on the position information of the resource reuse surface in the hierarchical level detail map resource and the positional relationship between the resource reuse surfaces, a plurality of the resource reuse surfaces are merged into a standard surface to obtain a hierarchical level detail model resource after surface reduction.

[0148] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0149] The present disclosure also provides an electronic device, such as Figure 7 FIG. 1 is a schematic diagram of a computer device structure provided in an embodiment of the present disclosure, including:

[0150] A processor 71 and a memory 72; the memory 72 stores machine-readable instructions executable by the processor 71, and the processor 71 is used to execute the machine-readable instructions stored in the memory 72. When the machine-readable instructions are executed by the processor 71, the processor 71 performs the following steps:

[0151] Acquire virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources;

[0152] Based on the virtual model layout information and the virtual model resource, generating a hierarchical level of detail model resource in the hierarchical level of detail resource;

[0153] Performing surface development processing on each of the virtual model resources to obtain a surface development diagram of each of the virtual model resources;

[0154] Based on the hierarchical level detail model resource and the virtual map resource corresponding to the surface development map, integrating a plurality of the surface development maps into a target surface development map corresponding to the hierarchical level detail model resource;

[0155] A hierarchical level of detail map resource in the hierarchical level of detail resource is generated based on the target surface unfolding map, the virtual map resource and the input environment parameters.

[0156] The above-mentioned memory 72 includes internal memory 721 and external memory 722; the memory 721 here is also called internal memory, which is used to temporarily store the calculation data in the processor 71, as well as the data exchanged with the external memory 722 such as the hard disk. The processor 71 exchanges data with the external memory 722 through the internal memory 721.

[0157] The embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for producing a hierarchical level of detail model resource described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0158] The computer program product of the method for producing a hierarchical level-of-detail model resource provided in the embodiment of the present disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the method for producing a hierarchical level-of-detail model resource described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0159] The present disclosure also provides a computer program, which implements any one of the methods of the aforementioned embodiments when executed by a processor. The computer program product can be implemented in hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0160] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0161] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0162] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0163] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0164] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for producing hierarchical level detail resources, characterized in that: include: Acquire virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources; Based on the virtual model layout information and the virtual model resource, generating a hierarchical level of detail model resource in the hierarchical level of detail resource; Performing surface development processing on each of the virtual model resources to obtain a surface development diagram of each of the virtual model resources; Based on the hierarchical level detail model resource and the virtual map resource corresponding to the surface development map, integrating a plurality of the surface development maps into a target surface development map corresponding to the hierarchical level detail model resource; A hierarchical level of detail map resource in the hierarchical level of detail resource is generated based on the target surface unfolding map, the virtual map resource and the input environment parameters.

2. The method according to claim 1, characterized in that The step of integrating the plurality of surface development maps into a target surface development map corresponding to the layered level detail model resource based on the layered level detail model resource and the virtual map resource corresponding to the surface development map comprises: Based on the virtual texture resource, deduplication is performed on the surface expansion map to obtain a deduplication surface expansion map; Based on the virtual texture resource, each surface expansion image after deduplication is detected with other surface expansion images in each surface expansion image after deduplication to obtain texture consistent area information of each surface expansion image after deduplication; Based on the texture consistent region information, the deduplicated surface development images are rearranged and integrated in the integrated space to obtain an integrated surface development image; Each target area in the integrated surface development map is associated with each surface of the hierarchical level of detail model resource to obtain the target surface development map.

3. The method according to claim 2, characterized in that The step of deduplicating the surface expansion map based on the virtual map resource to obtain a deduplicated surface expansion map includes: For each surface unfolded image, determining a first similarity between the surface unfolded image and each other surface unfolded image in the currently remaining surface unfolded images; and determining, based on rendering strategy information corresponding to the surface unfolded image, whether a virtual texture resource corresponding to the surface unfolded image is affected by pose information of a virtual model resource corresponding to the surface unfolded image; If the virtual texture resource of the surface expansion map is not affected by the pose information, and there is at least one other surface expansion map whose first similarity is higher than or equal to the first preset similarity in the currently remaining surface expansion maps, then the surface expansion map is removed from the currently remaining surface expansion maps; For each surface expansion map in the currently remaining surface expansion maps, determining a second similarity between a virtual texture resource corresponding to the surface expansion map and virtual texture resources of each other surface expansion map in the currently remaining surface expansion maps; If the virtual texture resource of the surface unfolded map is not affected by the pose information, and there is at least one other surface unfolded map whose second similarity is higher than or equal to the second preset similarity in the currently remaining surface unfolded maps, then the surface unfolded map is removed from the currently remaining surface unfolded maps to obtain the deduplicated surface unfolded map.

4. The method according to claim 1, characterized in that: The step of generating the hierarchical level detail map resource in the hierarchical level detail resource based on the target surface unfolded image, the virtual map resource and the input environment parameter comprises: Based on the environmental parameters, determining a first resolution that the hierarchical level of detail model resource is expected to occupy on the screen; Determining a second resolution of the layered level detail map resource based on the first resolution; Based on the mapping relationship between the virtual texture resource and the surface unfolding map, the virtual texture resource is integrated into the target surface unfolding map to obtain the hierarchical level detail texture resource of the second resolution.

5. The method according to claim 2, characterized in that: Based on the information of the consistent regions of the textures, the deduplicated surface expansion images are rearranged and integrated in the integrated space to obtain an integrated surface expansion image, including: Determine a target percentage of each surface unfolded image after deduplication to the surface area of ​​the hierarchical level of detail model resource; Scaling each of the deduplicated surface development images based on the target size of the target surface development image and the target percentage to obtain a scaled surface development image; Based on the texture consistent region information, each scaled surface expansion map is rearranged and integrated in the integrated space to obtain an integrated surface expansion map.

6. The method according to claim 1, characterized in that The method further comprises: Determining a target surface in the hierarchical level of detail model resource based on a visual effect of the hierarchical level of detail model resource; The target surface is deleted from the hierarchical level of detail model resource, and the target surface is replaced by a preset surface to obtain a hierarchical level of detail model resource after surface reduction.

7. The method according to claim 1, characterized in that The method further comprises: Based on the hierarchical level of detail model resource, determining a plurality of resource reuse surfaces in the hierarchical level of detail model resource; Based on the position information of the resource reuse surface in the hierarchical level detail map resource and the positional relationship between the resource reuse surfaces, a plurality of the resource reuse surfaces are merged into a standard surface to obtain a hierarchical level detail model resource after surface reduction.

8. A device for producing hierarchical level detail resources, characterized in that: include: An acquisition module, used to acquire virtual model layout information of a target virtual area and a plurality of virtual resources corresponding to the target virtual area; the virtual resources include virtual model resources and virtual texture resources; A first generating module, configured to generate a hierarchical level detail model resource in the hierarchical level detail resource based on the virtual model layout information and the virtual model resource; A surface development module, used to perform surface development processing on each of the virtual model resources to obtain a surface development diagram of each of the virtual model resources; An integration module, for integrating a plurality of the surface development maps into a target surface development map corresponding to the layered level detail model resource based on the layered level detail model resource and the virtual map resource corresponding to the surface development map; The second generating module is used to generate the hierarchical level detail map resource in the hierarchical level detail resource based on the target surface unfolding map, the virtual map resource and the input environment parameters.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the hierarchical level detail resource production method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the method for producing hierarchical level detail resources according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for generating virtual building model in game, processor and terminal

    CN110148203A

  • Scene rendering method and device, computer readable storage medium and computer equipment

    CN111105491A