CN110033507B - Method, device and equipment for drawing internal trace of model map and readable storage medium - Google Patents

Method, device and equipment for drawing internal trace of model map and readable storage medium Download PDF

Info

Publication number
CN110033507B
CN110033507B CN201910275569.1A CN201910275569A CN110033507B CN 110033507 B CN110033507 B CN 110033507B CN 201910275569 A CN201910275569 A CN 201910275569A CN 110033507 B CN110033507 B CN 110033507B
Authority
CN
China
Prior art keywords
dimensional
line
preset
contour line
model
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.)
Active
Application number
CN201910275569.1A
Other languages
Chinese (zh)
Other versions
CN110033507A (en
Inventor
宋田骥
范羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910275569.1A priority Critical patent/CN110033507B/en
Publication of CN110033507A publication Critical patent/CN110033507A/en
Application granted granted Critical
Publication of CN110033507B publication Critical patent/CN110033507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The method, the device, the equipment and the readable storage medium for drawing the internal tracing of the model map comprise the steps of obtaining a dividing line in a target model, wherein the dividing line divides the surface of the target model into a plurality of three-dimensional sub-surfaces; determining a marking line in a preset two-dimensional graph according to the three-dimensional sub-surface; and obtaining a mark line in a preset two-dimensional graph, and drawing an internal drawing line in the model map according to the mark line. The method, the device, the equipment and the computer readable storage medium for drawing the internal trace of the model map can mark the internal trace to be drawn in the target model in advance, and can directly draw the internal trace in the model map according to the mark line when the model is mapped, so that the internal trace is matched with the target model, and the internal trace cannot deform or reduce the precision when the target model is subjected to the operation of enlarging or reducing.

Description

Method, device and equipment for drawing internal trace of model map and readable storage medium
Technical Field
The present disclosure relates to graphics processing technology, and in particular, to a method, apparatus, device, and readable storage medium for internal tracing of a model map.
Background
With the development of 3D model technology, many products process images based on 3D technology, so as to obtain more realistic pictures, so as to improve the visual perception effect of users, for example, the products have certain application in visual works such as games, movies, animations and the like.
In the prior art, when rendering 3D graphics, the 3D model may include some linear elements, so that in order to make the rendered picture more realistic, the same linear elements need to be drawn in the rendered graphics. For example, a two-dimensional style of tracing. A complete trace consists of two parts, an outer contour trace and an inner trace. The external tracing refers to the edges of the object distinguished from other objects in space; the internal tracing refers to the drawing of a linear pattern of the surface area between the contours of the object itself.
In the prior art, a structural line needing internal drawing can be directly drawn on the mapping of the 3D model, but in the mode, when mapping resources are compressed or mapping accuracy is too small, the drawn line can be saw-tooth.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, and readable storage medium for drawing an internal trace of a model map, so as to solve the problem in the prior art that the internal trace drawn in the model map is easy to be jagged.
A first aspect of the present disclosure provides an internal tracing drawing method of a model map, including:
acquiring a boundary line in a target model, wherein the boundary line divides the surface of the target model into a plurality of three-dimensional sub-surfaces;
determining a marking line in a preset two-dimensional graph according to the three-dimensional sub-surface;
and obtaining the marking line in the preset two-dimensional graph, and drawing an internal drawing line in the model mapping according to the marking line.
Another aspect of the present disclosure is to provide an internal tracing drawing apparatus of a model map, including:
the first acquisition module is used for acquiring a dividing line in the target model, and the dividing line divides the surface of the target model into a plurality of three-dimensional sub-surfaces;
the determining module is used for determining a marking line in a preset two-dimensional graph according to the three-dimensional sub-surface;
the second acquisition module is used for acquiring the marking lines in the preset two-dimensional graph;
and the drawing module is used for drawing an internal drawing line in the model map according to the marking line.
Yet another aspect of the present disclosure is to provide an internal tracing drawing apparatus of a model map, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of internal ray tracing of a model map as described in the first aspect above.
It is a further aspect of the present disclosure to provide a computer readable storage medium having stored thereon a computer program for execution by a processor to implement the method of internal tracing of a model map as described in the first aspect above.
The method, the device, the equipment and the computer readable storage medium for drawing the internal tracing of the model map provided by the disclosure have the technical effects that:
the method, the device, the equipment and the readable storage medium for drawing the internal tracing of the model map comprise the steps of obtaining a dividing line in a target model, wherein the dividing line divides the surface of the target model into a plurality of three-dimensional sub-surfaces; determining a marking line in a preset two-dimensional graph according to the three-dimensional sub-surface; and obtaining a mark line in a preset two-dimensional graph, and drawing an internal drawing line in the model map according to the mark line. The method, the device, the equipment and the computer readable storage medium for drawing the internal trace of the model map can mark the internal trace to be drawn in the target model in advance, and can directly draw the internal trace in the model map according to the mark line when the model is mapped, so that the internal trace is matched with the target model, and the internal trace cannot deform or reduce the precision when the target model is subjected to the operation of enlarging or reducing.
Drawings
FIG. 1A is an exemplary model map with internal traces drawn;
FIG. 1B is an exemplary model map without an internal trace drawn;
FIG. 1C is an exemplary interline alignment;
FIG. 1D is another exemplary interline alignment;
FIG. 2 is a flow chart of a method of internal tracing of a model map, according to an exemplary embodiment of the invention;
FIG. 2A is a schematic diagram of the demarcation of a target model according to an exemplary embodiment of the invention;
FIG. 3 is a flow chart of a method of internal tracing of a model map shown in another exemplary embodiment of the invention;
FIG. 3A is a schematic diagram of the demarcation of a target model according to another exemplary embodiment of the invention;
FIG. 3B is a schematic diagram of an operational interface of an extended UV modifier according to an exemplary embodiment of the invention;
FIG. 3C is a schematic diagram illustrating the determination of marker lines in a preset two-dimensional graph according to an exemplary embodiment of the present invention;
FIG. 3D is a schematic diagram of a model map shown in accordance with an exemplary embodiment of the present invention;
FIG. 4 is a block diagram of an internal tracing device of a model map according to an exemplary embodiment of the present invention;
fig. 5 is a block diagram of an internal tracing apparatus of a model map shown in an exemplary embodiment of the present invention.
Detailed Description
FIG. 1A is an exemplary model map with internal traces drawn; FIG. 1B is an exemplary model map without an internal trace drawn; fig. 1C is an exemplary internal tracing magnification.
As shown in fig. 1A and 1B, the effect map in the figure is a model map obtained by rendering based on a 3D model. In many two-dimensional games or film works, it is necessary to shape the structure of the model by internal drawing lines, thereby strengthening the artistic style of the model. In the prior art, the internal drawing line is required to be directly drawn on the model map, but when the map resource is compressed or the map precision is too small, obvious saw teeth appear on drawn lines, and the internal drawing line is deformed. As shown at 1 in fig. 1C, the inner trace appears jagged and changes with the enlarged shape of the picture, as shown at 1 in fig. 1D. Fig. 1D is a partially enlarged view of a model map drawn by the method according to the embodiment of the present invention, as shown in fig. 1D, and when the model is enlarged, an internal trace drawn by the method according to the embodiment is shown as 2 in fig. 1D. 1C and 1D, the texture lines of the traditional map at the mark 1 are jagged and blurred; the 'field' shaped line of the mark 2 is not affected, and still is clear and sharp. The normal internal trace of this location should be as in 1D.
FIG. 2 is a flow chart of a method of internal tracing of a model map, according to an exemplary embodiment of the invention.
As shown in fig. 2, the method for drawing an internal line of a model map provided in this embodiment includes:
step 201, obtaining a boundary line in the target model, wherein the boundary line divides the surface of the target model into a plurality of three-dimensional sub-surfaces.
The user terminal can automatically map the target model, or the user terminal can be operated by the user to perform model mapping, and the user terminal automatically draws an internal line on the model mapping. The user terminal may be an electronic device, such as a computer, with computing capabilities.
Specifically, the user terminal may receive an operation instruction sent by the user, for example, the instruction may be an instruction input by the user through a device such as a mouse or a keyboard, for example, the user selects, through the mouse, a target model that needs to be mapped, where the target model may be a 3D model.
Further, after the user selects the target model, the user terminal may acquire the boundary line in the target model, and further, the user may send an instruction to the user terminal by expanding the UVW modifier, so that the user terminal may acquire the boundary line in the target model.
In practical application, the target model has UV coordinate information, and for the three-dimensional model, there are two most important coordinate systems, namely, the position (X, Y, Z) coordinates of the vertex, and the other is UV coordinates, wherein U and V are the coordinates of the picture in the horizontal and vertical directions of the display respectively, and the values are generally 0-1, namely (the U-th pixel/picture width in the horizontal direction and the V-th pixel/picture height in the vertical direction).
Wherein the extended UVW modifier is used to assign map (texture) coordinates to object and sub-object selections and edit these coordinates manually or by various tools. It can also be used to expand and edit existing UVW coordinates on the object. The map can be adapted to mesh, patch, polygon, HSDS and NURBS models using any combination of manual methods and various procedural methods. In the method provided by the embodiment, the 3D object model may be opened based on the development of the UVW modifier, and the boundary line therein may be obtained.
Specifically, the boundary line with the included angle smaller than or equal to 120 degrees and connected with two lines in the boundary lines of the surface of the target model may be used as the boundary line, and the boundary line may be manually drawn in the 3D target model by a user. In general, an included angle between two lines in the 3D model is larger, for example, approximately 180 degrees, and it can only be considered that the two edges belong to the same plane, and if the included angle between the two edges is smaller, for example, less than or equal to 120 degrees, it can be considered that the two edges belong to different planes. Therefore, the user terminal can take the boundary line with the included angle smaller than or equal to 120 degrees as the boundary line through the angle between the lines. The demarcation line is used to finally draw the internal trace of the model map, and the internal trace is on the outer surface of the graph, so that the demarcation line only needs to be obtained on the surface of the target model.
Furthermore, in order to avoid inaccuracy or incompleteness of the automatically determined dividing line, the user can edit the 3D model in the expanding UVW modifier, so that the dividing line can be acquired more accurately according to the editing instruction of the user.
In practical application, the boundary line of the target model is obtained by determining a wiring structure needing internal drawing on the model; specifically, in the developing UV modifier, one step of UV fabrication of the model specifically includes:
adding an extended UV modifier to the model (model has UV coordinate properties); the demarcation line is drawn for the model using functions in the extended UV modifier.
The internal drawing line is used for enhancing the wind drawing of the final model charting, and can also enhance the stereoscopic effect of the charting, and the internal drawing line is drawn at the groove position of the model, so that the effects can be achieved. In this embodiment, the dividing line is obtained based on the angle between the lines and the user instruction, and therefore, it can be considered that the dividing line includes all the internal lines to be drawn.
FIG. 2A is a schematic diagram of the boundary of a target model according to an exemplary embodiment of the present invention.
As shown in fig. 2A, demarcations may be obtained at the surface of the object model that divide the surface of the object model into a plurality of three-dimensional sub-facets.
Step 202, determining a marking line in a preset two-dimensional graph according to the three-dimensional sub-surface.
In practical application, a two-dimensional graph may be preset for marking the demarcation line obtained in step 101. Since the dividing line is three-dimensional, it is necessary to convert the three-dimensional sub-plane obtained based on the dividing line into a two-dimensional pattern and then mark the two-dimensional pattern in a predetermined two-dimensional pattern.
The contour line information of each three-dimensional sub-surface, in particular, the UV coordinate information of the contour line can be obtained, and then the three-dimensional contour line is mapped to a two-dimensional plane based on the UV coordinate information of the contour line, so that the two-dimensional contour line coordinate information is obtained.
In particular, the model may be expanded along the dividing line into individual UV elements using an expanding UV modifier; trimming individual UV elements using an extended UV modifier to reduce map stretching/deformation; the UV elements of the model are expanded and reasonably distributed in the mapping space using functions in the expanded UV modifier. And obtaining the complete UV coordinate information of the model.
Further, as shown in fig. 1A, the boundary defined in the object model can divide the model exterior into a plurality of three-dimensional sub-surfaces, and each of the three-dimensional sub-surfaces is not closed, so that the contour lines of the three-dimensional sub-surfaces can be projected according to the discovery direction of the three-dimensional sub-surfaces, thereby obtaining two-dimensional contour lines.
Further, the two-dimensional contour line may be placed in a preset two-dimensional pattern, and the two-dimensional contour line may be marked. In some embodiments, not all the demarcations in the object model need to be drawn as an internal trace, and at this time, a certain rule may be set to mark the internal trace that needs to be drawn. For example, an edge line may be set in a preset two-dimensional graph, and a contour line that coincides with the edge line is a mark line, that is, a position of an internal line to be drawn.
In practical application, if the shape of the two-dimensional contour line is not consistent with the shape in the preset graph, and the two-dimensional contour line cannot be overlapped with the edge line in the preset graph, the two-dimensional contour line can be processed in a manner of segmentation, stretching and the like, so that the two-dimensional contour line and the edge line are matched. For example, if the two-dimensional contour line is circular, the two-dimensional contour line can be cut into four equal-sized sectors, and then the arc-shaped part of the sector is stretched into a straight line, and if the straight line is overlapped with the edge line in the preset graph, the arc corresponding to the straight line is drawn into an internal drawing line during the mapping process.
The method provided in this embodiment may further include setting a mark of each marking line, and corresponding the mark to a boundary line corresponding to the marking line. For example, in the preset graph, the contour line 1 is a mark line, that is, an internal line to be drawn, and the corresponding UV coordinate information is a.
According to step 202, the internal trace in the model that needs to be drawn can be pre-marked.
And 203, acquiring a mark line in a preset two-dimensional graph, and drawing an internal drawing line in the model map according to the mark line.
Specifically, after the target model is processed, mapping processing can be performed on the target model. The method provided in this embodiment specifically refers to mapping the model based on UV information. In the target model, UV coordinate information corresponding to each point is provided, each point on the image can be accurately corresponding to the surface of the model object according to the UV information of the image, and the image smooth interpolation processing is carried out by software at the gap positions of the points, so that the model is mapped.
Further, based on the method provided in this embodiment, the user may operate the user terminal to obtain an image for mapping, and process the target model based on the image to obtain the model mapping. In this process or after the process, the method provided in this embodiment may further obtain a marker line in the preset two-dimensional graph, and after obtaining the model map, draw an internal trace in the model map according to the marker line. For example, a mapping instruction may be sent by the user to the user terminal, so that it obtains a mark line in the preset two-dimensional image according to the instruction.
In practical application, the mark lines in the preset two-dimensional graph are internal lines to be drawn, corresponding UV coordinate information can be obtained according to the marks of the mark lines, and the internal lines are drawn in the model map based on the UV coordinate information. The internal trace drawn in step 203 is drawn based on the UV coordinate information of the object model, which corresponds to the UV coordinate information of the object model, and the internal trace is not deformed nor the sharpness is reduced when the object model is subjected to the zoom-in or zoom-out operation.
The method provided by the present embodiment is for drawing an internal trace in a model map, which is performed by a device provided with the method provided by the present embodiment, which is typically implemented in hardware and/or software.
The method for drawing the internal line of the model map comprises the steps of obtaining a boundary line in a target model, wherein the boundary line divides the surface of the target model into a plurality of three-dimensional sub-surfaces; determining a marking line in a preset two-dimensional graph according to the three-dimensional sub-surface; and obtaining a mark line in a preset two-dimensional graph, and drawing an internal drawing line in the model map according to the mark line. According to the method for drawing the internal trace of the model map, the internal trace to be drawn in the target model can be marked in advance, and the internal trace can be drawn in the model map directly according to the marked line when the model is mapped, so that the internal trace is matched with the target model, and the internal trace cannot deform or reduce accuracy when the target model is subjected to the operation of enlarging or reducing.
FIG. 3 is a flow chart of a method of internal tracing of a model map, according to another exemplary embodiment of the invention.
As shown in fig. 3, the method for drawing an internal line of a model map provided in this embodiment includes:
step 301, acquiring a boundary line in the target model, wherein the boundary line divides the surface of the target model into a plurality of three-dimensional sub-surfaces.
Step 301 is similar to the specific principles and implementation of step 201 and will not be described in detail herein.
And 302, determining a two-dimensional contour line according to the contour line of the three-dimensional sub-surface, and marking the two-dimensional contour line in a preset two-dimensional graph.
The three-dimensional contour line corresponding to each three-dimensional sub-surface may be determined according to the three-dimensional sub-surface obtained in step 301, and specifically may be determined based on the position of the three-dimensional sub-surface in the target model. The target model is a model with UV coordinate information, the three-dimensional sub-surface is a surface of the target model, and then the contour line of the three-dimensional sub-surface is also on the surface of the target model, and the contour line information of the three-dimensional sub-surface can be determined according to the UV coordinate information of the target model and the position of the contour line on the target model.
Specifically, the three-dimensional contour line information may include UV coordinate information, and may be stored in units of edges, for example, for one three-dimensional sub-surface, there may be a plurality of edges, and coordinate information corresponding to each edge may be stored, for example, coordinate information of edge 1 is a. After the three-dimensional coordinates corresponding to the contour lines of the three-dimensional sub-surfaces are obtained, the three-dimensional coordinates can be projected to obtain two-dimensional contour lines
Further, the three-dimensional sub-surface can be projected according to the normal direction of the three-dimensional sub-surface, so that a two-dimensional contour line corresponding to the three-dimensional sub-surface is obtained. The projection may be performed in other manners, for example, the user terminal may be operated by the user to designate the projection direction, and the projection direction may be set in advance. Based on this step, a two-dimensional contour corresponding to the three-dimensional sub-surface can be obtained.
In practical application, the two-dimensional contour line also includes a plurality of edges, and the identifier corresponding to each edge can be set and the corresponding UV coordinate information can be determined, for example, the edge 1 in the two-dimensional contour line and the edge 1 of the three-dimensional sub-surface are actually one edge, and then the edge 1 in the two-dimensional contour line also corresponds to the coordinate information a.
Wherein, can mark two-dimentional contour lines in the preset two-dimentional figure. The preset two-dimensional graph may be stored in the user terminal, and after the boundary line of the target model is acquired, the preset two-dimensional graph may be loaded, and the two-dimensional contour line finally obtained according to the boundary line may be displayed in the preset two-dimensional graph.
In one embodiment, a display rule may be set, so that the two-dimensional contour lines are displayed in a preset two-dimensional graph according to a certain rule, and the two-dimensional contour lines are stored in the preset two-dimensional graph, thereby completing the purpose of marking the two-dimensional contour lines.
In another embodiment, the position of the two-dimensional contour line in the preset two-dimensional graph may be adjusted by a user so that the internal trace included in the two-dimensional contour line conforms to the marking rule. For example, if an edge in a two-dimensional contour line coincides with an edge of a preset two-dimensional pattern, the edge is considered to be an inscribed line. In this embodiment, the two-dimensional contour line may be displayed at a preset position in the preset two-dimensional graph, and then adjusted by the user, or an edge of the two-dimensional contour line may be automatically matched with an edge in the preset two-dimensional graph, and the matched edges may be overlapped, so that the number of times of user adjustment is reduced.
Alternatively, the preset two-dimensional pattern may include at least one rectangle, for example, four rectangles, which may be different in size, for placing two-dimensional contour lines of different sizes.
At this time, a rectangle to be matched with the two-dimensional contour line may be determined according to the size of the two-dimensional contour line, and at least one side of the two-dimensional contour line may be overlapped with a side line of the rectangle. For example, if the size of the two-dimensional contour is large, then a large rectangle may be matched and the two-dimensional contour placed within the large rectangle with at least one side overlapping the side of the rectangle. If the coincident edges are not the user's desired internal line, then the two-dimensional contour may be manually adjusted by the user. In the method provided by the embodiment, the two-dimensional contour can be placed in a rectangle matched with the size of the preset two-dimensional graph, so that the two-dimensional contour can be matched with the rectangle in the preset two-dimensional graph without greatly adjusting the two-dimensional contour, and the proportion of the two-dimensional contour can be further unchanged greatly.
Specifically, an insert can be designed, and a user can adjust a two-dimensional contour line in a preset two-dimensional graph through the insert. For example, a plurality of buttons for moving the two-dimensional contour lines can be designed in the plug-in, a user can select some contour lines or elements forming the contour lines, and click on corresponding buttons in the plug-in, so that the processor can adjust the two-dimensional contour lines according to a moving instruction input by the user, and at least one side of the two-dimensional contour lines is overlapped with the side lines of the preset two-dimensional graph.
Further, a plurality of movement buttons may be designed in the plug-in, for example, when the preset two-dimensional graph is in a grid shape, and includes three vertical lines and three horizontal lines, six movement buttons may be set for respectively: moving the selected element in a lateral direction so that it coincides with the first vertical line; moving the selected element in a lateral direction so that it coincides with the second vertical line; moving the selected element in a lateral direction so that it coincides with a third vertical line; moving the selected element vertically so that it can be laterally coincident with the first strip; moving the selected element vertically so that it can be laterally coincident with the second bar; the selected element is moved vertically so that it can be laterally coincident with the third bar.
In practical application, the two-dimensional contour line may include a plurality of points in a preset two-dimensional graph, and the points are connected with wires, so as to form the two-dimensional contour line. The user can select a two-dimensional contour line in the preset two-dimensional graph in a mode of being at the midpoint of the preset two-dimensional graph.
Specifically, in some cases, the two-dimensional contour line may not be a regular shape, and at this time, it may be determined whether the two-dimensional contour line is a preset shape, and if not, it may be adjusted to the preset shape according to the shape of the two-dimensional contour line. The preset shape may be preset according to the need, and may be, for example, a shape having a straight line as a side, such as a rectangle, a trapezoid, a triangle, or the like. If the two-dimensional contour line is a perfect circle, the two-dimensional contour line can be segmented, and the segmented graph is stretched into a preset shape. For example, the circle may be divided into a plurality of sectors, and the more the number of divisions, the closer the arc edge of the sector is to a straight line, the less the deformation of the figure is when the adjustment is performed. .
Further, the shape of the two-dimensional contour line can be actively adjusted by the user, and at this time, an adjustment button can be designed in the plug-in. The user can select the two-dimensional contour line to be adjusted and click an adjusting button in the plug-in, so that the user terminal can also receive an adjusting instruction of the user and adjust the two-dimensional contour line to a preset shape according to the adjusting instruction and the shape of the two-dimensional contour line. For example, the two-dimensional contour is a trapezoid, wherein two intersecting sides need to be drawn as an internal line, at this time, the user can adjust the two-dimensional contour to make the included angle of the two sides ninety degrees, so that the two sides can be simultaneously overlapped with the rectangular sides in the preset two-dimensional graph. The ratio of the trapezoid, in particular the ratio of the length and the width, can be kept unchanged during the stretching process.
In order to facilitate the user to observe the two-dimensional contour lines in the preset two-dimensional contour lines, the two-dimensional contour lines which are not needed at present can be hidden through the plug-in. For example, the user may select one three-dimensional surface in the model, and click on the display-only function in the plug-in, and only the two-dimensional contour corresponding to the three-dimensional surface may be displayed in the preset two-dimensional graph.
More specifically, only the display function may be subdivided, and all the two-dimensional contour lines where the selected surface is located may be displayed, or only the two-dimensional contour lines corresponding to the selected portion may be displayed.
In practical applications, the preset shape may also include only a rectangle. At this time, an insert may be provided, and all the two-dimensional contour lines other than the rectangle may be adjusted to the rectangle by cutting and stretching based on the insert function.
In addition, the user terminal may display the target model and the preset two-dimensional graph at the same time, for example, two windows may be set, one for displaying the target model and the other for displaying the preset two-dimensional graph, where a two-dimensional contour corresponding to the target model may be displayed in the preset two-dimensional graph. The user can select the three-dimensional sub-surface to be displayed in the window of the target model, the two-dimensional contour lines corresponding to the selected three-dimensional sub-surface can be displayed in a preset two-dimensional graph, and other two-dimensional contour lines can be hidden, so that the operation of the user is facilitated.
And 303, acquiring a mark line which coincides with a preset position in a preset two-dimensional graph, and drawing an internal trace in the model map according to the mark line.
After the target model is processed, mapping processing can be performed on the target model. The method provided in this embodiment specifically refers to mapping the model based on UV information. In the target model, UV coordinate information corresponding to each point is provided, each point on the image can be accurately corresponding to the surface of the model object according to the UV information of the image, and the image smooth interpolation processing is carried out by software at the gap positions of the points, so that the model is mapped.
Further, based on the method provided in this embodiment, the user may operate the user terminal to obtain an image for mapping, and process the target model based on the image to obtain the model mapping. In this process or after the process, the method provided in this embodiment may further obtain a marker line in the preset two-dimensional graph, and after obtaining the model map, draw an internal trace in the model map according to the marker line.
In practical application, the mark lines which are coincident with the preset positions can be obtained from the preset two-dimensional graph, and the mark lines can be regarded as the internal lines needing to be drawn. The two-dimensional contour line information of the mark line can also be obtained from a preset two-dimensional graph, so that the proportion of the mark line in the two-dimensional contour line is determined. For example, a predetermined two-dimensional pattern has a marking line 1 parallel to a line 4 in the two-dimensional contour line. If the pixel occupied by the mark line 1 is 1 and all the pixel values of the mark lines 1 to 4 are 50, the mark line duty ratio can be regarded as 1/50. Then the internal trace may also be drawn to a scale of 1/50 when drawing the internal trace in the model map.
Wherein, because the mark line in the preset two-dimensional graph is a part of the two-dimensional contour lines, and the two-dimensional contour lines are obtained based on the contours of the three-dimensional sub-surfaces, each two-dimensional contour line has a corresponding three-dimensional contour line, namely, each mark line has a corresponding three-dimensional contour line. According to the corresponding relation, the accurate position of the internal trace is determined in the model map according to the UV coordinate system corresponding to the mark line, and then the internal trace is drawn in the model map. In addition, the method provided by the embodiment is drawn based on the coordinate information of the target model, which corresponds to the UV coordinate information of the target model, and when the target model is enlarged or reduced, the internal trace is not deformed and the definition is not reduced.
Alternatively, the preset position may be a boundary included in the preset two-dimensional pattern. The marking lines are overlapped with the edge lines in the preset two-dimensional graph, so that the marking lines can be conveniently obtained, and the drawing speed of the internal drawing lines is improved.
Fig. 3A is a schematic diagram of the boundary of a target model according to another exemplary embodiment of the present invention.
As shown in fig. 3A, each edge of the cuboid may be used as a dividing line of the model, and the dividing lines divide the outer surface of the cuboid into a plurality of three-dimensional sub-surfaces.
Fig. 3B is a schematic diagram of an operation interface of the extended UV modifier according to an exemplary embodiment of the present invention.
As shown in fig. 3B, a three-dimensional sub-surface to be operated may be selected in the UV modifier, so that the user terminal displays a three-dimensional contour corresponding to the three-dimensional sub-surface in the UV modifier, and the UV modifier is further capable of acquiring UV coordinate information corresponding to the three-dimensional contour.
A two-dimensional contour edge may be determined based on the three-dimensional contour.
Fig. 3C is a schematic diagram illustrating determining a mark line in a preset two-dimensional graph according to an exemplary embodiment of the present invention.
As shown in fig. 3C, the preset two-dimensional pattern may be a "field" type structure including four rectangles of different sizes. The two-dimensional contour line can be moved to the left lower corner space of the 'field' -shaped space, three sides are respectively aligned with three rectangular side lines, the other side is not aligned so as to keep the correct proportion of the original rectangle, and the line drawing can not be generated on the side which is not aligned. The process can be automatically determined by the user terminal according to the size of the two-dimensional contour line or can be adjusted by the user.
In addition, the correct proportion of the original rectangle can be maintained when the original two-dimensional contour line is stretched, so that the thickness of the line body is consistent when the internal line is drawn in the mapping.
As shown in fig. 3C, the edges 1, 2, 3 are determined as marker lines.
FIG. 3D is a schematic diagram of a model map according to an exemplary embodiment of the present invention.
As shown in fig. 3D, the positions corresponding to the edges 1, 2, 3 in the model are drawn as an inner trace.
Step 304, receiving a modification instruction of the user, and modifying the attribute of the internal trace according to the modification instruction.
In the practical application process, the requirements on the properties of the internal trace are different according to different scenes of the model map, for example, some scenes need thicker internal trace, and some scenes need thinner internal trace. Thus, the user may also adjust the properties of the internal trace in the model.
For example, in a game application scenario, a user may quickly change the color, and/or thickness, and/or display characteristics of all the internal lines by adjusting parameters by using a shader or material in a post-game engine, the display characteristics being to display/turn off the internal line function.
Fig. 4 is a block diagram of an internal tracing drawing apparatus of a model map according to an exemplary embodiment of the present invention.
As shown in fig. 4, the internal line drawing device for model map provided in this embodiment includes:
a first obtaining module 41, configured to obtain a boundary line in a target model, where the boundary line segments a surface of the target model into a plurality of three-dimensional sub-surfaces;
a determining module 42, configured to determine a mark line in a preset two-dimensional graph according to the three-dimensional sub-surface;
a second obtaining module 43, configured to obtain the mark line in the preset two-dimensional graph;
a drawing module 44 for drawing an internal trace in the model map based on the marker line.
The internal line drawing device of the model map provided in this embodiment includes: the first acquisition module is used for acquiring a boundary line in the target model, and the boundary line divides the surface of the target model into a plurality of three-dimensional sub-surfaces; the determining module is used for determining a marking line in a preset two-dimensional graph according to the three-dimensional subplane; the second acquisition module is used for acquiring the mark line in the preset two-dimensional graph; and the drawing module is used for drawing the internal trace in the model map according to the mark line. The internal line drawing device of the model map provided by the embodiment can mark the internal line to be drawn in the target model in advance, and can directly draw the internal line in the model map according to the mark line when the model is mapped, so that the internal line is matched with the target model, and the internal line cannot deform or reduce the precision when the target model is subjected to the operation of enlarging or reducing.
The specific principle and implementation of the internal line drawing device of the model map provided in this embodiment are similar to those of the embodiment shown in fig. 2, and will not be described here again.
On the basis of the foregoing embodiment, the determining module 42 is specifically configured to:
and determining a two-dimensional contour line according to the contour line of the three-dimensional subplane, and marking the two-dimensional contour line in the preset two-dimensional graph.
The determining module 42 is specifically configured to:
and obtaining three-dimensional coordinates corresponding to the contour lines of the three-dimensional sub-surfaces, and projecting the three-dimensional coordinates to obtain the two-dimensional contour lines.
The determining module 42 is specifically configured to:
loading the preset two-dimensional graph, and displaying the two-dimensional contour line in the preset two-dimensional graph;
and receiving a moving instruction of a user, and moving the two-dimensional contour line according to the moving instruction so as to enable at least one side of the two-dimensional contour line to coincide with the side line of the preset two-dimensional graph.
If the two-dimensional contour is not a preset shape, the determining module 42 is further configured to, before receiving the movement instruction of the user:
receiving an adjustment instruction of a user, and adjusting the two-dimensional contour line to the preset shape according to the adjustment instruction and the shape of the two-dimensional contour line.
Optionally, the preset two-dimensional graph includes at least one rectangle;
the determining module 42 is specifically configured to:
and determining the rectangle matched with the two-dimensional contour line according to the size of the two-dimensional contour line, and overlapping at least one side of the two-dimensional contour line with the side line of the rectangle.
The second obtaining module 43 is specifically configured to:
and acquiring the mark line overlapped with the preset position in the preset two-dimensional graph.
Optionally, the preset position is a border included in the preset two-dimensional graph.
Optionally, the drawing module 44 is further configured to:
and receiving a modification instruction of a user, and modifying the attribute of the internal trace according to the modification instruction.
The attributes include at least one of:
thickness, color, display characteristics.
The specific principle and implementation of the device provided in this embodiment are similar to those of the embodiment shown in fig. 3, and will not be described here again.
Fig. 5 is a block diagram of an internal tracing apparatus of a model map shown in an exemplary embodiment of the present invention.
As shown in fig. 5, the internal line drawing apparatus of a model map provided in this embodiment includes:
a memory 51;
a processor 52; and
a computer program;
wherein the computer program is stored in the memory 51 and configured to be executed by the processor 52 to implement any of the model map's internal ray tracing methods as described above.
The present embodiment also provides a computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement any of the model map's internal ray tracing methods described above.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (10)

1. An internal line drawing method of a model map, comprising:
acquiring a boundary line in a target model, wherein the boundary line divides the surface of the target model into a plurality of three-dimensional sub-surfaces;
determining a two-dimensional contour line according to the contour line of the three-dimensional subplane, and marking the two-dimensional contour line in a preset two-dimensional graph;
acquiring a contour line of which the two-dimensional contour line coincides with a side line arranged in the preset two-dimensional graph, wherein the contour line is a mark line, acquiring corresponding UV coordinate information according to the mark of each mark line, and drawing an internal drawing line in a model map according to the UV coordinate information;
if the two-dimensional contour line is not coincident with the edge line in the preset two-dimensional graph, the two-dimensional contour line is processed in a segmentation and stretching mode so as to be matched with the two-dimensional contour line.
2. The method of claim 1, wherein said determining a two-dimensional contour from the contour of the three-dimensional sub-surface comprises:
and obtaining three-dimensional coordinates corresponding to the contour lines of the three-dimensional sub-surfaces, and projecting the three-dimensional coordinates to obtain the two-dimensional contour lines.
3. The method of claim 1, wherein marking the two-dimensional contour line in a preset two-dimensional pattern comprises:
loading the preset two-dimensional graph, and displaying the two-dimensional contour line in the preset two-dimensional graph;
and receiving a moving instruction of a user, and adjusting the two-dimensional contour line according to the moving instruction so as to enable at least one side of the two-dimensional contour line to coincide with the side line of the preset two-dimensional graph.
4. A method according to claim 3, wherein if the two-dimensional contour is not of a predetermined shape, the method further comprises, prior to receiving the user movement instruction:
receiving an adjustment instruction of a user, and adjusting the two-dimensional contour line to the preset shape according to the adjustment instruction and the shape of the two-dimensional contour line.
5. The method of claim 1, wherein the predetermined two-dimensional pattern comprises at least one rectangle;
the marking the two-dimensional contour line in a preset two-dimensional graph comprises the following steps:
and determining the rectangle matched with the two-dimensional contour line according to the size of the two-dimensional contour line, and overlapping at least one side of the two-dimensional contour line with the side line of the rectangle.
6. The method of any one of claims 1-5, further comprising:
and receiving a modification instruction of a user, and modifying the attribute of the internal trace according to the modification instruction.
7. The method of claim 6, wherein the attributes comprise at least one of:
thickness, color, display characteristics.
8. An internal line drawing device for model mapping, comprising:
the first acquisition module is used for acquiring a dividing line in the target model, and the dividing line divides the surface of the target model into a plurality of three-dimensional sub-surfaces;
the determining module is used for determining a two-dimensional contour line according to the contour line of the three-dimensional subplane and marking the two-dimensional contour line in a preset two-dimensional graph;
the second acquisition module is used for acquiring the contour line of the two-dimensional contour line, which coincides with the side line arranged in the preset two-dimensional graph, wherein the contour line is a mark line; if the two-dimensional contour line is not coincident with the edge line in the preset two-dimensional graph, processing the two-dimensional contour line in a segmentation and stretching mode so as to match the two-dimensional contour line with the edge line in the preset two-dimensional graph;
and the drawing module is used for acquiring corresponding UV coordinate information according to the identification of each marking line, and drawing the internal drawing line in the model map according to the UV coordinate information.
9. An internal tracing drawing apparatus of a model map, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of claims 1-7.
10. A computer-readable storage medium, having a computer program stored thereon,
the computer program being executable by a processor to implement the method of any of claims 1-7.
CN201910275569.1A 2019-04-08 2019-04-08 Method, device and equipment for drawing internal trace of model map and readable storage medium Active CN110033507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910275569.1A CN110033507B (en) 2019-04-08 2019-04-08 Method, device and equipment for drawing internal trace of model map and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910275569.1A CN110033507B (en) 2019-04-08 2019-04-08 Method, device and equipment for drawing internal trace of model map and readable storage medium

Publications (2)

Publication Number Publication Date
CN110033507A CN110033507A (en) 2019-07-19
CN110033507B true CN110033507B (en) 2023-08-22

Family

ID=67237613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910275569.1A Active CN110033507B (en) 2019-04-08 2019-04-08 Method, device and equipment for drawing internal trace of model map and readable storage medium

Country Status (1)

Country Link
CN (1) CN110033507B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114529686B (en) * 2022-04-21 2022-08-02 三一筑工科技股份有限公司 Building model generation method, device, equipment and medium
CN114840902B (en) * 2022-05-19 2023-03-24 三一筑工科技股份有限公司 Target object drawing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001202530A (en) * 2000-01-24 2001-07-27 Dainippon Printing Co Ltd Method for plotting contour of three-dimensional computer graphics
CN102306386A (en) * 2011-07-19 2012-01-04 杭州实时数码科技有限公司 Method for quickly constructing third dimension tree model from single tree image
CN104966312A (en) * 2014-06-10 2015-10-07 腾讯科技(深圳)有限公司 Method for rendering 3D model, apparatus for rendering 3D model and terminal equipment
CN108876910A (en) * 2018-06-15 2018-11-23 郑州云海信息技术有限公司 A kind of three-dimensional modeling method, device, equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001202530A (en) * 2000-01-24 2001-07-27 Dainippon Printing Co Ltd Method for plotting contour of three-dimensional computer graphics
CN102306386A (en) * 2011-07-19 2012-01-04 杭州实时数码科技有限公司 Method for quickly constructing third dimension tree model from single tree image
CN104966312A (en) * 2014-06-10 2015-10-07 腾讯科技(深圳)有限公司 Method for rendering 3D model, apparatus for rendering 3D model and terminal equipment
CN108876910A (en) * 2018-06-15 2018-11-23 郑州云海信息技术有限公司 A kind of three-dimensional modeling method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN110033507A (en) 2019-07-19

Similar Documents

Publication Publication Date Title
JP5299173B2 (en) Image processing apparatus, image processing method, and program
US8884947B2 (en) Image processing apparatus and image processing method
US20080018668A1 (en) Image Processing Device and Image Processing Method
US8436852B2 (en) Image editing consistent with scene geometry
EP3772040A1 (en) Method and computer program product for producing 3-dimensional model data of a garment
JP2002202838A (en) Image processor
CN110033507B (en) Method, device and equipment for drawing internal trace of model map and readable storage medium
US7620234B2 (en) Image processing apparatus and method for generating a three-dimensional model of an object from a collection of images of the object recorded at different viewpoints and segmented using semi-automatic segmentation techniques
JP2018045587A (en) Image processing device, image processing method, and image processing program
CN111462205B (en) Image data deformation, live broadcast method and device, electronic equipment and storage medium
CN114494570A (en) Rendering method and device of three-dimensional model, storage medium and computer equipment
US11551409B2 (en) Rendering portions of a three-dimensional environment with different sampling rates utilizing a user-defined focus frame
CN116206320A (en) Method, system, equipment and medium for matching drawing characteristics with numbers
JP2000339465A (en) Corresponding method for three-dimensional form
CN108876932B (en) Editing apparatus for three-dimensional shape data and method of editing three-dimensional shape data
CN113935893A (en) Sketch style scene rendering method and device and storage medium
KR100496956B1 (en) Comparing Method of Two 3D CAD Files
US11961200B2 (en) Method and computer program product for producing 3 dimensional model data of a garment
US8243072B2 (en) Method for rendering an object
CN112583976B (en) Graphic code display method, equipment and readable storage medium
US20030081849A1 (en) Method and system for creating seamless textured three dimensional models of objects
CN107883930B (en) Pose calculation method and system of display screen
JP2004252815A (en) Image display device, its method and program
CN116474363A (en) Scene model rendering method and device and electronic equipment
CN116524099A (en) Model rendering method and device, electronic equipment and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant