CN116071446A - Drawing method and device for model vertex color and electronic equipment - Google Patents

Drawing method and device for model vertex color and electronic equipment Download PDF

Info

Publication number
CN116071446A
CN116071446A CN202211375084.8A CN202211375084A CN116071446A CN 116071446 A CN116071446 A CN 116071446A CN 202211375084 A CN202211375084 A CN 202211375084A CN 116071446 A CN116071446 A CN 116071446A
Authority
CN
China
Prior art keywords
color
vertex color
layer
vertex
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.)
Pending
Application number
CN202211375084.8A
Other languages
Chinese (zh)
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 CN202211375084.8A priority Critical patent/CN116071446A/en
Publication of CN116071446A publication Critical patent/CN116071446A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a drawing method, a drawing device and electronic equipment for model vertex colors, and initial model vertex colors of a target model are obtained; creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel; updating a target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation; and updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer. By creating the vertex color merging layer and the vertex color drawing layer, each drawing layer can be drawn respectively, the merging layer is updated according to the drawing layers, the model vertex colors are drawn, so that the numerical values on different channels can be drawn and erased independently, the model vertex colors can be drawn through simple drawing operation, and the drawing efficiency and the drawing precision of the model vertex colors are improved.

Description

Drawing method and device for model vertex color and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for drawing a model vertex color, and an electronic device.
Background
The principle of apex color blending is typically to blend different maps through color channels, i.e., R, G, and B channels. But only the information on the R channel cannot be erased only by synchronous erasure without affecting the information on the G channel and the B channel, and thus the degree of freedom is reduced when drawing the vertex color or when iterative optimization. In the related art, new vertex color information is usually redrawn after the vertex color information is erased, or the new vertex color information is drawn in a redrawing mode, but the drawing mode cannot independently draw and erase information on different channels, the drawing process is complex, and if iteration is needed, the drawing is more complicated, the efficiency is lower, and the drawing precision is lower.
Disclosure of Invention
Accordingly, an object of the present invention is to provide a method, an apparatus, and an electronic device for drawing model vertex colors, in which each drawing layer can be drawn by creating a vertex color combining layer and a vertex color drawing layer, and the combining layer is updated according to the drawing layer, so as to draw the model vertex colors separately and erase the numerical values on different channels, and the model vertex colors can be drawn by simple drawing operation, so that the operation is simple, and the drawing efficiency and the drawing precision of the model vertex colors are improved.
In a first aspect, an embodiment of the present invention provides a method for drawing a model vertex color, where the method includes: obtaining the initial model vertex color of the target model; wherein, the initial model vertex color comprises a plurality of color channels; creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the vertex color drawing layer corresponds to the color channel; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel; updating a target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation; and updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer.
In a second aspect, an embodiment of the present invention provides a device for drawing a model vertex color, including: the acquisition module is used for acquiring the initial model vertex color of the target model; wherein, the initial model vertex color comprises a plurality of color channels; the building module is used for building a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the vertex color drawing layer corresponds to the color channel; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel; the drawing module is used for responding to the vertex color drawing operation and updating a target drawing layer corresponding to the vertex color drawing operation; and the updating module is used for updating the vertex color merging layer based on the target drawing layer and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory stores computer executable instructions executable by the processor, and the processor executes the computer executable instructions to implement the method for drawing a model vertex color according to any one of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement a method for drawing a model vertex color of any of the first aspects.
The embodiment of the invention has the following beneficial effects:
the invention provides a drawing method, a drawing device and electronic equipment for model vertex colors, and initial model vertex colors of a target model are obtained; creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel; updating a target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation; and updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer. By creating the vertex color merging layer and the vertex color drawing layer, each drawing layer can be drawn respectively, the merging layer is updated according to the drawing layers, the model vertex colors are drawn, so that the numerical values on different channels can be drawn and erased independently, the model vertex colors can be drawn through simple drawing operation, and the drawing efficiency and the drawing precision of the model vertex colors are improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the invention 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, it being obvious that the drawings in the description below are some embodiments of the invention and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for drawing model vertex colors according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a drawing interface of a model vertex color according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a drawing interface of another model vertex color according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a drawing interface of another model vertex color according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a drawing device for model vertex color according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention 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 invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The principle of apex color blending is typically to blend different maps through color channels, i.e., R, G, and B channels. But only the information on the R channel cannot be erased only by synchronous erasure without affecting the information on the G channel and the B channel, and thus the degree of freedom is reduced when drawing the vertex color or when iterative optimization. If the R channel information needs to be erased, the G channel information and the B channel information must be erased, and the operation of retaining the original G channel information and the B channel information cannot be performed. In the related art, new vertex color information is usually redrawn after the vertex color information is erased, or the new vertex color information is drawn in a redrawing mode, but the drawing mode cannot independently draw and erase information on different channels, the drawing process is complex, if iteration is needed, the drawing is more complicated, colors need to be selected back and forth, a large number of parameters need to be modified for each adjustment, the efficiency is low, and the drawing precision is low. Based on the above, the method, the device and the electronic equipment for drawing the model vertex color provided by the embodiment of the invention can be applied to equipment such as mobile phones, notebooks, computers and the like.
For the sake of understanding the present embodiment, first, a method for drawing a model vertex color disclosed in the present embodiment of the present invention is described in detail, as shown in fig. 1, where the method specifically includes the following steps:
step S102, obtaining an initial model vertex color of a target model; wherein, the initial model vertex color comprises a plurality of color channels;
the object model may be a three-dimensional model created in three-dimensional graphic image software, wherein the three-dimensional graphic software may be a Blender. The initial model vertex color may have no vertex color information, i.e., the channel values of the color channels in the initial model vertex color are zero. Of course, the initial model vertex color has vertex color information, that is, the channel value of the color channel in the initial model vertex color is not zero. Alternatively, the initial model vertex color has no vertex color information, and it is understood that the initial model vertex color has no vertex color layers, and the number of vertex color layers is zero. The initial model vertex color has no vertex color information, and can be understood as that the initial model vertex color has vertex color layers, and the number of the vertex color layers is one.
In actual implementation, the initial model vertex color of the target model can be obtained through a vertex color layer drawing tool provided by the terminal equipment.
Step S104, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the vertex color drawing layer corresponds to the color channel; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel;
the vertex color merging layer also comprises a plurality of color channels, which are the same as the plurality of color channels in the vertex color of the initial model. Such as R-channel, G-channel, B-channel. The vertex color drawing layers correspond to color channels, for example, the vertex color drawing layers include three vertex color drawing layers, and each vertex color drawing layer has a corresponding color channel.
The vertex color merging layer is a vertex color corresponding to the superimposed R color channel, G color channel, and B color channel, and may also be referred to as an RGB layer in this embodiment. The vertex color drawing layer includes: the vertex color corresponding to the independent R color channel, the vertex color corresponding to the independent G color channel, and the vertex color corresponding to the independent B color channel. The user cannot directly draw the vertex color merging layer, that is, the user cannot draw the corresponding vertex colors after the R color channel, the G color channel and the B color channel are overlapped. However, the user may draw the vertex color drawing layer, that is, the user may draw the vertex color corresponding to the individual R channel color, the vertex color corresponding to the individual G channel color, and the vertex color corresponding to the individual B channel color.
Specifically, a plurality of vertex color drawing layers corresponding to the target model may be created first, and the channel values of the color channels included in the vertex color of the initial model are determined as initial values of the corresponding vertex color drawing layers, that is, the initial values of the vertex color drawing layers are the channel values of the corresponding color channels. Then, a vertex color merging layer corresponding to the target model can be created according to the initial model vertex color of the target model. If the initial model vertex color has no vertex color information, namely the vertex color layer is zero, the vertex color merging layer corresponding to the target model can be directly created. If the initial model vertex color has vertex color information, a vertex color merging layer corresponding to the target model can be created, and then an initial value of the vertex color merging layer is determined as the initial model vertex color.
Step S106, in response to the vertex color drawing operation, updating a target drawing layer corresponding to the vertex color drawing operation;
in actual implementation, the terminal device may provide a vertex color drawing page, in which vertex color drawing operations are performed, for example, clicking on a target drawing layer in multiple vertex color drawing layers may activate a drawing function for the target drawing layer, and the user may select a corresponding brush or eraser, select a size of the brush, a size of the eraser, and perform drawing operations on the target drawing layer. Corresponding drawing information can be obtained through the vertex color drawing operation, and the attribute value of the target drawing layer is updated according to the drawing information, such as the color value of the target drawing layer is updated according to the drawing information.
And S108, updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer.
Specifically, the attribute value of the vertex color drawing layer that is updated may be updated to the channel corresponding to the vertex merging layer, so that the channel value of the channel is the same as the attribute value of the corresponding vertex color drawing layer. Thus, the properties of the vertex color combining layer also change in real time when the vertex color drawing layer can be drawn or deleted. And finally, directly combining the vertex colors into a layer to serve as a layer of a final display effect, and obtaining a model vertex color drawing result of the target model. The current situation that the vertex color is not provided with a layered drawing tool is broken through, the intuitiveness during use can be greatly improved through layered drawing, the secondary modification is carried out, the fault tolerance is greatly improved, the independent layers can be respectively controlled, and the use is smoother, more convenient and more intuitionistic.
The embodiment of the invention provides a drawing method of model vertex colors, which is used for obtaining initial model vertex colors of a target model; creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel; updating a target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation; and updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer. By creating the vertex color merging layer and the vertex color drawing layer, each drawing layer can be drawn respectively, the merging layer is updated according to the drawing layers, the model vertex colors are drawn, so that the numerical values on different channels can be drawn and erased independently, the model vertex colors can be drawn through simple drawing operation, and the drawing efficiency and the drawing precision of the model vertex colors are improved.
In the step S104, a step of creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model is one possible implementation:
step 1, if the initial model vertex color is a preset value, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to a target model; wherein the channel value of the color channel is a preset value;
the above-mentioned preset value is generally referred to as "0". In actual implementation, whether the initial model vertex color has vertex color information is judged through the IF function, and IF the number of vertex color layers of the initial model vertex color=0, a vertex color merging layer (which can be an RGB layer) and four vertex color drawing layers (an R layer, a G layer and a B layer) corresponding to the target model are directly created. That is, the channel value of each color channel in the merge layer created at this time is zero, and the attribute values of the plurality of vertex-color drawing layers are also zero.
And judging whether the initial model vertex color has vertex color information or not, wherein the number of vertex color layers of the initial model vertex color needs to be obtained.
And 2, if the initial model vertex color is not a preset value, creating a corresponding vertex color merging layer and a plurality of vertex color drawing layers for the target model based on the initial model vertex color.
In actual implementation, whether the initial model vertex color has vertex color information is judged through the IF function, IF the number of the vertex color layers of the initial model vertex color is=1, the fact that the initial model vertex color has vertex color information is explained, and at the moment, a corresponding vertex color merging layer and a plurality of vertex color drawing layers are needed to be created for the target model according to the vertex color information of the initial model vertex color. In this manner, in order to enable the initial value of the created vertex color drawing layer to be the same as the attribute value of the initial model vertex color, it is necessary to create a vertex color combining layer and a vertex color drawing layer according to the vertex color information of the initial model vertex color, and further set the corresponding attribute values, so that accuracy of model vertex color drawing can be improved.
In the step 2, a step of creating a corresponding vertex color merging layer and a plurality of vertex color drawing layers for the target model based on the initial model vertex colors, which is one possible implementation manner:
step 21, creating a plurality of vertex color drawing layers corresponding to the target model, and updating channel values of the color channels into the corresponding vertex color drawing layers;
in actual implementation, if the number of vertex color layers of the initial model vertex color=1, first, splitting the color channels included in the initial model vertex color, reading out the attribute values of the existing vertex colors, and respectively giving the attribute values to the corresponding vertex color drawing layers. So that the vertex-color drawing layer that can be drawn has an existing attribute value. In addition, in actual implementation, since the model vertices of the target model are more, the channel values of the color channels need to be updated to the corresponding vertex color drawing layers by adopting a circulation function circulation.
And step 22, creating a vertex color merging layer corresponding to the target model according to the initial model vertex color.
The vertex color merging layer having a plurality of color channels may be directly created, and the color channel values included in the vertex color of the initial model are updated to the color channels corresponding to the vertex color merging layer, as in the above-described steps. Alternatively, the vertex color layer of the initial model vertex color may be directly determined as the vertex color merging layer described above. In the mode, if the vertex color information exists in the vertex color of the initial model, the vertex color information is split, namely, the color channels of the vertex color of the initial model are split, and the color values of the color channels are given to the drawing layer, so that the accuracy of drawing the vertex color is further improved.
Specifically, the initial model vertex color comprises a first color channel, a second color channel and a third color channel; the channel value of the first color channel is a first channel value, the channel value of the second color channel is a second channel value, and the channel value of the third color channel is a third channel value; the first color channel may be an R channel, the second color channel may be a G channel, and the third color channel may be a B channel.
In the step 21, a plurality of vertex color drawing layers corresponding to the target model are created, and the channel values of the color channels are updated to the corresponding vertex color drawing layers, which is one possible implementation manner:
creating a first vertex color drawing layer, a second vertex color drawing layer and a third vertex color drawing layer corresponding to the target model; updating the first channel value into the first vertex color drawing layer, updating the second channel value into the second vertex color drawing layer, and updating the third channel value into the third vertex color drawing layer.
The first vertex color drawing layer is an R layer, the second vertex color drawing layer is a G layer, the third vertex color drawing layer is a B layer, the channel value of the R channel is updated to the R layer, the channel value of the G channel is updated to the G layer, and the channel value of the B channel is updated to the B layer.
To avoid the initial model from having a vertex color that results in a newly created vertex color rendering layer, the R, G, B layer, automatically synchronizes to the initial model vertex color. Before the step of creating the plurality of vertex color drawing layers corresponding to the target model and updating the channel values of the color channels into the corresponding vertex color drawing layers, the method further includes: updating the initial name of the initial model vertex color to a designated name;
Since the initial name is unknown, in order to avoid the step of directly updating the attribute value of the vertex color drawing layer to the vertex color combining layer after the vertex color drawing layer is created, the initial name of the vertex color of the initial model needs to be updated to a specified name. For example, the initial name RGB of the initial model vertex color may be updated to the specified name r_g_b. Thus, the preset condition is not satisfied.
In the step 22, a step of creating a merging layer of vertex colors corresponding to the target model according to the vertex colors of the initial model is one possible implementation:
updating the appointed name of the initial model vertex color to a target name to obtain the initial model vertex color after updating the name; and determining the vertex color of the initial model after the name is updated as a vertex color merging layer corresponding to the target model.
When the attribute value of the vertex color of the initial model is given to the vertex color drawing layer, the step of updating the attribute value of the vertex color drawing layer to the vertex color merging layer can be executed, so that the updated initial model vertex color can be determined to be the vertex color merging layer corresponding to the target model in order to ensure normal execution, and the vertex color merging layer can be further created.
That is, the name of the vertex color layer of the vertex color of the initial model is set as r_g_b, then the corresponding layer data are respectively transferred to the r_g_b reverse image R, G, B layer of the initial vertex color layer, and after the transfer is completed, the initial vertex color layer is renamed to RGB, so as to start the logic module of real-time synchronous layered drawing through security check. The entire vertex color layer is created as: r_g_ B, R, G, B, after the reverse synchronization is successful, is RGB, R, G, B.
In the mode, the problem that the newly created vertex color drawing layer, namely the R, G, B layer, is automatically synchronized to the vertex color of the initial model due to the fact that the initial model is provided with the vertex color is avoided by setting the name of the vertex color of the initial model.
In order to avoid attribute disorder during code operation, it is generally necessary to avoid function operation disorder by attribute naming, because R layer, G layer and B layer, that is, vertex color drawing is synchronized to RGB layer, that is, vertex color merging layer, to operate in real time, IF function needs to be added to determine operation time, and in this embodiment, the method of searching and comparing for attribute naming is adopted to determine. The step of updating the vertex-color-merging layer based on the target rendering layer is performed only if a preset condition is satisfied.
The vertex color drawing layer includes: a first vertex color drawing layer, a second vertex color drawing layer, and a third vertex color drawing layer; in the step S108, a possible implementation manner of updating the vertex color combining layer based on the target rendering layer is:
if the vertex color combining layer and the plurality of vertex color drawing layers meet preset conditions, acquiring the current value of the target drawing layer; and updating the current value to a target color channel corresponding to the vertex color merging layer, so that the channel value of the target color channel is the current value.
Wherein, the preset conditions are: the hierarchy of the vertex color combining layer is a first preset hierarchy, the hierarchy of the first vertex color drawing layer is a second preset hierarchy, the hierarchy of the second vertex color drawing layer is a third preset hierarchy, the hierarchy of the third vertex color drawing layer is a fourth preset hierarchy, the name of the vertex combining layer is a target name, the name of the first vertex color drawing layer is a first preset name, the name of the second vertex color drawing layer is a second preset name, and the name of the third vertex color drawing layer is a third preset name.
Specific judgment basis: the model shares 4 groups of vertex colors, namely, a layer 0 vertex color name is RGB, a layer 1 vertex color name is R, a layer 2 vertex color name is G, a layer 3 vertex color name is B, the model is carried out through logic of Boolean operation 'and', and the step of updating the vertex color merging layer based on the target drawing layer is not operated as long as one condition is not met, and the operation is only carried out when the condition is met. In the mode, through setting the preset conditions, the vertex color merging layer is updated based on the target drawing layer only when the preset conditions are met, and the accuracy of model vertex color drawing is further improved.
In addition, the vertex color information is an attribute at each model point, and the number of points on the model is large, but information can be given to the model point only once, that is, attribute information of only one point can be given. If attribute information is to be given to each model point, a round-robin function is required to give attribute information to each model point round.
The number of loops is determined by obtaining the number of points of the current activated object, so that the point attributes can be correctly given to different models. However, the number of points obtained is a function expression, character string pruning is required to lock the required character information, and the number of points of the integer obtained through the operation of converting the character into the integer is input into a circular function.
Before the step of obtaining the model vertex color drawing result of the target model based on the vertex color merging layer, the method further comprises the following steps: in response to an application operation for the target model, the vertex-color rendering layer is deleted.
After drawing, the vertex color merging layers are required to be applied, so that only one vertex color layer of the model is ensured to be the merging layer, other software can be used normally when the model is imported, the R, G, B layers, namely the vertex color drawing layers, are deleted, and only the RGB layers are left, namely the vertex color merging layers are the final merging layers.
Providing a drawing interface of the model vertex color through the terminal equipment, wherein the drawing interface comprises a target control; exemplary as shown in fig. 2, the added layers are the target controls described above.
In the step S104, a step of creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model is one possible implementation: and responding to the triggering operation aiming at the target control, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model, and displaying and determining the drawing control and the drawing tool in a drawing interface.
And the method is used for clicking the added layers, namely creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model, and displaying and determining drawing controls and drawing tools in a drawing interface. Illustratively, as shown in FIG. 3, a certain rendering layer, the certain rendering control described above, is displayed. The drawing tool is in an inactive state, and is not operable by the user.
Providing a drawing interface of the model vertex color through the terminal equipment, wherein the drawing interface comprises a drawing control and a drawing tool in an inactive state; an example is shown in fig. 3. Before the step of updating the target rendering layer corresponding to the vertex color rendering operation in response to the vertex color rendering operation, the method further includes:
In response to a trigger operation for determining a drawing control, a drawing tool is activated and a selected region of the vertex-color drawing layer, a drawing region of the vertex-color drawing layer, and a preview region are displayed.
In actual implementation, the user may click on the determine rendering control, i.e., the determine rendering layer in fig. 3, and the RGB layers are displayed at this time, and the rendering tool is in an operable state, as shown in fig. 4, and includes a selection area of the vertex color rendering layer, a rendering area of the vertex color rendering layer, and a preview area.
In addition, referring to fig. 2, the method includes "vertex drawing" and "object mode", wherein the vertex drawing model and the object model are rapidly switched, and the mode switching of the bottom layer is realized through the corresponding mode API.
And a layer monitoring module are added, so that data observation of a user is facilitated, and the attribute of the vertex color layer of the current model is intuitively displayed.
In step S106, in response to the vertex color drawing operation, the step of updating the target drawing layer corresponding to the vertex color drawing operation includes:
in response to a selection operation for the target drawing layer, displaying the target drawing layer in a designated display manner in a selected area, and displaying a drawing tool in a drawing area; responding to the drawing operation aiming at the drawing tool, acquiring drawing information aiming at a target drawing layer, and updating the drawing information into the target drawing layer; displaying drawing information in the drawing area; wherein the drawing information of the drawing layer includes: color information, intensity information of a drawing tool, and size information of the drawing tool.
The vertex color drawing layer selection module comprises 3 layers of Detail, stain_1 and stain_2, which respectively correspond to R, G, B layers, and can display the name of the current activation layer in real time. Drawing tool module: the color, intensity and size of the painting brush can be adjusted in real time by rapidly switching the painting brush and the rubber. The acquisition of the vertex color names and the brush attributes of the bottom layer can be realized through different interfaces.
In the mode, the vertex colors can be drawn in a layered mode, the vertex colors can be erased in a layered mode, attribute combination can be carried out in real time, and drawing of the model vertex colors can be carried out conveniently and efficiently through a drawing interface.
The method further comprises the following steps: in response to a preview operation for the vertex color combining layer or the vertex color drawing layer, a display effect of the vertex color combining layer or a display effect of the vertex color drawing layer is displayed.
Preview layer module: the display effect of each layer can be previewed separately. The switching of the bottom vertex color layer can be realized through the corresponding interface.
In this way, the mixing effect of each layer can be displayed quickly through the preview operation. RGB, R, G, B layer effects can be previewed hierarchically.
Corresponding to the above method embodiment, the embodiment of the present invention provides a device for drawing a model vertex color, as shown in fig. 5, where the device includes:
An obtaining module 51, configured to obtain an initial model vertex color of the target model; wherein, the initial model vertex color comprises a plurality of color channels;
a creation module 52, configured to create a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the vertex color drawing layer corresponds to the color channel; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel;
a drawing module 53 for updating the target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation;
and the updating module 54 is used for updating the vertex color merging layer based on the target drawing layer and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer.
The embodiment of the invention provides a drawing device for model vertex colors, which is used for obtaining initial model vertex colors of a target model; creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel; updating a target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation; and updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer. By creating the vertex color merging layer and the vertex color drawing layer, each drawing layer can be drawn respectively, the merging layer is updated according to the drawing layers, the model vertex colors are drawn, so that the numerical values on different channels can be drawn and erased independently, the model vertex colors can be drawn through simple drawing operation, and the drawing efficiency and the drawing precision of the model vertex colors are improved.
The above wound module is also used for: if the initial model vertex color is a preset value, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; wherein the channel value of the color channel is a preset value; if the initial model vertex color is not a preset value, a corresponding vertex color merging layer and a plurality of vertex color drawing layers are created for the target model based on the initial model vertex color.
The above wound module is also used for: creating a plurality of vertex color drawing layers corresponding to the target model, and updating channel values of the color channels into the corresponding vertex color drawing layers; and creating a vertex color merging layer corresponding to the target model according to the initial model vertex color.
The initial model vertex color comprises a first color channel, a second color channel and a third color channel; the channel value of the first color channel is a first channel value, the channel value of the second color channel is a second channel value, and the channel value of the third color channel is a third channel value; the above wound module is also used for: creating a first vertex color drawing layer, a second vertex color drawing layer and a third vertex color drawing layer corresponding to the target model; updating the first channel value into the first vertex color drawing layer, updating the second channel value into the second vertex color drawing layer, and updating the third channel value into the third vertex color drawing layer.
The device further comprises a name updating module for: updating the initial name of the initial model vertex color to a designated name; the creation module is further configured to: updating the appointed name of the initial model vertex color to a target name to obtain the initial model vertex color after updating the name; and determining the vertex color of the initial model after the name is updated as a vertex color merging layer corresponding to the target model.
The vertex color drawing layer includes: a first vertex color drawing layer, a second vertex color drawing layer, and a third vertex color drawing layer; the update module is further configured to: if the vertex color combining layer and the plurality of vertex color drawing layers meet preset conditions, acquiring the current value of the target drawing layer; and updating the current value to a target color channel corresponding to the vertex color merging layer, so that the channel value of the target color channel is the current value.
The vertex color drawing layer includes: a first vertex color drawing layer, a second vertex color drawing layer, and a third vertex color drawing layer; the preset conditions are as follows: the hierarchy of the vertex color combining layer is a first preset hierarchy, the hierarchy of the first vertex color drawing layer is a second preset hierarchy, the hierarchy of the second vertex color drawing layer is a third preset hierarchy, the hierarchy of the third vertex color drawing layer is a fourth preset hierarchy, the name of the vertex combining layer is a target name, the name of the first vertex color drawing layer is a first preset name, the name of the second vertex color drawing layer is a second preset name, and the name of the third vertex color drawing layer is a third preset name.
The device further comprises a deleting operation: in response to an application operation for the target model, the vertex-color rendering layer is deleted.
Providing a drawing interface of the model vertex color through the terminal equipment, wherein the drawing interface comprises a target control; the creation module is further configured to: and responding to the triggering operation aiming at the target control, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model, and displaying and determining the drawing control and the drawing tool in a drawing interface.
Providing a drawing interface of the model vertex color through the terminal equipment, wherein the drawing interface comprises a drawing control and a drawing tool in an inactive state; the device also comprises a display module for: in response to a trigger operation for determining a drawing control, a drawing tool is activated and a selected region of the vertex-color drawing layer, a drawing region of the vertex-color drawing layer, and a preview region are displayed.
The drawing module is further configured to: in response to a selection operation for the target drawing layer, displaying the target drawing layer in a designated display manner in a selected area, and displaying a drawing tool in a drawing area; responding to the drawing operation aiming at the drawing tool, acquiring drawing information aiming at a target drawing layer, and updating the drawing information into the target drawing layer; displaying drawing information in the drawing area; wherein the drawing information of the drawing layer includes: color information, intensity information of a drawing tool, and size information of the drawing tool.
The device further comprises an effect display module for: in response to a preview operation for the vertex color combining layer or the vertex color drawing layer, a display effect of the vertex color combining layer or a display effect of the vertex color drawing layer is displayed.
The drawing device of the model vertex color provided by the embodiment of the invention has the same technical characteristics as the drawing method of the model vertex color provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment also provides an electronic device, including a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for drawing the model vertex color. The electronic device may be a server or a terminal device.
Referring to fig. 6, 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 above-described method of drawing a model vertex color.
Further, the electronic device shown in fig. 6 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. 6, 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 disclosed methods, steps, and logic blocks in the embodiments of the present invention 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 the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding 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 information in the memory 101, and in combination with hardware, performs the steps of the method of the foregoing embodiment, where the method specifically includes:
Obtaining the initial model vertex color of the target model; wherein, the initial model vertex color comprises a plurality of color channels; creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the vertex color drawing layer corresponds to the color channel; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel; updating a target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation; and updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer. By creating the vertex color merging layer and the vertex color drawing layer, each drawing layer can be drawn respectively, the merging layer is updated according to the drawing layers, the model vertex colors are drawn, so that the numerical values on different channels can be drawn and erased independently, the model vertex colors can be drawn through simple drawing operation, and the drawing efficiency and the drawing precision of the model vertex colors are improved.
The step of creating the vertex color merging layer and the plurality of vertex color drawing layers corresponding to the target model includes: if the initial model vertex color is a preset value, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; wherein the channel value of the color channel is a preset value; if the initial model vertex color is not a preset value, a corresponding vertex color merging layer and a plurality of vertex color drawing layers are created for the target model based on the initial model vertex color. In this manner, in order to enable the initial value of the created vertex color drawing layer to be the same as the attribute value of the initial model vertex color, it is necessary to create a vertex color combining layer and a vertex color drawing layer according to the vertex color information of the initial model vertex color, and further set the corresponding attribute values, so that accuracy of model vertex color drawing can be improved.
The step of creating a corresponding vertex color merging layer and a plurality of vertex color drawing layers for the target model based on the initial model vertex colors includes: creating a plurality of vertex color drawing layers corresponding to the target model, and updating channel values of the color channels into the corresponding vertex color drawing layers; and creating a vertex color merging layer corresponding to the target model according to the initial model vertex color. In this way, if there is already vertex color information in the initial model vertex color, the vertex color information is split, that is, the color channels of the initial model vertex color are split, and the color values of the color channels are given to the drawing layer.
The initial model vertex color comprises a first color channel, a second color channel and a third color channel; the channel value of the first color channel is a first channel value, the channel value of the second color channel is a second channel value, and the channel value of the third color channel is a third channel value; creating a plurality of vertex color drawing layers corresponding to the target model, and updating channel values of the color channels into the corresponding vertex color drawing layers, wherein the method comprises the following steps of: creating a first vertex color drawing layer, a second vertex color drawing layer and a third vertex color drawing layer corresponding to the target model; updating the first channel value into the first vertex color drawing layer, updating the second channel value into the second vertex color drawing layer, and updating the third channel value into the third vertex color drawing layer.
Before the step of creating the plurality of vertex color drawing layers corresponding to the target model and updating the channel values of the color channels into the corresponding vertex color drawing layers, the method further includes: updating the initial name of the initial model vertex color to a designated name; the method comprises the steps of creating a vertex color merging layer corresponding to a target model according to the initial model vertex color, wherein the method comprises the following steps: updating the appointed name of the initial model vertex color to a target name to obtain the initial model vertex color after updating the name; and determining the vertex color of the initial model after the name is updated as a vertex color merging layer corresponding to the target model. In the mode, the problem that the initial model is automatically synchronized to the vertex color of the initial model due to the fact that the initial model is provided with the vertex color to cause a newly created vertex color drawing layer, namely a R, G, B layer is avoided by setting the name of the vertex color of the initial model.
The step of updating the vertex color combining layer based on the target drawing layer comprises the following steps: if the vertex color combining layer and the plurality of vertex color drawing layers meet preset conditions, acquiring the current value of the target drawing layer; and updating the current value to a target color channel corresponding to the vertex color merging layer, so that the channel value of the target color channel is the current value. In the mode, through setting the preset conditions, the vertex color merging layer is updated based on the target drawing layer only when the preset conditions are met, and the accuracy of model vertex color drawing is further improved.
The vertex color drawing layer includes: a first vertex color drawing layer, a second vertex color drawing layer, and a third vertex color drawing layer; the preset conditions are as follows: the hierarchy of the vertex color combining layer is a first preset hierarchy, the hierarchy of the first vertex color drawing layer is a second preset hierarchy, the hierarchy of the second vertex color drawing layer is a third preset hierarchy, the hierarchy of the third vertex color drawing layer is a fourth preset hierarchy, the name of the vertex combining layer is a target name, the name of the first vertex color drawing layer is a first preset name, the name of the second vertex color drawing layer is a second preset name, and the name of the third vertex color drawing layer is a third preset name.
Before the step of obtaining the model vertex color drawing result of the target model based on the vertex color merging layer, the method further comprises the following steps: in response to an application operation for the target model, the vertex-color rendering layer is deleted.
Providing a drawing interface of the model vertex color through the terminal equipment, wherein the drawing interface comprises a target control; the method for creating the vertex color merging layer and the plurality of vertex color drawing layers corresponding to the target model comprises the following steps: and responding to the triggering operation aiming at the target control, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model, and displaying and determining the drawing control and the drawing tool in a drawing interface.
Providing a drawing interface of the model vertex color through the terminal equipment, wherein the drawing interface comprises a drawing control and a drawing tool in an inactive state; before the step of updating the target rendering layer corresponding to the vertex color rendering operation in response to the vertex color rendering operation, the method further includes: in response to a trigger operation for determining a drawing control, a drawing tool is activated and a selected region of the vertex-color drawing layer, a drawing region of the vertex-color drawing layer, and a preview region are displayed.
The step of updating the target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation includes: in response to a selection operation for the target drawing layer, displaying the target drawing layer in a designated display manner in a selected area, and displaying a drawing tool in a drawing area; responding to the drawing operation aiming at the drawing tool, acquiring drawing information aiming at a target drawing layer, and updating the drawing information into the target drawing layer; displaying drawing information in the drawing area; wherein the drawing information of the drawing layer includes: color information, intensity information of a drawing tool, and size information of the drawing tool. In the mode, the vertex colors can be drawn in a layered mode, the vertex colors can be erased in a layered mode, attribute combination can be carried out in real time, and drawing of the model vertex colors can be carried out conveniently and efficiently through a drawing interface.
The method further comprises the following steps: in response to a preview operation for the vertex color combining layer or the vertex color drawing layer, a display effect of the vertex color combining layer or a display effect of the vertex color drawing layer is displayed. In this way, the mixing effect of each layer can be displayed quickly through the preview operation. RGB, R, G, B layer effects can be previewed hierarchically
The embodiment also provides a machine-readable storage medium, which stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method for drawing the model vertex colors, including:
obtaining the initial model vertex color of the target model; wherein, the initial model vertex color comprises a plurality of color channels; creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the vertex color drawing layer corresponds to the color channel; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel; updating a target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation; and updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer. By creating the vertex color merging layer and the vertex color drawing layer, each drawing layer can be drawn respectively, the merging layer is updated according to the drawing layers, the model vertex colors are drawn, so that the numerical values on different channels can be drawn and erased independently, the model vertex colors can be drawn through simple drawing operation, and the drawing efficiency and the drawing precision of the model vertex colors are improved.
The step of creating the vertex color merging layer and the plurality of vertex color drawing layers corresponding to the target model includes: if the initial model vertex color is a preset value, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; wherein the channel value of the color channel is a preset value; if the initial model vertex color is not a preset value, a corresponding vertex color merging layer and a plurality of vertex color drawing layers are created for the target model based on the initial model vertex color. In this manner, in order to enable the initial value of the created vertex color drawing layer to be the same as the attribute value of the initial model vertex color, it is necessary to create a vertex color combining layer and a vertex color drawing layer according to the vertex color information of the initial model vertex color, and further set the corresponding attribute values, so that accuracy of model vertex color drawing can be improved.
The step of creating a corresponding vertex color merging layer and a plurality of vertex color drawing layers for the target model based on the initial model vertex colors includes: creating a plurality of vertex color drawing layers corresponding to the target model, and updating channel values of the color channels into the corresponding vertex color drawing layers; and creating a vertex color merging layer corresponding to the target model according to the initial model vertex color. In the mode, if the vertex color information exists in the vertex color of the initial model, the vertex color information is split, namely, the color channels of the vertex color of the initial model are split, and the color values of the color channels are given to the drawing layer, so that the accuracy of drawing the vertex color is further improved.
The initial model vertex color comprises a first color channel, a second color channel and a third color channel; the channel value of the first color channel is a first channel value, the channel value of the second color channel is a second channel value, and the channel value of the third color channel is a third channel value; creating a plurality of vertex color drawing layers corresponding to the target model, and updating channel values of the color channels into the corresponding vertex color drawing layers, wherein the method comprises the following steps of: creating a first vertex color drawing layer, a second vertex color drawing layer and a third vertex color drawing layer corresponding to the target model; updating the first channel value into the first vertex color drawing layer, updating the second channel value into the second vertex color drawing layer, and updating the third channel value into the third vertex color drawing layer.
Before the step of creating the plurality of vertex color drawing layers corresponding to the target model and updating the channel values of the color channels into the corresponding vertex color drawing layers, the method further includes: updating the initial name of the initial model vertex color to a designated name; the method comprises the steps of creating a vertex color merging layer corresponding to a target model according to the initial model vertex color, wherein the method comprises the following steps: updating the appointed name of the initial model vertex color to a target name to obtain the initial model vertex color after updating the name; and determining the vertex color of the initial model after the name is updated as a vertex color merging layer corresponding to the target model. In the mode, the problem that the initial model is automatically synchronized to the vertex color of the initial model due to the fact that the initial model is provided with the vertex color to cause a newly created vertex color drawing layer, namely a R, G, B layer is avoided by setting the name of the vertex color of the initial model.
The step of updating the vertex color combining layer based on the target drawing layer comprises the following steps: if the vertex color combining layer and the plurality of vertex color drawing layers meet preset conditions, acquiring the current value of the target drawing layer; and updating the current value to a target color channel corresponding to the vertex color merging layer, so that the channel value of the target color channel is the current value. In the mode, through setting the preset conditions, the vertex color merging layer is updated based on the target drawing layer only when the preset conditions are met, and the accuracy of model vertex color drawing is further improved.
The vertex color drawing layer includes: a first vertex color drawing layer, a second vertex color drawing layer, and a third vertex color drawing layer; the preset conditions are as follows: the hierarchy of the vertex color combining layer is a first preset hierarchy, the hierarchy of the first vertex color drawing layer is a second preset hierarchy, the hierarchy of the second vertex color drawing layer is a third preset hierarchy, the hierarchy of the third vertex color drawing layer is a fourth preset hierarchy, the name of the vertex combining layer is a target name, the name of the first vertex color drawing layer is a first preset name, the name of the second vertex color drawing layer is a second preset name, and the name of the third vertex color drawing layer is a third preset name.
Before the step of obtaining the model vertex color drawing result of the target model based on the vertex color merging layer, the method further comprises the following steps: in response to an application operation for the target model, the vertex-color rendering layer is deleted.
Providing a drawing interface of the model vertex color through the terminal equipment, wherein the drawing interface comprises a target control; the method for creating the vertex color merging layer and the plurality of vertex color drawing layers corresponding to the target model comprises the following steps: and responding to the triggering operation aiming at the target control, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model, and displaying and determining the drawing control and the drawing tool in a drawing interface.
Providing a drawing interface of the model vertex color through the terminal equipment, wherein the drawing interface comprises a drawing control and a drawing tool in an inactive state; before the step of updating the target rendering layer corresponding to the vertex color rendering operation in response to the vertex color rendering operation, the method further includes: in response to a trigger operation for determining a drawing control, a drawing tool is activated and a selected region of the vertex-color drawing layer, a drawing region of the vertex-color drawing layer, and a preview region are displayed.
The step of updating the target drawing layer corresponding to the vertex color drawing operation in response to the vertex color drawing operation includes: in response to a selection operation for the target drawing layer, displaying the target drawing layer in a designated display manner in a selected area, and displaying a drawing tool in a drawing area; responding to the drawing operation aiming at the drawing tool, acquiring drawing information aiming at a target drawing layer, and updating the drawing information into the target drawing layer; displaying drawing information in the drawing area; wherein the drawing information of the drawing layer includes: color information, intensity information of a drawing tool, and size information of the drawing tool. In the mode, the vertex colors can be drawn in a layered mode, the vertex colors can be erased in a layered mode, attribute combination can be carried out in real time, and drawing of the model vertex colors can be carried out conveniently and efficiently through a drawing interface.
The method further comprises the following steps: in response to a preview operation for the vertex color combining layer or the vertex color drawing layer, a display effect of the vertex color combining layer or a display effect of the vertex color drawing layer is displayed. In this way, the mixing effect of each layer can be displayed quickly through the preview operation. RGB, R, G, B layer effects can be previewed hierarchically.
The method, the device, the electronic device and the computer program product of the system for drawing the model vertex color provided by the embodiment of the invention comprise a computer readable storage medium storing program codes, wherein the instructions included in the program codes can be used for executing the method described in the method embodiment, and specific implementation can be referred to the method embodiment and will not be repeated here.
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 embodiments of the present invention, 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 above terms in the present invention will be understood by those skilled in the art in specific cases.
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 this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. 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 invention, 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 invention 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 invention. 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 above examples are only specific embodiments of the present invention for illustrating the technical solution of the present invention, but not for limiting the scope of the present invention, and although the present invention has been described in detail with reference to the foregoing examples, it will be understood by those skilled in the art that the present invention is not limited thereto: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (15)

