Model rendering method and device, equipment and medium

By filtering and optimizing the texture and geometric information of the three-dimensional model, OpenGL solves the problem of large amount of data and complex processing during loading and rendering, achieving faster loading speed and higher rendering efficiency.

CN119169175APending Publication Date: 2024-12-20北京傲星科技有限公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411284946.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

When OpenGL handles the loading and rendering of three-dimensional models, it involves reading, parsing and processing of a large amount of data, resulting in a long loading and rendering time, affecting the user experience.

Method used

By obtaining the original model information set of the target three-dimensional model, selecting updated geometric information with low similarity to other geometric information and large distances, and removing duplicate texture blocks, obtaining updated texture information, only loading necessary texture and geometric information for rendering, and adjusting Detail hierarchy and resolution to optimize the rendering process.

Benefits of technology

It significantly reduces the amount of data and processing time, shortens the loading and rendering time, improves the rendering efficiency of three-dimensional models, reduces complexity, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169175A_ABST
    Figure CN119169175A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a model rendering method and device, equipment and a medium, and relates to the technical field of three-dimensional models. The method comprises the steps that an original model information set of a target three-dimensional model is acquired, the original model information set comprises an original texture information set and an original geometric information set, and the target three-dimensional model is used for rendering a target scene; selecting updated geometric information used for rendering the target scene from the original geometric information set, the similarity between the updated geometric information and other original geometric information is lower than a first threshold value, the distance between the updated geometric information and other original geometric information is larger than a second threshold value, and removing repeated texture blocks from the original texture information set. Obtaining updated texture information for rendering the target scene; and rendering the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model. Therefore, the loading speed of the target three-dimensional model can be increased, the rendering time of the target three-dimensional model can be shortened, and the rendering efficiency of the target three-dimensional model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional model technology, and in particular to a model rendering method, device, equipment and medium. Background Art

[0002] With the leap-forward improvement in the hardware performance of terminal devices, especially the significant enhancement of core components such as the graphics processing unit (GPU) and the central processing unit (CPU), coupled with the continuous optimization of algorithm technology, the reading efficiency and rendering efficiency of 3D models are constantly improving, and the rendered scenes are becoming more and more rich and realistic. 3D model technology has shown unprecedented application potential and great value in the fields of game entertainment, virtual reality, and augmented reality.

[0003] At present, the rendering of 3D models mainly relies on a series of professional tools and libraries, among which OpenGL is one of the widely used graphics application programming interfaces (APIs). OpenGL not only supports the creation and rendering of 2D and 3D vector graphics, but also can easily control the whole process from basic graphics construction to complex scene presentation, showing extremely high flexibility and efficiency.

[0004] However, when OpenGL handles the loading and rendering tasks of 3D models, it involves reading, parsing and processing a large amount of data. The amount of data is huge and the processing is complex, which can easily lead to long loading and rendering times, thus affecting the overall user experience. Summary of the invention

[0005] Based on the above problems, the present application provides a model rendering method, device, equipment and medium, which can improve the loading speed of the target three-dimensional model, reduce the rendering time of the target three-dimensional model, and improve the rendering efficiency of the target three-dimensional model.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, the present application discloses a model rendering method, the method comprising:

[0008] Acquire an original model information set of a target three-dimensional model, wherein the original model information set includes an original texture information set and an original geometry information set, wherein the target three-dimensional model is used to render a target scene, wherein the original texture information set includes at least one of color information and texture mapping information, and wherein the original geometry information set includes at least one of vertex coordinate information and edge information;

[0009] Selecting, from the original geometric information set, updated geometric information for rendering the target scene, which has a similarity with other original geometric information lower than a first threshold and a distance with the other original geometric information greater than a second threshold, and obtaining updated texture information for rendering the target scene by removing duplicate texture blocks from the original texture information set;

[0010] The updated texture information and the updated geometric information are rendered to obtain a target scene corresponding to the target three-dimensional model.

