Three-dimensional model generation method, device, electronic device and computer storage medium
By optimizing the three-dimensional model generation technology, using the information of the target file to automatically process it to generate a three-dimensional model, the problems of cumbersome steps and high cost in the existing technology are solved, and fast, simple and convenient three-dimensional model generation is achieved.
Patent Information
- Application Number
- CN202210806865.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-07-08
AI Technical Summary
The existing three-dimensional model generation technology requires professional operation, and the steps are cumbersome and expensive, making it difficult to meet the wide demand for three-dimensional video in the market.
By responding to the three-dimensional model generation instructions, the window view information in the target file is obtained and mapped to the three-dimensional coordinate information, the path information is sampled, the two-dimensional graphics are processed according to the preset graphic conversion rules, the three-dimensional model is generated, and the model position is adjusted according to the attribute information and coordinate information.
It realizes the fast, simple and convenient generation of three-dimensional models, reduces dependence on professionals, reduces generation costs, and improves efficiency.
Smart Images

Figure CN115100358B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of material production, and in particular to a three-dimensional model generation method, device, electronic device and computer storage medium. Background Art
[0002] Due to the good viewing effect of 3D animation, 3D video has broad market demand and application prospects; for example, 3D animation is used in product exhibitions, stage performances, etc., and the demand for 3D model generation required for 3D animation production is becoming more and more obvious.
[0003] Currently, the generation of 3D models requires professional modelers to use software such as Maya and 3D Max. The generation of 3D models requires the use of multiple software, which places high professional requirements on the production personnel. In addition, the modeling cycle is very long, and the 3D model generation steps are cumbersome and costly. Summary of the invention
[0004] The present application provides a three-dimensional model generation method, device, electronic device and computer storage medium, aiming to solve the technical problem that the three-dimensional model generation is troublesome and the production cost is high.
[0005] In one aspect, the present application provides a three-dimensional model generation method, the three-dimensional model generation method comprising the following steps:
[0006] In response to a three-dimensional model generation instruction, obtaining a target file to be processed associated with the three-dimensional model generation instruction;
[0007] Reading the window view information in the target file, and mapping the window view information to three-dimensional coordinate information;
[0008] Sampling the path information in the target file to obtain a two-dimensional graph;
[0009] Processing the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0010] The three-dimensional model corresponding to the two-dimensional graphic is adjusted according to the attribute information corresponding to the two-dimensional graphic, and the position information of the adjusted three-dimensional model is set according to the three-dimensional coordinate information to obtain a three-dimensional model file.
[0011] In some embodiments of the present application, the processing of the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic includes:
[0012] If the two-dimensional graphic is not of the target type, setting height data for the two-dimensional graphic according to a projection rule in a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0013] If the two-dimensional graphic is a target type, converting the two-dimensional graphic according to a target conversion rule corresponding to the target type in a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0014] The target type includes at least one of a circle, a triangle, a quadrilateral and an arc;
[0015] The projection rule is a light source projection ratio rule;
[0016] The target conversion rule includes at least one of: a circle is converted into a sphere, a triangle is converted into a cone, a quadrilateral is converted into a cube, and an arc is converted into a solid arc.
[0017] In some embodiments of the present application, adjusting the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic, and setting the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain the three-dimensional model file includes:
[0018] Acquire attribute information corresponding to the two-dimensional graphic, the attribute information including brightness information, color information, and surface concave-convex information;
[0019] Setting illumination projection information of the three-dimensional model corresponding to the two-dimensional graphic according to the brightness information, setting material information of the three-dimensional model corresponding to the two-dimensional graphic according to the color information, and setting texture information of the three-dimensional model corresponding to the two-dimensional graphic according to the surface concave-convex information;
[0020] The adjusted coordinate position of the three-dimensional model is set according to the three-dimensional coordinate information, and the illumination projection information, the material information, the texture information and the coordinate position of the adjusted three-dimensional model are input into a preset template file to obtain a three-dimensional model file.
[0021] In some embodiments of the present application, sampling the path information in the target file to obtain a two-dimensional graph includes:
[0022] Perform word segmentation on the text information in the target file to obtain a word segmentation set;
[0023] Compare each keyword in the word segmentation set with a preset path field, and obtain a line path field, a line color field, and a line width field in the target file that match the preset path field;
[0024] The line path field, the line color field and the line width field are used as path information, and a two-dimensional graphic is generated according to the path information.
[0025] In some embodiments of the present application, after the three-dimensional model generation instruction is responded to and the target file to be processed associated with the three-dimensional model generation instruction is obtained, the method includes:
[0026] Obtaining the file format of the target file;
[0027] If the target file is not in SVG format, query the preset format conversion rule, convert the target file into SVG format, and execute the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information;
[0028] If the target file is in SVG format, the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information are performed.
[0029] In some embodiments of the present application, after adjusting the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic and setting the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain the three-dimensional model file, the method includes:
[0030] Establishing an association relationship between the three-dimensional model file and the target file;
[0031] In response to an update instruction of the target file, the path information in the target file is edited according to the update instruction to obtain an updated target file;
[0032] The three-dimensional model file associated with the target file is queried, and the three-dimensional model file is adjusted according to the updated target file.
[0033] In some embodiments of the present application, after adjusting the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic and setting the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain the three-dimensional model file, the method includes:
[0034] In response to a three-dimensional video production instruction, configure a model identifier in a video corresponding to the three-dimensional video production instruction, and position information of a model corresponding to the model identifier;
[0035] For each video frame in the target video, query the 3D model file, obtain the target 3D model corresponding to the model identifier, and set the position of the target 3D model according to the position information;
[0036] The target video is associated with preset audio information, and action special effect information of the target three-dimensional model in each video frame is set according to the audio information to obtain a three-dimensional video.
[0037] On the other hand, the present application provides a three-dimensional model generation device, the three-dimensional model generation device comprising:
[0038] An acquisition module, used for responding to a three-dimensional model generation instruction and acquiring a target file to be processed associated with the three-dimensional model generation instruction;
[0039] A reading module, used for reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information;
[0040] A sampling module, used for sampling the path information in the target file to obtain a two-dimensional graph;
[0041] A conversion module, used for processing the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0042] A generating module is used to adjust the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic, and to set the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain a three-dimensional model file.
[0043] On the other hand, the present application also provides an electronic device, the electronic device comprising:
[0044] one or more processors;
[0045] Memory; and
[0046] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps in the three-dimensional model generation method.
[0047] On the other hand, the present application also provides a computer storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the three-dimensional model generation method.
[0048] In the technical solution of the present application: responding to a three-dimensional model generation instruction, obtaining a target file to be processed associated with the three-dimensional model generation instruction; reading window view information in the target file, and mapping the window view information to three-dimensional coordinate information; sampling the path information in the target file to obtain a two-dimensional graphic; processing the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic; adjusting the three-dimensional model corresponding to the two-dimensional graphic according to attribute information corresponding to the two-dimensional graphic, and setting the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain a three-dimensional model file; in the embodiment of the present application, sampling the path information in the target file to obtain a two-dimensional graphic, and automatically converting the two-dimensional graphic into a three-dimensional model according to a preset graphic conversion rule, makes the production of the three-dimensional model simpler, more convenient and more efficient; does not require users to perform complex editing, does not require reliance on dedicated personnel, and reduces the cost of generating three-dimensional models. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 is a scene schematic diagram of the three-dimensional model generation method provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of a flow chart of a method for generating a three-dimensional model in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of a specific scenario of an embodiment of three-dimensional model generation in a three-dimensional model generation method in an embodiment of the present application;
[0053] Figure 4 It is a flow chart of an embodiment of processing a target file to generate a three-dimensional model in the three-dimensional model generation method provided in the embodiment of the present application;
[0054] Figure 5 It is a flowchart of an embodiment of updating a 3D model file in a 3D model generation method provided in an embodiment of the present application;
[0055] Figure 6 It is a schematic diagram of an embodiment of a flow chart of a three-dimensional video production in a three-dimensional model generation method provided in an embodiment of the present application;
[0056] Figure 7It is a schematic diagram of the structure of an embodiment of a three-dimensional model generating device provided in an embodiment of the present application;
[0057] Figure 8 It is a schematic diagram of the structure of an embodiment of an electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of the present invention.
[0059] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0060] In this application, the word "exemplary" is used to mean "serving as an example, illustration, or illustration." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to implement and use the invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the invention can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.
[0061] A three-dimensional model generation method, device, electronic device and computer storage medium are provided in the embodiments of the present application, which are described in detail below.
[0062] The three-dimensional model generation method in an embodiment of the present invention is applied to a three-dimensional model generation device, and the three-dimensional model generation device is arranged in an electronic device, and the electronic device is provided with one or more processors, a memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the three-dimensional model generation method; the electronic device can be a server, for example, a mobile phone or a tablet computer, and the electronic device can also be a server, or a service cluster consisting of multiple servers.
[0063] like Figure 1 As shown, Figure 1 This is a scene diagram of the three-dimensional model generation method of an embodiment of the present application. The three-dimensional model generation scene in the embodiment of the present invention includes an electronic device 100 (a three-dimensional model generation device is integrated in the electronic device 100), and a computer storage medium corresponding to the three-dimensional model generation is run in the electronic device 100 to execute the three-dimensional model generation steps.
[0064] Understandably, Figure 1 The electronic devices in the scene generated by the three-dimensional model shown, or the devices included in the electronic devices, do not constitute a limitation on the embodiments of the present invention. That is, the number of devices and types of electronic devices included in the scene generated by the three-dimensional model, or the number of devices and types of devices included in each device, do not affect the overall implementation of the technical solution in the embodiments of the present invention, and can all be regarded as equivalent replacements or derivatives of the technical solution claimed to be protected in the embodiments of the present invention.
[0065] In the embodiment of the present invention, the electronic device 100 is mainly used for: responding to a three-dimensional model generation instruction, obtaining a target file to be processed associated with the three-dimensional model generation instruction; reading window view information in the target file, and mapping the window view information to three-dimensional coordinate information; sampling the path information in the target file to obtain a two-dimensional graphic; processing the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic; adjusting the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic, and setting the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain a three-dimensional model file.
[0066] In the embodiment of the present invention, the electronic device 100 may be an independent electronic device, or an electronic device network or electronic device cluster composed of electronic devices. For example, the electronic device 100 described in the embodiment of the present invention includes but is not limited to a computer, a network host, a single network electronic device, a set of multiple network electronic devices, or a cloud electronic device composed of multiple electronic devices. The cloud electronic device is composed of a large number of computers or network electronic devices based on cloud computing.
[0067] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer electronic devices shown in, or electronic device network connection relationships, such as Figure 1 Only one electronic device is shown. It can be understood that the scene generated by the three-dimensional model may also include one or more other electronic devices, which are not specifically limited here; the electronic device 100 may also include a memory.
[0068] In addition, in the scene of the three-dimensional model generation of the present application, the electronic device 100 may be provided with a display device, or the electronic device 100 may not be provided with a display device and may be communicated with an external display device 200, and the display device 200 is used to output the result of the execution of the three-dimensional model generation method in the electronic device. The electronic device 100 may access a backend database 300 (the backend database may be in the local memory of the electronic device, or may be set in the cloud), and the backend database 300 stores information related to the three-dimensional model generation.
[0069] It should be noted that Figure 1 The scene diagram of the 3D model generation method shown is only an example. The scene of 3D model generation described in the embodiment of the present invention is to more clearly illustrate the technical solution of the embodiment of the present invention, and does not constitute a limitation on the technical solution provided by the embodiment of the present invention.
[0070] Based on the above scenario of 3D model generation, an embodiment of a 3D model generation method is proposed.
[0071] like Figure 2 As shown, Figure 2 This is a flow chart of an embodiment of a method for generating a three-dimensional model in an embodiment of the present application. The method for generating a three-dimensional model includes steps 201-205:
[0072] 201 , responding to a three-dimensional model generation instruction, obtaining a target file to be processed associated with the three-dimensional model generation instruction.
[0073] The three-dimensional model generation method in this embodiment is applied to an electronic device, and the type of the electronic device is not specifically limited. For example, the electronic device may be a terminal or a server. This embodiment is described by taking a server as an example.
[0074] The server receives a 3D model generation instruction, and the triggering method of the 3D model generation instruction is not specifically limited, that is, the 3D model generation instruction can be actively triggered by the user, for example, the user actively triggers the 3D model generation instruction by clicking a "generate" button on the display interface of the 3D model generation software; in addition, the 3D model generation instruction can also be automatically triggered by the server, for example, the trigger condition of the 3D model generation instruction is set in the server as a new file, and the server detects the file in the database. When the server detects the new file, the server determines whether the file is a target file that can be converted into a 3D model. If the server determines that the new file is the target file, the 3D model generation instruction is automatically triggered.
[0075] After receiving the 3D model generation instruction, the server obtains the target file to be processed associated with the 3D model generation instruction. The target file refers to a file used to describe the path information corresponding to the 2D graphics. For example, the target file may be an SVG file.
[0076] 202 , reading the window view information in the target file, and mapping the window view information to three-dimensional coordinate information.
[0077] The server reads the window view information in the target file, and the window view information is used to describe the display window of the two-dimensional graphics. The server maps the window view information to the three-dimensional coordinate information, that is, the server converts the two-dimensional coordinates according to the window view information, and the server adds the height information to the converted two-dimensional coordinates to obtain the three-dimensional coordinate information.
[0078] 203, sampling the path information in the target file to obtain a two-dimensional graph.
[0079] The server samples the path information in the target file, that is, the server parses the target file, extracts the path information in the target file, and generates a two-dimensional graph according to the path information; specifically, it includes:
[0080] 1. Perform word segmentation on the text information in the target file to obtain a word segmentation set;
[0081] 2. Compare each keyword in the word segmentation set with the preset path field to obtain the line path field, line color field and line width field in the target file that match the preset path field;
[0082] 3. Use the line path field, the line color field and the line width field as path information, and generate a two-dimensional graphic according to the path information.
[0083] The server inputs the target file into a preset word segmentation model, which is a neural network model for parsing and segmenting text information. The type of the preset word segmentation model is not specifically limited. For example, the preset word segmentation model is a neural network Chinese word segmentation model based on BiLSTM. The server performs word segmentation processing on the text information in the target file through the preset word segmentation model to obtain each word segmentation, and the server removes noise information in the word segmentation to obtain a word segmentation set; the server presets a path field, which refers to information related to the generation of a two-dimensional graphic, that is, the preset path field can be a generation instruction and generation parameter of a two-dimensional graphic. For example, the target file is an SVG format file, the preset path field is a command field of the SVG format file, and the preset path field is M(m)xy, L(l)xy, T(t)xy, etc.; the server compares each keyword in the word segmentation set with the preset path field, and the server obtains the line path field, line color field, and line width field that match the preset path field in the target file; the server uses the line path field, line color field, and line width field as path information, and the server draws a picture according to the path information to generate a two-dimensional graphic.
[0084] In this embodiment, a word segmentation model is preset in the server. The server parses the target file through the preset word segmentation model to obtain path information in the target file. The server generates a two-dimensional graphic based on the path information to facilitate the subsequent three-dimensional conversion.
[0085] 204 , processing the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic.
[0086] The server presets a graphic conversion rule, which refers to a preset conversion rule from a two-dimensional graphic to a three-dimensional model. The preset graphic conversion rule records the height information setting rules of different types of two-dimensional graphics. In this embodiment, the server processes the two-dimensional graphic according to the preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic; specifically, it includes:
[0087] 1. If the two-dimensional graphic is not of the target type, setting height data for the two-dimensional graphic according to the projection rule in the preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0088] 2. If the two-dimensional graphic is a target type, the two-dimensional graphic is converted according to a target conversion rule corresponding to the target type in a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic.
[0089] The server identifies the graphic type of the two-dimensional graphic and determines whether the graphic type is a target type, wherein the target type refers to a basic graphic with a standard three-dimensional model, for example, the target type includes at least one of a circle, a triangle, a quadrilateral and an arc; if the two-dimensional graphic is not the target type, the server sets height data for the two-dimensional graphic according to the projection rule in the preset graphic conversion rule, and obtains a three-dimensional model corresponding to the two-dimensional graphic, wherein the projection rule is a light source projection ratio rule, and the projection rule is a rule for adding height under a three-dimensional perspective; if the two-dimensional graphic is the target type, the server converts the two-dimensional graphic according to the target conversion rule corresponding to the target type in the preset graphic conversion rule, and obtains the three-dimensional model corresponding to the two-dimensional graphic, wherein the target conversion rule includes: a circle is converted into a sphere rule, a triangle is converted into a cone rule, a quadrilateral is converted into a cube rule, and an arc is converted into a solid arc rule.
[0090] In this embodiment, the server determines the corresponding graphic conversion rule according to the type of the two-dimensional graphic, and performs three-dimensional conversion according to the graphic conversion rule, so that the generated three-dimensional model is more realistic.
[0091] 205 , adjusting the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic, and setting the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain a three-dimensional model file.
[0092] The server adjusts the three-dimensional model according to the attribute information corresponding to the two-dimensional graphic, wherein the attribute information includes information such as brightness and size of the two-dimensional graphic; the server sets the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain a three-dimensional model file; specifically, including:
[0093] 1. Obtaining attribute information corresponding to the two-dimensional graphic, wherein the attribute information includes brightness information, color information, and surface concave-convex information;
[0094] 2. Setting illumination projection information of the three-dimensional model corresponding to the two-dimensional graphic according to the brightness information, setting material information of the three-dimensional model corresponding to the two-dimensional graphic according to the color information, and setting texture information of the three-dimensional model corresponding to the two-dimensional graphic according to the surface concave-convex information;
[0095] 3. Setting the coordinate position of the adjusted three-dimensional model according to the three-dimensional coordinate information, and inputting the illumination projection information, the material information, the texture information and the coordinate position of the adjusted three-dimensional model into a preset template file to obtain a three-dimensional model file.
[0096] The server obtains attribute information corresponding to the two-dimensional graphics, the attribute information including brightness information, color information, and surface convexity and concavity information; the server sets the lighting projection information of the three-dimensional model corresponding to the two-dimensional graphics according to the brightness information, the server sets the material information of the three-dimensional model corresponding to the two-dimensional graphics according to the color information, and the server sets the texture information of the three-dimensional model corresponding to the two-dimensional graphics according to the surface convexity and concavity information; the server sets the coordinate position of the adjusted three-dimensional model according to the three-dimensional coordinate information, and the server inputs the lighting projection information, material information, texture information and coordinate position of the adjusted three-dimensional model into a preset template file to obtain a three-dimensional model file.
[0097] Reference Figure 3 , Figure 3 This is a schematic diagram of a specific scenario of a three-dimensional model generation method in an embodiment of the present application. This embodiment provides a specific scenario example of a three-dimensional model generation. In this embodiment, the target file in the server SVG format is converted into a three-dimensional model; SVG is composed of an XML file, and the XML stores the path information of SVG. The line path, line color, line width and other information in the path information constitute the display characteristics of SVG, such as the target file in SVG format below:
[0098] <? xml version="1.0"standalone="no"? >
[0099] <! DOCTYPE svg PUBLIC"- / / W3C / / DTD SVG 1.1 / / EN"
[0100] "http: / / www.w3.org / Graphics / SVG / 1.1 / DTD / svg11.dtd">
[0101] <svg version="1.1"viewbox="300,100"xmlns="http: / / www.w3.org / 2000 / svg">
[0102] <rect width="300"height="100"style="fill:rgb(0,0,255);stroke-width:1;
[0103] stroke:rgb(0,0,0)" / >
[0104] The SVG contains a rect shape with a width and height of 300 and 100, a blue fill color, a line width of 1, and a black line color.
[0105] Specifically, the implementation idea of converting the target file in SVG format into a 3D model is as follows:
[0106] 1. Read the window position information in the SVG file (i.e., the ViewBox field) and map it to a 3D coordinate system;
[0107] 2. Read the Path field in the path information in the SVG file and perform sampling processing in the Path;
[0108] 3. After sampling different shapes, different processing is adopted: Circle becomes sphere, triangle becomes cone, quadrilateral becomes cube, arc becomes three-dimensional arc, and other paths add height information;
[0109] 4. Set different materials according to different shapes, including surface material, hardness, softness and wrinkles, etc.
[0110] 5. The server outputs according to the format of the 3D model to form a 3D model file.
[0111] It should be noted that in this embodiment, the path information in the SVG format target file is obtained, and different three-dimensional conversion processes are performed according to different Path types in the path information, so that different two-dimensional graphics are converted into corresponding three-dimensional shapes, and a Z-direction dimension is added to the Path information. For example, a circle is converted into a sphere, a triangle is converted into a triangular cone, and a quadrilateral is converted into a cube. Common shapes can be converted into upgraded three-dimensional shapes, and the Path of other uncommon graphics can be given a height attribute to become a three-dimensional Path with height information; at the same time, different materials are set for different SVG shapes, that is, the three-dimensional model has lighting and materials, etc., because materials, bumps and different lighting effects can be rendered. When setting materials and lighting for different shapes, we can add the materials and lighting corresponding to the three-dimensional shape. For example, a cube will have face shadows, and a sphere will also have corresponding shadow shapes, etc., so that the generated three-dimensional model is more three-dimensional and realistic.
[0112] In the technical solution of the present application, a three-dimensional model generation instruction is responded to, and a target file to be processed associated with the three-dimensional model generation instruction is obtained; window view information in the target file is read, and the window view information is mapped to three-dimensional coordinate information; path information in the target file is sampled to obtain a two-dimensional graphic; the two-dimensional graphic is processed according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic; the three-dimensional model corresponding to the two-dimensional graphic is adjusted according to attribute information corresponding to the two-dimensional graphic, and position information of the adjusted three-dimensional model is set according to the three-dimensional coordinate information to obtain a three-dimensional model file; in the embodiment of the present application, the path information in the target file is sampled to obtain a two-dimensional graphic, and the two-dimensional graphic is automatically converted into a three-dimensional model according to the preset graphic conversion rule, so that the production of the three-dimensional model is simpler, more convenient and more efficient; it does not require users to perform complex editing, does not require reliance on dedicated personnel, and reduces the cost of generating three-dimensional models.
[0113] Reference Figure 4 , Figure 4 It is a flow chart of an embodiment of processing a target file to generate a three-dimensional model in the three-dimensional model generation method provided in the embodiment of the present application.
[0114] In some embodiments of the present application, after step 201 responds to the 3D model generation instruction and obtains the target file to be processed associated with the 3D model generation instruction, the file type of the target file is first determined in this embodiment to perform the step of generating the 3D model, including steps 301-303:
[0115] 301, obtaining the file format of the target file.
[0116] 302. If the target file is not in SVG format, query the preset format conversion rule, convert the target file into SVG format, and execute the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information.
[0117] 303. If the target file is in SVG format, execute the step of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information.
[0118] The server obtains the file format of the target file; the server presets a format conversion rule, and the preset format conversion rule records the rules for converting the formats of different files into the SVG format. For example, the preset format conversion rule in the server is a mapping rule between a CAD format file and an SVG format. In this embodiment, the formats of the target files are unified into the SVG format, which can facilitate the sampling of the path information in the target file. Specifically,
[0119] The server determines whether the format of the target file is SVG format. If the target file is not SVG format, the server queries the preset format conversion rule, converts the target file into SVG format, and executes the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information. If the target file is SVG format, the server executes the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information.
[0120] In this embodiment, the server identifies the file format of the target file. The server first converts the target file into SVG format to achieve accurate identification of path information in the target file.
[0121] Reference Figure 5 , Figure 5 It is a flow chart of an embodiment of updating a 3D model file in a 3D model generation method provided in an embodiment of the present application.
[0122] In some embodiments of the present application, step 205 adjusts the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic, and sets the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information. After obtaining the three-dimensional model file, the three-dimensional model generation method can realize automatic update of the three-dimensional model file and further includes steps 401-403:
[0123] 401, establishing an association relationship between the three-dimensional model file and the target file;
[0124] The server establishes an association relationship between the 3D model file and the target file, and the server associates and saves the 3D model file with the target file to facilitate subsequent file operation processing.
[0125] 402, responding to the update instruction of the target file, editing the path information in the target file according to the update instruction to obtain an updated target file;
[0126] The server responds to the update instruction of the target file, and edits the path information in the target file according to the update instruction to obtain an updated target file. For example, the server adds path information to the target file to make the target file more complete.
[0127] 403 , query the 3D model file associated with the target file, and adjust the 3D model file according to the updated target file.
[0128] After the server detects that the target file has been updated, the server queries the three-dimensional model file associated with the target file, and adjusts the three-dimensional model file according to the updated target file, that is, the server resamples the path information in the updated target file to obtain an updated two-dimensional graphic; the server processes the new two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the new two-dimensional graphic; the server adjusts the three-dimensional model according to the attribute information corresponding to the two-dimensional graphic, and sets the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain an updated three-dimensional model file.
[0129] In this embodiment, after the target file is updated, the server performs file linkage based on the association relationship between the target file and the three-dimensional model file to obtain an updated three-dimensional model file. This does not require repeated file generation operations. It can be understood that those skilled in the art can directly update the three-dimensional model file, which is not elaborated in this embodiment.
[0130] Reference Figure 6 , Figure 6 It is a flowchart of an embodiment of three-dimensional video production in the three-dimensional model generation method provided in the embodiments of the present application.
[0131] In some embodiments of the present application, step 205 adjusts the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic, and sets the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information. After obtaining the three-dimensional model file, the three-dimensional model generation method can produce a three-dimensional video based on the generated three-dimensional model, specifically including steps 501-503:
[0132] 501, responding to a 3D video production instruction, configuring a model identifier in a video corresponding to the 3D video production instruction, and location information of a model corresponding to the model identifier;
[0133] The server responds to the 3D video production instruction, configures the model identifier in the video corresponding to the 3D video production instruction, and the location information of the model corresponding to the model identifier. The information configuration method in this embodiment is not limited, that is, the server can output a configuration page for the user to actively configure; the server can also automatically configure according to the video production requirements.
[0134] 502 : For each video frame in the target video, query the 3D model file, obtain the target 3D model corresponding to the model identifier, and set the position of the target 3D model according to the position information.
[0135] The server queries the 3D model file for each video frame in the target video, obtains the target 3D model corresponding to the model identifier, and sets the position of the target 3D model according to the position information.
[0136] 503 , associating the target video with preset audio information, and setting action special effect information of the target 3D model in each video frame according to the audio information to obtain a 3D video.
[0137] The server associates the target video with the preset audio information, and sets the action special effect information of the target 3D model in each video frame according to the audio information. For example, if the audio information is music, the server adds music features to the 3D model to obtain a 3D video. This embodiment realizes the conversion and production of the 3D model to the 3D video, further making the 3D video production faster and more convenient.
[0138] like Figure 7 As shown, Figure 7 It is a schematic diagram of the structure of an embodiment of a three-dimensional model generating device provided in an embodiment of the present application.
[0139] In order to better implement the three-dimensional model generation method in the embodiment of the present application, based on the three-dimensional model generation method, a three-dimensional model generation device is also provided in the embodiment of the present application, and the three-dimensional model generation device includes:
[0140] An acquisition module 601 is used to respond to a three-dimensional model generation instruction and acquire a target file to be processed associated with the three-dimensional model generation instruction;
[0141] A reading module 602 is used to read the window view information in the target file and map the window view information to three-dimensional coordinate information;
[0142] A sampling module 603 is used to sample the path information in the target file to obtain a two-dimensional graph;
[0143] A conversion module 604 is used to process the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0144] The generating module 605 is used to adjust the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic, and set the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain a three-dimensional model file.
[0145] In some embodiments of the present application, the conversion module 604 in the three-dimensional model generation device further includes:
[0146] If the two-dimensional graphic is not of the target type, setting height data for the two-dimensional graphic according to a projection rule in a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0147] If the two-dimensional graphic is a target type, converting the two-dimensional graphic according to a target conversion rule corresponding to the target type in a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0148] The target type includes at least one of a circle, a triangle, a quadrilateral and an arc;
[0149] The projection rule is a light source projection ratio rule;
[0150] The target conversion rule includes at least one of: a circle is converted into a sphere, a triangle is converted into a cone, a quadrilateral is converted into a cube, and an arc is converted into a solid arc.
[0151] In some embodiments of the present application, the generating module 605 in the three-dimensional model generating device further includes:
[0152] Acquire attribute information corresponding to the two-dimensional graphic, the attribute information including brightness information, color information, and surface concave-convex information;
[0153] Setting illumination projection information of the three-dimensional model corresponding to the two-dimensional graphic according to the brightness information, setting material information of the three-dimensional model corresponding to the two-dimensional graphic according to the color information, and setting texture information of the three-dimensional model corresponding to the two-dimensional graphic according to the surface concave-convex information;
[0154] The adjusted coordinate position of the three-dimensional model is set according to the three-dimensional coordinate information, and the illumination projection information, the material information, the texture information and the coordinate position of the adjusted three-dimensional model are input into a preset template file to obtain a three-dimensional model file.
[0155] In some embodiments of the present application, the sampling module 603 in the three-dimensional model generation device includes:
[0156] Perform word segmentation on the text information in the target file to obtain a word segmentation set;
[0157] Compare each keyword in the word segmentation set with a preset path field, and obtain a line path field, a line color field, and a line width field in the target file that match the preset path field;
[0158] The line path field, the line color field and the line width field are used as path information, and a two-dimensional graphic is generated according to the path information.
[0159] In some embodiments of the present application, after the three-dimensional model generation device acquisition module 601 executes the response three-dimensional model generation instruction and acquires the target file to be processed associated with the three-dimensional model generation instruction, the three-dimensional model generation device further includes:
[0160] Obtaining the file format of the target file;
[0161] If the target file is not in SVG format, query the preset format conversion rule, convert the target file into SVG format, and execute the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information;
[0162] If the target file is in SVG format, the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information are performed.
[0163] In some embodiments of the present application, after the three-dimensional model generation device executes the generation module 605, the three-dimensional model generation device includes:
[0164] Establishing an association relationship between the three-dimensional model file and the target file;
[0165] In response to an update instruction of the target file, the path information in the target file is edited according to the update instruction to obtain an updated target file;
[0166] The three-dimensional model file associated with the target file is queried, and the three-dimensional model file is adjusted according to the updated target file.
[0167] In some embodiments of the present application, the three-dimensional model generating device, after generating module 605, comprises:
[0168] In response to a three-dimensional video production instruction, configure a model identifier in a video corresponding to the three-dimensional video production instruction, and position information of a model corresponding to the model identifier;
[0169] For each video frame in the target video, query the 3D model file, obtain the target 3D model corresponding to the model identifier, and set the position of the target 3D model according to the position information;
[0170] The target video is associated with preset audio information, and action special effect information of the target three-dimensional model in each video frame is set according to the audio information to obtain a three-dimensional video.
[0171] The three-dimensional model generating device in the present embodiment: responds to the three-dimensional model generating instruction, obtains the target file to be processed associated with the three-dimensional model generating instruction; reads the window view information in the target file, and maps the window view information to the three-dimensional coordinate information; samples the path information in the target file to obtain a two-dimensional graphic; processes the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic; adjusts the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic, and sets the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain a three-dimensional model file; in the present application embodiment, the path information in the target file is sampled to obtain a two-dimensional graphic, and the two-dimensional graphic is automatically converted into a three-dimensional model according to the preset graphic conversion rule, so that the production of the three-dimensional model is simpler, more convenient and more efficient; it does not require the user to perform complex editing, does not require reliance on dedicated personnel, and reduces the cost of generating the three-dimensional model.
[0172] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, Figure 8 It is a schematic diagram of the structure of an embodiment of an electronic device provided in the embodiments of the present application.
[0173] An electronic device integrates any one of the three-dimensional model generation devices provided in the embodiments of the present invention, and the electronic device includes:
[0174] one or more processors;
[0175] Memory; and
[0176] One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to perform the steps of the three-dimensional model generation method described in any of the above three-dimensional model generation method embodiments.
[0177] Specifically, the electronic device may include one or more processing core processors 701, one or more computer storage media memories 702, a power supply 703, an input unit 704 and other components. Those skilled in the art will understand that Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0178] The processor 701 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 702, and calling data stored in the memory 702, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701.
[0179] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0180] The electronic device also includes a power supply 703 for supplying power to each component. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 703 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0181] The electronic device may further include an input unit 704, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0182] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 701 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 702 according to the following instructions, and the processor 701 will run the application programs stored in the memory 702, thereby realizing various functions, as follows:
[0183] In response to a three-dimensional model generation instruction, obtaining a target file to be processed associated with the three-dimensional model generation instruction;
[0184] Reading the window view information in the target file, and mapping the window view information to three-dimensional coordinate information;
[0185] Sampling the path information in the target file to obtain a two-dimensional graph;
[0186] Processing the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0187] The three-dimensional model corresponding to the two-dimensional graphic is adjusted according to the attribute information corresponding to the two-dimensional graphic, and the position information of the adjusted three-dimensional model is set according to the three-dimensional coordinate information to obtain a three-dimensional model file.
[0188] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer storage medium and loaded and executed by a processor.
[0189] To this end, an embodiment of the present invention provides a computer storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the three-dimensional model generation methods provided in the embodiments of the present invention. For example, the computer program may be loaded by a processor to execute the following steps:
[0190] In response to a three-dimensional model generation instruction, obtaining a target file to be processed associated with the three-dimensional model generation instruction;
[0191] Reading the window view information in the target file, and mapping the window view information to three-dimensional coordinate information;
[0192] Sampling the path information in the target file to obtain a two-dimensional graph;
[0193] Processing the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic;
[0194] The three-dimensional model corresponding to the two-dimensional graphic is adjusted according to the attribute information corresponding to the two-dimensional graphic, and the position information of the adjusted three-dimensional model is set according to the three-dimensional coordinate information to obtain a three-dimensional model file.
[0195] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0196] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0197] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0198] The above is a detailed introduction to a three-dimensional model generation method provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A three-dimensional model generation method, characterized in that: The three-dimensional model generation method is applied to electronic equipment, and the three-dimensional model generation method includes: In response to the three-dimensional model generation instruction, a target file to be processed associated with the three-dimensional model generation instruction is obtained; the target file is a file for describing path information corresponding to the two-dimensional graphic; Reading the window view information in the target file, the window view information is used to describe the display window of the two-dimensional graphics, and converting the two-dimensional coordinates according to the window view information, adding the height information to the converted two-dimensional coordinates to obtain the three-dimensional coordinate information; Sampling the path information in the target file to obtain a two-dimensional graph; Process the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic; the preset graphic conversion rule records the height information setting rules of different types of two-dimensional graphics; Acquire attribute information corresponding to the two-dimensional graphic, the attribute information including brightness information, color information, and surface concave-convex information; Setting illumination projection information of the three-dimensional model corresponding to the two-dimensional graphic according to the brightness information, setting material information of the three-dimensional model corresponding to the two-dimensional graphic according to the color information, and setting texture information of the three-dimensional model corresponding to the two-dimensional graphic according to the surface concave-convex information; The adjusted coordinate position of the three-dimensional model is set according to the three-dimensional coordinate information, and the illumination projection information, the material information, the texture information and the coordinate position of the adjusted three-dimensional model are input into a preset template file to obtain a three-dimensional model file; Establishing an association relationship between the three-dimensional model file and the target file; In response to an update instruction of the target file, the path information in the target file is edited according to the update instruction to obtain an updated target file; The three-dimensional model file associated with the target file is queried, and the three-dimensional model file is adjusted according to the updated target file.
2. The three-dimensional model generation method according to claim 1, characterized in that: The step of processing the two-dimensional graphic according to a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic includes: If the two-dimensional graphic is not of the target type, setting height data for the two-dimensional graphic according to a projection rule in a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic; If the two-dimensional graphic is a target type, converting the two-dimensional graphic according to a target conversion rule corresponding to the target type in a preset graphic conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphic; The target type includes at least one of a circle, a triangle, a quadrilateral and an arc; The projection rule is a light source projection ratio rule; The target conversion rule includes at least one of: a circle is converted into a sphere, a triangle is converted into a cone, a quadrilateral is converted into a cube, and an arc is converted into a solid arc.
3. The three-dimensional model generation method according to claim 1, characterized in that: The sampling of the path information in the target file to obtain a two-dimensional graph includes: Perform word segmentation on the text information in the target file to obtain a word segmentation set; Compare each keyword in the word segmentation set with a preset path field, and obtain a line path field, a line color field, and a line width field in the target file that match the preset path field; The line path field, the line color field and the line width field are used as path information, and a two-dimensional graphic is generated according to the path information.
4. The three-dimensional model generation method according to claim 1, characterized in that: After responding to the three-dimensional model generation instruction and obtaining the target file to be processed associated with the three-dimensional model generation instruction, the method includes: Obtaining the file format of the target file; If the target file is not in SVG format, query the preset format conversion rule, convert the target file into SVG format, and execute the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information; If the target file is in SVG format, the steps of reading the window view information in the target file and mapping the window view information to three-dimensional coordinate information are performed.
5. The three-dimensional model generation method according to any one of claims 1 to 4, characterized in that: After adjusting the three-dimensional model corresponding to the two-dimensional graphic according to the attribute information corresponding to the two-dimensional graphic and setting the position information of the adjusted three-dimensional model according to the three-dimensional coordinate information to obtain the three-dimensional model file, the method includes: In response to a 3D video production instruction, configure a model identifier in a target video corresponding to the 3D video production instruction, and position information of a model corresponding to the model identifier; For each video frame in the target video, query the 3D model file, obtain the target 3D model corresponding to the model identifier, and set the position of the target 3D model according to the position information; The target video is associated with preset audio information, and action special effect information of the target three-dimensional model in each video frame is set according to the audio information to obtain a three-dimensional video.
6. A three-dimensional model generating device, characterized in that: The three-dimensional model generating device comprises: An acquisition module, used to respond to a three-dimensional model generation instruction and acquire a target file to be processed associated with the three-dimensional model generation instruction; the target file is a file for describing path information corresponding to a two-dimensional graphic; A reading module, used for reading the window view information in the target file, the window view information is used for describing the display window of the two-dimensional graphics, and converting the two-dimensional coordinates according to the window view information, and the server adds the height information to the converted two-dimensional coordinates to obtain the three-dimensional coordinate information; A sampling module, used for sampling the path information in the target file to obtain a two-dimensional graph; A conversion module, used for processing the two-dimensional graphics according to a preset graphics conversion rule to obtain a three-dimensional model corresponding to the two-dimensional graphics; the preset graphics conversion rule records the height information setting rules of different types of two-dimensional graphics; a generating module, configured to obtain attribute information corresponding to the two-dimensional graphic, the attribute information including brightness information, color information, and surface concave-convex information; set illumination projection information of a three-dimensional model corresponding to the two-dimensional graphic according to the brightness information, set material information of the three-dimensional model corresponding to the two-dimensional graphic according to the color information, and set texture information of the three-dimensional model corresponding to the two-dimensional graphic according to the surface concave-convex information; The adjusted coordinate position of the three-dimensional model is set according to the three-dimensional coordinate information, and the illumination projection information, the material information, the texture information and the coordinate position of the adjusted three-dimensional model are input into a preset template file to obtain a three-dimensional model file; Establishing an association relationship between the three-dimensional model file and the target file; responding to an update instruction of the target file, editing the path information in the target file according to the update instruction to obtain an updated target file; querying the three-dimensional model file associated with the target file, and adjusting the three-dimensional model file according to the updated target file.
7. An electronic device, characterized in that: The electronic device comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to implement the steps in the three-dimensional model generation method according to any one of claims 1 to 5.
8. A computer storage medium, characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the three-dimensional model generation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Path graph processing method of SVG format and apparatus thereof
CN107221016A
Method, device and equipment for generating virtual target model and readable storage medium
CN112862929A