1. A method for drawing a model vertex color, the method comprising:
obtaining the initial model vertex color of the target model; wherein the initial model vertex color comprises a plurality of color channels;
creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the vertex color drawing layer corresponds to the color channel; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel;
Responding to a vertex color drawing operation, and updating a target drawing layer corresponding to the vertex color drawing operation;
and updating the vertex color merging layer based on the target drawing layer, and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer.
2. The method of claim 1, wherein the step of creating the vertex-color merging layer and the plurality of vertex-color rendering layers corresponding to the target model comprises:
if the initial model vertex color is a preset value, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; wherein, the channel value of the color channel is the preset value;
and if the initial model vertex color is not the preset numerical value, creating a corresponding vertex color merging layer and a plurality of vertex color drawing layers for the target model based on the initial model vertex color.
3. The method of claim 2, wherein creating a corresponding vertex color merge layer and multiple vertex color rendering layers for the target model based on the initial model vertex colors comprises:
creating a plurality of vertex color drawing layers corresponding to the target model, and updating channel values of the color channels into the corresponding vertex color drawing layers;
And creating a vertex color merging layer corresponding to the target model according to the initial model vertex color.
4. A method according to claim 3, wherein the initial model vertex color comprises a first color channel, a second color channel and a third color channel; the channel value of the first color channel is a first channel value, the channel value of the second color channel is a second channel value, and the channel value of the third color channel is a third channel value;
creating a plurality of vertex color drawing layers corresponding to the target model, and updating the channel values of the color channels into the corresponding vertex color drawing layers, wherein the method comprises the following steps of:
creating a first vertex color drawing layer, a second vertex color drawing layer and a third vertex color drawing layer corresponding to the target model;
updating the first channel value into the first vertex color drawing layer, updating the second channel value into the second vertex color drawing layer, and updating the third channel value into the third vertex color drawing layer.
5. A method according to claim 3, wherein prior to the step of creating a plurality of vertex-color rendering layers corresponding to the target model and updating the channel values of the color channels into the corresponding vertex-color rendering layers, the method further comprises:
Updating the initial name of the initial model vertex color to a designated name;
the step of creating the vertex color merging layer corresponding to the target model according to the initial model vertex color comprises the following steps:
updating the designated name of the initial model vertex color to a target name to obtain the initial model vertex color after updating the name; and determining the initial model vertex color after updating the name as a vertex color merging layer corresponding to the target model.
6. The method of claim 1, wherein the step of updating the vertex color combining layer based on the target rendering layer comprises:
if the vertex color combining layer and the plurality of vertex color drawing layers meet preset conditions, acquiring the current value of the target drawing layer;
and updating the current value to a target color channel corresponding to the vertex color merging layer, so that the channel value of the target color channel is the current value.
7. The method of claim 6, wherein the vertex-color rendering layer comprises: a first vertex color drawing layer, a second vertex color drawing layer, and a third vertex color drawing layer;
the preset conditions are as follows: the hierarchy of the vertex color combining layer is a first preset hierarchy, the hierarchy of the first vertex color drawing layer is a second preset hierarchy, the hierarchy of the second vertex color drawing layer is a third preset hierarchy, the hierarchy of the third vertex color drawing layer is a fourth preset hierarchy, the name of the vertex combining layer is a target name, the name of the first vertex color drawing layer is a first preset name, the name of the second vertex color drawing layer is a second preset name, and the name of the third vertex color drawing layer is a third preset name.
8. The method according to claim 1, wherein, before the step of obtaining the model vertex color rendering result of the target model based on the vertex color merging layer, the method further comprises:
the vertex-color rendering layer is deleted in response to an application operation for the target model.
9. The method according to claim 1, wherein a drawing interface of the model vertex color is provided through a terminal device, and the drawing interface comprises a target control;
the step of creating the vertex color merging layer and the plurality of vertex color drawing layers corresponding to the target model comprises the following steps:
and responding to the triggering operation aiming at the target control, creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model, and displaying and determining a drawing control and a drawing tool in the drawing interface.
10. The method according to claim 1, wherein a drawing interface of the model vertex color is provided by a terminal device, and the drawing interface comprises a drawing control and a drawing tool in an inactive state;
in response to a vertex color drawing operation, before the step of updating a target drawing layer corresponding to the vertex color drawing operation, the method further includes:
And responding to the triggering operation aiming at the determining drawing control, activating the drawing tool, and displaying the selected area of the vertex color drawing layer, the drawing area of the vertex color drawing layer and the preview area.
11. The method of claim 10, wherein in response to a vertex color rendering operation, the step of updating a target rendering layer corresponding to the vertex color rendering operation comprises:
displaying a target drawing layer in a designated display manner in the selected area in response to a selection operation for the target drawing layer, and displaying the drawing tool in the drawing area;
responding to the drawing operation aiming at the drawing tool, acquiring drawing information aiming at the target drawing layer, and updating the drawing information into the target drawing layer;
displaying the drawing information in the drawing area; wherein the drawing information of the drawing layer includes: color information, intensity information of the drawing tool, and size information of the drawing tool.
12. The method according to claim 10, wherein the method further comprises:
and displaying a display effect of the vertex color combining layer or a display effect of the vertex color drawing layer in response to a preview operation for the vertex color combining layer or the vertex color drawing layer.
13. A device for drawing a model vertex color, the device comprising:
the acquisition module is used for acquiring the initial model vertex color of the target model; wherein the initial model vertex color comprises a plurality of color channels;
the creation module is used for creating a vertex color merging layer and a plurality of vertex color drawing layers corresponding to the target model; the initial value of the vertex color merging layer is the initial model vertex color; the vertex color drawing layer corresponds to the color channel; the initial value of the vertex color drawing layer is the channel value of the corresponding color channel;
the drawing module is used for responding to the vertex color drawing operation and updating a target drawing layer corresponding to the vertex color drawing operation;
and the updating module is used for updating the vertex color merging layer based on the target drawing layer and obtaining a model vertex color drawing result of the target model based on the vertex color merging layer.
14. 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 method of drawing model vertex colors of any of claims 1-12.
15. A computer readable storage medium storing computer executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of drawing model vertex colors according to any of claims 1-12.
CN202211375084.8A 2022-11-04 2022-11-04 Drawing method and device for model vertex color and electronic equipment Pending CN116071446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211375084.8A CN116071446A (en) 2022-11-04 2022-11-04 Drawing method and device for model vertex color and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211375084.8A CN116071446A (en) 2022-11-04 2022-11-04 Drawing method and device for model vertex color and electronic equipment

Publications (1)

Publication Number Publication Date
CN116071446A true CN116071446A (en) 2023-05-05

Family

ID=86182809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211375084.8A Pending CN116071446A (en) 2022-11-04 2022-11-04 Drawing method and device for model vertex color and electronic equipment

Country Status (1)

Country Link
CN (1) CN116071446A (en)

Similar Documents

Publication Publication Date Title
CN108228169B (en) Chart making method, device, equipment and medium based on eCharts tool
CN109614424B (en) Page layout generation method, device, computing equipment and medium
US20230229704A1 (en) Graph processing method and apparatus
CN108268275B (en) Software version control method and software version control equipment
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
CN112560422A (en) Chart processing method, device, equipment and medium
CN116071446A (en) Drawing method and device for model vertex color and electronic equipment
CN109934894B (en) CAD (computer-aided design) drawing method and device and computer-readable storage medium
CN114741064B (en) Page generation method, device and system and storage medium
CN116301785A (en) Method and device for realizing custom text editor component
CN115169294A (en) Data conversion method, device and medium
CN111338522B (en) Display interface layout method and device, electronic equipment and storage medium
CN114840190A (en) Code generation method and device, computer equipment and storage medium
CN114564854A (en) Operation method and equipment of data node supporting FMEA bidirectional relationship tree
US20020051000A1 (en) Design support system facilitating process modification
CN111026391A (en) Icon code generation method and device
CN115049804B (en) Editing method, device, equipment and medium for virtual scene
CN118001745A (en) Model asset processing method and device and electronic equipment
CN115080671B (en) Method and device for creating user-defined relationship graph, storage medium and electronic equipment
CN117591117B (en) Page generation method, system, equipment and storage medium
CN113918152B (en) Low-code application development method and equipment in page building process
Siebert et al. PNets-the verification tool based on Petri nets
US20240211644A1 (en) Methods and systems for creating site drawings
KR101196985B1 (en) Method for displating an user interface picture in potable terminal
CN117032631A (en) Test outline generation method, device, computer equipment and 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