CN114898048A - Rendering method and device of three-dimensional model, medium and computer equipment - Google Patents

Rendering method and device of three-dimensional model, medium and computer equipment Download PDF

Info

Publication number
CN114898048A
CN114898048A CN202210600325.8A CN202210600325A CN114898048A CN 114898048 A CN114898048 A CN 114898048A CN 202210600325 A CN202210600325 A CN 202210600325A CN 114898048 A CN114898048 A CN 114898048A
Authority
CN
China
Prior art keywords
dimensional model
processing parameters
rendering
dimensions
simplified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210600325.8A
Other languages
Chinese (zh)
Inventor
黄雷
侯欣如
宗瑶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Datianmian White Sugar Technology Co ltd
Original Assignee
Beijing Datianmian White Sugar Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Datianmian White Sugar Technology Co ltd filed Critical Beijing Datianmian White Sugar Technology Co ltd
Priority to CN202210600325.8A priority Critical patent/CN114898048A/en
Publication of CN114898048A publication Critical patent/CN114898048A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Image Generation (AREA)

Abstract

The embodiment of the disclosure provides a rendering method and device of a three-dimensional model, a medium and computer equipment, wherein the method comprises the following steps: acquiring reference processing parameters of multiple dimensions; the reference processing parameter of each dimension is obtained by searching in the search space corresponding to the dimension, and each dimension corresponds to a simplified process; simplifying the target three-dimensional model based on the reference processing parameters of the multiple dimensions to obtain a simplified three-dimensional model; and rendering the simplified three-dimensional model to obtain a rendered image.

Description

