Method and device for editing three-dimensional model
By dividing the three -dimensional model into multiple components and editing separately, the problems of poor three -dimensional model editing in existing technologies have been solved, and more efficient three -dimensional model editing is achieved.
Patent Information
- Application Number
- CN202310935332.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, it is difficult to achieve ideal editing effects when editing three-dimensional models, because the information volume of the three-dimensional model is huge and the overall deformation is difficult to control carefully.
By dividing the three -dimensional model into at least two model components, and editing these components based on the model editing instructions, the component after the combination is finally edited to obtain the target three -dimensional model.
Reduce the amount of information of the editor object, improve the editing effect of each component, and thereby enhance the overall editing effect of the three -dimensional model.
Smart Images

Figure CN119379960A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method and device for editing a three-dimensional model. Background Art
[0002] 3D model technology is widely used in industrial manufacturing, live video streaming, online shopping, film and television entertainment and other fields due to its advantages such as low migration cost, no site restrictions, and the ability to greatly reduce the operating costs of digital media-related industries.
[0003] At present, three-dimensional models are mainly generated by modeling and rendering in the form of computer graphics (CG). That is, first, a three-dimensional model designer creates an initial three-dimensional model, and then renders the three-dimensional model through hardware such as a graphics card, thereby rendering a three-dimensional model. When editing the clothing, posture, style, expression, etc. of the three-dimensional model, in order to avoid the three-dimensional model designer from re-building the model, the existing technology often deforms the constructed three-dimensional model to obtain the edited three-dimensional model. However, since the amount of information in the three-dimensional model is often very large, it is often difficult to achieve an ideal three-dimensional model editing effect by deforming the entire constructed three-dimensional model. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a method and device for processing a three-dimensional model, so as to improve the editing effect of the three-dimensional model.
[0005] In order to achieve the above purpose, the embodiments of the present application provide the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a method for editing a three-dimensional model, comprising:
[0007] Obtain 3D models and model editing instructions;
[0008] Splitting the three-dimensional model into at least two model components;
[0009] Edit the at least two model components respectively based on the model editing instruction to obtain target model components corresponding to the at least two model components;
[0010] The target model components respectively corresponding to the at least two model components are combined to obtain a target three-dimensional model of the three-dimensional model.
[0011] As an optional implementation manner of the embodiment of the present invention, the dividing the three-dimensional model into at least two model components includes:
[0012] Obtaining component annotation information of the three-dimensional model;
[0013] The three-dimensional model is segmented into at least two model components based on the component annotation information of the three-dimensional model.
[0014] As an optional implementation manner of the embodiment of the present invention, the dividing the three-dimensional model into at least two model components includes:
[0015] The three-dimensional model is segmented into at least two model components based on a three-dimensional semantic segmentation algorithm.
[0016] As an optional implementation manner of the embodiment of the present invention, the dividing the three-dimensional model into at least two model components includes:
[0017] Segmenting the three-dimensional model into at least two model components based on a segmentation network model;
[0018] Among them, the segmentation network model is a model obtained by training a machine learning model based on a first sample data set; the first sample data set includes multiple sample three-dimensional models and component annotation information corresponding to the multiple sample three-dimensional models.
[0019] As an optional implementation manner of the embodiment of the present invention, the editing of the at least two model components respectively according to the model editing instruction to obtain the target model components corresponding to the at least two model components includes:
[0020] Determine, according to the model editing instruction, the editing network models corresponding to the at least two model components respectively; the editing network model is a model obtained by training the machine learning model based on the second sample data set; the second sample data set includes a plurality of sample model components and a model component obtained by editing the plurality of sample model components based on the model editing instruction;
[0021] The target model components corresponding to the at least two model components are obtained according to the edited network models corresponding to the at least two model components.
[0022] As an optional implementation of the embodiment of the present invention, the step of obtaining target model components corresponding to the at least two model components according to the edit network models corresponding to the at least two model components respectively includes:
[0023] According to the editing network model and the component material library corresponding to the at least two model components, the target model components corresponding to the at least two model components are obtained.
[0024] As an optional implementation of the embodiment of the present invention, after dividing the three-dimensional model into at least two model components, the method further includes:
[0025] The at least two model components are added to the component library.
[0026] As an optional implementation of the embodiment of the present invention, after combining the target model components respectively corresponding to the at least two model components to obtain the editing result of the three-dimensional model, the method further includes:
[0027] The target three-dimensional model is post-processed based on a preset geometric graphics processing algorithm.
[0028] As an optional implementation of the embodiment of the present invention, after combining the target model components respectively corresponding to the at least two model components to obtain the editing result of the three-dimensional model, the method further includes:
[0029] Obtaining a texture map of the target three-dimensional model;
[0030] The target three-dimensional model is rendered based on the texture map to obtain a two-dimensional image corresponding to the target three-dimensional model.
[0031] In a second aspect, an embodiment of the present application provides a three-dimensional model editing device, including:
[0032] An acquisition unit, used for acquiring a three-dimensional model and a model editing instruction;
[0033] A segmentation unit, used for segmenting the three-dimensional model into at least two model components;
[0034] An editing unit, configured to edit the at least two model components respectively based on the model editing instruction to obtain target model components corresponding to the at least two model components;
[0035] A combining unit is used to combine the target model components respectively corresponding to the at least two model components to obtain a target three-dimensional model of the three-dimensional model.
[0036] As an optional implementation of the embodiment of the present application, the segmentation unit is specifically used to obtain component annotation information of the three-dimensional model; and segment the three-dimensional model into at least two model components based on the component annotation information of the three-dimensional model.
[0037] As an optional implementation of the embodiment of the present application, the segmentation unit is specifically used to segment the three-dimensional model into at least two model components based on a three-dimensional semantic segmentation algorithm.
[0038] As an optional implementation of the embodiment of the present application, the segmentation unit is specifically used to segment the three-dimensional model into at least two model components based on the segmentation network model;
[0039] Among them, the segmentation network model is a model obtained by training a machine learning model based on a first sample data set; the first sample data set includes multiple sample three-dimensional models and component annotation information corresponding to the multiple sample three-dimensional models.
[0040] As an optional implementation of the embodiment of the present application, the editing unit is specifically used to determine the editing network models corresponding to the at least two model components respectively according to the model editing instruction; the editing network model is a model obtained by training the machine learning model based on a second sample data set; the second sample data set includes multiple sample model components and model components obtained after editing the multiple sample model components based on the model editing instruction; and the target model components corresponding to the at least two model components are obtained according to the editing network models corresponding to the at least two model components.
[0041] As an optional implementation of the embodiment of the present application, the editing unit is specifically used to obtain the target model components corresponding to the at least two model components according to the corresponding editing network model and component material library input by the at least two model components.
[0042] As an optional implementation of the embodiment of the present application, the segmentation unit is further used to add the at least two model components to the component material library after segmenting the three-dimensional model into at least two model components.
[0043] As an optional implementation of the embodiment of the present application, the combination unit is also used to post-process the target three-dimensional model based on a preset geometric graphics processing algorithm after combining the target model components corresponding to the at least two model components to obtain the editing result of the three-dimensional model.
[0044] As an optional implementation of the embodiment of the present application, the combination unit is also used to obtain a texture map of the target three-dimensional model after combining the target model components corresponding to the at least two model components to obtain the editing result of the three-dimensional model; and render the target three-dimensional model based on the texture map to obtain a two-dimensional image corresponding to the target three-dimensional model.
[0045] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program and the processor is used to enable the electronic device to implement the three-dimensional model editing method described in any of the above embodiments when executing the computer program.
[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which, when the computer program is executed by a computing device, enables the computing device to implement the three-dimensional model editing method described in any of the above-mentioned embodiments.
[0047] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to implement the three-dimensional model editing method described in any of the above-mentioned embodiments.
[0048] The three-dimensional model editing method provided in the embodiment of the present application first divides the three-dimensional model into at least two model components after obtaining the three-dimensional model and the model editing instruction, and then edits the at least two model components respectively based on the model editing instruction to obtain the target model components corresponding to the at least two model components, and then combines the target model components respectively corresponding to the at least two model components to obtain the target three-dimensional model of the three-dimensional model. Compared with the prior art that edits the three-dimensional model as a whole, since the three-dimensional model editing method provided in the embodiment of the present application divides the three-dimensional model into at least two model components when editing the three-dimensional model, and then edits the at least two model components obtained by dividing the three-dimensional model respectively, and combines the editing results of the at least two model components to obtain the edited three-dimensional model, the embodiment of the present application can reduce the amount of information of the editing object, improve the editing effect of each component, and then improve the editing effect of the three-dimensional model. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0051] Figure 1 One of the flowcharts of the method for editing a three-dimensional model provided in an embodiment of the present application;
[0052] Figure 2 A schematic diagram of three-dimensional model segmentation provided in an embodiment of the present application;
[0053] Figure 3 The second flowchart of the method for editing a three-dimensional model provided in an embodiment of the present application;
[0054] Figure 4A structural diagram of a three-dimensional model editing device provided in an embodiment of the present application;
[0055] Figure 5 A schematic diagram of a three-dimensional model editing device provided in an embodiment of the present application;
[0056] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0058] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein. Obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0059] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In addition, in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0060] The present application embodiment provides a method for editing a three-dimensional model. Figure 1 As shown, the three-dimensional model editing method includes the following steps S11 to S14:
[0061] S11, obtaining a three-dimensional model and model editing instructions.
[0062] In some embodiments, the method of obtaining the three-dimensional model may include: reading the three-dimensional model from a remote server or a local storage space according to a specified uniform resource identifier (URI).
[0063] The three-dimensional model in the embodiment of the present application may be a three-dimensional mesh model, a point cloud model (Point Cloud), etc. The three-dimensional mesh model may include: geometric information and attribute information of the model such as vertex position coordinates, topological structure, vertex normal vector, color, etc.
[0064] The model editing instructions in the embodiments of the present application are used to indicate the editing operations that need to be performed on the three-dimensional model. The model editing instructions can be natural language instructions such as text and voice, or computer language instructions such as code and script. The embodiments of the present application do not limit this, and the model editing instructions shall be able to indicate the editing operations that need to be performed on the three-dimensional model.
[0065] S12: Divide the three-dimensional model into at least two model components.
[0066] In some embodiments, the implementation of dividing the three-dimensional model into at least two model components includes: determining the component to be edited according to the model editing instruction, and dividing the three-dimensional model into at least two model components according to the component to be edited. For example, if the three-dimensional model is a three-dimensional model of a person, and the model editing instruction indicates to edit the clothing of the person, the three-dimensional model of the person can be divided into two model components: a clothing component and a human body component.
[0067] In some embodiments, the implementation method of segmenting the three-dimensional model into at least two model components includes: segmenting the three-dimensional model into at least two model components according to the component to be edited according to a preset segmentation strategy. For example, if the three-dimensional model is a three-dimensional model of a person, and the preset segmentation strategy is to segment the three-dimensional model into a head component, a torso component, a left upper limb component, a right upper limb component, a left lower limb component, and a right lower limb component, then the preset segmentation strategy can be used to segment the three-dimensional model of the person into six model components: a head component, a torso component, a left upper limb component, a right upper limb component, a left lower limb component, and a right lower limb component.
[0068] For example, refer to Figure 2 As shown, when the three-dimensional model is a human three-dimensional model 200 , the human three-dimensional model 200 can be divided into four model components, which are: a head component 201 , a left upper limb component 202 , a right upper limb component 203 and a torso component 204 .
[0069] S13. Edit the at least two model components respectively based on the model editing instruction to obtain target model components corresponding to the at least two model components.
[0070] In the embodiment of the present application, the target model component corresponding to any model component is the model component obtained after editing the model component based on the model editing instruction.
[0071] S14. Combine the target model components respectively corresponding to the at least two model components to obtain a target three-dimensional model of the three-dimensional model.
[0072] The three-dimensional model editing method provided in the embodiment of the present application first divides the three-dimensional model into at least two model components after obtaining the three-dimensional model and the model editing instruction, and then edits the at least two model components respectively based on the model editing instruction to obtain the target model components corresponding to the at least two model components, and then combines the target model components respectively corresponding to the at least two model components to obtain the target three-dimensional model of the three-dimensional model. Compared with the prior art that edits the three-dimensional model as a whole, since the three-dimensional model editing method provided in the embodiment of the present application divides the three-dimensional model into at least two model components when editing the three-dimensional model, and then edits the at least two model components obtained by dividing the three-dimensional model respectively, and combines the editing results of the at least two model components to obtain the edited three-dimensional model, the embodiment of the present application can reduce the amount of information of the editing object, improve the editing effect of each component, and then improve the editing effect of the three-dimensional model.
[0073] As an extension and refinement of the above embodiment, the present application embodiment provides another method for editing a three-dimensional model. Figure 3 As shown, the editing method of the three-dimensional model includes the following steps:
[0074] S301, obtaining a three-dimensional model and a model editing instruction.
[0075] In some embodiments, the 3D model and the model editing instructions are obtained by displaying a model editing interface to the user through a model editing application, and determining the 3D model and the model editing instructions according to the user's operation in the model editing interface.
[0076] S302: Divide the three-dimensional model into at least two model components.
[0077] In some embodiments, the implementation of the above step S302 (segmenting the three-dimensional model into at least two model components) includes the following steps a and b:
[0078] Step a: Obtain component annotation information of the three-dimensional model.
[0079] Step b: dividing the three-dimensional model into at least two model components based on the component annotation information of the three-dimensional model.
[0080] That is, when generating a three-dimensional model, semantic segmentation and annotation are performed on the three-dimensional model, and the three-dimensional model is divided into model components according to the annotation information.
[0081] In some embodiments, the implementation of the above step S302 (segmenting the three-dimensional model into at least two model components) includes: segmenting the three-dimensional model into at least two model components based on a three-dimensional semantic segmentation algorithm.
[0082] Exemplarily, the 3D semantic segmentation algorithm may be a projection-based 3D semantic segmentation algorithm, that is, the 3D model is first projected into multiple 2D images from multiple angles, and then semantic segmentation is performed on the multiple 2D images obtained by the projection, and the 3D model is segmented according to the semantic segmentation results of the multiple 2D images.
[0083] In some embodiments, the implementation of the above step S302 (segmenting the three-dimensional model into at least two model components) includes: segmenting the three-dimensional model into at least two model components based on a segmentation network model.
[0084] Among them, the segmentation network model is a model obtained by training a machine learning model based on a first sample data set; the first sample data set includes multiple sample three-dimensional models and component annotation information corresponding to the multiple sample three-dimensional models.
[0085] Exemplarily, the machine learning model may be a deep neural network model (DNN), a convolutional neural network model (CNN), etc.
[0086] In some embodiments, the training process of the segmentation network model may include: inputting a sample three-dimensional model into the segmentation network model to be trained, and obtaining a semantic segmentation result of the sample three-dimensional model output by the segmentation network model to be trained, calculating a loss value based on the semantic segmentation result of the sample three-dimensional model, component annotation information corresponding to the sample three-dimensional model, and a preset loss function, and adjusting model parameters of the segmentation network model to be trained based on the loss value.
[0087] S303: Determine the editing network models corresponding to the at least two model components respectively according to the model editing instruction.
[0088] Among them, the edited network model is a model obtained by training a machine learning model based on a second sample data set; the second sample data set includes multiple sample model components and model components obtained after editing the multiple sample model components based on the model editing instructions.
[0089] For example: there are two style transfer network models pre-trained for facial components, the first style transfer network model is used to convert facial components into a cartoon style, and the second style transfer network model is used to convert facial components into an oil painting style. When the model editing instruction indicates that the three-dimensional model is converted into a cartoon style, the first style transfer network model is determined as the editing network model corresponding to the facial component.
[0090] S304: Obtain target model components corresponding to the at least two model components according to the edit network models corresponding to the at least two model components.
[0091] That is, the model component is input into the corresponding editing network model, and the output of the editing network model is used as the target model component corresponding to the model component.
[0092] In some embodiments, obtaining target model components corresponding to the at least two model components according to the edit network models corresponding to the at least two model components respectively includes:
[0093] According to the editing network model and the component material library corresponding to the at least two model components, the target model components corresponding to the at least two model components are obtained.
[0094] For example: when editing a facial model component, you need to add a glasses model component to the facial component. You can first obtain the matching glasses model component from the component library, and then obtain the facial component wearing glasses based on the glasses model component, the facial model component, and the editing network model corresponding to the facial model component.
[0095] S305: Combine the target model components respectively corresponding to the at least two model components to obtain a target three-dimensional model of the three-dimensional model.
[0096] That is, the edited model components (the target model components respectively corresponding to the at least two model components) are reassembled to obtain the edited three-dimensional model (the target three-dimensional model).
[0097] S306: Post-process the target three-dimensional model based on a preset geometric graphics processing algorithm.
[0098] Since the target three-dimensional model obtained by combining the target model components corresponding to the at least two model components is likely to have problems such as mold penetration, holes, abnormal deformation, missing grids at component connections, burrs, etc., after the target three-dimensional model is obtained by combining the target model components corresponding to the at least two model components, the embodiment of the present application will also introduce a post-processing graphic geometry processing algorithm to ensure the rationality and driving capability of the generation of the target three-dimensional model.
[0099] Reference Figure 4 As shown, in some embodiments, for performing Figure 3 The 3D model editing method of the embodiment shown in the figure includes: an input module 41, a segmentation module 42, a plurality of editing network models 43, a combination module 44 and a post-processing module 45. The input module 41 is used to obtain the 3D model E meshand model editing instructions, the segmentation module 42 is used to segment the three-dimensional model into multiple model components (Eh ead 、E la 、E ra ……), the multiple editing network models 43 are respectively used to edit a model component to obtain the edited model component (Dh ead , D la , D ra ……), the combining module 44 is used to combine the edited model components into the edited three-dimensional model D mesh The post-processing module 45 is used to post-process the target three-dimensional model based on a geometric graphics processing algorithm to obtain a processed three-dimensional model D mesh ′ .
[0100] In some embodiments, after combining the target model components corresponding to the at least two model components respectively to obtain the editing result of the three-dimensional model, the three-dimensional model editing method provided in the embodiment of the present application also includes: obtaining the texture map of the target three-dimensional model; rendering the target three-dimensional model based on the texture map to obtain a two-dimensional image corresponding to the target three-dimensional model.
[0101] In some embodiments, the method of acquiring the texture map of the target three-dimensional model may include: acquiring an image specified by a user as the texture map of the target three-dimensional model.
[0102] In other embodiments, the method of obtaining the texture map of the target three-dimensional model may include: deforming and aligning the texture map of the three-dimensional model based on the difference between the three-dimensional model and the target three-dimensional model to obtain the texture map of the target three-dimensional model.
[0103] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application also provides a three-dimensional model editing device, which corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the three-dimensional model editing device in this embodiment can correspond to all the contents of the aforementioned method embodiment.
[0104] The embodiment of the present application provides a three-dimensional model editing device, Figure 5 is a schematic diagram of the structure of the editing device of the three-dimensional model, such as Figure 5 As shown, the three-dimensional model editing device 500 includes:
[0105] An acquisition unit 51 is used to acquire a three-dimensional model and a model editing instruction;
[0106] A segmentation unit 52, configured to segment the three-dimensional model into at least two model components;
[0107] An editing unit 53, configured to edit the at least two model components respectively based on the model editing instruction to obtain target model components corresponding to the at least two model components;
[0108] The combining unit 54 is used to combine the target model components respectively corresponding to the at least two model components to obtain a target three-dimensional model of the three-dimensional model.
[0109] As an optional implementation of the embodiment of the present application, the segmentation unit 52 is specifically used to obtain component annotation information of the three-dimensional model; and segment the three-dimensional model into at least two model components based on the component annotation information of the three-dimensional model.
[0110] As an optional implementation of the embodiment of the present application, the segmentation unit 52 is specifically used to segment the three-dimensional model into at least two model components based on a three-dimensional semantic segmentation algorithm.
[0111] As an optional implementation of the embodiment of the present application, the segmentation unit 52 is specifically used to segment the three-dimensional model into at least two model components based on the segmentation network model;
[0112] Among them, the segmentation network model is a model obtained by training a machine learning model based on a first sample data set; the first sample data set includes multiple sample three-dimensional models and component annotation information corresponding to the multiple sample three-dimensional models.
[0113] As an optional implementation of the embodiment of the present application, the editing unit 53 is specifically used to determine the editing network models corresponding to the at least two model components respectively according to the model editing instruction; the editing network model is a model obtained by training the machine learning model based on a second sample data set; the second sample data set includes multiple sample model components and model components obtained after editing the multiple sample model components based on the model editing instruction; and the target model components corresponding to the at least two model components are obtained by inputting the corresponding editing network models respectively according to the at least two model components.
[0114] As an optional implementation of the embodiment of the present application, the editing unit 53 is specifically used to obtain the target model components corresponding to the at least two model components according to the corresponding editing network model and component material library input by the at least two model components.
[0115] As an optional implementation of the embodiment of the present application, the segmentation unit 52 is further used to add the at least two model components to the component material library after segmenting the three-dimensional model into at least two model components.
[0116] As an optional implementation of the embodiment of the present application, the combination unit 54 is also used to post-process the target three-dimensional model based on a preset geometric graphics processing algorithm after combining the target model components corresponding to the at least two model components to obtain the editing result of the three-dimensional model.
[0117] As an optional implementation of the embodiment of the present application, the combination unit 54 is also used to obtain a texture map of the target three-dimensional model after combining the target model components corresponding to the at least two model components to obtain the editing result of the three-dimensional model; and render the target three-dimensional model based on the texture map to obtain a two-dimensional image corresponding to the target three-dimensional model.
[0118] The three-dimensional model editing device provided in this embodiment can execute the three-dimensional model editing method provided in the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0119] Based on the same inventive concept, an embodiment of the present application also provides an electronic device. Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the electronic device provided in this embodiment includes: a memory 61 and a processor 62, wherein the memory 61 is used to store a computer program, and the processor 62 is used to execute the three-dimensional model editing method provided in the above embodiment when executing the computer program.
[0120] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computing device implements the three-dimensional model editing method provided in the above embodiment.
[0121] Based on the same inventive concept, an embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computing device implements the three-dimensional model editing method provided in the above embodiment.
[0122] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0123] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware model components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0124] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0125] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, program modules 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for editing a three-dimensional model, characterized in that: include: Obtain 3D models and model editing instructions; Splitting the three-dimensional model into at least two model components; Edit the at least two model components respectively based on the model editing instruction to obtain target model components corresponding to the at least two model components; The target model components respectively corresponding to the at least two model components are combined to obtain a target three-dimensional model of the three-dimensional model.
2. The method according to claim 1, characterized in that: The step of dividing the three-dimensional model into at least two model components comprises: Obtaining component annotation information of the three-dimensional model; The three-dimensional model is segmented into at least two model components based on the component annotation information of the three-dimensional model.
3. The method according to claim 1, characterized in that The step of dividing the three-dimensional model into at least two model components comprises: The three-dimensional model is segmented into at least two model components based on a three-dimensional semantic segmentation algorithm.
4. The method according to claim 1, characterized in that: The step of dividing the three-dimensional model into at least two model components comprises: Segmenting the three-dimensional model into at least two model components based on a segmentation network model; Among them, the segmentation network model is a model obtained by training a machine learning model based on a first sample data set; the first sample data set includes multiple sample three-dimensional models and component annotation information corresponding to the multiple sample three-dimensional models.
5. The method according to claim 1, characterized in that The editing of the at least two model components respectively according to the model editing instruction to obtain target model components corresponding to the at least two model components includes: Determine, according to the model editing instruction, the editing network models corresponding to the at least two model components respectively; the editing network model is a model obtained by training the machine learning model based on the second sample data set; the second sample data set includes a plurality of sample model components and a model component obtained by editing the plurality of sample model components based on the model editing instruction; The target model components corresponding to the at least two model components are obtained according to the edited network models corresponding to the at least two model components.
6. The method according to claim 5, characterized in that The step of obtaining target model components corresponding to the at least two model components according to the edit network models corresponding to the at least two model components inputs respectively includes: According to the editing network model and the component material library corresponding to the at least two model components, the target model components corresponding to the at least two model components are obtained.
7. The method according to claim 6, characterized in that After segmenting the three-dimensional model into at least two model components, the method further comprises: The at least two model components are added to the component library.
8. The method according to any one of claims 1 to 7, characterized in that: After combining the target model components respectively corresponding to the at least two model components to obtain the editing result of the three-dimensional model, the method further includes: The target three-dimensional model is post-processed based on a preset geometric graphics processing algorithm.
9. The method according to any one of claims 1 to 7, characterized in that: After combining the target model components respectively corresponding to the at least two model components to obtain the editing result of the three-dimensional model, the method further includes: Obtaining a texture map of the target three-dimensional model; The target three-dimensional model is rendered based on the texture map to obtain a two-dimensional image corresponding to the target three-dimensional model.
10. A three-dimensional model editing device, characterized in that: include: An acquisition unit, used for acquiring a three-dimensional model and a model editing instruction; A segmentation unit, used for segmenting the three-dimensional model into at least two model components; An editing unit, configured to edit the at least two model components respectively based on the model editing instruction to obtain target model components corresponding to the at least two model components; A combining unit is used to combine the target model components respectively corresponding to the at least two model components to obtain a target three-dimensional model of the three-dimensional model.
11. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program and the processor is used to enable the electronic device to implement the three-dimensional model editing method described in any one of claims 1-9 when executing the computer program.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the three-dimensional model editing method according to any one of claims 1 to 9.
Citation Information
Cited By
Method and apparatus for editing three-dimensional model
EP4752844A1