Model rendering method, device, electronic device and computer-readable medium

By receiving the model access address, loading and adjusting parameters, mapping and unfolding, and baking the 3D model, the rendering problem caused by incomplete 3D model information is solved, and complete data support and efficient rendering effects are achieved.

CN119850819BActive Publication Date: 2025-09-19WEIZHANSHI (BEIJING) DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411930840.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-09-19
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In the prior art, when rendering a three-dimensional model, the rendering effect is poor or even impossible due to incomplete three-dimensional model information.

Method used

By receiving the model access address, loading the initial 3D model, performing parameter adjustment, mapping, expansion and baking, generating a 3D model rendering, and exporting the rendering results according to user requests.

Benefits of technology

It ensures that automatic unfolding and baking can be performed when 3D model information is missing, providing complete data support for subsequent rendering and output, and avoiding poor rendering effects or even the inability to render.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850819B_ABST
    Figure CN119850819B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a model rendering method, device, electronic device and computer-readable medium. A specific implementation of the method includes: receiving a model access address sent by a target user; loading an initial three-dimensional model; adjusting parameters of the initial three-dimensional model; mapping and expanding the adjusted three-dimensional model; baking the expanded three-dimensional model; rendering the baked three-dimensional model; receiving an export request sent by a target user, and determining a target export format; generating a three-dimensional model rendering corresponding to the target export format, and exporting the three-dimensional model rendering. This implementation ensures that the model can be automatically expanded and baked when the three-dimensional model information is missing, providing complete data support for subsequent rendering and output, thereby avoiding the situation where the rendered three-dimensional model has a poor effect or even the three-dimensional model cannot be rendered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a model rendering method, device, electronic device, and computer-readable medium. Background Art

[0002] 3D model rendering technology plays a vital role in the generation of 3D models. When performing 3D model rendering, the method usually adopted is: according to the 3D model information, the obtained 3D model is rendered to generate a rendering effect image.

[0003] However, when using the above method to render a 3D model, the following technical problems often occur:

[0004] The uploaded 3D model information may be incomplete, resulting in poor rendering quality of the 3D model or even failure to render the 3D model.

[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the Invention

[0006] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0007] Some embodiments of the present disclosure provide a model rendering method, apparatus, electronic device, and computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.

[0008] In a first aspect, some embodiments of the present disclosure provide a model rendering method, which includes: receiving a model access address sent by a target user; loading an initial three-dimensional model according to the above-mentioned model access address and a preset model format; in response to receiving adjustment information for the above-mentioned initial three-dimensional model sent by the above-mentioned target user, adjusting the parameters of the above-mentioned initial three-dimensional model according to the above-mentioned adjustment information to generate a parameter-adjusted three-dimensional model; mapping and expanding the above-mentioned parameter-adjusted three-dimensional model to generate an expanded three-dimensional model; baking the above-mentioned expanded three-dimensional model to generate a baked three-dimensional model; performing effect rendering processing on the above-mentioned baked three-dimensional model according to the above-mentioned baked three-dimensional model to generate a three-dimensional model effect graph; receiving an export request sent by the above-mentioned target user, and determining a target export format according to the above-mentioned export request; generating a three-dimensional model effect graph corresponding to the above-mentioned target export format, and exporting the above-mentioned three-dimensional model effect graph.

[0009] In a second aspect, some embodiments of the present disclosure provide a model rendering device, which includes: a first receiving unit, configured to receive a model access address sent by a target user; a loading unit, configured to load an initial three-dimensional model according to the above-mentioned model access address and a preset model format; a parameter adjustment unit, configured to, in response to receiving adjustment information for the above-mentioned initial three-dimensional model sent by the above-mentioned target user, perform parameter adjustment processing on the above-mentioned initial three-dimensional model according to the above-mentioned adjustment information, so as to generate a parameter-adjusted three-dimensional model; a mapping and expansion unit, configured to perform mapping and expansion processing on the above-mentioned parameter-adjusted three-dimensional model to generate an expanded three-dimensional model; a baking unit, configured to perform baking processing on the above-mentioned expanded three-dimensional model to generate a baked three-dimensional model; a rendering unit, configured to perform rendering processing on the above-mentioned baked three-dimensional model according to the above-mentioned baked three-dimensional model to generate a three-dimensional model rendering; a second receiving unit, configured to receive an export request sent by the above-mentioned target user, and determine a target export format according to the above-mentioned export request; a generating unit, configured to generate a three-dimensional model rendering corresponding to the above-mentioned target export format, and export the above-mentioned three-dimensional model rendering.

[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation of the first aspect is implemented.

[0012] The above-described embodiments of the present disclosure have the following beneficial effects: Through the model rendering methods of some embodiments of the present disclosure, situations where the rendered 3D model has poor quality or even fails to render can be avoided. Specifically, the reason for the poor quality or even failure to render a 3D model is that the uploaded 3D model information may be incomplete, resulting in poor quality or even failure to render the 3D model. Based on this, the model rendering methods of some embodiments of the present disclosure first receive a model access address sent by a target user. This allows the storage address of the initial 3D model to be determined. Next, the initial 3D model is loaded based on the model access address and a preset model format. This allows the initial 3D model to be loaded in the preset format. Then, in response to receiving adjustment information for the initial 3D model sent by the target user, parameter adjustment is performed on the initial 3D model based on the adjustment information to generate a parameter-adjusted 3D model. This allows the adjustment of various parameters of the initial 3D model. Thereafter, the parameter-adjusted 3D model is mapped and expanded to generate an expanded 3D model; and the expanded 3D model is baked to generate a baked 3D model. Thus, by automatically mapping the expansion and baking, it is ensured that the model can be automatically expanded and baked when the three-dimensional model information is missing, providing complete data support for subsequent rendering and output. Then, based on the above-mentioned baked three-dimensional model, the above-mentioned baked three-dimensional model is subjected to rendering processing to generate a three-dimensional model rendering. Thus, the rendering of the rendering of the rendering of the three-dimensional model is completed, ensuring that the model can be automatically expanded and baked when the three-dimensional model information is missing, providing complete data support for subsequent rendering and output. Finally, the export request sent by the above-mentioned target user is received, and the target export format is determined according to the above-mentioned export request; a three-dimensional model rendering corresponding to the above-mentioned target export format is generated, and the above-mentioned three-dimensional model rendering is exported. Thus, the rendered rendering can be exported in the format required by the user. This avoids the situation where the rendered three-dimensional model has a poor effect or even the three-dimensional model cannot be rendered. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0014] Figure 1 is a flowchart of some embodiments of the model rendering method according to the present disclosure;

[0015] Figure 2is a schematic structural diagram of some embodiments of the model rendering device according to the present disclosure;

[0016] Figure 3 It is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure.

[0017] Figure 4 This is a model loading test diagram according to some embodiments of the model rendering method disclosed herein. DETAILED DESCRIPTION

[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0019] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.

[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0021] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0023] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0024] Figure 1 A process 100 of some embodiments of the model rendering method according to the present disclosure is shown. The model rendering method includes the following steps:

[0025] Step 101: Receive a model access address sent by a target user.

[0026] In some embodiments, an execution entity (e.g., a server) of the model rendering method may receive a model access address sent by a target user. The target user may be the user who sent the model access address. The model access address may be a network address for accessing the initial 3D model. For example, the model access address may be a URL link.

[0027] Step 102: Load the initial three-dimensional model according to the model access address and the preset model format.

[0028] In some embodiments, the execution subject may load the initial three-dimensional model according to the model access address and the preset model format. The preset model format may be a pre-set format for loading the initial three-dimensional model. For example, the preset model format may be a GLTF model format. Figure 4 As shown, a model loading test diagram of some embodiments of the model rendering method of the present disclosure is shown. It can be seen that the scene is equipped with multiple real-time light sources, which can act on multiple components at the same time, making the model texture clearer.

[0029] In practice, the above initial 3D model can be loaded by the following steps:

[0030] The first step is to asynchronously load the three-dimensional model represented by the above model access address.

[0031] The second step is to add the loaded 3D model to a pre-generated 3D model scene using a preset loading algorithm. In practice, this can be done using the GLTFLoader tool. This 3D model scene can be a Three.js scene used to display the loaded 3D model.

[0032] Step 103: In response to receiving the adjustment information for the initial three-dimensional model sent by the target user, the initial three-dimensional model is adjusted according to the adjustment information to generate a three-dimensional model after adjustment.

[0033] In some embodiments, the execution entity may, in response to receiving adjustment information for the initial three-dimensional model sent by the target user, perform parameter adjustment processing on the initial three-dimensional model according to the adjustment information to generate a parameter-adjusted three-dimensional model.

[0034] In practice, the initial 3D model can be adjusted by the following steps to generate a tuned 3D model:

[0035] The first step is to receive adjustment information for the initial three-dimensional model sent by the target user, wherein the adjustment information may be information for adjusting the displayed initial three-dimensional model.

[0036] The second step is to split the adjustment information to generate split adjustment information. The split adjustment information may include size information and material information. The size information may be the required size of the initial 3D model. The material information may be the material of the model to be modified. The material information may include, but is not limited to, color and texture.

[0037] The third step is to adjust the size of the three-dimensional model according to the scaling factor included in the size information, wherein the scaling factor may be a factor used to represent the degree of scaling of the initial three-dimensional model.

[0038] The fourth step is to adjust the material of the above-mentioned three-dimensional model to the three-dimensional model material represented by the above-mentioned material information to generate a three-dimensional model after parameter adjustment.

[0039] Step 104: Perform mapping and expansion processing on the adjusted three-dimensional model to generate an expanded three-dimensional model.

[0040] In some embodiments, the execution entity may perform mapping and expansion processing on the parameter-adjusted three-dimensional model to generate an expanded three-dimensional model.

[0041] In practice, the execution entity may perform mapping and expansion processing on the parameter-adjusted three-dimensional model through the following steps to generate an expanded three-dimensional model:

[0042] The first step is to import the adjusted 3D model into the unwrapping module, which can be the bpy module of the Blender suite.

[0043] The second step is to select the adjusted 3D model and put the expansion module into edit mode. In practice, the adjusted 3D model in the expansion module can be put into edit mode to facilitate mapping expansion.

[0044] The third step is to map and unfold each face of the 3D model after the above parameter adjustment. The above mapping and unfolding can be UV unwrapping.

[0045] In the fourth step, in response to the completion of the mapping and expansion of each surface of the three-dimensional model after the above-mentioned parameter adjustment, the above-mentioned expansion module is adjusted to object mode.

[0046] Step 5: Save the adjusted 3D model after mapping and expansion to a folder to obtain the expanded 3D model.

[0047] In the process of adopting technical solutions to solve the above technical problems, the following technical problems often occur: when the UV unfolding of the model is performed, the secant lines of the closed three-dimensional model are different, resulting in inconsistent unfolded two-dimensional images, which in turn causes distortion of the rendered image.

[0048] In some optional implementations of some embodiments, the execution entity may perform mapping and expansion processing on the parameter-adjusted three-dimensional model through the following steps:

[0049] In the first step, at least one mesh slit is generated based on the parameter-adjusted three-dimensional model. The mesh slit in the at least one mesh slit is used to cut the mesh included in the three-dimensional model and generate new mesh vertices.

[0050] In the second step, based on the at least one grid cut, the grid included in the three-dimensional model after parameter adjustment is divided into multiple grid disk structures to obtain a grid disk structure group.

[0051] In the third step, each grid disk structure in the grid disk structure group is unfolded into a two-dimensional plane according to a preset algorithm, wherein the preset algorithm may be a PCA (Principal Component Analysis) algorithm.

[0052] In the fourth step, for each grid disk structure in the above grid disk structure group, perform the following determination steps:

[0053] The first determination step is to determine the surface curvature corresponding to the mesh disk structure. In practice, the surface curvature corresponding to the mesh disk structure can be determined using a curvature calculation formula.

[0054] The second determining step is, in response to the surface curvature being greater than a preset surface curvature threshold, segmenting and unfolding the grid disk structure according to the preset algorithm.

[0055] In the fifth step, texture coordinates of each unfolded grid disk structure are packaged to generate the packaged grid disk structures as the unfolded three-dimensional model.

[0056] The above-mentioned first to seventh steps, as an inventive feature of an embodiment of the present disclosure, combined with the following step "Step 106," solve the technical problem of "when UV unfolding a model, the tangent lines of the enclosed three-dimensional model are different, resulting in inconsistent unfolded two-dimensional images, which in turn causes distortion in the rendered image." The reason for the distortion in the rendered image is as follows: when UV unfolding a model, the tangent lines of the enclosed three-dimensional model are different, resulting in inconsistent unfolded two-dimensional images, which in turn causes distortion in the rendered image. If these factors are resolved, the distortion in the rendered image can be avoided. To achieve this effect, the present disclosure first generates at least one mesh slit based on the above-mentioned parameter-adjusted three-dimensional model. Thus, multiple mesh slits can be generated. Second, based on the at least one mesh slit, the mesh included in the above-mentioned parameter-adjusted three-dimensional model is divided into multiple mesh disk structures to obtain a mesh disk structure group. Thus, the mesh slits can be used to divide the three-dimensional model into multiple mesh disks. Third, based on a preset algorithm, each mesh disk structure in the above-mentioned mesh disk structure group is unfolded into a two-dimensional plane. Thus, the divided 3D model can be unfolded on a 2D plane, achieving dimensionality reduction of the 3D model. Fourth, for each grid disk structure in the grid disk structure group, the following determination step is performed: determining the surface curvature corresponding to the grid disk structure; in response to the surface curvature being greater than a preset surface curvature threshold, segmenting and unfolding the grid disk structure according to the preset algorithm. This allows the grid disks with higher curvature to be further divided, thereby reducing the curvature and alleviating distortion. This avoids inconsistencies in the unfolded 2D image due to different secants. Fifth, texture coordinates are packaged for each unfolded grid disk structure to generate the packaged grid disk structures as the unfolded 3D model. Thus, the unfolded 3D model can be texture packaged. In conjunction with "step 106," rendering is performed on the baked 3D model to generate a 3D model rendering. This avoids distortion in the rendered 3D model rendering.

[0057] Step 105 : baking the unfolded three-dimensional model to generate a baked three-dimensional model.

[0058] In some embodiments, the execution entity may bake the unfolded three-dimensional model to generate a baked three-dimensional model.

[0059] In some optional implementations of some embodiments, the execution entity may bake the unfolded three-dimensional model through the following steps to generate a baked three-dimensional model:

[0060] The first step is to load the unfolded 3D model into a baking module, which can be the bpy module of the Blender suite.

[0061] The second step is to receive the baking configuration information sent by the target terminal, wherein the baking configuration information may include but is not limited to: light source information and baking resolution.

[0062] The third step is to generate a light source component in the baking module according to the light source information included in the baking configuration information.

[0063] The fourth step is to create an initial texture file group. The initial texture file can be a texture used to store baked texture information.

[0064] The fifth step is to allocate and process the material information corresponding to the initial texture file group and the expanded 3D model. Here, for each initial texture file in the initial texture file group, the material part of the expanded 3D model corresponding to the initial texture file is determined.

[0065] The sixth step is to obtain baking information, and bake the initial map file included in the expanded three-dimensional model according to the baking information to generate a baked three-dimensional model, and bake the baking information into the initial map file.

[0066] Step 7. Save the baked 3D model to a folder.

[0067] Step 106 : performing rendering processing on the baked 3D model according to the baked 3D model to generate a 3D model rendering.

[0068] In some embodiments, the execution entity may perform rendering processing on the baked three-dimensional model according to the baked three-dimensional model to generate a three-dimensional model rendering.

[0069] In practice, the execution entity may perform rendering processing on the baked 3D model through the following steps:

[0070] The first step is to replace the baked 3D model with the initial 3D model.

[0071] The second step is to obtain pre-stored model adjustment information and adjust the baked 3D model according to the pre-stored model adjustment information to generate an adjusted 3D model. The pre-stored model adjustment information can be a pre-stored JSON file for adjusting the baked 3D model.

[0072] The third step is to input the adjusted 3D model into a pre-configured renderer, which then runs a rendering loop on the adjusted 3D model to produce the rendered 3D model. In practice, first, the baked 3D model can be input into a pre-configured renderer. Next, the camera and light sources can be configured in the renderer to ensure the correct display of the model. Finally, the adjusted 3D model can be run through a rendering loop for real-time rendering.

[0073] The fourth step is to generate a 3D model rendering based on the rendered 3D model. Here, each rendering layer in the rendered 3D model can be merged to generate the 3D model rendering.