Rendering method and device of three-dimensional model, medium and computer equipment
Technical Field
The present disclosure relates to the field of three-dimensional modeling technologies, and in particular, to a method and an apparatus for rendering a three-dimensional model, a medium, and a computer device.
Background
Before rendering the three-dimensional model, the three-dimensional model often needs to be simplified so as to improve rendering efficiency, which is the first requirement. The simplification mode in the related art is usually focused on a single task, only a specific part of the object representation is considered, and the simplification effect is poor.
Disclosure of Invention
In a first aspect, an embodiment of the present disclosure provides a method for rendering a three-dimensional model, where the method includes: acquiring reference processing parameters of multiple dimensions; the reference processing parameter of each dimension is obtained by searching in the search space corresponding to the dimension, and each dimension corresponds to a simplified process; simplifying the target three-dimensional model based on the reference processing parameters of the multiple dimensions to obtain a simplified three-dimensional model; and rendering the simplified three-dimensional model to obtain a rendered image.
In some embodiments, the obtaining the reference processing parameters of the plurality of dimensions includes: acquiring processing parameters of the multiple dimensions of the reference three-dimensional model; determining reference processing parameters for the plurality of dimensions based on the processing parameters for the plurality of dimensions of the reference three-dimensional model; wherein the reference three-dimensional model satisfies at least any one of the following conditions: the reference three-dimensional model and the target three-dimensional model are three-dimensional models in the same rendering scene; the reference three-dimensional model is of the same class as the target three-dimensional model.
In some embodiments, the obtaining processing parameters for the plurality of dimensions of the reference three-dimensional model comprises: simplifying the reference three-dimensional model based on the candidate processing parameters of the multiple dimensions to obtain a candidate simplified model; the candidate processing parameters of each dimension are obtained by searching in the search space corresponding to the dimension; obtaining the similarity between a first image obtained by rendering the candidate simplified model and a second image obtained by rendering the reference three-dimensional model; the first image and the second image are images under the same rendering camera view angle; and adjusting the candidate processing parameters of the multiple dimensions based on the similarity to obtain the processing parameters of the multiple dimensions of the reference three-dimensional model.
In some embodiments, the adjusting the candidate processing parameters for the plurality of dimensions based on the similarity comprises: adjusting the candidate processing parameters for at least one of the plurality of dimensions until the similarity is greater than a first similarity threshold.
In some embodiments, the method further comprises: acquiring a first low-resolution image corresponding to the first image and a second low-resolution image corresponding to the second image every time the candidate processing parameters are adjusted; determining whether a similarity between the first image and the second image is greater than the first similarity threshold if the similarity between the first low resolution image and the second low resolution image is greater than a second similarity threshold.
In some embodiments, said determining reference processing parameters for said plurality of dimensions based on processing parameters for said plurality of dimensions of said reference three-dimensional model comprises: simplifying the reference three-dimensional model based on the processing parameters of the multiple dimensions of the reference three-dimensional model to obtain a simplified reference model; rendering the simplified reference model, and determining resource occupation information during rendering; adjusting a processing parameter for at least one of the plurality of dimensions of the reference three-dimensional model based on the resource occupancy information; determining the adjusted processing parameters of the plurality of dimensions as reference processing parameters of the plurality of dimensions.
In some embodiments, the resource occupancy information includes at least one of: rendering duration, occupancy of the processor.
In some embodiments, the target three-dimensional model comprises a plurality of sub-models; the acquiring of the reference processing parameters of the multiple dimensions includes: and respectively acquiring the reference processing parameters of the multiple dimensions of each sub-model.
In a second aspect, an embodiment of the present disclosure provides an apparatus for rendering a three-dimensional model, where the apparatus includes: the acquisition module is used for acquiring reference processing parameters of multiple dimensions; the reference processing parameter of each dimension is obtained by searching in the search space corresponding to the dimension, and each dimension corresponds to a simplified process; the simplification module is used for simplifying the target three-dimensional model based on the reference processing parameters of the multiple dimensions to obtain a simplified three-dimensional model; and the rendering module is used for rendering the simplified three-dimensional model to obtain a rendered image.
In some embodiments, the obtaining module is to: acquiring processing parameters of the multiple dimensions of the reference three-dimensional model; determining reference processing parameters for the plurality of dimensions based on the processing parameters for the plurality of dimensions of the reference three-dimensional model; wherein the reference three-dimensional model satisfies at least any one of the following conditions: the reference three-dimensional model and the target three-dimensional model are three-dimensional models in the same rendering scene; the reference three-dimensional model is of the same class as the target three-dimensional model.
In some embodiments, the obtaining module is to: simplifying the reference three-dimensional model based on the candidate processing parameters of the multiple dimensions to obtain a candidate simplified model; the candidate processing parameters of each dimension are obtained by searching in the search space corresponding to the dimension; obtaining the similarity between a first image obtained by rendering the candidate simplified model and a second image obtained by rendering the reference three-dimensional model; the first image and the second image are images under the same rendering camera view angle; and adjusting the candidate processing parameters of the multiple dimensions based on the similarity to obtain the processing parameters of the multiple dimensions of the reference three-dimensional model.
In some embodiments, the obtaining module is to: adjusting the candidate processing parameters for at least one of the plurality of dimensions until the similarity is greater than a first similarity threshold.
In some embodiments, the apparatus further comprises: an image obtaining module, configured to obtain a first low-resolution image corresponding to the first image and a second low-resolution image corresponding to the second image each time the candidate processing parameter is adjusted; a determining module, configured to determine whether a similarity between the first image and the second image is greater than the first similarity threshold if the similarity between the first low-resolution image and the second low-resolution image is greater than a second similarity threshold.
In some embodiments, the obtaining module is to: simplifying the reference three-dimensional model based on the processing parameters of the multiple dimensions of the reference three-dimensional model to obtain a simplified reference model; rendering the simplified reference model, and determining resource occupation information during rendering; adjusting a processing parameter for at least one of the plurality of dimensions of the reference three-dimensional model based on the resource occupancy information; determining the adjusted processing parameters of the plurality of dimensions as reference processing parameters of the plurality of dimensions.
In some embodiments, the resource occupancy information includes at least one of: rendering duration, occupancy of the processor.
In some embodiments, the target three-dimensional model comprises a plurality of sub-models; the acquisition module is configured to: and respectively acquiring the reference processing parameters of the multiple dimensions of each sub-model.
In a third aspect, the embodiments of the present disclosure provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to any of the embodiments.
In a fourth aspect, embodiments of the present disclosure provide a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method of any embodiment when executing the program.
In the embodiment of the disclosure, the reference processing parameters of each dimension are searched from the search space corresponding to the dimension, and each dimension corresponds to one simplified processing, so that different combinations of the searched reference processing parameters can correspond to different combinations of the simplified processing modes, and different values of the reference processing parameters can correspond to the simplification degree of the simplified processing, so that the target three-dimensional model can be simplified by adopting different combinations of the simplified processing modes and the corresponding simplification degree according to actual needs, so that rendering requirements (for example, duration required by rendering, occupancy rate of a processor during rendering, and the like) of the three-dimensional model are reduced, and rendering efficiency is improved. Compared with the simplified mode focusing on a single task in the related art, the simplified mode of the embodiment of the disclosure can automatically integrate different simplified processing modes, thereby being suitable for various different tasks and being suitable for processing the representation of each part of the three-dimensional model.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a rendering method of a three-dimensional model according to an embodiment of the present disclosure.
Fig. 2 and 3 are general flow diagrams of embodiments of the present disclosure, respectively.
Fig. 4 is a block diagram of a rendering apparatus of a three-dimensional model according to an embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make the technical solutions in the embodiments of the present disclosure better understood and make the above objects, features and advantages of the embodiments of the present disclosure more comprehensible, the technical solutions in the embodiments of the present disclosure are described in further detail below with reference to the accompanying drawings.
Acquiring images of objects with complex shapes and appearances is a central goal of computer graphics and the problem can be divided into: selecting a suitable representation for shape and appearance, simplifying the three-dimensional modeling according to the selected representation, and rendering the simplified three-dimensional model. In the related art, the three-dimensional modeling can be simplified in various ways, so that the rendering requirement is reduced during rendering, and the rendering efficiency is improved. Several simplified ways are illustrated below:
(1) level of Detail (LOD) simplification. The LOD technology reduces the geometric complexity of a scene by successively simplifying the surface details of the scene under the condition of not influencing the visual effect of a picture, thereby improving the efficiency of a drawing algorithm. This technique typically builds several geometric models of different approximation accuracy for each original polyhedral model. Each model retains a certain level of detail compared to the original model. When rendering, an appropriate hierarchical model is selected to represent the object according to various criteria.
(2) The combination of shape and appearance is simplified. The simplified approach optimizes shape and surface appearance models based on mesh geometry, displacement maps, normal maps, spatially varying Bidirectional Reflectance Distribution Function (BRDF) maps, etc., to simulate the appearance of a more complex three-dimensional model. For example, for a cube model with an uneven surface, only the normal map of each vertex may be obtained, and a cube model with a flat surface may be rendered based on the normal map, so that the cube model with an uneven surface may be obtained.
(3) When rendering the animation three-dimensional model, whether the skin weight is dynamically optimized can be selected according to actual needs. The skinning weight can indicate that one vertex is affected by the movement of other vertices around the vertex, so that the rendering effect can be matched with the target animation by optimizing the skinning weight, but the rendering efficiency is reduced.
(4) And simplifying the aggregate geometry, namely rendering a plurality of adjacent vertexes as a small three-dimensional model, and combining the plurality of small three-dimensional models into a large three-dimensional model, wherein the simplification mode not only can effectively improve the rendering efficiency, but also has small influence on the visual quality.
(5) Different rendering systems are selected according to actual requirements, for example, different rendering engines are adopted.
(6) The transformation between the shape representations is performed by replacing the current three-dimensional model with a three-dimensional model similar to the current three-dimensional model.
However, the simplification manner in the related art is usually focused on a single task, only a specific part of the object representation is considered, and the simplification effect is poor.
Based on this, the present disclosure provides a rendering method of a three-dimensional model, referring to fig. 1, the method including:
step 101: acquiring reference processing parameters of multiple dimensions; the reference processing parameter of each dimension is obtained by searching in the search space corresponding to the dimension, and each dimension corresponds to a simplified process;
step 102: simplifying the target three-dimensional model based on the reference processing parameters of the multiple dimensions to obtain a simplified three-dimensional model;
step 103: and rendering the simplified three-dimensional model to obtain a rendered image.
In step 101, reference processing parameters for multiple dimensions may be obtained. Wherein each dimension corresponds to a simplification process, for example, in case the simplification process comprises an LOD process, the reference process parameter may be used to characterize the number of vertices and/or the number of meshes after the process; under the condition that the simplified processing comprises a processing mode of dynamically optimizing the skin weight, the reference processing parameter can be used for representing whether the processing mode of dynamically optimizing the skin weight is adopted or not; in the case where the simplification process includes selecting a different processing manner of the rendering system according to actual requirements, the reference processing parameter may be used to characterize the identification information of the employed rendering system. Of course, the simplified processing may also include other types of processing according to actual needs, and accordingly, the reference processing parameter may be set to other types of parameters.
Each dimension corresponds to a search space, the reference processing parameter of the dimension can be searched from the search space corresponding to the dimension, and the search space can be a continuous or discrete numerical value interval. For example, in the case where a search space is a continuous interval of values, the search space may be denoted as [ X ] 1 ,X 2 ]Thus can be in [ X ] 1 ,X 2 ]Search for the reference processing parameter for the dimension, wherein X 1 And X 2 Respectively a value lower limit and a value upper limit of the reference processing parameter in the search space. The values of the reference processing parameters can be used to characterize the degree of simplification of the simplified processing for the corresponding dimension. Taking the case that the reference processing parameter represents the number of vertices as an example, the closer the reference processing parameter is to X 2 The more the number of simplified vertexes is, the lower the LOD simplification degree is; conversely, the closer the reference process parameter is to X 1 This means that the number of vertices after simplification is smaller, i.e., the LOD simplification degree is higher.
In the case of a search space of discrete value intervals, the search space may be denoted as { Y } 1 ,Y 2 ,……,Y n I.e. the reference processing parameters in the search space include Y 1 ,Y 2 ,……,Y n These n values are taken. For example, in the case that the reference processing parameter is used to represent whether a processing method of dynamically optimizing the skinning weight is adopted, the search space may be recorded as {0,1}, where 0 represents a processing method of not adopting the dynamically optimized skinning weight, and 1 represents a processing method of adopting the dynamically optimized skinning weightAnd (4) a heavy processing mode. Likewise, the values of the reference processing parameters can be used to characterize the degree of simplification of the simplified processing for the corresponding dimension. When the value of the reference processing parameter is 0, the simplification of the dimension is performed, namely the simplification degree is high; when the reference processing parameter takes a value of 1, it means that simplification of the dimension is not performed, that is, the degree of simplification is low.
There are similarities between some three-dimensional models, and the simplification of these similar three-dimensional models is often similar. Therefore, in order to improve the processing efficiency, one three-dimensional model may be used as a reference three-dimensional model, and reference processing parameters for a plurality of dimensions of the target three-dimensional model are determined based on the processing parameters for the plurality of dimensions of the reference three-dimensional model. The processing parameters of each dimension of the reference three-dimensional model can be stored in advance and read when the target model needs to be simplified. Thus, the rendering efficiency can be effectively improved.
In some embodiments, the reference three-dimensional model satisfies at least any one of the following conditions:
(1) the reference three-dimensional model and the target three-dimensional model are three-dimensional models in the same rendering scene, and the three-dimensional models in the same rendering scene are often similar to each other, for example, building models in the same cell are similar to each other. Therefore, a certain three-dimensional model in a rendering scene can be used as a reference model, and processing parameters of each dimension of the reference model can be multiplexed on other three-dimensional models in the same rendering scene.
(2) The reference three-dimensional model is of the same class as the target three-dimensional model. There is often similarity between three-dimensional models of the same category, for example, buildings of a building category. Therefore, the class of the target three-dimensional model may be determined first, and then the three-dimensional model having the same class as the target three-dimensional model may be used as the reference model. The processing parameters of the reference model of each category may be stored in association with the category of the reference model in advance, so as to obtain the processing parameters of the reference model of the corresponding category.
In some embodiments, the processing parameters for each dimension of the reference model may be determined in the following manner: simplifying the reference three-dimensional model based on the candidate processing parameters of the multiple dimensions to obtain a candidate simplified model; the candidate processing parameters of each dimension are obtained by searching in the search space corresponding to the dimension; obtaining the similarity between a first image obtained by rendering the candidate simplified model and a second image obtained by rendering the reference three-dimensional model; the first image and the second image are images under the same rendering camera view angle; and adjusting the candidate processing parameters of the multiple dimensions based on the similarity to obtain the processing parameters of the multiple dimensions of the reference three-dimensional model.
Suppose that the candidate processing parameter of the ith dimension corresponds to the search space Q from the ith dimension i The dimension is obtained by searching, and the ith dimension corresponds to the ith simplified processing, wherein i is more than or equal to 1 and less than or equal to m, m is the total number of the dimensions, and i and m are positive integers. Then it may be based on slave Q first 1 The reference three-dimensional model is simplified by the candidate processing parameter of the 1 st dimension obtained by searching, and then is based on the Q 2 And carrying out simplification processing on the reference three-dimensional model after the simplification for the first time by using the candidate processing parameter of the 2 nd dimension obtained by searching, and repeating the steps until the simplification processing of each dimension is finished, thereby obtaining the candidate simplified model. The execution order of the simplified processing of each dimension can be determined according to actual needs. At this point, the candidate simplified model may be rendered and a first image of the rendered candidate simplified model may be taken from a rendering camera perspective (e.g., a top-down perspective or a front-view perspective). And rendering the reference three-dimensional model without simplified processing in the same rendering mode, acquiring a second image of the rendered reference three-dimensional model under the same rendering camera view angle, and then determining the similarity between the first image and the second image.
In some embodiments, the candidate processing parameters for at least one of the plurality of dimensions may be adjusted until the similarity is greater than a first similarity threshold. The embodiment may iteratively adjust the processing parameters of each dimension based on the similarity between the first image and the second image, and each iteration may adjust the processing parameters of one or more dimensions. And regenerating the candidate simplified model once every iteration, and determining the similarity between the first image and the second image of the regenerated candidate simplified model until the similarity is greater than a first similarity threshold value.
In some embodiments, the resolution of the first image and the second image tends to be higher, resulting in a larger amount of data processed in calculating the similarity. In order to reduce data processing amount and improve processing efficiency, a first low-resolution image corresponding to the first image and a second low-resolution image corresponding to the second image may be acquired each time a candidate processing parameter is adjusted; determining whether a similarity between the first image and the second image is greater than the first similarity threshold if the similarity between the first low resolution image and the second low resolution image is greater than a second similarity threshold.
To facilitate the calculation of the similarity, the first low-resolution image and the second low-resolution image may be images of the same resolution. In this embodiment, the similarity between two low-resolution images is calculated, and the similarity between corresponding high-resolution images (i.e., the first image and the second image) is calculated only when the similarity between the two low-resolution images is greater than a second similarity threshold. If the similarity between the two low-resolution images is less than or equal to the second similarity threshold, the corresponding high-resolution image does not need to be calculated, and the next iteration is directly performed. Thus, the processing efficiency can be effectively improved.
After the processing parameters of the multiple dimensions of the reference three-dimensional model are obtained, the processing parameters of the multiple dimensions of the reference three-dimensional model may be directly determined as the reference processing parameters of the multiple dimensions, or the processing parameters of the multiple dimensions of the reference three-dimensional model may be further processed to obtain the reference processing parameters of the multiple dimensions.
For example, the reference three-dimensional model may be simplified based on the processing parameters of the multiple dimensions of the reference three-dimensional model, resulting in a simplified reference model; rendering the simplified reference model, and determining resource occupation information during rendering; adjusting a processing parameter for at least one of the plurality of dimensions of the reference three-dimensional model based on the resource occupancy information; determining the adjusted processing parameters of the plurality of dimensions as reference processing parameters of the plurality of dimensions.
Wherein the resource occupancy information includes, but is not limited to, rendering duration and/or occupancy of the processor. Taking the example that the resource occupation information includes rendering duration, if the rendering duration of the simplified reference model obtained by simplifying the reference three-dimensional model based on the processing parameters of the multiple dimensions is greater than a preset duration threshold, it indicates that the current rendering duration is still beyond expectation. Moreover, because the reference three-dimensional model and the target three-dimensional model have similarity, if the target three-dimensional model is rendered by using the current processing parameters, the rendering time is more likely to be beyond expectation. Thus, the processing parameters of at least one of the plurality of dimensions may be further adjusted, for example, to reduce the number of vertices in the LOD processing dimension to further reduce rendering duration.
Similarly, in the case that the resource occupation information includes an occupancy rate of the processor, if the occupancy rate of the simplified reference model obtained by simplifying the reference three-dimensional model based on the processing parameters of the multiple dimensions on the processor during rendering is greater than a preset occupancy rate threshold (for example, 80%), it indicates that the occupancy rate of the processor during rendering is too high, which may cause system seizure and even crash. Thus, the processing parameters of at least one of the plurality of dimensions may be further adjusted to further reduce the occupancy of the processor.
In some embodiments, the target three-dimensional model includes a plurality of sub-models, and the reference processing parameters of the plurality of dimensions may be determined for each sub-model separately in the manner described in the above embodiments. The reference processing parameters of different submodels in the same dimension may be the same or different. For example, a face sub-model of a three-dimensional model of a person usually receives more attention, and a hand sub-model receives less attention, so in order to improve the visual effect, different parameter values may be set for reference processing parameters of the face sub-model and the hand sub-model in at least one dimension, where the degree of simplification corresponding to the reference processing parameters of the face sub-model is lower than that corresponding to the reference processing parameters of the hand sub-model. Therefore, on one hand, certain simplified processing can be realized, and the rendering requirement is reduced; on the other hand, the visual effect of the sub-model which is concerned more can be improved, and the visual experience of the user is ensured.
Furthermore, the reference three-dimensional model also comprises a plurality of submodels, and each submodel of the reference three-dimensional model corresponds to each submodel of the target three-dimensional model one to one. Reference processing parameters for corresponding sub-models of the target three-dimensional model in the plurality of dimensions may be determined based on processing parameters for each sub-model of a reference three-dimensional model in the plurality of dimensions. The manner of determining the processing parameters of each sub-model of the reference three-dimensional model in the multiple dimensions is similar to the manner of determining the processing parameters of the entire reference three-dimensional model in the multiple dimensions, which may be referred to in the foregoing embodiments specifically, and details are not repeated here.
In step 102, after the reference processing parameters of the multiple dimensions are acquired, the target three-dimensional model may be simplified based on the reference processing parameters of the multiple dimensions. For example, in the case that the multiple dimensions include an LOD processing dimension, a processing dimension for dynamically optimizing the skin weight, and a rendering system dimension, the reference processing parameters of the multiple dimensions correspondingly include a parameter for characterizing the number of simplified vertices, a parameter for characterizing whether to enable a dynamically optimized skin weight processing mode, and a parameter for identifying the rendering system. Based on the parameters, the three-dimensional simplification processing can be respectively carried out on the target three-dimensional model, and the simplified three-dimensional model is obtained.
In step 103, the simplified three-dimensional model may be rendered to obtain a rendered image. For example, color information may be rendered for each vertex of the simplified three-dimensional model, and the simplified three-dimensional model may also be rendered into different styles (e.g., quadratic style, digital human style, etc.). Specifically, a rendering camera view angle can be set, and an image corresponding to a model region of the simplified three-dimensional model under the rendering camera view angle is generated. For example, rendering the camera perspective toward the front of the simplified three-dimensional model, an image may be generated that includes the front of the simplified three-dimensional model.
The general flow of the embodiments of the present disclosure is described below with reference to the drawings. The multiple dimensions in this embodiment include: the method comprises the steps of combining simplified dimensions of shapes and appearances (including normal mapping baking, displacement mapping processing and material processing), LOD dimensions, dimensions for dynamically optimizing skin weights, simplified dimensions of aggregation geometry, and dimensions for extracting three-dimensional meshes from implicit curved surfaces. Unless otherwise noted, the following is described using resolution optimization of 2048 × 2048 pixels for 10k iterations, where each iteration uses random rendering camera and light positions. Referring to fig. 2, the overall process is as follows:
step 201: baking the normal map. For example, the shape and tangential space normal mapping can be automatically optimized starting from a sphere comprising 3k triangular patches to approximate a highly detailed reference three-dimensional model comprising 735k triangular patches.
Step 202: and (5) displacement mapping processing. A compact representation is obtained by dynamically subdividing a coarse basis mesh and approximating the geometry of the reference three-dimensional model by displacing the resulting vertices in the direction of the interpolated surface normal by the number read from the displacement map texture.
Step 203: and (4) material treatment. And rendering the material of the reference three-dimensional model by adopting a physical coloring shader model with a diffuse reflection lobe and an isotropic GGX mirror lobe.
Step 204: automatic cleaning of the LOD dimension. The volume of the grid is automatically reduced, and geometric elements are separated.
Step 205: and dynamically optimizing the dimension of the skinning weight. And setting the binding position vertex position, the normal, the SVBRDF and the skin weight (near the skeleton-vertex) of the reference three-dimensional model, and adding the vertex position after the blending conversion of the skinning weight so as to optimize the animation skinning by linear operation.
Step 206: simplified dimensions of the aggregate geometry. Textured quadrilaterals are used instead of complex leaf geometries. An initial guess is provided by the quadrilateral and then the parameters, shape and transparency of the material are jointly optimized according to the visual loss of the rendered image.
Step 207: shape and appearance filtering (i.e., extracting the dimensions of a three-dimensional mesh from an implicit surface). And pre-screening the automatically generated model and the adjusted material by the rendered images with ultra-low resolution (namely the first low-resolution image and the second low-resolution image) and the images with normal resolution (namely the first image and the second image).
Step 208: and repeatedly executing 201 and 207 for iterative optimization to obtain optimal reference processing parameters of multiple dimensions such as models, materials, rendering settings and the like, and exporting the parameters for software such as 3dmax, maya, unity and the like.
As shown in fig. 3, in the iterative optimization process, the potential representations (mesh and material parameters) may be rendered in a differentiable rendering pipeline (e.g., the pipeline shown in fig. 2), then a series of rasterization and deferred rendering mesh operations are performed, and an image of the reference three-dimensional model at a preset rendering camera view and lighting conditions is generated. Similarly, the reference three-dimensional model can be simplified based on the model, material and rendering setting obtained by each iteration, images of the simplified reference three-dimensional model under the same rendering camera visual angle and illumination condition are generated, the similarity of the image pair formed by the two images is calculated, and iterative optimization is performed based on the similarity. In the optimization process, a large number of image pairs can be iterated under random rendering camera views and lighting conditions. During iteration, the potential representation of the reference three-dimensional model can be gradually deformed by utilizing backward propagation and random gradient descent, an image close to the reference three-dimensional model is generated, so that reference processing parameters of all dimensions are obtained, and the reference processing parameters of all dimensions are applied to a target three-dimensional model similar to the reference three-dimensional model.
The reference processing parameters of the dimensionality are searched out from the search space corresponding to each dimensionality, and each dimensionality corresponds to one simplified processing, so that the combination mode of different searched reference processing parameters can correspond to the combination of different simplified processing modes, and different values of the reference processing parameters can correspond to the simplification degree of the simplified processing, and thus, the target three-dimensional model can be simplified by adopting the combination of different simplified processing modes and the corresponding simplification degree according to actual needs, the rendering requirement of the three-dimensional model is reduced, and the rendering efficiency is improved. Compared with the simplified mode focusing on a single task in the related art, the simplified mode of the embodiment of the disclosure can automatically integrate different simplified processing modes, thereby being suitable for various different tasks and being suitable for processing the representation of each part of the three-dimensional model.
When rendering is carried out, a user can lead the reference three-dimensional model and the simplified reference three-dimensional model into the system, and the reference processing parameters of each dimension such as the optimized reference three-dimensional model, the material of the reference three-dimensional model, the rendering setting and the like are output after automatic operation. These reference processing parameters can be used directly by importing them into rendering software or a game engine. The rendering requirement after the optimization of the system is far lower than that of the reference three-dimensional model, and the visual effect of the single frame and the visual effect of the original reference three-dimensional model can be kept consistent. The embodiment of the disclosure can be compatible with various three-dimensional models such as trees, human bodies, buildings and terrains by integrating various technologies such as model optimization, materials and rendering settings for reducing rendering requirements.
It will be understood by those of skill in the art that in the above method of the present embodiment, the order of writing the steps does not imply a strict order of execution and does not impose any limitations on the implementation, as the order of execution of the steps should be determined by their function and possibly inherent logic.
Referring to fig. 4, an embodiment of the present disclosure further provides an apparatus for rendering a three-dimensional model, where the apparatus includes:
an obtaining module 401, configured to obtain reference processing parameters of multiple dimensions; the reference processing parameter of each dimension is obtained by searching in the search space corresponding to the dimension, and each dimension corresponds to a simplified process;
a simplification module 402, configured to perform simplification processing on the target three-dimensional model based on the reference processing parameters of the multiple dimensions, so as to obtain a simplified three-dimensional model;
and a rendering module 403, configured to render the simplified three-dimensional model to obtain a rendered image.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present specification also provide a computer device, which at least includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method according to any of the foregoing embodiments when executing the program.
Fig. 5 is a schematic diagram illustrating a more specific hardware structure of a computing device according to an embodiment of the present disclosure, where the computing device may include: a processor 501, a memory 502, an input/output interface 503, a communication interface 504, and a bus 505. Wherein the processor 501, the memory 502, the input/output interface 503 and the communication interface 504 are communicatively connected to each other within the device via a bus 505.
The processor 501 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification. The processor 501 may further include a graphics card, which may be an Nvidia titan X graphics card or a 1080Ti graphics card, etc.
The Memory 502 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 502 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 502 and called to be executed by the processor 501.
The input/output interface 503 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 504 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as motion network, WIFI, Bluetooth and the like).
Bus 505 comprises a path that transfers information between the various components of the device, such as processor 501, memory 502, input/output interface 503, and communication interface 504.
It should be noted that although the above-mentioned device only shows the processor 501, the memory 502, the input/output interface 503, the communication interface 504 and the bus 505, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method of any of the foregoing embodiments.
Computer-readable media, which include both non-transitory and non-transitory, removable and non-removable media, may implement any method or technology for storage of information. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present disclosure. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.

Claims (11)

1. A method of rendering a three-dimensional model, the method comprising:
acquiring reference processing parameters of multiple dimensions; the reference processing parameter of each dimension is obtained by searching in the search space corresponding to the dimension, and each dimension corresponds to a simplified process;
simplifying the target three-dimensional model based on the reference processing parameters of the multiple dimensions to obtain a simplified three-dimensional model;
and rendering the simplified three-dimensional model to obtain a rendered image.
2. The method of claim 1, wherein the obtaining reference processing parameters for a plurality of dimensions comprises:
acquiring processing parameters of the multiple dimensions of the reference three-dimensional model;
determining reference processing parameters for the plurality of dimensions based on the processing parameters for the plurality of dimensions of the reference three-dimensional model;
wherein the reference three-dimensional model satisfies at least any one of the following conditions:
the reference three-dimensional model and the target three-dimensional model are three-dimensional models in the same rendering scene;
the reference three-dimensional model is of the same class as the target three-dimensional model.
3. The method of claim 2, wherein said obtaining processing parameters for said plurality of dimensions of the reference three-dimensional model comprises:
simplifying the reference three-dimensional model based on the candidate processing parameters of the multiple dimensions to obtain a candidate simplified model; the candidate processing parameters of each dimension are obtained by searching in the search space corresponding to the dimension;
obtaining the similarity between a first image obtained by rendering the candidate simplified model and a second image obtained by rendering the reference three-dimensional model; the first image and the second image are images under the same rendering camera view angle;
and adjusting the candidate processing parameters of the multiple dimensions based on the similarity to obtain the processing parameters of the multiple dimensions of the reference three-dimensional model.
4. The method of claim 3, wherein the adjusting the candidate processing parameters for the plurality of dimensions based on the similarity comprises:
adjusting the candidate processing parameters for at least one of the plurality of dimensions until the similarity is greater than a first similarity threshold.
5. The method of claim 4, further comprising:
acquiring a first low-resolution image corresponding to the first image and a second low-resolution image corresponding to the second image every time the candidate processing parameters are adjusted;
determining whether a similarity between the first image and the second image is greater than the first similarity threshold if the similarity between the first low resolution image and the second low resolution image is greater than a second similarity threshold.
6. The method of any of claims 2-5, wherein said determining reference processing parameters for said plurality of dimensions based on processing parameters for said plurality of dimensions of said reference three-dimensional model comprises:
simplifying the reference three-dimensional model based on the processing parameters of the multiple dimensions of the reference three-dimensional model to obtain a simplified reference model;
rendering the simplified reference model, and determining resource occupation information during rendering;
adjusting a processing parameter for at least one of the plurality of dimensions of the reference three-dimensional model based on the resource occupancy information;
determining the adjusted processing parameters of the plurality of dimensions as reference processing parameters of the plurality of dimensions.
7. The method of claim 6, wherein the resource occupancy information comprises at least one of: rendering duration, occupancy of the processor.
8. The method of any of claims 1-7, wherein the target three-dimensional model comprises a plurality of sub-models; the acquiring of the reference processing parameters of the multiple dimensions includes:
and respectively acquiring the reference processing parameters of the multiple dimensions of each sub-model.
9. An apparatus for rendering a three-dimensional model, the apparatus comprising:
the acquisition module is used for acquiring reference processing parameters of multiple dimensions; the reference processing parameter of each dimension is obtained by searching in the search space corresponding to the dimension, and each dimension corresponds to a simplified process;
the simplification module is used for simplifying the target three-dimensional model based on the reference processing parameters of the multiple dimensions to obtain a simplified three-dimensional model;
and the rendering module is used for rendering the simplified three-dimensional model to obtain a rendered image.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 8.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 8 when executing the program.
CN202210600325.8A 2022-05-27 2022-05-27 Rendering method and device of three-dimensional model, medium and computer equipment Pending CN114898048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210600325.8A CN114898048A (en) 2022-05-27 2022-05-27 Rendering method and device of three-dimensional model, medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210600325.8A CN114898048A (en) 2022-05-27 2022-05-27 Rendering method and device of three-dimensional model, medium and computer equipment