[0011] Optionally, the method further comprises:

[0012] If the similarity between the first original texture information and the second original texture information in the original texture information set is higher than a third threshold, updated texture information for rendering the target scene is obtained by merging the first original texture information and the second original texture information.

[0013] Optionally, rendering the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model includes:

[0014] Determine the distance information between the target three-dimensional model and the current camera viewpoint;

[0015] Selecting a detail level model matching the distance information from a plurality of detail level models;

[0016] The updated texture information and the updated geometric information corresponding to the detail level model are rendered to obtain a target scene corresponding to the target three-dimensional model.

[0017] Optionally, rendering the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model includes:

[0018] Determining rendering load information of the target scene;

[0019] According to the rendering load information, adjusting the resolution of the updated texture information and / or adjusting the detail level of the updated geometric information;

[0020] The adjusted updated texture information and / or the adjusted updated geometric information are rendered to obtain a target scene corresponding to the target three-dimensional model.

[0021] Optionally, the obtaining of an original model information set of the target three-dimensional model includes:

[0022] Determining a to-be-loaded range of the target three-dimensional model;

[0023] The original model information set of the target three-dimensional model within the range to be loaded is obtained.

[0024] In a second aspect, the present application discloses a model rendering device, the device comprising: an acquisition module, a selection module and a rendering module;

[0025] The acquisition module is used to acquire an original model information set of a target three-dimensional model, wherein the original model information set includes an original texture information set and an original geometry information set, wherein the target three-dimensional model is used to render a target scene, wherein the original texture information set includes at least one of color information and texture mapping information, and wherein the original geometry information set includes at least one of vertex coordinate information and edge information;

[0026] The selection module is used to select, from the original geometric information set, updated geometric information for rendering the target scene, which has a similarity with other original geometric information lower than a first threshold and a distance with the other original geometric information greater than a second threshold, and obtain updated texture information for rendering the target scene by removing duplicate texture blocks from the original texture information set;

[0027] The rendering module is used to render the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model.

[0028] Optionally, the selection module is also used to: if the similarity between the first original texture information and the second original texture information in the original texture information set is higher than a third threshold, obtain updated texture information for rendering the target scene by merging the first original texture information and the second original texture information.

[0029] Optionally, the rendering module includes: a first rendering submodule, a second rendering submodule and a third rendering submodule;

[0030] The first rendering submodule is used to determine the distance information between the target three-dimensional model and the current camera viewpoint;

[0031] The second rendering submodule is used to select a detail level model matching the distance information from a plurality of detail level models;

[0032] The third rendering submodule is used to render the updated texture information and the updated geometric information corresponding to the detail level model to obtain a target scene corresponding to the target three-dimensional model.

[0033] Optionally, the rendering module includes: a fourth rendering module, a fifth rendering module and a sixth rendering module;

[0034] The fourth rendering module is used to determine the distance information between the target three-dimensional model and the current camera viewpoint;

[0035] The fifth rendering module is used to select a detail level model matching the distance information from a plurality of detail level models;

[0036] The sixth rendering module is used to render the updated texture information and the updated geometric information corresponding to the detail level model to obtain a target scene corresponding to the target three-dimensional model.

[0037] Optionally, the acquisition module is specifically used to: determine a range of the target three-dimensional model to be loaded; and acquire an original model information set of the target three-dimensional model within the range to be loaded.

[0038] In a third aspect, the present application discloses a computer device, the device comprising a processor and a memory:

[0039] The memory is used to store program code and transmit the program code to the processor;

[0040] The processor is used to execute the steps of the model rendering method described in the first aspect according to the instructions in the program code.

[0041] In a fourth aspect, the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the steps of the model rendering method described in the first aspect.

[0042] Compared with the prior art, this application has the following beneficial effects:

[0043] The embodiment of the present application provides a model rendering method, device, equipment and medium, the method comprising: obtaining an original model information set of a target three-dimensional model, the original model information set including an original texture information set and an original geometric information set, the target three-dimensional model is used to render a target scene; from the original geometric information set, selecting updated geometric information for rendering the target scene whose similarity with other original geometric information is lower than a first threshold and whose distance with other original geometric information is greater than a second threshold, and obtaining updated texture information for rendering the target scene by removing repeated texture blocks from the original texture information set; rendering the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model. Thus, by loading only the necessary parts of the target three-dimensional model (i.e., the updated texture information and the updated geometric information), the amount of data that needs to be read and processed can be significantly reduced, and the data transmission time from a storage device (such as a hard disk or a network) to a memory is reduced, thereby speeding up the loading speed of the target three-dimensional model. Moreover, by selecting the updated texture information and the updated geometric information for rendering, unnecessary details can be removed, thereby reducing the complexity of the target three-dimensional model, reducing the amount of data that the rendering engine needs to process, thereby shortening the rendering time of the target three-dimensional model, and improving the rendering efficiency of the target three-dimensional model. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0045] Figure 1 A flowchart of a model rendering method provided in an embodiment of the present application;

[0046] Figure 2 A flowchart of another model rendering method provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of a model rendering device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] As described above, when OpenGL handles the loading and rendering tasks of 3D models, it involves reading, parsing and processing a large amount of data. The amount of data is huge and the processing is complex, which can easily lead to long loading and rendering times, thus affecting the overall user experience.

[0049] After research, the inventors have proposed a model rendering method, device, equipment and medium. The model rendering method can significantly reduce the amount of data that needs to be read and processed by loading only the necessary parts of the target three-dimensional model (i.e., updating texture information and updating geometric information), and reduces the data transmission time from the storage device (such as a hard disk or network) to the memory, thereby speeding up the loading speed of the target three-dimensional model. In addition, by selecting the updated texture information and updated geometric information for rendering, unnecessary details can be removed, thereby reducing the complexity of the target three-dimensional model, reducing the amount of data that the rendering engine needs to process, thereby shortening the rendering time of the target three-dimensional model, and improving the rendering efficiency of the target three-dimensional model.

[0050] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] See also Figure 1 , which is a flow chart of a model rendering method provided in an embodiment of the present application. The method includes:

[0052] S101: Acquire an original model information set of a target three-dimensional model, the original model information set including an original texture information set and an original geometry information set. The target three-dimensional model is used to render a target scene. The original texture information set includes at least one of color information and texture mapping information. The original geometry information set includes at least one of vertex coordinate information and edge information.

[0053] The original texture information set describes the visual characteristics of the target 3D model surface, including but not limited to color information and texture mapping information. Among them, the color information defines the color of each part of the target 3D model. The color information can be a simple solid color, or a gradient color or pattern color, which is used to distinguish different parts of the target 3D model or to express different material effects. Texture mapping information provides more complex surface details of the target 3D model, such as texture (such as wood grain, stone grain, cloth texture, etc., used to simulate the surface texture of the object), reflectivity (used to simulate the reflection effect of the object surface), glossiness (used to define the smoothness of the object surface), etc., which can greatly enhance the realism of the rendered target scene.

[0054] The original geometric information set describes the spatial shape and structure of the target 3D model, including but not limited to vertex coordinate information and edge information. Among them, the vertex coordinate information defines the 3D position of each vertex of the target 3D model. Each vertex has a 3D coordinate (X, Y, Z), and these 3D coordinates together constitute the 3D shape of the target 3D model. By adjusting the position of the vertex, the shape and structure of the target 3D model can be changed. The edge information defines how these vertices are connected to form the basic structure of the target 3D model.

[0055] S102: Selecting updated geometric information for rendering the target scene from the original geometric information set, whose similarity with other original geometric information is lower than a first threshold and whose distance with other original geometric information is greater than a second threshold, and obtaining updated texture information for rendering the target scene by removing duplicate texture blocks from the original texture information set.

[0056] In some specific implementations, in order to reduce unnecessary data processing during the rendering process, thereby reducing the amount of computation during rendering and improving rendering efficiency, updated texture information for rendering the target scene may be selected from the original texture information set.

[0057] Specifically, the original texture information set is first analyzed to find and identify repeated texture blocks. These repeated texture blocks can be texture blocks with exactly the same texture, reflectivity, glossiness, etc., or they can be similar texture blocks that are difficult to distinguish visually. Once the repeated texture blocks are identified, the redundant copies of them are removed from the original texture information set to obtain updated texture information for rendering the target scene. The updated texture information includes all the necessary and non-duplicate texture data when rendering the target scene. Since the redundant original texture information is removed, the updated texture information obtained by screening has less data volume and faster loading speed. At the same time, it can more efficiently utilize memory and cache resources during rendering, thereby improving rendering efficiency.

[0058] In some specific implementations, in order to reduce unnecessary data processing during the rendering process, thereby reducing the amount of calculation during rendering and improving rendering efficiency, unique geometric information (that is, geometric information that is not highly similar to other geometric information and is far away from other geometric information) can also be selected from the original geometric information set as updated geometric information when rendering the target scene.

[0059] Specifically, first set the first threshold and the second threshold. Among them, the first threshold is used to measure the similarity between two geometric information. When the similarity of two geometric information is lower than the first threshold, they are considered to be unique and need to be processed separately during the rendering process to maintain the details and diversity of the rendered target scene. When the similarity of two geometric information is higher than or equal to the first threshold, they are considered to be similar, so only one geometric information can be rendered during the rendering process, or the geometric information can be optimized by other means (such as merging, instantiation, etc.), thereby improving rendering efficiency.

[0060] The second threshold is used to measure the relative position relationship of geometric information in space, and represents the maximum acceptable distance between two geometric information. When the distance between two geometric information is greater than the second threshold, they are considered to be unrelated to each other, or they need to be considered in the rendering scene, that is, they need to be processed separately during the rendering process to maintain the details and diversity of the rendered target scene. When the distance between two geometric information is less than or equal to the second threshold, they are considered to be similar, so only one geometric information can be rendered during the rendering process, or the geometric information can be optimized through other methods (such as merging, instantiation, etc.), thereby improving rendering efficiency.

[0061] Therefore, if the similarity of a piece of geometric information to all other geometric information is lower than a first threshold, and the distance between it and all other geometric information is greater than a second threshold, then the geometric information is considered as updated geometric information for rendering the target scene.

[0062] Therefore, by filtering the texture information and geometric information provided by the embodiment of the present application, the amount of calculation during rendering can be reduced and the rendering efficiency can be improved. At the same time, since the unique geometric information is retained, it can be ensured that the rendered target scene has good visual effects while maintaining details and realism.

[0063] It should be noted that this application does not limit the order of selecting updated texture information for rendering the target scene from the original texture information set and selecting updated geometric information for rendering the target scene from the original geometric information set.

[0064] S103: Rendering the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model.

[0065] In summary, the embodiment of the present application provides a model rendering method, which can significantly reduce the amount of data that needs to be read and processed by loading only the necessary parts of the target three-dimensional model (i.e., updating texture information and updating geometric information), and reduce the data transmission time from the storage device (such as a hard disk or network) to the memory, thereby speeding up the loading speed of the target three-dimensional model. In addition, by selecting updated texture information and updated geometric information for rendering, unnecessary details can be removed, thereby reducing the complexity of the target three-dimensional model, reducing the amount of data that the rendering engine needs to process, and thus shortening the rendering time of the target three-dimensional model, and improving the rendering efficiency of the target three-dimensional model.

[0066] See also Figure 2 , which is a flowchart of another model rendering method provided in an embodiment of the present application.

[0067] It should be noted that in the model rendering method disclosed in the present application, the target three-dimensional model file can be read through the Assimp library to obtain the original model information of the target three-dimensional model. This is because the Assimp library is smaller in size than OpenGL or other large graphics libraries, making it easier to integrate into the project and will not significantly increase the size of the final application. In addition, the Assimp library supports a variety of three-dimensional model file formats, which enables developers to easily load and process model data from different sources.

[0068] Furthermore, the Assimp library not only reads model data, but also performs certain preprocessing, such as coordinate conversion, skeletal animation data analysis, etc., which greatly simplifies the data processing work in the subsequent rendering process. This method is particularly suitable for processing complex scenes and large-scale data sets, which can effectively reduce the burden on the CPU and improve the overall performance of the software.

[0069] The method includes:

[0070] S201: Determine a range of a target three-dimensional model to be loaded.

[0071] Since the target 3D model may be very large and complex, loading the entire target 3D model at once may lead to problems such as insufficient memory and reduced rendering performance. Therefore, it is usually necessary to determine a reasonable range of the target 3D model to be loaded based on factors such as the current viewing angle, user interaction, and scene complexity.

[0072] Specifically, determining the range of the target 3D model to be loaded according to the current viewing angle means determining which parts of the target 3D model are located within or near the camera's viewing cone according to the position and orientation of the current camera viewpoint, and these parts of the target 3D model need to be loaded first.

[0073] Determining the scope of the target 3D model to be loaded based on user interaction means predicting which parts of the target 3D model may enter the user's field of view based on the user's operations (such as rotation, scaling, translation, etc.), and these parts of the target 3D model need to be loaded first.

[0074] Determining the scope of the target 3D model to be loaded according to the complexity of the scene means that for a complex scene, it may be necessary to assign a priority for loading the target 3D model according to the importance and urgency of the scene to ensure that the key parts of the target 3D model are loaded first.

[0075] It should be noted that the present application does not limit the specific method for determining the range to be loaded of the target three-dimensional model.

[0076] S202: Acquire an original model information set of a target three-dimensional model within a range to be loaded, wherein the original model information set includes an original texture information set and an original geometry information set. The target three-dimensional model is used to render a target scene. The original texture information set includes at least one of color information and texture mapping information. The original geometry information set includes at least one of vertex coordinate information and edge information.

[0077] In some specific implementations, in order to improve rendering efficiency and response speed, part of the original model information of the target 3D model can be selectively loaded according to actual needs. For example, if the current scene only needs to display the static appearance of the target 3D model without processing complex functions such as animation or physical simulation, then only the original texture information set and the original geometry information set of the target 3D model can be obtained, while ignoring the data related to these complex functions (such as the original animation information set and the original physical simulation information set), thereby reducing memory usage and improving rendering performance.

[0078] In other specific implementations, in order to reduce memory usage, lower storage requirements and optimize network transmission bandwidth, the acquired original texture information set can also be compressed, thereby avoiding the problem of insufficient memory and increasing latency and bandwidth consumption.

[0079] It is understandable that step S202 is similar to step S101 and will not be described in detail here.

[0080] S203: Obtain updated texture information for rendering the target scene by removing duplicate texture blocks from the original texture information set.

[0081] It is understandable that step S203 is similar to step S102 and will not be described in detail here.

[0082] S204: Selecting updated geometric information for rendering the target scene from the original geometric information set, whose similarity to other original geometric information is lower than a first threshold and whose distance to other original geometric information is greater than a second threshold.

[0083] It is understandable that step S203 is similar to step S102 and will not be described in detail here.

[0084] S205: If the similarity between the first original texture information and the second original texture information in the original texture information set is higher than a third threshold, the first original texture information and the second original texture information are merged to obtain updated texture information for rendering the target scene.

[0085] In order to reduce memory usage during rendering and improve rendering performance, similar original texture information can also be detected and merged. Specifically, the similarity between the first original texture information and the second original texture information in the original texture information set is first checked. This similarity is usually calculated by comparing the pixel data, color distribution, texture features, etc. of the two original texture information. If the calculated similarity is higher than a third threshold, then the two original texture information are visually similar enough to be merged, and the merged texture information is used as the updated texture information for rendering the target scene.

[0086] It is understandable that in most cases, merging similar texture information will not have a significant impact on the final rendering effect because they are visually close enough. Therefore, by merging similar original texture information, the amount of updated texture information stored in memory can be reduced, thereby saving memory resources.

[0087] S206: Determine the distance information between the target three-dimensional model and the current camera viewpoint.

[0088] In some specific implementations, the Level of Detail (LOD) technology can also be applied to select detail level models of different complexities based on the distance information between the target three-dimensional model and the observer (i.e., the current camera viewpoint), so as to achieve the technical effect of reducing the amount of calculation while maintaining visual quality.

[0089] S207: Selecting a detail level model that matches the distance information from the multiple detail level models.

[0090] According to the distance information obtained in step S206, a most matching level of detail model is selected from a plurality of predefined level of detail models.

[0091] Specifically, when the distance information is large (i.e., the target 3D model is far from the current camera viewpoint), a detail level model with a lower detail level (i.e., simpler and with fewer polygons) is usually selected. This is because the visual details of distant objects will be greatly simplified, and using a high-detail model will not only waste computing resources, but may also cause visual unreality due to the perspective effect. When the distance information is small (i.e., the target 3D model is close to the current camera viewpoint), a detail level model with a higher detail level (i.e., more complex and with more polygons) is usually selected to ensure that the target 3D model can provide enough details to maintain visual realism and clarity when observed at close range.

[0092] In this way, it can be ensured that when the object to be rendered is far away, the simplified version of the detail level model is sufficient to provide sufficient visual information while reducing the rendering burden; and when the object to be rendered is close, the detail level model can provide finer details.

[0093] S208: Rendering the updated texture information and updated geometric information corresponding to the detail level model to obtain a target scene corresponding to the target three-dimensional model.

[0094] In some specific implementations, the rendering load information of the target scene can also be dynamically evaluated by analyzing the usage rate of the GPU during the rendering process. The rendering load information refers to the measurement of the computing resources and time required to render a target scene, which depends on the complexity of the target three-dimensional model of the target scene (such as the number of vertices, texture resolution, number of materials, etc.), the complexity of lighting and shadow calculations, the resolution of the view (i.e., the number of pixels of the rendering output), and the frame rate requirements during real-time rendering. If the rendering load value is high, you can try to reduce the resolution of the texture to reduce the memory usage and texture sampling time of the GPU. On the contrary, if the rendering load is low and performance allows, you can increase the texture resolution to improve the image quality. Alternatively, if the rendering load value is high, you can try to select a detail level model with a lower detail level (i.e., simpler and fewer polygons) to save computing resources. On the contrary, if the rendering load is low and performance allows, you can select a detail level model with a higher detail level (i.e., more complex and more polygons) to ensure that the target three-dimensional model can provide sufficient details and maintain visual realism and clarity. Subsequently, the target scene is rendered using the adjusted updated texture information and / or the adjusted updated geometry information. Through the previous adjustments, it is possible to reduce the rendering load as much as possible and improve rendering efficiency and performance while maintaining acceptable visual effects.

[0095] It is understandable that during the rendering process, it is also necessary to be able to respond to various user operations, such as mouse dragging, wheel rolling, etc., to generate the target scene expected by the user. For example, the user may want to change the viewing angle by dragging the mouse, or to zoom in or out from the target scene corresponding to the target 3D model by rolling the wheel, so it is necessary to update the camera viewpoint and / or rendering parameters in real time according to these user operations to ensure that the rendered scene is consistent with the user's expectations.

[0096] In summary, the embodiment of the present application provides a model rendering method, which can significantly reduce the amount of data that needs to be read and processed by loading only the necessary parts of the target three-dimensional model (i.e., updating texture information and updating geometric information), and reduce the data transmission time from the storage device (such as a hard disk or network) to the memory, thereby speeding up the loading speed of the target three-dimensional model. In addition, by selecting updated texture information and updated geometric information for rendering, unnecessary details can be removed, thereby reducing the complexity of the target three-dimensional model, reducing the amount of data that the rendering engine needs to process, and thus shortening the rendering time of the target three-dimensional model, and improving the rendering efficiency of the target three-dimensional model.

[0097] See also Figure 3 , which is a model rendering device provided in an embodiment of the present application. The model rendering device 300 includes: an acquisition module 301, a selection module 302 and a rendering module 303.

[0098] An acquisition module 301 is used to acquire an original model information set of a target three-dimensional model, the original model information set including an original texture information set and an original geometry information set, the target three-dimensional model is used to render a target scene, the original texture information set includes at least one of color information and texture mapping information, and the original geometry information set includes at least one of vertex coordinate information and edge information;

[0099] A selection module 302 is used to select, from the original geometric information set, updated geometric information for rendering the target scene, which has a similarity with other original geometric information lower than a first threshold and a distance with other original geometric information greater than a second threshold, and to obtain updated texture information for rendering the target scene by removing duplicate texture blocks from the original texture information set;

[0100] The rendering module 303 is used to render the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model.

[0101] In some specific implementations, the selection module 302 is also used to: if the similarity between the first original texture information and the second original texture information in the original texture information set is higher than a third threshold, then the first original texture information and the second original texture information are merged to obtain updated texture information for rendering the target scene.

[0102] In some specific implementations, the rendering module 303 includes: a first rendering submodule, a second rendering submodule, and a third rendering submodule;

[0103] A first rendering submodule, used to determine the distance information between the target three-dimensional model and the current camera viewpoint;

[0104] A second rendering submodule is used to select a detail level model matching the distance information from a plurality of detail level models;

[0105] The third rendering submodule is used to render the updated texture information and updated geometric information corresponding to the detail level model to obtain a target scene corresponding to the target three-dimensional model.

[0106] In some specific implementations, the rendering module 303 includes: a fourth rendering module, a fifth rendering module, and a sixth rendering module;

[0107] A fourth rendering module, used to determine the distance information between the target three-dimensional model and the current camera viewpoint;

[0108] a fifth rendering module, configured to select a detail level model matching the distance information from a plurality of detail level models;

[0109] The sixth rendering module is used to render the updated texture information and updated geometric information corresponding to the detail level model to obtain a target scene corresponding to the target three-dimensional model.

[0110] In some specific implementations, the acquisition module 301 is specifically used to: determine the range of the target three-dimensional model to be loaded; and acquire the original model information set of the target three-dimensional model within the range to be loaded.

[0111] In summary, the embodiment of the present application provides a model rendering device, which can significantly reduce the amount of data that needs to be read and processed by loading only the necessary parts of the target three-dimensional model (i.e., updating texture information and updating geometric information), and reduces the data transmission time from the storage device (such as a hard disk or network) to the memory, thereby speeding up the loading speed of the target three-dimensional model. In addition, by selecting updated texture information and updated geometric information for rendering, unnecessary details can be removed, thereby reducing the complexity of the target three-dimensional model, reducing the amount of data that the rendering engine needs to process, and thus shortening the rendering time of the target three-dimensional model, and improving the rendering efficiency of the target three-dimensional model.

[0112] The embodiment of the present application also provides corresponding computer equipment and computer storage media for implementing the model rendering method provided in the embodiment of the present application.

[0113] Among them, the computer device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute instructions or codes so that the device executes a model rendering method of any embodiment of the present application.

[0114] The computer storage medium stores codes, and when the codes are executed, the device executing the codes implements the computer method described in any embodiment of the present application.

[0115] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.

[0116] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0117] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0118] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A model rendering method, characterized in that: The method comprises: Acquire an original model information set of a target three-dimensional model, wherein the original model information set includes an original texture information set and an original geometry information set, wherein the target three-dimensional model is used to render a target scene, wherein the original texture information set includes at least one of color information and texture mapping information, and wherein the original geometry information set includes at least one of vertex coordinate information and edge information; Selecting, from the original geometric information set, updated geometric information for rendering the target scene, which has a similarity with other original geometric information lower than a first threshold and a distance with the other original geometric information greater than a second threshold, and obtaining updated texture information for rendering the target scene by removing duplicate texture blocks from the original texture information set; The updated texture information and the updated geometric information are rendered to obtain a target scene corresponding to the target three-dimensional model.

2. The method according to claim 1, characterized in that The method further comprises: If the similarity between the first original texture information and the second original texture information in the original texture information set is higher than a third threshold, updated texture information for rendering the target scene is obtained by merging the first original texture information and the second original texture information.

3. The method according to claim 1, characterized in that The rendering of the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model includes: Determine the distance information between the target three-dimensional model and the current camera viewpoint; Selecting a detail level model matching the distance information from a plurality of detail level models; The updated texture information and the updated geometric information corresponding to the detail level model are rendered to obtain a target scene corresponding to the target three-dimensional model.

4. The method according to claim 1, characterized in that: The rendering of the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model includes: Determining rendering load information of the target scene; According to the rendering load information, adjusting the resolution of the updated texture information and / or adjusting the detail level of the updated geometric information; The adjusted updated texture information and / or the adjusted updated geometric information are rendered to obtain a target scene corresponding to the target three-dimensional model.

5. The method according to claim 1, characterized in that The step of obtaining the original model information set of the target three-dimensional model includes: Determining a to-be-loaded range of the target three-dimensional model; The original model information set of the target three-dimensional model within the range to be loaded is obtained.

6. A model rendering device, characterized in that: The device comprises: an acquisition module, a selection module and a rendering module; The acquisition module is used to acquire an original model information set of a target three-dimensional model, wherein the original model information set includes an original texture information set and an original geometry information set, wherein the target three-dimensional model is used to render a target scene, wherein the original texture information set includes at least one of color information and texture mapping information, and wherein the original geometry information set includes at least one of vertex coordinate information and edge information; The selection module is used to select, from the original geometric information set, updated geometric information for rendering the target scene, which has a similarity with other original geometric information lower than a first threshold and a distance with the other original geometric information greater than a second threshold, and obtain updated texture information for rendering the target scene by removing duplicate texture blocks from the original texture information set; The rendering module is used to render the updated texture information and the updated geometric information to obtain a target scene corresponding to the target three-dimensional model.

7. The device according to claim 6, characterized in that The selection module is also used for: From the original geometric information set, updated geometric information for rendering the target scene is selected, the updated geometric information having a similarity with other original geometric information lower than a first threshold and a distance with other original geometric information greater than a second threshold.

8. The device according to claim 6, characterized in that The rendering module includes: a first rendering submodule, a second rendering submodule and a third rendering submodule; The first rendering submodule is used to determine the distance information between the target three-dimensional model and the current camera viewpoint; The second rendering submodule is used to select a detail level model matching the distance information from a plurality of detail level models; The third rendering submodule is used to render the updated texture information and the updated geometric information corresponding to the detail level model to obtain a target scene corresponding to the target three-dimensional model.

9. A computer device, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of the model rendering method according to any one of claims 1 to 5 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the steps of the model rendering method according to any one of claims 1 to 5.

Citation Information

Cited By

  • Selective 3D rendering method based on three-dimensional scene

    CN119741462A

  • A Selective 3D Rendering Method Based on 3D Scenes

    CN119741462B