[0074] In the process of adopting technical solutions to solve the above technical problems, the following technical problems are often accompanied: when rendering the three-dimensional model as a whole, the model rendering speed is slow and the rendering efficiency is low, and it takes a long time to render the model.

[0075] In some optional implementations of some embodiments, the execution entity may perform rendering processing on the baked 3D model to generate a 3D model rendering image through the following steps:

[0076] In the first step, the baked three-dimensional model is divided into blocks to generate a block model group.

[0077] The second step is to determine the baked three-dimensional model as the root node, and generate a quadtree model based on the root node.

[0078] The third step is to match each block model in the block model group with each node included in the quadtree model to obtain a matched quadtree.

[0079] Step 4: For each node in the quadtree after matching, perform the following processing steps:

[0080] The first processing step is to determine whether the node intersects with the baked three-dimensional model.

[0081] The second processing step is to determine the node and its corresponding child nodes as first rendering nodes in response to the node not intersecting with the baked three-dimensional model.

[0082] The third processing step is to determine, in response to the node intersecting with the baked three-dimensional model, whether each child node corresponding to the node intersects with the baked three-dimensional model.

[0083] In a fourth processing step, the node and the sub-nodes intersecting with the baked three-dimensional model among the sub-nodes corresponding to the node are determined as second rendering nodes.

[0084] In the fifth step, the CPU performs multi-dimensional matrix processing on the block models corresponding to the determined second rendering nodes in real time, and performs smoothing processing on the vertices corresponding to each block model.

[0085] In the sixth step, each smoothed block model is transmitted to the shader according to the position of the corresponding node in the quadtree model for rendering to obtain a three-dimensional model rendering.

[0086] The above-mentioned steps 1-7, as an inventive feature of an embodiment of the present disclosure, resolve the technical problem of "when rendering the 3D model as a whole, the model rendering speed is slow and the rendering efficiency is low, which in turn requires a long time to render the model." The reason for the long time required to render the model is as follows: when rendering the 3D model as a whole, the model rendering speed is slow and the rendering efficiency is low, which in turn requires a long time to render the model. If these factors are resolved, the time required to render the model can be reduced. To achieve this effect, the present disclosure first blocks the above-mentioned baked 3D model to generate a block model group. In this way, the 3D model can be divided into different data blocks. Second, the above-mentioned baked 3D model is determined as the root node, and a quadtree model is generated based on the above-mentioned root node. In this way, a quadtree structure can be formed. Third, each block model in the above-mentioned block model group is matched with each node included in the above-mentioned quadtree model to obtain a matched quadtree. In this way, each data block can be combined with the node in the quadtree. Fourth, for each node in the matched quadtree, the following processing steps are performed: determining whether the node intersects with the baked 3D model; in response to the node not intersecting with the baked 3D model, determining the node and its corresponding child nodes as first rendering nodes; in response to the node intersecting with the baked 3D model, determining whether each child node corresponding to the node intersects with the baked 3D model; and determining the node and its corresponding child nodes that intersect with the baked 3D model as second rendering nodes. Thus, it is possible to determine whether each data block needs to be rendered by traversing the data blocks, and classify the data blocks according to the traversal results. Fifth, the CPU performs multi-dimensional matrix processing on the block models corresponding to each second rendering node, and smoothes the vertices corresponding to each block model in real time; each smoothed block model is transmitted to the shader according to the position of the corresponding node in the quadtree model for rendering, thereby obtaining a 3D model rendering. In this way, the rendering of the three-dimensional model is completed. By dividing the three-dimensional model into blocks and rendering only the data blocks that need to be rendered, the transmission of rendering data is reduced, thereby improving the rendering efficiency and reducing the time for rendering the three-dimensional model.

[0087] Step 107: receiving an export request sent by a target user, and determining a target export format according to the export request.

[0088] In some embodiments, the execution host may receive an export request from a target user and determine a target export format based on the export request. The export request may be a request to export the 3D model rendering. In practice, format information representing the format selected by the target user for exporting the 3D model rendering may be selected from the export request to determine the target export format.

[0089] Step 108: Generate a 3D model rendering corresponding to the target export format, and export the 3D model rendering.

[0090] In some embodiments, the execution entity may generate a 3D model rendering corresponding to the target export format and export the 3D model rendering. In practice, the 3D model rendering may be converted to the target export format and the converted 3D model rendering may be exported.

[0091] The above-described embodiments of the present disclosure have the following beneficial effects: Through the model rendering methods of some embodiments of the present disclosure, situations where the rendered 3D model has poor quality or even fails to render can be avoided. Specifically, the reason for the poor quality or even failure to render a 3D model is that the uploaded 3D model information may be incomplete, resulting in poor quality or even failure to render the 3D model. Based on this, the model rendering methods of some embodiments of the present disclosure first receive a model access address sent by a target user. This allows the storage address of the initial 3D model to be determined. Next, the initial 3D model is loaded based on the model access address and a preset model format. This allows the initial 3D model to be loaded in the preset format. Then, in response to receiving adjustment information for the initial 3D model sent by the target user, parameter adjustment is performed on the initial 3D model based on the adjustment information to generate a parameter-adjusted 3D model. This allows the adjustment of various parameters of the initial 3D model. Thereafter, the parameter-adjusted 3D model is mapped and expanded to generate an expanded 3D model; and the expanded 3D model is baked to generate a baked 3D model. Thus, by automatically mapping the expansion and baking, it is ensured that the model can be automatically expanded and baked when the three-dimensional model information is missing, providing complete data support for subsequent rendering and output. Then, based on the above-mentioned baked three-dimensional model, the above-mentioned baked three-dimensional model is subjected to rendering processing to generate a three-dimensional model rendering. Thus, the rendering of the rendering of the rendering of the three-dimensional model is completed, ensuring that the model can be automatically expanded and baked when the three-dimensional model information is missing, providing complete data support for subsequent rendering and output. Finally, the export request sent by the above-mentioned target user is received, and the target export format is determined according to the above-mentioned export request; a three-dimensional model rendering corresponding to the above-mentioned target export format is generated, and the above-mentioned three-dimensional model rendering is exported. Thus, the rendered rendering can be exported in the format required by the user. This avoids the situation where the rendered three-dimensional model has a poor effect or even the three-dimensional model cannot be rendered.

[0092] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a model rendering device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the model rendering device can be specifically applied to various electronic devices.

[0093] like Figure 2As shown, the model rendering device 200 of some embodiments includes: a receiving unit 201, a loading unit 202, a parameter adjustment unit 203, a mapping expansion unit 204, a baking unit 205, an effect graph rendering unit 206, a second receiving unit 207 and a generating unit 208. Among them, the receiving unit 201 is configured to receive the model access address sent by the target user; the loading unit 202 is configured to load the initial three-dimensional model according to the above-mentioned model access address and the preset model format; the parameter adjustment unit 203 is configured to, in response to receiving the adjustment information for the above-mentioned initial three-dimensional model sent by the above-mentioned target user, adjust the parameters of the above-mentioned initial three-dimensional model according to the above-mentioned adjustment information to generate a parameter-adjusted three-dimensional model; the mapping and expansion unit 204 is configured to perform mapping and expansion processing on the above-mentioned parameter-adjusted three-dimensional model to generate an expanded three-dimensional model; the baking unit 205 is configured to bake the above-mentioned expanded three-dimensional model to generate a baked three-dimensional model; the effect rendering unit 206 is configured to perform effect rendering processing on the above-mentioned baked three-dimensional model according to the above-mentioned baked three-dimensional model to generate a three-dimensional model effect graph; the second receiving unit 207 is configured to receive the export request sent by the above-mentioned target user, and determine the target export format according to the above-mentioned export request; the generating unit 208 is configured to generate a three-dimensional model effect graph corresponding to the above-mentioned target export format, and export the above-mentioned three-dimensional model effect graph.

[0094] It is understandable that the units described in the model rendering device 200 and the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the model rendering device 200 and the units included therein, and will not be repeated here.

[0095] Reference below Figure 3 , which shows a schematic structural diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0096] like Figure 3As shown, electronic device 300 may include a processing device 301 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 302 or programs loaded from a storage device 308 into a random access memory (RAM) 303. RAM 303 also stores various programs and data required for the operation of electronic device 300. Processing device 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to bus 304.

[0097] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0098] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.

[0099] It should be noted that the computer-readable medium described in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. Furthermore, in some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.

[0100] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0101] The computer-readable medium may be included in the electronic device, or it may exist independently and not incorporated into the electronic device. The computer-readable medium carries one or more programs. When executed by the electronic device, the electronic device: receives a model access address sent by a target user. Loads an initial three-dimensional model based on the model access address and a preset model format. In response to receiving adjustment information for the initial three-dimensional model sent by the target user, performs parameter adjustment on the initial three-dimensional model based on the adjustment information to generate a parameter-adjusted three-dimensional model. Maps and expands the parameter-adjusted three-dimensional model to generate an expanded three-dimensional model. Bakes the expanded three-dimensional model to generate a baked three-dimensional model. Based on the baked three-dimensional model, renders the baked three-dimensional model to generate a three-dimensional model rendering. Receives an export request sent by the target user, and determines a target export format based on the export request. Generates a three-dimensional model rendering corresponding to the target export format, and exports the three-dimensional model rendering.

[0102] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0104] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor. For example, they may be described as follows: a processor including a receiving unit, a loading unit, a parameter adjustment unit, a mapping expansion unit, a baking unit, a rendering unit, a second receiving unit, and a generating unit. The names of these units do not, in some cases, constitute a limitation on the units themselves. For example, the receiving unit may also be described as a "unit that receives the model access address sent by the target user."

[0105] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0106] The above descriptions are merely some preferred embodiments of the present disclosure and illustrate the underlying technical principles. Those skilled in the art should understand that the scope of the invention encompassed by the embodiments of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the aforementioned inventive concept. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A model rendering method, comprising: Receive the model access address sent by the target user; Loading the initial three-dimensional model according to the model access address and the preset model format; In response to receiving the adjustment information for the initial three-dimensional model sent by the target user, performing parameter adjustment processing on the initial three-dimensional model according to the adjustment information to generate a parameter-adjusted three-dimensional model; Performing mapping and expansion processing on the parameter-adjusted three-dimensional model to generate an expanded three-dimensional model; The mapping and unfolding processing is performed on the parameter-adjusted three-dimensional model to generate an unfolded three-dimensional model, including: Generating at least one mesh cut according to the parameter-adjusted three-dimensional model; Dividing the grid included in the parameter-adjusted three-dimensional model into a plurality of grid disk structures according to the at least one grid slit to obtain a grid disk structure group; According to a preset algorithm, each grid disk structure in the grid disk structure group is unfolded into a two-dimensional plane; For each grid disk structure in the grid disk structure group, the following determining steps are performed: Determine the surface curvature corresponding to the above grid disk structure; In response to the surface curvature being greater than a preset surface curvature threshold, segmenting and unfolding the grid disk structure according to the preset algorithm; Performing texture coordinate packing processing on each unfolded grid disk structure to generate each packed grid disk structure as an unfolded three-dimensional model; performing a baking process on the unfolded three-dimensional model to generate a baked three-dimensional model; The step of baking the unfolded three-dimensional model to generate a baked three-dimensional model includes: Loading the unfolded three-dimensional model into a baking module; Receiving baking configuration information sent by a target terminal, wherein the baking configuration information includes: light source information and baking resolution; generating a light source component in the baking module according to the light source information included in the baking configuration information; Create an initial texture file group; Assigning and processing the material information corresponding to the initial texture file group and the expanded three-dimensional model; Obtaining baking information, and baking the initial map file included in the unfolded three-dimensional model according to the baking information to generate a baked three-dimensional model, and baking the baking information into the corresponding initial map file; Saving the baked three-dimensional model to a folder; According to the baked three-dimensional model, performing effect graph rendering processing on the baked three-dimensional model to generate a three-dimensional model effect graph; receiving an export request sent by the target user, and determining a target export format according to the export request; A three-dimensional model rendering corresponding to the target export format is generated, and the three-dimensional model rendering is exported.

2. The method according to claim 1, wherein The loading of the initial three-dimensional model according to the model access address and the preset model format includes: Performing asynchronous loading processing on the three-dimensional model represented by the model access address; The loaded 3D model is added to the pre-generated 3D model scene through a preset loading algorithm.

3. The method according to claim 1, wherein In response to receiving the adjustment information for the initial three-dimensional model sent by the target user, performing parameter adjustment processing on the initial three-dimensional model according to the adjustment information to generate a parameter-adjusted three-dimensional model, including: receiving adjustment information for the initial three-dimensional model sent by the target user; Splitting the adjustment information to generate split adjustment information, wherein the split adjustment information includes: size information and material information; adjusting the size of the three-dimensional model according to the scaling factor included in the size information; The material of the three-dimensional model is adjusted to the three-dimensional model material represented by the material information to generate a three-dimensional model after parameter adjustment.

4. The method according to claim 1, wherein The mapping and unfolding processing is performed on the parameter-adjusted three-dimensional model to generate an unfolded three-dimensional model, including: Importing the adjusted three-dimensional model into the expansion module; Selecting the adjusted three-dimensional model and adjusting the expansion module to an editing mode; Mapping and unfolding each surface of the three-dimensional model after parameter adjustment; In response to completion of mapping and unfolding of each face of the three-dimensional model after parameter adjustment, adjusting the unfolding module to an object mode; Save the adjusted 3D model after mapping and expansion to a folder to obtain the expanded 3D model.

5. The method according to claim 1, wherein The step of performing rendering processing on the baked three-dimensional model according to the baked three-dimensional model to generate a three-dimensional model rendering includes: Replacing the baked three-dimensional model with the initial three-dimensional model; Acquiring pre-stored model adjustment information, and adjusting the baked three-dimensional model according to the pre-stored model adjustment information to generate an adjusted three-dimensional model; Inputting the adjusted three-dimensional model into a preset renderer to perform a rendering loop on the adjusted three-dimensional model to obtain a rendered three-dimensional model; A three-dimensional model rendering is generated based on the rendered three-dimensional model.

6. A model rendering device comprising: A first receiving unit is configured to receive a model access address sent by a target user; a loading unit configured to load the initial three-dimensional model according to the model access address and a preset model format; a parameter adjustment unit configured to, in response to receiving adjustment information for the initial three-dimensional model sent by the target user, perform parameter adjustment processing on the initial three-dimensional model according to the adjustment information to generate a parameter-adjusted three-dimensional model; A mapping expansion unit is configured to perform mapping expansion processing on the parameter-adjusted three-dimensional model to generate an expanded three-dimensional model; the mapping expansion unit is further configured to: Generating at least one mesh cut according to the parameter-adjusted three-dimensional model; Dividing the grid included in the parameter-adjusted three-dimensional model into a plurality of grid disk structures according to the at least one grid slit to obtain a grid disk structure group; According to a preset algorithm, each grid disk structure in the grid disk structure group is unfolded into a two-dimensional plane; For each grid disk structure in the grid disk structure group, the following determining steps are performed: Determine the surface curvature corresponding to the above grid disk structure; In response to the surface curvature being greater than a preset surface curvature threshold, segmenting and unfolding the grid disk structure according to the preset algorithm; Performing texture coordinate packing processing on each unfolded grid disk structure to generate each packed grid disk structure as an unfolded three-dimensional model; a baking unit configured to bake the unfolded three-dimensional model to generate a baked three-dimensional model; the baking unit is further configured to: Loading the unfolded three-dimensional model into a baking module; Receiving baking configuration information sent by a target terminal, wherein the baking configuration information includes: light source information and baking resolution; generating a light source component in the baking module according to the light source information included in the baking configuration information; Create an initial texture file group; Assigning and processing the material information corresponding to the initial texture file group and the expanded three-dimensional model; Obtaining baking information, and baking the initial map file included in the unfolded three-dimensional model according to the baking information to generate a baked three-dimensional model, and baking the baking information into the corresponding initial map file; Saving the baked three-dimensional model to a folder; an effect rendering unit configured to perform effect rendering processing on the baked three-dimensional model according to the baked three-dimensional model to generate a three-dimensional model effect graph; a second receiving unit configured to receive an export request sent by the target user, and determine a target export format according to the export request; The generating unit is configured to generate a three-dimensional model rendering corresponding to the target export format and perform export processing on the three-dimensional model rendering.

7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Three-dimensional model baking method and system based on urban brain space-time construction component

    CN113822988A

  • Rendering adjustment method of three-dimensional model, rendering adjustment method of medical three-dimensional model and computer equipment

    CN119131217A