Publications (1)

Publication Number Publication Date
CN114898048A true CN114898048A (en) 2022-08-12

Family

ID=82726076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210600325.8A Pending CN114898048A (en) 2022-05-27 2022-05-27 Rendering method and device of three-dimensional model, medium and computer equipment

Country Status (1)

Country Link
CN (1) CN114898048A (en)

Similar Documents

Publication Publication Date Title
US20180012400A1 (en) Continuous and dynamic level of detail for efficient point cloud object rendering
CN107578467B (en) Three-dimensional modeling method and device for medical instrument
CN109697748B (en) Model compression processing method, model mapping processing method, model compression processing device, and storage medium
CN114746904A (en) Three-dimensional face reconstruction
US20090309877A1 (en) Soft shadow rendering
CN114373056A (en) Three-dimensional reconstruction method and device, terminal equipment and storage medium
US9019268B1 (en) Modification of a three-dimensional (3D) object data model based on a comparison of images and statistical information
JP2023519728A (en) 2D image 3D conversion method, apparatus, equipment, and computer program
US7439970B1 (en) Computer graphics
RU2680355C1 (en) Method and system of removing invisible surfaces of a three-dimensional scene
CN109377552B (en) Image occlusion calculating method, device, calculating equipment and storage medium
CN117333637A (en) Modeling and rendering method, device and equipment for three-dimensional scene
JP2023178274A (en) Method and system for generating polygon meshes approximating surfaces using root-finding and iteration for mesh vertex positions
CN114119923B (en) Three-dimensional face reconstruction method and device and electronic equipment
CN114898048A (en) Rendering method and device of three-dimensional model, medium and computer equipment
KR100693134B1 (en) Three dimensional image processing
US11941782B2 (en) GPU-based lens blur rendering using depth maps
CN111275806A (en) Parallelization real-time rendering system and method based on points
CN115228083A (en) Resource rendering method and device
Scholz et al. Level of Detail for Real-Time Volumetric Terrain Rendering.
CN116824082B (en) Virtual terrain rendering method, device, equipment, storage medium and program product
CN116012666B (en) Image generation, model training and information reconstruction methods and devices and electronic equipment
CN115830091B (en) Texture image generation method, device, equipment, storage medium and product
WO2024037116A1 (en) Three-dimensional model rendering method and apparatus, electronic device and storage medium
US11954802B2 (en) Method and system for generating polygon meshes approximating surfaces using iteration for mesh vertex positions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination