WO2023142945A1 - 3d模型生成方法及相关装置 - Google Patents

3d模型生成方法及相关装置 Download PDF

Info

Publication number
WO2023142945A1
WO2023142945A1 PCT/CN2023/070684 CN2023070684W WO2023142945A1 WO 2023142945 A1 WO2023142945 A1 WO 2023142945A1 CN 2023070684 W CN2023070684 W CN 2023070684W WO 2023142945 A1 WO2023142945 A1 WO 2023142945A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
target
component element
component
element set
Prior art date
Application number
PCT/CN2023/070684
Other languages
English (en)
French (fr)
Inventor
蓝宛君
廖晶堂
万聪灵
陈志平
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023142945A1 publication Critical patent/WO2023142945A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Definitions

  • the present application relates to the field of three-dimensional graphic modeling, and in particular to a method for generating a 3D model and related devices.
  • 3D digital content generation There are usually two types of methods for 3D digital content generation: one is to scan and obtain from the real world, and convert the geometry and material information of real-world objects into computer expressions such as mesh and texture maps; the other is to convert art design The teacher followed to build some digital content from scratch using modeling software.
  • the digital content generated by these two types of methods is usually provided to users or applications in the form of a complete 3D model.
  • the cost of storing and rendering and displaying the 3D digital content is also continuously increasing.
  • Embodiments of the present application provide a method for generating a 3D model and a related device. Using the present application, the storage cost of 3D digital content can be reduced and the rendering efficiency can be improved.
  • the embodiment of the present application provides a method for generating a 3D model, including:
  • the terminal device sends an acquisition request to the server, and the acquisition request carries the user identification and the 3D model category identification;
  • the terminal device receives the response message sent by the server for the acquisition request, the response message includes the component element set of the target 3D model determined by the server according to the user identifier and the 3D model category identifier and the combination rule of the target 3D model; at least one component element set is stored in the server Elements and at least one preset combination rule, at least one preset combination rule corresponds to at least one component element set, each component element set in the at least one component element set includes one or more of at least one component element; target 3D
  • the combination rule of the model is a combination rule corresponding to the component element set of the target 3D model in at least one preset combination rule; the number of component elements in the component element set of the target 3D model is less than the number of component elements forming the target 3D model ;
  • the terminal device combines and renders according to the component element set of the target 3D model and the combination rule of the target 3D model to obtain the target 3D model.
  • the method of this application can reduce the storage overhead of the server; What is transmitted is the component element set and combination rules, not the complete 3D model, so the bandwidth resources between the terminal device and the server can be reduced; when rendering, only the rendering information for the component elements in the component element set is used to render the complete 3D model Rendering does not require the rendering information of the component elements that make up the complete 3D model, so the cost of storing rendering information can be reduced, and the rendering efficiency of the model can also be improved.
  • the component element set of the target 3D model includes the geometric information of each component element in the component element set of the target 3D model
  • the terminal device combines the component element set of the target 3D model and the combination rule of the target 3D model and rendering to get the target 3D model, including:
  • the terminal device copies some or all of the component elements in the component element set of the target 3D model according to the combination rule, so as to obtain the component elements forming the target 3D model;
  • the terminal device combines and processes the component elements constituting the target 3D model according to a combination rule to obtain an unrendered target 3D model;
  • the terminal device renders the unrendered target 3D model according to the geometric information of each component element in the component element set of the target 3D model, so as to obtain the target 3D model.
  • the server also stores the material mapping information of each component element in the at least one component element, and the response message also carries the material mapping information of each component element in the component element set of the target 3D model; Render the unrendered target 3D model according to the geometric information of each component element in the component element set of the target 3D model to obtain the target 3D model, including:
  • the method of the present application also includes:
  • the terminal device obtains the material map information of each component element in the component element set input by the user;
  • the terminal device renders the unrendered target 3D model according to the material map information and geometric information of each component element in the component element set of the target 3D model input by the user, so as to obtain the target 3D model.
  • the material map information input by the user is introduced during rendering, which can meet the user's personalized requirements for the 3D model.
  • the embodiment of the present application provides a method for generating a 3D model, including:
  • the acquisition request carries the user identification and the identification of the 3D model, and obtain the component element set of the target 3D model and the combination rule of the target 3D model from the server according to the identification of the user identification and the 3D model;
  • At least one component element and at least one preset combination rule are stored; at least one preset combination rule corresponds to at least one component element set, and each component element set in the at least one component element set includes one or Multiple;
  • the combination rule of the target 3D model is a combination rule corresponding to the component element set of the target 3D model in at least one preset combination rule; the number of component elements in the component element set of the target 3D model is less than the components that make up the target 3D model The number of elements; sending a response message to the acquisition request to the terminal device, where the response message includes component element sets of the target 3D model and combination rules of the target 3D model.
  • the method of this application can reduce the storage overhead of the server; What is transmitted is the component element set and combination rules, not the complete 3D model, so the bandwidth resources between the terminal device and the server can be reduced.
  • the server also stores the material mapping information of each component element in at least one component element, and the response message also carries the material mapping information of each component element in the component element set of the target 3D model.
  • the embodiment of the present application further provides a terminal device, including:
  • a sending unit configured to send an acquisition request to the server, where the acquisition request carries a user identifier and a 3D model category identifier;
  • the receiving unit is used to receive a response message sent by the server for the acquisition request, the response message includes the component element set of the target 3D model determined by the server according to the user identifier and the 3D model category identifier and the combination rule of the target 3D model; At least one component element and at least one preset combination rule, the at least one preset combination rule corresponds to at least one component element set, and each component element set in the at least one component element set includes one or more of the at least one component element.
  • the combination rule of the target 3D model is a combination rule corresponding to the component element set of the target 3D model in at least one preset combination rule; the number of component elements in the component element set of the target 3D model is less than the components that make up the target 3D model the number of elements;
  • the combination rendering unit is configured to combine and render according to the component element set of the target 3D model and the combination rule of the target 3D model, so as to obtain the target 3D model.
  • the component element set of the target 3D model includes geometric information of each component element in the component element set of the target 3D model, and the combined rendering unit is specifically used for:
  • the server also stores the material mapping information of each component element in the at least one component element
  • the response message also carries the material mapping information of each component element in the component element set of the target 3D model
  • the combined rendering unit is specifically used for:
  • An acquisition unit configured to acquire the material map information of each component element in the component element set input by the user
  • the combined rendering unit is specifically used for:
  • a receiving unit configured to receive an acquisition request sent by the terminal device, the acquisition request carrying the user identification and the identification of the 3D model,
  • the determination unit is used to obtain the component element set of the target 3D model and the combination rule of the target 3D model from the server according to the user identification and the identification of the 3D model; at least one component element and at least one preset combination rule are stored in the server; at least A preset combination rule corresponds to at least one component element set, and each component element set in the at least one component element set includes one or more of at least one component element; the combination rule of the target 3D model is at least one preset combination Combination rules in the rules corresponding to the set of component elements of the target 3D model; the number of component elements in the set of component elements of the target 3D model is less than the number of component elements forming the target 3D model;
  • the sending unit is configured to send a response message to the acquisition request to the terminal device, where the response message includes a component element set of the target 3D model and a combination rule of the target 3D model.
  • the server also stores the material mapping information of each component element in at least one component element, and the response message also carries the material mapping information of each component element in the component element set of the target 3D model.
  • the embodiment of the present application also provides a chip system, which is applied to electronic equipment;
  • the chip system includes one or more interface circuits, and one or more processors; the interface circuit and the The processors are interconnected by wires; the interface circuit is used to receive signals from the memory of the electronic device and send the signals to the processor, the signals include computer instructions stored in the memory; when the processing When the computer executes the computer instructions, the electronic device executes part or all of the method described in the first aspect or the second aspect.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the first aspect or the second aspect. part or all of the method.
  • the embodiments of the present application further provide a computer program, which is executed to implement part or all of the method described in the first aspect or the second aspect.
  • FIG. 1 is a schematic diagram of a set of component elements provided by an embodiment of the present application.
  • Figure 2b provides a schematic diagram of a system according to an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a snowflake 3D model mentioned in the embodiment of the present application.
  • Fig. 5 is a schematic diagram of a petal 3D model provided by the embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of another terminal device provided by an embodiment of the present application.
  • Composition rules refer to the process of describing the combination of component elements according to certain spatial positions such as symmetry, uniform distribution or function description after certain processing such as rotation and scaling.
  • FIG. 2a is a schematic diagram of a system provided by an embodiment of the present application. As shown in FIG. 2 a , the system includes a terminal device 201 and a server 202 .
  • the terminal device 201 is a device capable of performing data processing and graphics rendering functions.
  • Common terminal devices include: mobile phones, tablets, laptops, PDAs, mobile internet devices (mobile internet devices, MIDs), IoT devices, wearable devices (such as smart watches, smart bracelets, pedometers), etc. .
  • the terminal device 201 sends an acquisition request to the server 202, and the acquisition request carries the identification of the target 3D model; the server 202 stores at least one component element and at least one preset combination rule, and the at least one preset combination rule is combined with at least one component
  • the element set corresponds to each component element set in at least one component element set including one or more of at least one component element; the server 202 obtains the component element of the target 3D model from at least one component element according to the user identification and the 3D model category identification set, and obtain the combination rule of the target 3D model from a plurality of preset combination rules; the server 202 sends to the terminal device 201 a response message carrying the component element set of the target 3D model and the combination rule of the target 3D model; the terminal device 201 After receiving the component element set of the target 3D model and the combination rule of the target 3D model, the target 3D model is obtained by combining and rendering according to the component element set of the target 3D model and the combination rule of the target 3D model.
  • the above system further includes a rendering display device 203.
  • the terminal device 201 obtains the unrendered target 3D model based on the component element set and combination rules of the target 3D model, the unrendered target 3D model is The target 3D model is input to the rendering and display device 203, and the rendering and display device 203 renders and displays the unrendered target 3D model.
  • the server stores the component elements and combination rules that can constitute the 3D model.
  • the method of the present application can reduce the server’s overhead. Storage overhead; since the component element set and combination rules are transmitted between the terminal device and the server, not the complete 3D model, the bandwidth resources between the terminal device and the server can be reduced; when rendering, only the set of component elements is used The rendering information of the component elements renders the complete 3D model without the rendering information of the component elements forming the complete 3D model, so the cost of storing the rendering information can be reduced, and the rendering efficiency of the model can also be improved.
  • the rendering information may include geometric information of the component element, and may also include material mapping information of the component element.
  • FIG. 3 is a schematic flowchart of a method for generating a 3D model provided in an embodiment of the present application. As shown in Figure 3, the method includes:
  • the terminal device sends an acquisition request to the server, where the acquisition request carries a user identifier and a 3D model category identifier.
  • the user identifier may be the user's ID, or the user's avatar, or the user's fingerprint information or voiceprint information.
  • the 3D model category identifier may be an ID of the 3D model, or an image of the 3D model.
  • the terminal device receives a response message sent by the server for the acquisition request, the response message including the component element set of the target 3D model and the combination rule of the target 3D model determined by the server according to the user identifier and the 3D model category identifier.
  • At least one element and at least one preset combination rule are stored in the server, and the at least one preset combination rule corresponds to at least one component element set, and each component element set in the at least one component element set includes the above-mentioned at least one component One or more of the elements, the combination rule of the target 3D model is a combination rule corresponding to the component element set of the target 3D model in at least one preset combination rule.
  • the number of component elements in the component element set of the target 3D model is less than the number of component elements constituting the target 3D model.
  • the response message further includes a start bit and/or an end bit of the combination rule of the target 3D model.
  • the combination rule can be determined in the response message through the start bit and/or end bit of the combination rule; optionally, the response message further includes an identifier of the combination rule, which is used to indicate the type of the combination rule.
  • the server stores at least one component element set of the 3D model, at least one combination rule corresponding to the at least one component element set of the 3D model, and a corresponding relationship table, and the corresponding relationship table is the component element set of the 3D model and A correspondence table of the user identification and the 3D model category identification; after the server receives the user identification and the 3D model category identification, it determines the component element set of the target 3D model based on the received user identification, the 3D model category identification and the correspondence table, and Get the composition rules corresponding to the set of component elements of the target 3D model.
  • At least one category of component element sets is stored in the server, and the component element sets in the at least one category of component element sets include at least one component element, and one or more of the at least one component element is related to one Corresponding to the user identifier; after receiving the user identifier and the 3D model category identifier, the server determines that the 3D model required by the terminal device is the target 3D model based on the 3D model category identifier, that is, the model indicated by the 3D model category identifier is the target 3D model; The server determines the target 3D model, and determines the category of the component elements that make up the target 3D model according to prior knowledge; determines the component elements that make up the target 3D model from the component elements of the above-mentioned multiple categories according to the category of the component elements that make up the target 3D model One or more component element sets corresponding to the category of the user; the terminal device determines one or more component element sets corresponding to the target user identification from each component element set in the one or more component
  • a set of component elements of a category corresponds to a combination rule, that is, the combination rules of component elements belonging to the same category are the same, and they are all combination rules corresponding to the set of component elements of this category.
  • At least one component element, or at least one category of component element set is stored in the server; after the server obtains the user identifier and the 3D model category identifier, it performs the user identifier and the 3D model category identifier according to a preset function Processing to obtain the identification of the component element in the component element set of the target 3D model; based on the identification of the component element, determine the element indicated by the identification of the component element from the component elements stored in the memory; these component elements constitute the target 3D model Set of component elements.
  • a set of component elements of a category corresponds to a combination rule, that is, the combination rules of component elements belonging to the same category are the same, and they are all combination rules corresponding to the set of component elements of this category.
  • the combination rule of each component element in the component element set of the target 3D model can be obtained at the same time.
  • the server also stores combination rules for each component element in the at least one component element stored in the server, and when the server determines the component element set of the target 3D model from the at least one component element stored in the server, it can simultaneously Gets the combination rules for each component element in the component element set of the target 3D model.
  • the combination rule of the target 3D model includes a combination rule of each component element in the component element set of the target 3D model.
  • At least one preset combination rule is stored in the server, and the at least one preset combination rule corresponds to at least one component element set.
  • the server determines the component element set of the target 3D model according to the above method, according to at least one The correspondence between the preset combination rule and at least one component element set determines the preset combination rule corresponding to the component element set of the target 3D model, and the combination rule is the combination rule of the target 3D model.
  • the terminal device combines and renders the target 3D model according to the combination rules of the component elements of the target 3D model set and the target 3D model, so as to obtain the target 3D model.
  • the component element set of the target 3D model includes the geometric information of each component element in the component element set of the target 3D model, and the terminal device combines and Render to get the target 3D model, including:
  • the combination rule of the target 3D model is used to represent the quantity, position information, whether to zoom, whether to rotate, etc. of each component element in the component element set of the target 3D model in the target 3D model;
  • the quantity of each component element in the component element set of the target 3D model in the model is used to copy the component element; it should be understood that if there is only one component element in the target 3D model, the component element does not need to be scaled; if according to Combination rules determine that a certain component element is scaled and/or rotated, then the component element is scaled and/or rotated; the component elements that make up the target 3D model can be obtained by processing in the above-mentioned manner, wherein the components that make up the target 3D model The number of elements is greater than the number of component elements in the target component element set of the target 3D model.
  • the terminal device combines the component elements that make up the target 3D model according to the position information of the component elements represented by the combination rules of the target 3D model to obtain an unrendered target 3D model; the component element set of the target 3D model includes each The geometric information of the component elements: the terminal device renders the corresponding component elements among the component elements constituting the target 3D model according to the geometric information of the component elements, so as to obtain the target 3D model.
  • the component elements that make up the target 3D model include three component elements A and four component elements B.
  • the terminal device renders the three component elements according to the geometric information of component element A, and renders the four component elements according to the geometric information of component element B.
  • a component element B is rendered.
  • the location information is used to represent the combination relationship between the component elements, for example, the component elements are evenly distributed, or equidistantly distributed, or distributed in a manner described by mathematical language.
  • the combination rule of the target 3D model includes the combination rule of each component element in the component element set of the target 3D model, and the terminal device acquires the component element set and the combination rule of the target 3D model, according to the
  • the combination rules of each component element in the component element set process the component element, including but not limited to one or more of copying, rotation and scaling, to obtain the component elements that make up the target 3D model; according to each component Combining the component elements of the target 3D model with the position information represented by the combination rules of the elements to obtain an unrendered target 3D model; rendering the corresponding component elements among the component elements that make up the target 3D model according to the geometric information of the component elements to obtain Get the target 3D model.
  • the server also stores the material mapping information of each component element in at least one component element
  • the response message also carries the material mapping information of each component element in the component element set of the target 3D model; according to the target
  • the geometric information of each component element in the component element set of the 3D model renders the unrendered target 3D model to obtain the target 3D model, including:
  • the terminal device wants to generate a snowflake 3D model of user A
  • the terminal device sends user A's identification and 3D model category identification to the server, and the 3D model category identification is used to indicate the snowflake 3D model
  • Model category identification Obtain the component element set and combination rules of the snowflake 3D model
  • the component element set of the snowflake 3D model includes 4 component elements, including component element a, component element b, component element c and component element d, as shown in Figure 1
  • the terminal device copies each component element in the component element set of the snowflake 3D model according to the combination rules of the snowflake 3D model, so that the number of each component element is 6, that is, 6 component elements a are obtained after copying, 6 component elements b, 6 component elements c and 6 component elements d, a total of 24 component elements; then the terminal combines the 24 component elements according to the position information of each component element indicated by the combination rule to obtain the following The rendered snowflake 3D model; the terminal
  • the terminal device according to the position information represented by the combination rule of component element a, the position information represented by the combination rule of component element b, the position information represented by the combination rule of component element c, and the position information represented by the combination rule of component element d
  • the terminal device Combining component element a, component element b, component element c and component element d to obtain a sub-model based on position information; copying the sub-model based on the number of combination rules to obtain 6 sub-models; for 6 sub-models Rotate 0°, 60°, 120°, 180°, 240° and 300° respectively, and then surround the rotated 6 sub-models in order of rotation degrees from small to large to get an unrendered snowflake 3D model;
  • the terminal device renders six component elements a in the unrendered snowflake 3D model according to the geometric information and material mapping information of component element a, and renders the six component elements a in the unrendered snowflake 3D model according to the geometric information and material mapping information
  • the 6 component elements b are rendered, and the 6 component elements c in the unrendered snowflake 3D model are rendered according to the geometric information and material map information of the component element c, and the unrendered components are rendered according to the geometric information and material map information of the component element d.
  • the six component elements d in the snowflake 3D model are rendered, and finally the snowflake 3D model shown in Figure 4 is obtained.
  • the terminal device sends the identifier of user A and the 3D model category identifier to the server, and the 3D model category identifier is used to indicate the 3D model of the petal;
  • the 3D model category identification obtains the component element set and combination rules of the petal 3D model; wherein, the component element set of the petal 3D model includes 2 component elements, including component element e and component element f;
  • the component element set component element e of the petal 3D model is copied to obtain 8 component elements e; then the terminal combines the 8 component elements and the component element f according to the position information indicated by the combination rule to obtain the unrendered petal 3D
  • the model is shown in Figure 5; the terminal device renders the 8 component elements e in the unrendered snowflake 3D model according to the geometric information and material map information of the component element e, and renders the 8 component elements e in the unrendered snowflake 3D model according to
  • the combination rule of the petal 3D model includes the combination rule of the component element e and the combination rule of the component element f; the component element e is copied according to the combination rule of the component element e to obtain 8 component elements e;
  • the combination rule of component element f does not copy component element f; according to the combination rule of component element e, rotate 8 component elements a clockwise by 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315°, and then surround the rotated 8 component elements e in a circle according to the order of rotation degrees from small to large, so as to obtain a sub-model composed of 8 component elements e;
  • the terminal device is based on the combination of component elements e
  • the position information represented by the rule and the combination of the component element f The position information represented by the rule combines the above-obtained sub-model and the component element f to obtain an unrendered 3D model of the petal.
  • the server stores the component elements and combination rules that can constitute the 3D model.
  • the method of the present application can reduce the server’s overhead. Storage overhead; since the component element set and combination rules are transmitted between the terminal device and the server, not the complete 3D model, bandwidth resources between the terminal device and the server can be reduced; when rendering, only the components in the component element set are used
  • the rendering information of the elements renders the complete 3D model without the rendering information of the component elements that make up the complete 3D model.
  • the complete 3D model can be rendered using the rendering information of the component elements in the component element set. Therefore, the overhead of storing rendering information can be reduced, and the rendering efficiency of the model can also be improved.
  • the rendering information here may include geometric information of component elements, and may also include material mapping information of component elements.
  • FIG. 6 is a schematic flowchart of a method for generating a 3D model provided by an embodiment of the present application. As shown in Figure 6, the method includes:
  • the server receives an acquisition request sent by a terminal device, where the acquisition request carries a user identifier and an identifier of a 3D model.
  • the component elements constituting the 3D model include the same or similar component elements.
  • the target 3D model may be a symmetrical model, such as a petal 3D model, a snowflake 3D model, a fruit 3D model, and the like.
  • some models in the target 3D model are symmetrical.
  • At least one element and at least one preset combination rule are stored in the server, and the at least one preset combination rule corresponds to at least one component element set, and each component element set in the at least one component element set includes the above-mentioned at least one component One or more of the elements, the combination rule of the target 3D model is a combination rule corresponding to the component element set of the target 3D model in at least one preset combination rule.
  • the number of component elements in the component element set of the target 3D model is less than the number of component elements constituting the target 3D model.
  • a set of component elements of a category corresponds to a combination rule, that is, the combination rules of component elements belonging to the same category are the same, and they are all combination rules corresponding to the set of component elements of this category.
  • the server also stores the material mapping information of each component element in at least one component element, and the response message also carries the material mapping information of each component element in the component element set of the target 3D model.
  • FIG. 7 is a schematic structural diagram of a terminal device provided in an embodiment of the present application. As shown in FIG. 7, the terminal device 700 includes:
  • the sending unit 701 is configured to send an acquisition request to the server, where the acquisition request carries a user identifier and a 3D model category identifier;
  • the sending unit 803 is configured to send a response message to the acquisition request to the terminal device, where the response message includes a component element set of the target 3D model and a combination rule of the target 3D model.
  • the server 800 is presented in the form of a unit.
  • the "unit” here may refer to an application-specific integrated circuit (ASIC), a processor and memory executing one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above functions .
  • the determining unit 802 may be implemented by the processor 1001 of the server shown in FIG. 10 .
  • the code stored in the memory 902 can execute any of the 3D model generation methods provided above, such as:
  • Memory 1002 can be ROM or other types of static storage devices that can store static information and instructions, RAM) or other types of dynamic storage devices that can store information and instructions, and can also be EEPROM, CD-ROM or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be used by Any other medium accessed by a computer, but not limited to.
  • the memory can exist independently and be connected to the processor through the bus. Memory can also be integrated with the processor.
  • the code stored in the memory 1002 can execute any of the 3D model generation methods provided above, such as:
  • the embodiment of the present application also provides a computer storage medium, wherein the computer storage medium can store a program, and when the program is executed, some or all steps of any 3D model generation method described in the above method embodiments are included.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable memory.
  • the technical solution of the present application is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory.
  • Several instructions are included to make a computer device (which may be a personal computer, server or network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the above-mentioned memory includes various media capable of storing program codes such as U disk, ROM, RAM, mobile hard disk, magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请公开了一种3D模型生成方法及相关装置,该方法包括:向服务器发送获取请求,获取请求携带有用户标识和3D模型类别标识;接收服务器发送的针对获取请求的响应消息,该响应消息包括服务器根据用户标识和3D模型类别标识确定的目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素及至少一个预设的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;根据目标3D模型的组件元素集和目标3D模型的组合规则进行组合和渲染,以得到目标3D模型。采用本申请的方法可以降低3D数据内容的存储开销和提高了3D模型的渲染效率。

Description

3D模型生成方法及相关装置
本申请要求于2022年01月27日提交中国国家知识产权局、申请号为202210104058.5、发明名称为“3D模型生成方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及三维图形建模领域,尤其涉及一种3D模型生成方法及相关装置。
背景技术
随着元宇宙浪潮的兴起,对3D数字内容需求也不断的增加。3D数字内容生成通常有两大类方法:一是从真实世界扫描获取,对真实世界的物体的几何,材质等信息转化为计算机的表达如mesh和材质贴图等;另一类方法是对美术设计师按照利用建模软件从无生有,构建一些数字内容。这两类方法生成的数字内容通常是以完整的3D模型形态提供给用户或者应用。随着3D数字内容的不断积累,对3D数字内容的存储和渲染显示的代价也不断的增长。
发明内容
本申请实施例提供一种3D模型生成方法及相关装置,采用本申请可以降低3D数字内容的存储开销和提高渲染效率。
第一方面,本申请实施例提供一种3D模型生成方法,包括:
终端设备向服务器发送获取请求,获取请求携带有用户标识和3D模型类别标识;
终端设备接收服务器发送的针对获取请求的响应消息,该响应消息包括服务器根据用户标识和3D模型类别标识确定的目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素及至少一个预设的组合规则,至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素中的一个或多个;目标3D模型的组合规则为至少一个预设的组合规则中与目标3D模型的组件元素集对应的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;
终端设备根据目标3D模型的组件元素集和目标3D模型的组合规则进行组合和渲染,以得到目标3D模型。
由于服务器中存储的是可以构成3D模型的组件元素及组合规则,相对于现有技术中存储的完整的3D模型,采用本申请的方法,可以降低服务器的存储开销;由于终端设备和服务器之间传输的是组件元素集和组合规则,不是完整的3D模型,因此可以降低终端设备和服务器之间的带宽资源;在渲染时,只是利用针对组件元素集中的组件元素的渲染信息对完整的3D模型进行渲染,不需要组成完整3D模型的组件元素的渲染信息,因此可以减小存储渲染信息的开销,也可以提高模型的渲染效率。
在一个可行的实施例中,目标3D模型的组件元素集中包括目标3D模型的组件元素集中每个组件元素的几何信息,终端设备根据目标3D模型的组件元素集和目标3D模型的组合规则进行组合和渲染,以得到目标3D模型,包括:
终端设备根据组合规则对目标3D模型的组件元素集中的部分或者全部组件元素进行复制,以得到组成目标3D模型的组件元素;
终端设备根据组合规则对所述组成目标3D模型的组件元素组合处理,以得到未渲染的目标3D模型;
终端设备根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。
在一个可行的实施例中,服务器中还存储有所述至少一个组件元素中每个组件元素的材质贴图信息,响应消息还携带目标3D模型的组件元素集中的每个组件元素的材质贴图信息;根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的所述目标3D模型进行渲染,以得到目标3D模型,包括:
根据目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。
在渲染时通过引入材质贴图信息,可以得到更加逼真和信息丰富的3D模型。
在一个可行的实施例中,本申请的方法还包括:
终端设备获取用户输入的所述组件元素集中每个组件元素的材质贴图信息;
终端设备根据目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的目标3D模型进行渲染,以得到目标3D模型,包括:
终端设备根据用户输入的目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对未渲染的所述目标3D模型进行渲染,以得到目标3D模型。
采用本实施例的方式,在渲染时引入用户输入的材质贴图信息,可以满足用户对3D模型的个性化需求。
第二方面,本申请实施例提供一种3D模型生成方法,包括:
接收终端设备发送的获取请求,该获取请求携带有用户标识和3D模型的标识,根据用户标识和3D模型的标识从服务器中获取目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素和至少一个预设的组合规则;至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素中的一个或多个;目标3D模型的组合规则为至少一个预设的组合规则中与目标3D模型的组件元素集对应的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成目标3D模型的组件元素的数量;向终端设备发送针对获取请求的响应消息,该响应消息包括目标3D模型的组件元素集及目标3D模型的组合规则。
由于服务器中存储的是可以构成3D模型的组件元素及组合规则,相对于现有技术中存储的完整的3D模型,采用本申请的方法,可以降低服务器的存储开销;由于终端设备和服务器之间传输的是组件元素集和组合规则,不是完整的3D模型,因此可以降低终端设备和服务器之间的带宽资源。
在一个可行的实施例中,服务器中还存储有至少一个组件元素中每个组件元素的材质贴图信息,响应消息还携带目标3D模型的组件元素集中的每个组件元素的材质贴图信息。
在渲染时通过引入材质贴图信息,可以得到更加逼真和信息丰富的3D模型。
第三方面,本申请实施例还提供一种终端设备,包括:
发送单元,用于向服务器发送获取请求,获取请求携带有用户标识和3D模型类别标识;
接收单元,用于接收服务器发送的针对获取请求的响应消息,该响应消息包括服务器根据用户标识和3D模型类别标识确定的目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素及至少一个预设的组合规则,至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素 中的一个或多个;目标3D模型的组合规则为至少一个预设的组合规则中与目标3D模型的组件元素集对应的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;
组合渲染单元,用于根据目标3D模型的组件元素集和目标3D模型的组合规则进行组合和渲染,以得到目标3D模型。
在一个可行的实施例中,目标3D模型的组件元素集中包括目标3D模型的组件元素集中每个组件元素的几何信息,组合渲染单元具体用于:
根据组合规则对目标3D模型的组件元素集中的部分或者全部组件元素进行复制,以得到组成目标3D模型的组件元素;根据组合规则对所述组成目标3D模型的组件元素组合处理,以得到未渲染的目标3D模型;根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。
在一个可行的实施例中,服务器中还存储有所述至少一个组件元素中每个组件元素的材质贴图信息,响应消息还携带目标3D模型的组件元素集中的每个组件元素的材质贴图信息;在根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的所述目标3D模型进行渲染,以得到目标3D模型的方面,组合渲染单元具体用于:
根据目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。
在一个可行的实施例中,终端设备还包括:
获取单元,用于获取用户输入的所述组件元素集中每个组件元素的材质贴图信息;
在根据目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的目标3D模型进行渲染,以得到目标3D模型的方面,组合渲染单元具体用于:
根据用户输入的目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对未渲染的所述目标3D模型进行渲染,以得到目标3D模型。
第四方面,本申请实施例提供一种服务器,包括:
接收单元,用于接收终端设备发送的获取请求,该获取请求携带有用户标识和3D模型的标识,
确定单元,用于根据用户标识和3D模型的标识从服务器中获取目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素和至少一个预设的组合规则;至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素中的一个或多个;目标3D模型的组合规则为至少一个预设的组合规则中与目标3D模型的组件元素集对应的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成目标3D模型的组件元素的数量;
发送单元,用于向终端设备发送针对获取请求的响应消息,该响应消息包括目标3D模型的组件元素集及目标3D模型的组合规则。
在一个可行的实施例中,服务器中还存储有至少一个组件元素中每个组件元素的材质贴图信息,响应消息还携带目标3D模型的组件元素集中的每个组件元素的材质贴图信息。
第五方面,本申请实施例还提供一种终端设备,包括处理器和存储器,其中,所述处理器和存储器相连,其中,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,以执行第一方面所述的方法的部分或者全部。
第六方面,本申请实施例还提供一种服务器,包括处理器和存储器,其中,所述处理器和存储器相连,其中,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码, 以执行第二方面所述的方法的部分或者全部。
第七方面,本申请实施例还提供一种芯片系统,该芯片系统应用于电子设备;所述芯片系统包括一个或多个接口电路,以及一个或多个处理器;所述接口电路和所述处理器通过线路互联;所述接口电路用于从所述电子设备的存储器接收信号,并向所述处理器发送所述信号,所述信号包括所述存储器中存储的计算机指令;当所述处理器执行所述计算机指令时,所述电子设备执行第一方面或第二方面所述的方法的部分或者全部。
第八方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现第一方面或第二方面所述的方法的部分或者全部。
第九方面,本申请实施例还提供一种计算机程序,该计算机程序被执行以实现第一方面或第二方面所述的方法的部分或者全部。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供一种组件元素集示意图;
图2a为本申请实施例提供一种系统示意图;
图2b为本申请实施例提供一种系统示意图;
图3为本申请实施例提供的一种3D模型生成方法的流程示意图;
图4为本申请实施例提到的一种雪花3D模型示意图;
图5为本申请实施例提供的一种花瓣3D模型示意图;
图6为本申请实施例提供的另一种3D模型生成方法的流程示意图;
图7为本申请实施例提供的一种终端设备的结构示意图;
图8为本申请实施例提供的一种服务器的结构示意图;
图9为本申请实施例提供的另一种终端设备的结构示意图;
图10为本申请实施例提供的另一种服务器的结构示意图。
具体实施方式
以下分别进行详细说明。
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
下面对本申请涉及的术语进行解释说明。
组件元素,是指形状不同的3D模型。可以组成一个人或者物体的组件元素为组件元素集。比如一人的3D模型包括头部3D模型、四肢3D模型及躯干3D模型,头部3D模型、四肢3D模型及躯干3D模型可以构成一个组件元素集。如图1所示,图1示意出了可以组成雪花3D模型的4个组件元素。该4个组件元素可以构成一个雪花3D模型的组件元素集。
组合规则是指描述组件元素按照某种特定的处理如旋转、缩放等之后按照某种空间位置如对称、均匀分布或者函数描述等进行组合的过程。
下面结合附图对本申请的实施例进行描述。
参见图2a,图2a为本申请实施例提供的一种系统示意图。如图2a所示,该系统包括终端设备201和服务器202。
其中,终端设备201,是一种能够进行数据处理和图形渲染功能的设备。常见的终端设备包括:手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID)、物联网设备,可穿戴设备(例如,智能手表、智能手环、计步器)等。
服务器202为可用于数据存储、处理和传输的设备。比如可以为云服务器、分布式服务器、集成式服务器、机架式服务器、机柜式服务器、刀片式服务器等。
终端设备201向服务器202发送获取请求,获取请求携带有目标3D模型的标识;服务器202中存储有至少一个组件元素和至少一个预设的组合规则,该至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素中的一个或多个;服务器202根据用户标识和3D模型类别标识从至少一个组件元素中获取目标3D模型的组件元素集,并从多个预设的组合规则中获取目标3D模型的组合规则;服务器202向终端设备201发送携带有目标3D模型的组件元素集及目标3D模型的组合规则的响应消息;终端设备201在接收到目标3D模型的组件元素集及目标3D模型的组合规则后,根据目标3D模型的组件元素集及目标3D模型的组合规则进行组合和渲染得到目标3D模型。
在另一个实例中,如图2b所示,上述系统还包括渲染显示设备203,终端设备201在基于目标3D模型的组件元素集和组合规则得到未渲染的目标3D模型后,将该未渲染的目标3D模型输入至渲染显示设备203,渲染显示设备203对未渲染的目标3D模型进行渲染和显示。
在此需要指出的是,上述组件元素的表现形式包括但不限于点云和mesh。
可以看出,在本申请的方案中,服务器中存储的是可以构成3D模型的组件元素及组合规则,相对于现有技术中存储的完整的3D模型,采用本申请的方法,可以降低服务器的存储开销;由于终端设备和服务器之间传输的是组件元素集和组合规则,不是完整的3D模型,因此可以降低终端设备和服务器之间的带宽资源;在渲染时,只是利用针对组件元素集中的组件元素的渲染信息对完整的3D模型进行渲染,不需要组成完整3D模型的组件元素的渲染信息,因此可以减小存储渲染信息的开销,也可以提高模型的渲染效率。
可选的,渲染信息可以包括组件元素的几何信息,还可以包括组件元素的材质贴图信息。
参见图3,图3为本申请实施例提供的一种3D模型生成方法的流程示意图。如图3所示, 该方法包括:
S301、终端设备向服务器发送获取请求,该获取请求携带有用户标识和3D模型类别标识。
可选的,用户标识可以为该用户的ID、或者该用户的头像、或者该用户的指纹信息或者声纹信息。可选的,3D模型类别标识可以为3D模型的ID,或者3D模型的图像。
其中,组成3D模型的组件元素包括相同或者相近的组件元素。目标3D模型可以为对称的模型,比如花瓣3D模型、雪花3D模型、水果3D模型等。可选的,目标3D模型中的部分模型是对称的。
S302、终端设备接收服务器发送的针对获取请求的响应消息,该响应消息包括服务器根据用户标识和3D模型类别标识确定的目标3D模型的组件元素集及目标3D模型的组合规则。
其中,服务器中存储有至少一个元素及至少一个预设的组合规则,该至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括上述至少一个组件元素中的一个或多个,目标3D模型的组合规则为至少一个预设的组合规则中目标3D模型的组件元素集对应的组合规则。目标3D模型的组件元素集中的组件元素的数量少于组成目标3D模型的组件元素的数量。
可选的,响应消息还包括目标3D模型的组件元素集中每个组件元素的标识,用于指示该组件元素的类型,比如组成人的3D模型的组件元素,可以通过组件元素的标识可以确定组件元素是头部的组件元素还是四肢的组件元素;可选的,响应消息还包括目标3D模型的组件元素集中每个组件元素的起始位和/或结束位。通过组件元素的起始位和/或结束位可以在响应消息中确定出该组件元素。
可选地,响应消息还包括目标3D模型的组合规则的起始位和/或结束位。通过组合规则的起始位和/或结束位可以在响应消息中确定出该组合规则;可选的,响应消息还包括组合规则的标识,用于指示该组合规则的类型。
在一个示例中,服务器中存储有至少一个3D模型的组件元素集、与至少一个3D模型的组件元素集对应的至少一个组合规则及对应关系表,该对应关系表为3D模型的组件元素集与用户标识和3D模型类别标识的对应关系表;服务器在接收到用户标识和3D模型类别标识后,基于接收到的用户标识和3D模型类别标识和对应关系表确定目标3D模型的组件元素集,并获取与目标3D模型的组件元素集对应的组合规则。
在另一个实施例中,服务器中存储有至少一个类别的组件元素集,该至少一个类别的组件元素集中的组件元素集包括至少一个组件元素,该至少一个组件元素中的一个或多个与一个用户标识对应;服务器在接收到用户标识和3D模型类别标识后,基于3D模型类别标识确定终端设备所需的3D模型为目标3D模型,也就是3D模型类别标识所指示的模型为目标3D模型;服务器在确定目标3D模型,根据先验知识确定组成目标3D模型的组件元素的类别;根据组成目标3D模型的组件元素的类别从上述多个类别的组件元素集中确定出组成目标3D模型的组件元素的类别对应的一个或多个组件元素集;终端设备根据用户标识从该一个或多个组件元素集中的每个组件元素集中确定出与目标用户标识对应的一个或多个组件元素;若从一个组件元素集中确定出多个组件元素,终端设备则从多个组件元素中挑选出该用户使用频次最高的一个组件元素;按照该方式,终端设备从该一个或多个组件元素集中的每个组件元素集中挑选出与目标用户标识对应的一个组件元素,这些挑选出的组件元素构成了目标3D模型的组件元素集。服务器中,一个类别的组件元素集对应一个组合规则,也就是说,属于同一个类别的组件元素的组合规则是相同的,均为该类别的组件元素集对应的组合规则。按 照上述方式从服务器中存储的至少一组件元素集获取目标3D模型的组件元素集时,同时可以获取目标3D模型的组件元素集中每个组件元素的组合规则。此时,可以看成上述目标3D模型的组合规则包括目标3D模型的组件元素集中每个组件元素的组合规则。
在另一个实施例中,服务器中存储有至少一个组件元素,或者至少一个类别的组件元素集;服务器在得到用户标识和3D模型类别标识后,根据预设函数对用户标识和3D模型类别标识进行处理,以得到目标3D模型的组件元素集中组件元素的标识;基于该组件元素的标识从存储器中存储的组件元素中确定出该组件元素的标识所指示的元素;这些组件元素构成目标3D模型的组件元素集。服务器中,一个类别的组件元素集对应一个组合规则,也就是说,属于同一个类别的组件元素的组合规则是相同的,均为该类别的组件元素集对应的组合规则。按照上述方式从服务器中存储的至少一组件元素集获取目标3D模型的组件元素集时,同时可以获取目标3D模型的组件元素集中每个组件元素的组合规则。在一个示例中,服务器中还存储有服务器存储的至少一个组件元素中每个组件元素的组合规则,在服务器从其存储的至少一个组件元素中确定出目标3D模型的组件元素集时,同时可以获取目标3D模型的组件元素集中每个组件元素的组合规则。此时,可以看成上述目标3D模型的组合规则包括目标3D模型的组件元素集中每个组件元素的组合规则。
可选地,服务器中存储有至少一个预设的组合规则,该至少一个预设的组合规则与至少一个组件元素集对应,服务器在按照上述方式确定目标3D模型的组件元素集后,根据至少一个预设的组合规则与至少一个组件元素集的对应关系确定出目标3D模型的组件元素集对应的预设的组合规则,该组合规则即为目标3D模型的组合规则。
S303、终端设备根据目标3D模型的组件元素集合目标3D模型的组合规则进行组合和渲染,以得到目标3D模型。
在一个可行的实施例中,目标3D模型的组件元素集包括目标3D模型的组件元素集中每个组件元素的几何信息,终端设备根据目标3D模型的组件元素集合目标3D模型的组合规则进行组合和渲染,以得到目标3D模型,包括:
终端设备根据组合规则对目标3D模型的组件元素集中的部分或者全部组件进行复制,以得到组成目标3D模型的组件元素;根据组合规则对组成目标3D模型的组件元素进行组合,以得到未渲染的目标3D模型;根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。
具体的,目标3D模型的组合规则用于表征在目标3D模型中,目标3D模型的组件元素集中每个组件元素的数量、位置信息、是否进行缩放、是否进行旋转等;终端设备基于在目标3D模型中目标3D模型的组件元素集中每个组件元素的数量进行对该组件元素进行复制;应理解,若在目标3D模型中某个组件元素只有一个,则不需要对组件元素进行缩放;若根据组合规则确定对某个组件元素进行缩放和/或旋转,则对该组件元素进行缩放和/或旋转;按照上述方式进行处理可得到组成目标3D模型的组件元素,其中,组成目标3D模型的组件元素的数量大于目标3D模型的目标组件元素集中组件元素的数量。终端设备根据目标3D模型的组合规则表征的组件元素的位置信息对组成目标3D模型的组件元素进行组合,以得到未渲染的目标3D模型;目标3D模型的组件元素集中包括该组件元素集中每个组件元素的几何信息;终端设备根据组件元素的几何信息对组成目标3D模型的组件元素中对应的组件元素进行渲染,以得到目标3D模型。比如组成目标3D模型的组件元素中包括3个组件元素A和4个组件元素B,终端设备根据组件元素A的几何信息对该3个组件元素进行渲染,根据组件元素B的几何信息对该4个组件元素B进行渲染。
在此需要指出的是,位置信息用于表示组件元素之间的组合关系,比如组件元素之间是均匀分布的、或者按照等距分布的,或者用数学语言描述的方式分布的。
在另一个具体的实施例中,目标3D模型的组合规则包括目标3D模型的组件元素集中每个组件元素的组合规则,终端设备在获取目标3D模型的组件元素集和组合规则,根据目标3D模型的组件元素集中的每个组件元素的组合规则对该组件元素进行处理,包括但不限于复制、旋转和缩放中的一项或者多项,以得到组成目标3D模型的组件元素;根据每个组件元素的组合规则表示的位置信息对目标3D模型的组件元素进行组合,以得到未渲染的目标3D模型;根据组件元素的几何信息对组成目标3D模型的组件元素中对应的组件元素进行渲染,以得到目标3D模型。
在此需要指出的是,终端设备对目标3D模型的组件元素集中的组件元素执行的复制操作和组合操作不分先后顺序;可以是先执行复制操作,再执行组合操作;还可以是先执行组合操作,在执行复制操作,也可以是同时执行的。
在一个可行的实施例中,服务器中还存储有至少一个组件元素中每个组件元素的材质贴图信息,响应消息还携带目标3D模型的组件元素集中的每个组件元素的材质贴图信息;根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型,包括:
根据目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。
在一个可行的实施例中,本申请的方法还包括:
获取用户输入的组件元素集中每个组件元素的材质贴图信息;
根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型,包括:
根据用户输入的目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对未渲染的所述目标3D模型进行渲染,以得到目标3D模型。
在对组成目标3D模型的组件元素进行渲染时,还利用到的组件元素的材质贴图信息;在一个实施例中,服务器中存储有至少一个组件元素中每个组件元素的材质贴图信息,终端设备从服务器中获取的目标3D模型的组件元素集中不仅包括一个或多个组件元素,还包括该一个或多个组件元素中每个组件元素的材质贴图信息;在另一个实施例中,目标3D模型的组件元素集中每个组件元素的材质贴图信息是用户输入的,也就是说,在渲染之前,终端设备获取用户输入的目标3D模型的组件元素集中每个组件元素的材质贴图信息;再根据目标3D模型的组件元素集中每个组件元素的材质贴图信息和几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。与组件元素的几何信息一样,在渲染时,终端设备根据组件元素的材质贴图信息对组成目标3D模型的组件元素中对应的组件元素进行渲染,以得到目标3D模型。比如组成目标3D模型的组件元素中包括2个组件元素A和3个组件元素B,终端设备根据组件元素A的材质贴图信息对该2个组件元素进行渲染,根据组件元素B的材质贴图信息对该3个组件元素B进行渲染。
举例说明,假设终端设备要生成用户A的雪花3D模型,终端设备向服务器发送用户A的标识和3D模型类别标识,该3D模型类别标识用于指示雪花3D模型;服务器根据用户A的标识和3D模型类别标识获取雪花3D模型的组件元素集和组合规则;其中,雪花3D模型的组件元素集包括4个组件元素,包括组件元素a,组件元素b,组件元素c和组件元素d,如图1所示;终端设备根据雪花3D模型的组合规则对雪花3D模型的组件元素集中每个组件 元素进行复制,以使每个组件元素的数量均为6,也就是复制后得到6个组件元素a,6个组件元素b,6个组件元素c和6个组件元素d,共24个组件元素;然后终端根据组合规则所指示的每个组件元素的位置信息对24个组件元素进行组合,以得到未渲染的雪花3D模型;终端设备根据组件元素a的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素a进行渲染,根据组件元素b的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素b进行渲染,根据组件元素c的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素c进行渲染,根据组件元素d的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素d进行渲染,最终得到如图4所示的雪花3D模型。
在另一个示例中,雪花3D模型的组合规则包括组件元素a的组合规则、组件元素b的组合规则、组件元素c的组合规则和组件元素d的组合规则;根据组件元素a的组合规则对组件元素a进行复制,以得到6个组件元素a;根据组件元素b的组合规则对组件元素b进行复制,以得到6个组件元素b;根据组件元素c的组合规则对组件元素c进行复制,以得到6个组件元素c;根据组件元素d的组合规则对组件元素d进行复制,以得到6个组件元素d;按照组件元素a的组合规则,对6个组件元素a分别顺时针旋转0°、60°、120°、180°、240°和300°,再按照旋转度数从小到大的顺序将旋转后的6个组件元素a围成一圈,以得到有6个组件元素a构成的子模型;按照组件元素b的组合规则,对6个组件元素b分别顺时针旋转30°、90°、150°、210°、270°和330°,再按照旋转度数从小到大的顺序将旋转后的6个组件元素b围成一圈,以得到有6个组件元素b构成的子模型;按照组件元素c的组合规则,对6个组件元素c分别顺时针旋转0°、60°、120°、180°、240°和300°,再按照旋转度数从小到大的顺序将旋转后的6个组件元素c围成一圈,以得到有6个组件元素c构成的子模型;按照组件元素d的组合规则,对6个组件元素d分别顺时针旋转30°、0°、60°、120°、180°、240°和300°,再按照旋转度数从小到大的顺序将旋转后的6个组件元素d围成一圈,以得到有6个组件元素d构成的子模型;终端设备根据组件元素a的组合规则表示的位置信息、组件元素b的组合规则表示的位置信息、组件元素c的组合规则表示的位置信息和组件元素d的组合规则表示的位置信息对上述得到的子模型进行组合,以得到未渲染的雪花3D模型;终端设备根据组件元素a的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素a进行渲染,根据组件元素b的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素b进行渲染,根据组件元素c的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素c进行渲染,根据组件元素d的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素d进行渲染,最终得到如图4所示的雪花3D模型。
在另一个示例中,终端设备根据组件元素a的组合规则表示的位置信息、组件元素b的组合规则表示的位置信息、组件元素c的组合规则表示的位置信息和组件元素d的组合规则表示的位置信息对组件元素a、组件元素b、组件元素c和组件元素d进行组合,以得到一个子模型;基于组合规则表示的数量对该子模型进行复制,以得到6个子模型;对6个子模型分别旋转0°、60°、120°、180°、240°和300°,再按照旋转度数从小到大的顺序将旋转后的6个子模型围成一圈,以得到未渲染的雪花3D模型;终端设备根据组件元素a的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素a进行渲染,根据组件元素b的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素b进行渲染,根据组件元素c的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素c进行渲染,根据组件元素d的几何信息和材质贴图信息对未渲染的雪花3D模型中的6个组件元素d 进行渲染,最终得到如图4所示的雪花3D模型。
再举例说明,假设终端设备要生成用户A的花瓣3D模型,终端设备向服务器发送用户A的标识和3D模型类别标识,该3D模型类别标识用于指示花瓣3D模型;服务器根据用户A的标识和3D模型类别标识获取花瓣3D模型的组件元素集和组合规则;其中,花瓣3D模型的组件元素集包括2个组件元素,包括组件元素e和组件元素f;终端设备根据花瓣3D模型的组合规则对花瓣3D模型的组件元素集中组件元素e进行复制,以得到8个组件元素e;然后终端根据组合规则所指示的位置信息对8个组件元素和组件元素f进行组合,以得到未渲染的花瓣3D模型,如图5所示;终端设备根据组件元素e的几何信息和材质贴图信息对未渲染的雪花3D模型中的8个组件元素e进行渲染,根据组件元素f的几何信息和材质贴图信息对未渲染的花瓣3D模型中的组件元素f进行渲染,最终得到花瓣3D模型。
在另一个示例中,花瓣3D模型的组合规则包括组件元素e的组合规则和组件元素f的组合规则;根据组件元素e的组合规则对组件元素e进行复制,以得到8个组件元素e;根据组件元素f的组合规则对组件元素f不进行复制;按照组件元素e的组合规则,对8个组件元素a分别顺时针旋转0°、45°、90°、135°、180°、225°、270°和315°,再按照旋转度数从小到大的顺序将旋转后的8个组件元素e围成一圈,以得到有8个组件元素e构成的子模型;终端设备根据组件元素e的组合规则表示的位置信息和组件元素f的组合规则表示的位置信息对上述得到的子模型及组件元素f进行组合,以得到未渲染的花瓣3D模型。
可以看出,在本申请的方案中,服务器中存储的是可以构成3D模型的组件元素及组合规则,相对于现有技术中存储的完整的3D模型,采用本申请的方法,可以降低服务器的存储开销;由于终端设备和服务器之间传输的是组件元素集和组合规则,不是完整的3D模型,因此可以降低终端设备和服务器之间的带宽资源;在渲染时,只是利用组件元素集中的组件元素的渲染信息对完整的3D模型进行渲染,不需要组成完整3D模型的组件元素的渲染信息,也就是在GPU渲染时,只需要将组件元素集中组件元素的渲染信息推送一次至GPU,GPU就可以利用组件元素集中的组件元素的渲染信息对完整的3D模型进行渲染。因此可以减小存储渲染信息的开销,也可以提高模型的渲染效率。这里的渲染信息可以包括组件元素的几何信息,还可以包括组件元素的材质贴图信息。
参见图6,图6为本申请实施例提供的一种3D模型生成方法的流程示意图。如图6所示,该方法包括:
S601、服务器接收终端设备发送的获取请求,该获取请求携带有用户标识和3D模型的标识。
可选的,用户标识可以为该用户的ID、或者该用户的头像、或者该用户的指纹信息或者声纹信息。可选的,3D模型类别标识可以为3D模型的ID,或者3D模型的图像。
其中,组成3D模型的组件元素包括相同或者相近的组件元素。目标3D模型可以为对称的模型,比如花瓣3D模型、雪花3D模型、水果3D模型等。可选的,目标3D模型中的部分模型是对称的。
S602、服务器根据用户标识和3D模型的标识从服务器中获取目标3D模型的组件元素集及目标3D模型的组合规则。
其中,服务器中存储有至少一个元素及至少一个预设的组合规则,该至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括上述至少一个组件元素中的一个或多个,目标3D模型的组合规则为至少一个预设的组合规则中目标 3D模型的组件元素集对应的组合规则。目标3D模型的组件元素集中的组件元素的数量少于组成目标3D模型的组件元素的数量。
在一个示例中,服务器中存储有至少一个3D模型的组件元素集、与至少一个3D模型的组件元素集对应的至少一个组合规则及对应关系表,该对应关系表为3D模型的组件元素集与用户标识和3D模型类别标识的对应关系表;服务器在接收到用户标识和3D模型类别标识后,基于接收到的用户标识和3D模型类别标识和对应关系表确定目标3D模型的组件元素集,并获取与目标3D模型的组件元素集对应的组合规则。
在另一个实施例中,服务器中存储有至少一个类别的组件元素集,该至少一个类别的组件元素集中的组件元素集包括至少一个组件元素,该至少一个组件元素中的一个或多个与一个用户标识对应;服务器在接收到用户标识和3D模型类别标识后,基于3D模型类别标识确定终端设备所需的3D模型为目标3D模型,也就是3D模型类别标识所指示的模型为目标3D模型;服务器在确定目标3D模型,根据先验知识确定组成目标3D模型的组件元素的类别;根据组成目标3D模型的组件元素的类别从上述多个类别的组件元素集中确定出组成目标3D模型的组件元素的类别对应的一个或多个组件元素集;终端设备根据用户标识从该一个或多个组件元素集中的每个组件元素集中确定出与目标用户标识对应的一个或多个组件元素;若从一个组件元素集中确定出多个组件元素,终端设备则从多个组件元素中挑选出该用户使用频次最高的一个组件元素;按照该方式,终端设备从该一个或多个组件元素集中的每个组件元素集中挑选出与目标用户标识对应的一个组件元素,这些挑选出的组件元素构成了目标3D模型的组件元素集。服务器中,一个类别的组件元素集对应一个组合规则,也就是说,属于同一个类别的组件元素的组合规则是相同的,均为该类别的组件元素集对应的组合规则。按照上述方式从服务器中存储的至少一个类别的组件元素集获取目标3D模型的组件元素集时,同时可以获取目标3D模型的组件元素集中每个组件元素的组合规则。此时,可以看成上述目标3D模型的组合规则包括目标3D模型的组件元素集中每个组件元素的组合规则。
在另一个实施例中,服务器中存储有至少一个组件元素,或者至少一个类别的组件元素集;服务器在得到用户标识和3D模型类别标识后,根据预设函数对用户标识和3D模型类别标识进行处理,以得到目标3D模型的组件元素集中组件元素的标识;基于该组件元素的标识从存储器中存储的组件元素中确定出该组件元素的标识所指示的元素;这些组件元素构成目标3D模型的组件元素集。服务器中,一个类别的组件元素集对应一个组合规则,也就是说,属于同一个类别的组件元素的组合规则是相同的,均为该类别的组件元素集对应的组合规则。按照上述方式从服务器中存储的至少一个组件元素或者至少一个组件元素集获取目标3D模型的组件元素集时,同时可以获取目标3D模型的组件元素集中每个组件元素的组合规则。在一个示例中,服务器中还存储有服务器存储的至少一个组件元素中每个组件元素的组合规则,在服务器从其存储的至少一个组件元素中确定出目标3D模型的组件元素集时,同时可以获取目标3D模型的组件元素集中每个组件元素的组合规则。此时,可以看成上述目标3D模型的组合规则包括目标3D模型的组件元素集中每个组件元素的组合规则。
可选地,服务器中存储有至少一个预设的组合规则,该至少一个预设的组合规则与至少一个组件元素集对应,服务器在按照上述方式确定目标3D模型的组件元素集后,根据至少一个预设的组合规则与至少一个组件元素集的对应关系确定出目标3D模型的组件元素集对应的预设的组合规则,该组合规则即为目标3D模型的组合规则。
S603、服务器向终端设备发送针对获取请求的响应消息,响应消息包括目标3D模型的组件元素集及目标3D模型的组合规则。
在一个可行的实施例中,服务器中还存储有至少一个组件元素中每个组件元素的材质贴图信息,响应消息还携带目标3D模型的组件元素集中的每个组件元素的材质贴图信息。
可以看出,在本申请的方案中,服务器中存储的是可以构成3D模型的组件元素及组合规则,相对于现有技术中存储的完整的3D模型,采用本申请的方法,可以降低服务器的存储开销;由于终端设备和服务器之间传输的是组件元素集和组合规则,不是完整的3D模型,因此可以降低终端设备和服务器之间的带宽资源。
参见图7,图7为本申请实施例提供的一种终端设备的结构示意图。如图7所示,该终端设备700包括:
发送单元701,用于向服务器发送获取请求,获取请求携带有用户标识和3D模型类别标识;
接收单元702,用于接收服务器发送的针对获取请求的响应消息,该响应消息包括服务器根据用户标识和3D模型类别标识确定的目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素及至少一个预设的组合规则,至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素中的一个或多个;目标3D模型的组合规则为至少一个预设的组合规则中与目标3D模型的组件元素集对应的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;
组合渲染单元703,用于根据目标3D模型的组件元素集和目标3D模型的组合规则进行组合和渲染,以得到目标3D模型。
在一个可行的实施例中,目标3D模型的组件元素集中包括目标3D模型的组件元素集中每个组件元素的几何信息,组合渲染单元703具体用于:
根据组合规则对目标3D模型的组件元素集中的部分或者全部组件元素进行复制,以得到组成目标3D模型的组件元素;根据组合规则对所述组成目标3D模型的组件元素组合处理,以得到未渲染的目标3D模型;根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。
在一个可行的实施例中,服务器中还存储有所述至少一个组件元素中每个组件元素的材质贴图信息,响应消息还携带目标3D模型的组件元素集中的每个组件元素的材质贴图信息;在根据目标3D模型的组件元素集中每个组件元素的几何信息对未渲染的所述目标3D模型进行渲染,以得到目标3D模型的方面,组合渲染单元703具体用于:
根据目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对未渲染的目标3D模型进行渲染,以得到目标3D模型。
在一个可行的实施例中,终端设备700还包括:
获取单元704,用于获取用户输入的所述组件元素集中每个组件元素的材质贴图信息;
在根据目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的目标3D模型进行渲染,以得到目标3D模型的方面,组合渲染单元703具体用于:
根据用户输入的目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对未渲染的所述目标3D模型进行渲染,以得到目标3D模型。
需要说明的是,上述各单元(发送单元701、接收单元702、组合渲染单元703和获取单元704)用于执行上述方法的相关步骤。其中,发送单元701用于实现S301的相关内容,接收单元702用于实现S302的相关内容,组合渲染单元703和获取单元704用于实现S303的 相关内容。
在本实施例中,终端设备700是以单元的形式来呈现。这里的“单元”可以指特定应用集成电路(application-specific integrated circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。此外,以组合渲染单元703和获取单元704可通过图9所示的终端装置的处理器901来实现。
参见图8,图8为本申请实施例提供的一种服务器的结构示意图。如图8所示,服务器800包括:
接收单元801用于接收终端设备发送的获取请求,该获取请求携带有用户标识和3D模型的标识,
确定单元802,用于根据用户标识和3D模型的标识从服务器中获取目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素和至少一个预设的组合规则;至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素中的一个或多个;目标3D模型的组合规则为至少一个预设的组合规则中与目标3D模型的组件元素集对应的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成目标3D模型的组件元素的数量;
发送单元803,用于向终端设备发送针对获取请求的响应消息,该响应消息包括目标3D模型的组件元素集及目标3D模型的组合规则。
在一个可行的实施例中,服务器中还存储有至少一个组件元素中每个组件元素的材质贴图信息,响应消息还携带目标3D模型的组件元素集中的每个组件元素的材质贴图信息。
需要说明的是,上述各单元(接收单元801、确定单元802和发送单元803)用于执行上述方法的相关步骤。其中,接收单元801用于实现S601的相关内容,确定单元802用于实现S602的相关内容,发送单元803用于实现S603的相关内容。
在本实施例中,服务器800是以单元的形式来呈现。这里的“单元”可以指特定应用集成电路(application-specific integrated circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。此外,以确定单元802可通过图10所示的服务器的处理器1001来实现。
如图9所示终端设备900可以以图9中的结构来实现,该终端设备900包括至少一个处理器901,至少一个存储器902以及至少一个通信接口903。所述处理器901、所述存储器902和所述通信接口903通过所述通信总线连接并完成相互间的通信。可选的,终端设备900还包括显示屏904。
处理器901可以是通用CPU,微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路;该处理器901还包括GPU。
通信接口903,用于与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(Wireless Local Area Networks,WLAN)等。
存储器902可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory, CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,所述存储器902用于存储执行以上方案的应用程序代码,并由处理器901来控制执行。所述处理器901用于执行所述存储器902中存储的应用程序代码。
存储器902存储的代码可执行以上提供的任一种3D模型生成方法,比如:
向服务器发送获取请求,获取请求携带有用户标识和3D模型类别标识;接收服务器发送的针对获取请求的响应消息,该响应消息包括服务器根据用户标识和3D模型类别标识确定的目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素及至少一个预设的组合规则,至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素中的一个或多个;目标3D模型的组合规则为至少一个预设的组合规则中与目标3D模型的组件元素集对应的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;根据目标3D模型的组件元素集和目标3D模型的组合规则进行组合和渲染,以得到目标3D模型。
其中,GPU用于未渲染的目标3D模型进行渲染,将渲染得到的目标3D模型通过显示屏904显示。
如图10所示服务器1000可以以图10中的结构来实现,该服务器1000包括至少一个处理器1001,至少一个存储器1002以及至少一个通信接口1003。所述处理器1001、所述存储器1002和所述通信接口1003通过所述通信总线连接并完成相互间的通信。
处理器1001可以是通用CPU,微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。
通信接口1003,用于与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(Wireless Local Area Networks,WLAN)等。
存储器1002可以是ROM或可存储静态信息和指令的其他类型的静态存储设备,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM、CD-ROM或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,所述存储器1002用于存储执行以上方案的应用程序代码,并由处理器1001来控制执行。所述处理器1001用于执行所述存储器1002中存储的应用程序代码。
存储器1002存储的代码可执行以上提供的任一种3D模型生成方法,比如:
接收终端设备发送的获取请求,该获取请求携带有用户标识和3D模型的标识,根据用户标识和3D模型的标识从服务器中获取目标3D模型的组件元素集及目标3D模型的组合规则;服务器中存储有至少一个组件元素和至少一个预设的组合规则;至少一个预设的组合规则与至少一个组件元素集对应,至少一个组件元素集中的每个组件元素集包括至少一个组件元素中的一个或多个;目标3D模型的组合规则为至少一个预设的组合规则中与目标3D模型的组件元素集对应的组合规则;目标3D模型的组件元素集中组件元素的数量少于组成目标 3D模型的组件元素的数量;向终端设备发送针对获取请求的响应消息,该响应消息包括目标3D模型的组件元素集及目标3D模型的组合规则。
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种3D模型生成方法的部分或全部步骤。
本申请实施例还提供一种计算机程序,该计算机程序被执行以实现包括上述方法实施例中记载的任何一种3D模型生成方法的部分或全部步骤。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、ROM、RAM、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、ROM、RAM、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (15)

  1. 一种3D模型生成方法,其特征在于,包括:
    终端设备向服务器发送获取请求,所述获取请求携带有用户标识和3D模型类别标识;
    终端设备接收所述服务器发送的针对所述获取请求的响应消息,所述响应消息包括所述服务器根据所述用户标识和所述3D模型类别标识确定的目标3D模型的组件元素集及所述目标3D模型的组合规则;所述服务器中存储有至少一个组件元素及至少一个预设的组合规则,所述至少一个预设的组合规则与至少一个组件元素集对应,所述至少一个组件元素集中的每个组件元素集包括所述至少一个组件元素中的一个或多个;所述目标3D模型的组合规则为所述至少一个预设的组合规则中与所述目标3D模型的组件元素集对应的组合规则;所述目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;
    终端设备根据所述目标3D模型的组件元素集和所述目标3D模型的组合规则进行组合和渲染,以得到所述目标3D模型。
  2. 根据权利要求1所述的方法,其特征在于,所述目标3D模型的组件元素集中包括所述目标3D模型的组件元素集中每个组件元素的几何信息,所述终端设备根据所述目标3D模型的组件元素集和所述目标3D模型的组合规则进行组合和渲染,以得到所述目标3D模型,包括:
    所述终端设备根据所述组合规则对所述目标3D模型的组件元素集中的部分或者全部组件元素进行复制,以得到组成所述目标3D模型的组件元素;
    所述终端设备根据所述组合规则对所述组成所述目标3D模型的组件元素组合处理,以得到未渲染的所述目标3D模型;
    所述终端设备根据所述目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型。
  3. 根据权利要求2所述的方法,其特征在于,所述服务器中还存储有所述至少一个组件元素中每个组件元素的材质贴图信息,所述响应消息还携带所述目标3D模型的组件元素集中的每个组件元素的材质贴图信息;所述终端设备根据所述目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型,包括:
    所述终端设备根据所述目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型。
  4. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    所述终端设备获取用户输入的所述组件元素集中每个组件元素的材质贴图信息;
    所述终端设备根据所述目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型,包括:
    所述终端设备根据所述用户输入的目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型。
  5. 一种3D模型生成方法,应用于服务器,其特征在于,包括:
    接收所述终端设备发送的获取请求,所述获取请求携带有用户标识和3D模型的标识,
    根据所述用户标识和3D模型的标识从所述服务器中获取目标3D模型的组件元素集及所述目标3D模型的组合规则;所述服务器中存储有至少一个组件元素和至少一个预设的组合规则;所述至少一个预设的组合规则与所述至少一个组件元素集对应,所述至少一个组件元素集中的每个组件元素集包括所述至少一个组件元素中的一个或多个;所述目标3D模型的组合规则为所述至少一个预设的组合规则中与所述目标3D模型的组件元素集对应的组合规则;所述目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;
    向所述终端设备发送针对所述获取请求的响应消息,所述响应消息包括所述目标3D模型的组件元素集及所述目标3D模型的组合规则。
  6. 根据权利要求5所述的方法,其特征在于,所述服务器中还存储有所述至少一个组件元素中每个组件元素的材质贴图信息,所述响应消息还携带所述目标3D模型的组件元素集中的每个组件元素的材质贴图信息。
  7. 一种终端设备,其特征在于,包括:
    发送单元,用于向服务器发送获取请求,所述获取请求携带有用户标识和3D模型类别标识;
    接收单元,用于接收所述服务器发送的针对所述获取请求的响应消息,所述响应消息包括所述服务器根据所述用户标识和所述3D模型类别标识确定的目标3D模型的组件元素集及目标所述目标3D模型的组合规则;所述服务器中存储有至少一个组件元素及至少一个预设的组合规则,所述至少一个预设的组合规则与至少一个组件元素集对应,所述至少一个组件元素集中的每个组件元素集包括所述至少一个组件元素中的一个或多个;所述目标3D模型的组合规则为所述至少一个预设的组合规则中与所述目标3D模型的组件元素集对应的组合规则;所述目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;
    组合渲染单元,用于根据所述目标3D模型的组件元素集和所述目标3D模型的组合规则进行组合和渲染,以得到所述目标3D模型。
  8. 根据权利要求1所述的终端设备,其特征在于,所述目标3D模型的组件元素集中包括所述目标3D模型的组件元素集中每个组件元素的几何信息,所述组合渲染单元具体用于:
    根据所述组合规则对所述目标3D模型的组件元素集中的部分或者全部组件元素进行复制,以得到组成所述目标3D模型的组件元素;
    根据所述组合规则对所述组成所述目标3D模型的组件元素组合处理,以得到未渲染的所述目标3D模型;
    根据所述目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型。
  9. 根据权利要求8所述的终端设备,其特征在于,所述服务器中还存储有所述至少一个组件元素中每个组件元素的材质贴图信息,所述响应消息还携带所述目标3D模型的组件元素集中的每个组件元素的材质贴图信息;在所述根据所述目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型的 方面,所述组合渲染单元具体用于:
    根据所述目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型。
  10. 根据权利要求8所述的终端设备,其特征在于,所述终端设备还包括:
    获取单元,用于获取用户输入的所述组件元素集中每个组件元素的材质贴图信息;
    在所述根据所述目标3D模型的组件元素集中每个组件元素的几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型的方面,所述组合渲染单元具体用于:
    根据所述用户输入的目标3D模型的组件元素集中的每个组件元素的材质贴图信息和几何信息对所述未渲染的所述目标3D模型进行渲染,以得到所述目标3D模型。
  11. 一种服务器,其特征在于,包括:
    接收单元,用于接收所述终端设备发送的获取请求,所述获取请求携带有用户标识和3D模型的标识,
    确定单元,用于根据所述用户标识和3D模型的标识从所述服务器中获取目标3D模型的组件元素集及所述目标3D模型的组合规则;所述服务器中存储有至少一个组件元素和至少一个预设的组合规则;所述至少一个预设的组合规则与所述至少一个组件元素集对应,所述至少一个组件元素集中的每个组件元素集包括所述至少一个组件元素中的一个或多个;所述目标3D模型的组合规则为所述至少一个预设的组合规则中与所述目标3D模型的组件元素集对应的组合规则;所述目标3D模型的组件元素集中组件元素的数量少于组成所述目标3D模型的组件元素的数量;
    发送单元,用于向所述终端设备发送针对所述获取请求的响应消息,所述响应消息包括所述目标3D模型的组件元素集及所述目标3D模型的组合规则。
  12. 根据权利要求11所述的服务器,其特征在于,所述服务器中还存储有所述至少一个组件元素中每个组件元素的材质贴图信息,所述响应消息还携带所述目标3D模型的组件元素集中的每个组件元素的材质贴图信息。
  13. 一种终端设备,包括处理器和存储器,其中,所述处理器和存储器相连,其中,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,以实现如权利要求1至4任一项所述的方法。
  14. 一种服务器,包括处理器和存储器,其中,所述处理器和存储器相连,其中,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,以实现如权利要求5至6任一项所述的方法。
  15. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至6任一项所述的方法。
PCT/CN2023/070684 2022-01-27 2023-01-05 3d模型生成方法及相关装置 WO2023142945A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210104058.5A CN116563449A (zh) 2022-01-27 2022-01-27 3d模型生成方法及相关装置
CN202210104058.5 2022-01-27

Publications (1)

Publication Number Publication Date
WO2023142945A1 true WO2023142945A1 (zh) 2023-08-03

Family

ID=87470560

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/070684 WO2023142945A1 (zh) 2022-01-27 2023-01-05 3d模型生成方法及相关装置

Country Status (2)

Country Link
CN (1) CN116563449A (zh)
WO (1) WO2023142945A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104584A (zh) * 2009-12-21 2011-06-22 中国移动通信集团公司 下发3d模型数据的方法、装置和3d模型数据传输系统
WO2012140361A1 (fr) * 2011-04-12 2012-10-18 Real Fusio France Procédé et système de rendu d'une scène virtuelle en trois dimensions
CN108475269A (zh) * 2015-11-25 2018-08-31 酷比特公司 用于传输三维模型的系统、方法和计算机程序产品
CN110148203A (zh) * 2019-05-16 2019-08-20 网易(杭州)网络有限公司 游戏中虚拟建筑模型的生成方法、装置、处理器及终端
CN111258690A (zh) * 2020-01-10 2020-06-09 中国建设银行股份有限公司 一种构建3d页面的方法和装置
CN111710020A (zh) * 2020-06-18 2020-09-25 腾讯科技(深圳)有限公司 动画渲染方法和装置及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104584A (zh) * 2009-12-21 2011-06-22 中国移动通信集团公司 下发3d模型数据的方法、装置和3d模型数据传输系统
WO2012140361A1 (fr) * 2011-04-12 2012-10-18 Real Fusio France Procédé et système de rendu d'une scène virtuelle en trois dimensions
CN108475269A (zh) * 2015-11-25 2018-08-31 酷比特公司 用于传输三维模型的系统、方法和计算机程序产品
CN110148203A (zh) * 2019-05-16 2019-08-20 网易(杭州)网络有限公司 游戏中虚拟建筑模型的生成方法、装置、处理器及终端
CN111258690A (zh) * 2020-01-10 2020-06-09 中国建设银行股份有限公司 一种构建3d页面的方法和装置
CN111710020A (zh) * 2020-06-18 2020-09-25 腾讯科技(深圳)有限公司 动画渲染方法和装置及存储介质

Also Published As

Publication number Publication date
CN116563449A (zh) 2023-08-08

Similar Documents

Publication Publication Date Title
US20150161763A1 (en) 2d animation from a 3d mesh
US20230120253A1 (en) Method and apparatus for generating virtual character, electronic device and readable storage medium
CN112288665A (zh) 图像融合的方法、装置、存储介质及电子设备
CN108109191A (zh) 渲染方法及系统
US20180276870A1 (en) System and method for mass-animating characters in animated sequences
JP2023026531A (ja) バーチャルキャラクター生成方法、装置、電子機器、記憶媒体及びコンピュータプログラム
JP2022539290A (ja) ディープラーニングのためのビジュアルプログラミング
WO2022121653A1 (zh) 确定透明度的方法、装置、电子设备和存储介质
CN109598672B (zh) 一种地图道路渲染方法及装置
CN117437365A (zh) 医学三维模型的生成方法、装置、电子设备及存储介质
WO2023142945A1 (zh) 3d模型生成方法及相关装置
EP4287134A1 (en) Method and system for generating polygon meshes approximating surfaces using root-finding and iteration for mesh vertex positions
CN111915714A (zh) 用于虚拟场景的渲染方法、客户端、服务器及计算设备
WO2023083067A1 (zh) 一种绒毛渲染方法、装置、设备及介质
CN114489552B (zh) 远程显示控制系统、远程控制界面显示方法及计算设备
CN115861510A (zh) 对象渲染方法、装置、电子设备、存储介质及程序产品
CN114797109A (zh) 对象编辑方法、装置、电子设备和存储介质
CN114913277A (zh) 一种物体立体交互展示方法、装置、设备及介质
JP2024506879A (ja) 仮想表現を提示するための方法及び装置、コンピュータ機器及び記憶媒体
CN114452646A (zh) 虚拟对象透视处理方法、装置及计算机设备
CN116563505B (zh) 虚拟形象生成方法、装置、电子设备以及存储介质
CN114820908B (zh) 虚拟形象生成方法、装置、电子设备和存储介质
US11954802B2 (en) Method and system for generating polygon meshes approximating surfaces using iteration for mesh vertex positions
WO2023221683A1 (zh) 图像渲染方法、装置、设备和介质
US20230394767A1 (en) Method and system for generating polygon meshes approximating surfaces using root-finding and iteration for mesh vertex positions

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23745830

Country of ref document: EP

Kind code of ref document: A1