CN117058347A - Blueprint generation method and device of model and electronic equipment - Google Patents
Blueprint generation method and device of model and electronic equipment Download PDFInfo
- Publication number
- CN117058347A CN117058347A CN202310857648.XA CN202310857648A CN117058347A CN 117058347 A CN117058347 A CN 117058347A CN 202310857648 A CN202310857648 A CN 202310857648A CN 117058347 A CN117058347 A CN 117058347A
- Authority
- CN
- China
- Prior art keywords
- model
- target
- edge
- wire frame
- line segments
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 239000000463 material Substances 0.000 claims abstract description 50
- 238000003860 storage Methods 0.000 claims description 9
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 238000013507 mapping Methods 0.000 abstract description 11
- 230000000694 effects Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000000465 moulding Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004040 coloring Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000010422 painting Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2219/00—Indexing scheme for manipulating 3D models or images for computer graphics
- G06T2219/20—Indexing scheme for editing of 3D models
- G06T2219/2012—Colour editing, changing, or manipulating; Use of colour codes
Landscapes
- Engineering & Computer Science (AREA)
- Architecture (AREA)
- Computer Graphics (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
The disclosure provides a blueprint generating method and device of a model and electronic equipment, and a target model is obtained; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model; and combining the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain a blueprint of the target model. In the method, the hard edge of the target model is extracted, and is converted into the wire frame model, so that the precision of the wire frame is improved, and the blueprints are prevented from being sawteeth; no mapping is required to be made, so that the memory occupation is reduced; and combining the target model with the wire frame model, and setting transparency and color values of the target model and the wire frame model through the material balls, so that the labor, financial and time cost is reduced.
Description
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a blueprint generating method and device of a model and electronic equipment.
Background
At present, for blueprints of various models, such as virtual models (virtual vehicles and the like) in games, the blueprints of the models are generally generated by a hand-drawn three-view mode, and the hand-drawn three-view mode cannot achieve 360-degree display. In the related art, a blueprint of a model is generally generated by adding a map to the model. Specifically, a UV ray frame of a model is firstly manufactured, then a color (such as blue) is filled in the wire frame, and then the wire frame is added to a material ball of the model. Although 360-degree display can be achieved in the mode, the mapping occupies a large amount of memory, and a new mapping is added in the later color replacement process; in addition, the accuracy of wire frame is lower, and the blueprint that renders will have a large amount of sawtooth generally, and the bandwagon effect is relatively poor, if want better bandwagon effect, and the manufacturing process is comparatively loaded down with trivial details, needs a large amount of manpower, financial resources and time cost.
Disclosure of Invention
Accordingly, an object of the present disclosure is to provide a method, an apparatus, and an electronic device for generating a blueprint of a model, which can improve the accuracy of a wire frame and avoid the occurrence of jaggies in the blueprint by extracting a hard edge of a target model and converting the hard edge into the wire frame model; in addition, no mapping is needed to be manufactured, so that the memory occupation is reduced, and the transparency and color values of the target model and the wire frame model are set through the material balls, so that the labor, financial and time cost is reduced.
In a first aspect, an embodiment of the present disclosure provides a blueprint generating method of a model, including: obtaining a target model; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model; and combining the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain a blueprint of the target model.
In a second aspect, an embodiment of the present disclosure provides a blueprint generating apparatus for a model, the apparatus including: the model acquisition module is used for acquiring a target model; the model conversion module is used for extracting the hard edge of the target model and converting the hard edge of the target model into a wire frame model; and the blueprint generating module is used for merging the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain the blueprint of the target model.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the blueprint generating method of the model of any one of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement a blueprint generating method for a model of any one of the first aspects.
The embodiment of the disclosure brings the following beneficial effects:
the disclosure provides a blueprint generating method and device of a model and electronic equipment, and a target model is obtained; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model; and combining the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain a blueprint of the target model. In the method, the hard edge of the target model is extracted, and is converted into the wire frame model, so that the precision of the wire frame is improved, and the blueprints are prevented from being sawteeth; no mapping is required to be made, so that the memory occupation is reduced; and combining the target model with the wire frame model, and setting transparency and color values of the target model and the wire frame model through the material balls, so that the labor, financial and time cost is reduced.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the disclosure. The objectives and other advantages of the disclosure will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a blueprint generating method of a model according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a wire frame model provided in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a target model provided by an embodiment of the present disclosure;
FIG. 4 is a blueprint schematic diagram of a target model according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a blueprint of another object model provided by an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a soft side and a hard side provided by an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a polygonal column and a model line segment according to an embodiment of the disclosure;
FIG. 8 is a diagram illustrating blueprint contrast of a target model according to an embodiment of the present disclosure
Fig. 9 is a schematic structural diagram of a blueprint generating device of a model according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
At present, for blueprints of various models, such as virtual models (virtual vehicles and the like) in games, the blueprints of the models are generally generated by a hand-drawn three-view mode, and the hand-drawn three-view mode cannot achieve 360-degree display. In the related art, a blueprint of a model is generally generated by adding a map to the model. Specifically, a UV ray frame of a model is firstly manufactured, then a color (such as blue) is filled in the wire frame, and then the wire frame is added to a material ball of the model. Although 360-degree display can be achieved in the mode, the mapping occupies a large amount of memory, and new mapping is required to be added for later color replacement by hand painting, so that the efficiency is low; in addition, the accuracy of wire frame is lower, and the blueprint that renders will have a large amount of sawtooth generally, and the bandwagon effect is relatively poor, if want better bandwagon effect, and the manufacturing process is comparatively loaded down with trivial details, needs a large amount of manpower, financial resources and time cost. Based on the above, the blueprint generating method, the blueprint generating device and the electronic equipment of the model provided by the embodiment of the disclosure, and the technology can be applied to equipment such as computers and notebooks.
For the understanding of the present embodiment, first, a detailed description will be given of a blueprint generating method of a model disclosed in the embodiment of the present disclosure, as shown in fig. 1, the method includes the following steps:
step S102, obtaining a target model;
the target model may be various virtual models, such as a building model in a game, a carrier model, a furniture model, a weapon model, etc., and further such as an airship model in a science fiction movie, etc. The object model is usually prefabricated by a worker in three-dimensional graphic image software (such as Blender).
Step S104, extracting the hard edge of the target model, and converting the hard edge of the target model into a wire frame model;
model edges of a general object model include soft edges and hard edges, which differ in whether normal vectors on two faces sharing one edge are continuous, if normal discontinuous changes on two faces sharing one edge, the edge is a hard edge that appears to be a distinct boundary, and if normal continuous changes on two faces sharing one edge, the edge is a soft edge that appears to be a smooth boundary.
In the initial state, in model processing software, according to the included angle of two surfaces sharing one edge, the hard edge and the soft edge of the target model are automatically determined and displayed according to the corresponding display mode. For example, an angle between two faces sharing one edge of greater than 90 degrees is set as a soft edge, and the normal direction on the two faces sharing the soft edge is controlled to continuously change. And setting the hard edge as the two surfaces sharing one edge with an included angle smaller than or equal to 90 degrees, and controlling normal discontinuous change on the two surfaces sharing the hard edge.
The hard edge of the extracted target model may be the hard edge determined in the initial state, or may be the hard edge redetermined according to the need, for example, the included angle of two surfaces sharing one edge is set to be a soft edge by setting the included angle to be greater than 135 degrees. And if the included angle of two surfaces sharing one edge is less than or equal to 135 degrees, the hard edge is set. Wherein the hard edges may also be referred to as structural lines or sharp edges. The soft edges described above may also be referred to as non-structural wires.
After the hard edges of the target model are extracted, the hard edges of the target model are not three-dimensional models, but are only one line segment after being combined, and the line frame of the blueprint is far seen as one line, but is actually composed of a polygonal column (such as a triangular column and the like), so that the hard edges of the target model need to be converted into the polygonal column, and then the line frame model is obtained.
And S106, merging the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain a blueprint of the target model.
The target model is an original model for any treatment, and the wire frame model and the target model can be overlapped, so that a blueprint expressed by a pure model can be obtained. The material balls of the wire frame model are pre-generated, and the color, transparency, thickness, color intensity and the like of the wire frame in the wire frame model can be set (edited). The material balls of the target model are also pre-generated, and the color, transparency, color intensity, etc. of the target model can be set (edited), or the color, transparency, color intensity, etc. of the model map of the target model can be set.
Illustratively, a wire frame model as shown in FIG. 2, a target model as shown in FIG. 3, and combining the wire frame model with the target model results in an initial blueprint of the target model as shown in FIG. 4. When the wire frame is set to be opaque and blue by the material ball according to the wire frame model, the target model is set to be transparent and blue by the material ball of the target model, as shown in fig. 5.
The embodiment of the disclosure provides a blueprint generating method of a model, which is used for acquiring a target model; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model; and combining the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain a blueprint of the target model. In the method, the hard edge of the target model is extracted, and is converted into the wire frame model, so that the precision of the wire frame is improved, and the blueprints are prevented from being sawteeth; no mapping is required to be made, so that the memory occupation is reduced; and combining the target model with the wire frame model, and setting transparency and color values of the target model and the wire frame model through the material balls, so that the labor, financial and time cost is reduced.
The target model comprises a plurality of model edges, wherein the model edges with the first marks are hard edges, and the model edges without the first marks are soft edges;
the step of extracting the hard edge of the target model and converting the hard edge of the target model into a wire frame model is one possible implementation mode:
step 1, deleting a first mark in a target model;
in actual implementation, the model line of the target model may be set in an editable state in model processing software, for example, after the model line of the target model is set in an editable state by clicking the "smooth coloring" control, the model line (i.e., hard edge and soft edge) of the target model may be controlled to be in an editable state, at this time, the edit control for the opposite edge is clicked to display a pull-down menu, and the sharp edge mark in the "clear sharp edge mark for the vertex" is clicked to correspond to the first mark, and at this time, the first mark in the target model is deleted.
The purpose of the above steps is to determine all model edges in the object model as soft edges, which are displayed in the form of soft edges, in order to facilitate the program to re-determine the hard edges (sharp edges) of the object model as required. That is, the turning edge of the model, the calculated turning edge can be used as the line frame of the blueprint.
Step 2, determining a target hard edge and a target soft edge of a target model from a plurality of model edges based on a preset rule, and adding a first mark on the target hard edge;
the preset rules generally refer to determining the angles of the hard edge and the soft edge, and setting different angles can determine different hard edges and soft edges. Specifically, a first model side formed by adjacent model surfaces with included angles smaller than a first angle is determined from a plurality of model sides, and the first model side is determined as a target hard side; and determining a second model edge formed by adjacent model surfaces with included angles larger than or equal to the first angle, and determining the second model edge as a target soft edge.
For example, the editing state before exiting in the model processing software is firstly exited, then the automatic smoothing parameter is set to be 5 degrees in the model data attribute, and then the custom edge removing normal data is clicked and added. And automatically calculating a target soft edge and a target hard edge of the target model, and determining the edge with the included angle formed by the two die surfaces larger than 135 degrees as the target soft edge and the edge smaller than 135 degrees as the target hard edge according to the first angle calculation.
After the step of determining the target hard edge and the target soft edge of the target model from the plurality of model edges based on the preset rule, the method further comprises: controlling a target hard edge in the target model to be displayed in a first display mode, and controlling a target soft edge in the target model to be displayed in a second display mode; wherein the smoothness of the target soft edge is greater than the smoothness of the target hard edge.
The method is characterized by controlling normal continuous change on two surfaces of a shared target hard edge and controlling normal discontinuous change on two surfaces of a shared target soft edge. Illustratively, as shown in fig. 6, the hard edges of the object with the first mark have sharp corners, have no smooth display effect, and the soft edges of the object without the first mark have no sharp corners, have a smooth display effect.
And 3, extracting the target hard edge with the first mark, and converting the target hard edge into a wire frame model.
Specifically, the target hard edge with the first mark can be directly screened out, for example, the editing state of the model edge of the target model is entered again, and the target hard edge is selected to copy out the target hard edge. Or deleting the molding surfaces, the target soft edges and the like except the target hard edges in the target model to finally obtain the target hard edges with the first marks, and converting the target hard edges into the wire frame model after obtaining the target hard edges.
In the mode, the soft edge and the hard edge of the target model are redetermined according to the preset rule, so that the saw teeth of the blueprint are further reduced, and the blueprint effect of the model is further improved.
In the step 3, the step of extracting the target hard edge with the first mark and converting the target hard edge into the wire frame model is one possible implementation manner:
step 31, deleting the die surface and the target soft edge in the target model to obtain a target hard edge with a first mark; the target hard edge is formed by connecting a plurality of model line segments;
for example, in the editing state of the target model, the target soft edge is selected, the deletion is clicked, the displayed "limited fusion" control is clicked, and then the "limited fusion" control is clicked, so that the target soft edge can be deleted, and a model without triangle lines can be obtained. Then selecting the model surface of the target model, clicking to delete the model surface, displaying the control of 'only surface', clicking the control of 'only surface', deleting the model surface in the target model, and obtaining the target hard edge with the first mark.
Step 32, disconnecting a plurality of model line segments connected in the target hard edge to obtain a plurality of model line segments which are not connected with each other;
in the editing state, the lines are selected completely, and then the V key is pressed to disconnect all the lines. Since in the previous step, after deleting the mold surface, the structural line (i.e. the above-mentioned target hard edge) remains, but this structural line is not a three-dimensional model, and is a line segment, although the blue-drawing line frame is far seen as a line, it is actually composed of triangular prisms, and it is necessary to convert a plurality of model line segments into a line frame model.
Step 33, converting the plurality of model line segments into a wire frame model.
The method is characterized in that a triangular prism is sleeved outside according to the position and trend of a model line segment, then a line frame model is formed, the line is cut off for the purpose of simple calculation of a program, errors are not easy to occur, and the method is easier than the method that all column-shaped bodies of a chair are sleeved with shells, the chair is certainly disassembled into one section, then the shells are sleeved, and then assembly is easier. Without disassembly, there is no way to encase the cylinder therein.
One possible implementation is: updating the line segment types of the plurality of model line segments to obtain a plurality of updated model line segments; lofting the updated plurality of model line segments to obtain lofting models of the plurality of model line segments; and converting the lofting model into a grid model to obtain a wire frame model.
Specifically, an equilateral triangle is created; the line segment type of the equilateral triangle is the same as the line segment type of the updated multiple model line segments; generating triangular prisms corresponding to the equilateral triangles based on the equilateral triangles; setting a plurality of model line segments at the center of the triangular prism to obtain a lofting model of the plurality of model line segments; the model line segment in the lofting model is surrounded by the triangular prism.
For example, the editing mode is exited first, and then the line segment type of the model line segment is converted to the curve type. Only by converting the line type of the model line segment into the curve type, the triangular prism model shell can be arranged at the periphery of the model line segment. An equilateral triangle is then created, the line segment type of which is also of the curve type. In practice, the triangle is a cross section of a triangular prism, the cross section is elongated along the trend of the model line segment to become the triangular prism, and a plurality of model line segments are arranged at the center of the triangular prism to obtain a lofting model of the plurality of model line segments. As shown in fig. 7, a model line segment is provided at the center position of the triangular prism.
After the step of setting the transparency and color value of the wire frame model according to the material ball of the wire frame model and setting the transparency and color value of the target model according to the material ball of the target model, the method further comprises the steps of: and setting the thickness of the model line segment in the wire frame model according to the material balls of the wire frame model.
Specifically, the size of the triangle created by the method can be controlled, so that the thickness of the triangular prism can be adjusted, and the thickness of the model line segment in the wire frame model can be adjusted.
Further, as shown in fig. 8, the blueprint of the final target model obtained in the above manner has a great improvement in the display effect, and the blueprint manufactured in the prior art has more saw teeth. By contrast, the method has the advantages that the precision is improved or the anti-aliasing is improved obviously, the resource size occupies only one ninth of the prior resource size, the manufacturing process is simple, and the effect and the efficiency are improved obviously.
Corresponding to the above method embodiment, the embodiment of the present disclosure provides a blueprint generating device of a model, as shown in fig. 9, including:
a model acquisition module 91, configured to acquire a target model;
the model conversion module 92 is configured to extract a hard edge of the target model, and convert the hard edge of the target model into a wire frame model;
and the blueprint generating module 93 is used for merging the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain the blueprint of the target model.
The embodiment of the disclosure provides a blueprint generating device of a model, which acquires a target model; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model; and combining the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain a blueprint of the target model. In the method, the hard edge of the target model is extracted, and is converted into the wire frame model, so that the precision of the wire frame is improved, and the blueprints are prevented from being sawteeth; no mapping is required to be made, so that the memory occupation is reduced; and combining the target model with the wire frame model, and setting transparency and color values of the target model and the wire frame model through the material balls, so that the labor, financial and time cost is reduced.
The target model comprises a plurality of model edges, wherein the model edges with the first marks are hard edges, and the model edges without the first marks are soft edges; the model conversion module is also used for: deleting the first mark in the target model; determining a target hard edge and a target soft edge of a target model from a plurality of model edges based on a preset rule, and adding a first mark on the target hard edge; a target hard edge with a first mark is extracted, and the target hard edge is converted into a wire frame model.
The model edge consists of adjacent model surfaces; the model conversion module is also used for: determining a first model side formed by adjacent model surfaces with included angles smaller than a first angle from the plurality of model sides, and determining the first model side as a target hard side; and determining a second model edge formed by adjacent model surfaces with included angles larger than or equal to the first angle, and determining the second model edge as a target soft edge.
The device further comprises: the display control module is used for controlling the target hard edge in the target model to be displayed in a first display mode and controlling the target soft edge in the target model to be displayed in a second display mode; wherein the smoothness of the target soft edge is greater than the smoothness of the target hard edge.
The model conversion module is also used for: deleting the molding surface and the target soft edge in the target model to obtain a target hard edge with a first mark; the target hard edge is formed by connecting a plurality of model line segments; disconnecting a plurality of model line segments connected in the target hard edge to obtain a plurality of model line segments which are not connected with each other; a plurality of model line segments are converted into a wire frame model.
The model conversion module is also used for: updating the line segment types of the plurality of model line segments to obtain a plurality of updated model line segments; lofting the updated plurality of model line segments to obtain lofting models of the plurality of model line segments; and converting the lofting model into a grid model to obtain a wire frame model.
The model conversion module is also used for: creating an equilateral triangle; the line segment type of the equilateral triangle is the same as the line segment type of the updated multiple model line segments; generating triangular prisms corresponding to the equilateral triangles based on the equilateral triangles; setting a plurality of model line segments at the center of the triangular prism to obtain a lofting model of the plurality of model line segments; the model line segment in the lofting model is surrounded by the triangular prism.
The device further comprises: the thickness setting module is used for: and setting the thickness of the model line segment in the wire frame model according to the material balls of the wire frame model.
The blueprint generating device of the model provided by the embodiment of the disclosure has the same technical characteristics as the blueprint generating method of the model provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The present embodiment also provides an electronic device including a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the blueprint generating method of the model. The electronic device may be a server or a terminal device.
Referring to fig. 10, the electronic device includes a processor 100 and a memory 101, the memory 101 storing machine executable instructions that can be executed by the processor 100, the processor 100 executing the machine executable instructions to implement the blueprint generating method of the above model.
Further, the electronic device shown in fig. 10 further includes a bus 102 and a communication interface 103, and the processor 100, the communication interface 103, and the memory 101 are connected through the bus 102.
The memory 101 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 103 (which may be wired or wireless), and may use the internet, a wide area network, a local network, a metropolitan area network, etc. Bus 102 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 10, but not only one bus or type of bus.
The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 100 or by instructions in the form of software. The processor 100 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks of the disclosure in the embodiments of the disclosure may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present disclosure may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and, in combination with its hardware, performs the steps of the method of the previous embodiment.
The processor in the electronic device may implement the following operations in the blueprint generating method of the model by executing machine executable instructions:
obtaining a target model; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model; and combining the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain a blueprint of the target model.
The target model comprises a plurality of model edges, wherein the model edges with the first marks are hard edges, and the model edges without the first marks are soft edges; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model, wherein the method comprises the following steps of: deleting the first mark in the target model; determining a target hard edge and a target soft edge of a target model from a plurality of model edges based on a preset rule, and adding a first mark on the target hard edge; a target hard edge with a first mark is extracted, and the target hard edge is converted into a wire frame model.
The model edge consists of adjacent model surfaces; determining a target hard edge and a target soft edge of a target model from a plurality of model edges based on a preset rule, wherein the method comprises the following steps: determining a first model side formed by adjacent model surfaces with included angles smaller than a first angle from the plurality of model sides, and determining the first model side as a target hard side; and determining a second model edge formed by adjacent model surfaces with included angles larger than or equal to the first angle, and determining the second model edge as a target soft edge.
After the step of determining the target hard edge and the target soft edge of the target model from the plurality of model edges based on the preset rule, the method further comprises: controlling a target hard edge in the target model to be displayed in a first display mode, and controlling a target soft edge in the target model to be displayed in a second display mode; wherein the smoothness of the target soft edge is greater than the smoothness of the target hard edge.
The step of extracting the target hard edge with the first mark and converting the target hard edge into a wire frame model comprises the following steps: deleting the molding surface and the target soft edge in the target model to obtain a target hard edge with a first mark; the target hard edge is formed by connecting a plurality of model line segments; disconnecting a plurality of model line segments connected in the target hard edge to obtain a plurality of model line segments which are not connected with each other; a plurality of model line segments are converted into a wire frame model.
The step of converting the plurality of model line segments into a wire frame model includes: updating the line segment types of the plurality of model line segments to obtain a plurality of updated model line segments; lofting the updated plurality of model line segments to obtain lofting models of the plurality of model line segments; and converting the lofting model into a grid model to obtain a wire frame model.
The step of lofting the updated plurality of model line segments to obtain lofted models of the plurality of model line segments comprises the following steps: creating an equilateral triangle; the line segment type of the equilateral triangle is the same as the line segment type of the updated multiple model line segments; generating triangular prisms corresponding to the equilateral triangles based on the equilateral triangles; setting a plurality of model line segments at the center of the triangular prism to obtain a lofting model of the plurality of model line segments; the model line segment in the lofting model is surrounded by the triangular prism.
After the step of setting the transparency and color value of the wire frame model according to the material ball of the wire frame model and setting the transparency and color value of the target model according to the material ball of the target model, the method further comprises the steps of: and setting the thickness of the model line segment in the wire frame model according to the material balls of the wire frame model.
In the method, the hard edge of the target model is extracted, and is converted into the wire frame model, so that the precision of the wire frame is improved, and the blueprints are prevented from being sawteeth; no mapping is required to be made, so that the memory occupation is reduced; and combining the target model with the wire frame model, and setting transparency and color values of the target model and the wire frame model through the material balls, so that the labor, financial and time cost is reduced.
The present embodiment also provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the blueprint generation method of the model described above.
The machine-executable instructions stored on the machine-readable storage medium may implement the following operations in the blueprint generating method of the model by executing the machine-executable instructions:
obtaining a target model; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model; and combining the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain a blueprint of the target model.
The target model comprises a plurality of model edges, wherein the model edges with the first marks are hard edges, and the model edges without the first marks are soft edges; extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model, wherein the method comprises the following steps of: deleting the first mark in the target model; determining a target hard edge and a target soft edge of a target model from a plurality of model edges based on a preset rule, and adding a first mark on the target hard edge; a target hard edge with a first mark is extracted, and the target hard edge is converted into a wire frame model.
The model edge consists of adjacent model surfaces; determining a target hard edge and a target soft edge of a target model from a plurality of model edges based on a preset rule, wherein the method comprises the following steps: determining a first model side formed by adjacent model surfaces with included angles smaller than a first angle from the plurality of model sides, and determining the first model side as a target hard side; and determining a second model edge formed by adjacent model surfaces with included angles larger than or equal to the first angle, and determining the second model edge as a target soft edge.
After the step of determining the target hard edge and the target soft edge of the target model from the plurality of model edges based on the preset rule, the method further comprises: controlling a target hard edge in the target model to be displayed in a first display mode, and controlling a target soft edge in the target model to be displayed in a second display mode; wherein the smoothness of the target soft edge is greater than the smoothness of the target hard edge.
The step of extracting the target hard edge with the first mark and converting the target hard edge into a wire frame model comprises the following steps: deleting the molding surface and the target soft edge in the target model to obtain a target hard edge with a first mark; the target hard edge is formed by connecting a plurality of model line segments; disconnecting a plurality of model line segments connected in the target hard edge to obtain a plurality of model line segments which are not connected with each other; a plurality of model line segments are converted into a wire frame model.
The step of converting the plurality of model line segments into a wire frame model includes: updating the line segment types of the plurality of model line segments to obtain a plurality of updated model line segments; lofting the updated plurality of model line segments to obtain lofting models of the plurality of model line segments; and converting the lofting model into a grid model to obtain a wire frame model.
The step of lofting the updated plurality of model line segments to obtain lofted models of the plurality of model line segments comprises the following steps: creating an equilateral triangle; the line segment type of the equilateral triangle is the same as the line segment type of the updated multiple model line segments; generating triangular prisms corresponding to the equilateral triangles based on the equilateral triangles; setting a plurality of model line segments at the center of the triangular prism to obtain a lofting model of the plurality of model line segments; the model line segment in the lofting model is surrounded by the triangular prism.
After the step of setting the transparency and color value of the wire frame model according to the material ball of the wire frame model and setting the transparency and color value of the target model according to the material ball of the target model, the method further comprises the steps of: and setting the thickness of the model line segment in the wire frame model according to the material balls of the wire frame model.
In the method, the hard edge of the target model is extracted, and is converted into the wire frame model, so that the precision of the wire frame is improved, and the blueprints are prevented from being sawteeth; no mapping is required to be made, so that the memory occupation is reduced; and combining the target model with the wire frame model, and setting transparency and color values of the target model and the wire frame model through the material balls, so that the labor, financial and time cost is reduced.
The blueprint generating method, apparatus and computer program product of the system provided by the embodiments of the present disclosure include a computer readable storage medium storing program codes, where the instructions included in the program codes may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments and are not repeated herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In addition, in the description of the embodiments of the present disclosure, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the terms in this disclosure will be understood by those skilled in the art in the specific case.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the description of the present disclosure, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the foregoing examples are merely illustrative of specific embodiments of the present disclosure, and are not intended to limit the scope of the disclosure, although the disclosure has been described in detail with reference to the foregoing examples, it will be understood by those skilled in the art that: any person skilled in the art, within the technical scope of the disclosure of the present disclosure, may modify or easily conceive changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features thereof; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the disclosure, and are intended to be included within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
Claims (11)
1. A blueprint generation method of a model, said method comprising:
obtaining a target model;
extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model;
and merging the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material balls of the wire frame model, and setting the transparency and the color value of the target model according to the material balls of the target model to obtain the blueprint of the target model.
2. The method of claim 1, wherein the target model comprises a plurality of model edges, the model edges with the first indicia being hard edges and the model edges without the first indicia being soft edges;
extracting a hard edge of the target model, and converting the hard edge of the target model into a wire frame model, wherein the method comprises the following steps of:
deleting a first mark in the target model;
determining a target hard edge and a target soft edge of the target model from the plurality of model edges based on a preset rule, and adding the first mark on the target hard edge;
and extracting a target hard edge with the first mark, and converting the target hard edge into a wire frame model.
3. The method of claim 2, wherein the mold edge is comprised of adjacent mold surfaces; determining a target hard edge and a target soft edge of the target model from the plurality of model edges based on a preset rule, wherein the step comprises the following steps:
determining a first model edge formed by adjacent model surfaces with included angles smaller than a first angle from the plurality of model edges, and determining the first model edge as the target hard edge;
and determining a second model edge formed by adjacent model surfaces with included angles larger than or equal to the first angle, and determining the second model edge as the target soft edge.
4. The method of claim 2, wherein after the step of determining the target hard edge and the target soft edge of the target model from the plurality of model edges based on a preset rule, the method further comprises:
controlling the target hard edge in the target model to be displayed in a first display mode, and controlling the target soft edge in the target model to be displayed in a second display mode; and the smoothness of the target soft edge is greater than that of the target hard edge.
5. The method of claim 2, wherein the step of extracting the target hard edge with the first mark, converting the target hard edge into a wireframe model, comprises:
deleting the die surface and the target soft edge in the target model to obtain a target hard edge with the first mark; the target hard edge is formed by connecting a plurality of model line segments;
disconnecting a plurality of model line segments connected in the target hard edge to obtain a plurality of model line segments which are not connected with each other;
the plurality of model line segments are converted into the wireframe model.
6. The method of claim 5, wherein the step of converting the plurality of model line segments into the wire frame model comprises:
updating the line segment types of the model line segments to obtain updated model line segments;
lofting the updated model line segments to obtain lofting models of the model line segments;
and converting the lofting model into a grid model to obtain the wire frame model.
7. The method of claim 6, wherein the step of lofting the updated plurality of model line segments to obtain a lofted model of the plurality of model line segments comprises:
creating an equilateral triangle; the line segment type of the equilateral triangle is the same as the line segment type of the updated model line segments;
generating triangular prisms corresponding to the equilateral triangles based on the equilateral triangles;
setting the model line segments at the center of the triangular prism to obtain lofting models of the model line segments; wherein the model line segments in the lofting model are surrounded by the triangular prism.
8. The method of claim 1, wherein the transparency and color values of the wire frame model are set according to the material balls of the wire frame model, and wherein the transparency and color values of the target model are set according to the material balls of the target model, and wherein after the step of obtaining the blueprint of the target model, the method further comprises:
and setting the thickness of the model line segment in the wire frame model according to the material balls of the wire frame model.
9. A blueprint generating apparatus for a model, said apparatus comprising:
the model acquisition module is used for acquiring a target model;
the model conversion module is used for extracting the hard edge of the target model and converting the hard edge of the target model into a wire frame model;
and the blueprint generating module is used for merging the wire frame model and the target model, setting the transparency and the color value of the wire frame model according to the material ball of the wire frame model, and setting the transparency and the color value of the target model according to the material ball of the target model to obtain the blueprint of the target model.
10. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the blueprint generating method of the model of any one of claims 1-8.
11. A computer readable storage medium storing computer executable instructions which, when invoked and executed by a processor, cause the processor to implement the blueprint generating method of the model of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310857648.XA CN117058347A (en) | 2023-07-12 | 2023-07-12 | Blueprint generation method and device of model and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310857648.XA CN117058347A (en) | 2023-07-12 | 2023-07-12 | Blueprint generation method and device of model and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117058347A true CN117058347A (en) | 2023-11-14 |
Family
ID=88656238
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310857648.XA Pending CN117058347A (en) | 2023-07-12 | 2023-07-12 | Blueprint generation method and device of model and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117058347A (en) |
-
2023
- 2023-07-12 CN CN202310857648.XA patent/CN117058347A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11847738B2 (en) | Voxelization of mesh representations | |
US8725466B2 (en) | System and method for hybrid solid and surface modeling for computer-aided design environments | |
CN107578467B (en) | Three-dimensional modeling method and device for medical instrument | |
CN112733318B (en) | Adaptive grid subdivision method, device, equipment and storage medium | |
CN111260750B (en) | Processing method and device for openFL drawing vector graphics and electronic equipment | |
CN113724401A (en) | Three-dimensional model cutting method and device, computer equipment and storage medium | |
US11087511B1 (en) | Automated vectorization of a raster image using a gradient mesh with arbitrary topology | |
CN111508054B (en) | Terrain construction method, device and equipment | |
CN108280135B (en) | Method and device for realizing visualization of data structure and electronic equipment | |
CN115841558B (en) | Urban road modeling method, device, electronic equipment and storage medium | |
CN117058347A (en) | Blueprint generation method and device of model and electronic equipment | |
CN114979592B (en) | Image curved surface geometric correction method and device, electronic equipment and storage medium | |
CN111462343B (en) | Data processing method and device, electronic equipment and storage medium | |
CN110310353B (en) | BIM model data optimization method and system | |
CN113888718A (en) | Route modeling method and device based on cross section template | |
CN115858519B (en) | DEM leveling method and device | |
Wang | Robust Geometry Kernel and UI for Handling Non-orientable 2-Mainfolds | |
CN113368498B (en) | Model generation method and device and electronic equipment | |
JP3209003B2 (en) | Method and apparatus for automatically generating a three-dimensional shape | |
CN117744187B (en) | CAD drawing method, device, computer equipment and storage medium | |
CN117224935A (en) | Scene model generation method and device, electronic equipment and storage medium | |
JP4405822B2 (en) | Trim inside / outside determination device and method | |
CN114288665A (en) | Terrain construction method and device, electronic equipment and storage medium | |
CN112328234A (en) | Image processing method and device | |
CN116630555A (en) | Terrain height map generation method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |