CN110379021B - Method and device for constructing entity model in finished product display and computer equipment - Google Patents

Method and device for constructing entity model in finished product display and computer equipment Download PDF

Info

Publication number
CN110379021B
CN110379021B CN201910500262.7A CN201910500262A CN110379021B CN 110379021 B CN110379021 B CN 110379021B CN 201910500262 A CN201910500262 A CN 201910500262A CN 110379021 B CN110379021 B CN 110379021B
Authority
CN
China
Prior art keywords
size
entity
variable
component
vectorization
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
CN201910500262.7A
Other languages
Chinese (zh)
Other versions
CN110379021A (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.)
Zxtech Shanghai Co ltd
Original Assignee
Zxtech Shanghai 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 Zxtech Shanghai Co ltd filed Critical Zxtech Shanghai Co ltd
Priority to CN201910500262.7A priority Critical patent/CN110379021B/en
Publication of CN110379021A publication Critical patent/CN110379021A/en
Application granted granted Critical
Publication of CN110379021B publication Critical patent/CN110379021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • 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 invention discloses a method and a device for constructing a solid model in finished product display and computer equipment, which mainly aim to modify the size of the solid model in real time, realize parametric size driving of the solid model and improve the solid modeling efficiency in finished product display. The method comprises the following steps: acquiring default parameter sizes of size-variable components of an entity to be modeled, a preset parameter size driving table of the size-variable components, initial non-vectorization models corresponding to the size-variable components and non-vectorization models corresponding to the size-invariable components; according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on an initial non-vectorization model corresponding to the size variable component; and constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component. The method is suitable for constructing the entity model in the finished product display.

Description

Method and device for constructing entity model in finished product display and computer equipment
Technical Field
The invention relates to the technical field of information, in particular to a method and a device for constructing an entity model in finished product display and computer equipment.
Background
With the rapid development of computer software science and technology, the rendering function of computer graphics has gained much attention and rapid development in recent years, in the finished product display, the display of the solid finished product is completed by rendering the established solid model, the rendering of the model realizes the vivid effect of the solid finished product, meets the requirements of users, and enables the users to see the effect of the solid finished product in advance before the finished product is manufactured.
At present, when a finished product is displayed, a three-dimensional model of an entity is usually established in modeling software according to the actual design size of the entity, and the effect of the finished product of the entity is displayed by rendering the three-dimensional model of the entity.
Disclosure of Invention
The invention provides a method and a device for constructing a solid model in finished product display and computer equipment, and mainly aims to modify the size of the solid model in real time, realize parametric size driving of the solid model and improve the solid modeling efficiency in finished product display.
According to a first aspect of the present invention, there is provided a method for constructing a solid model in a finished product display, including:
acquiring default parameter sizes of size-variable components of an entity to be modeled, a preset parameter size driving table of the size-variable components, an initial non-vectorization model corresponding to the size-variable components and a non-vectorization model corresponding to the size-invariable components;
according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on the initial non-vectorization model corresponding to the size variable component;
and constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
According to a second aspect of the present invention, there is provided an apparatus for constructing a solid model in a finished product display, comprising:
an obtaining unit, configured to obtain a default parameter size of a size-variable component of an entity to be modeled, a preset parameter size driving table of the size-variable component, an initial non-vectorization model corresponding to the size-variable component, and a non-vectorization model corresponding to the size-invariable component;
an adjusting unit, configured to perform size adjustment on the initial non-vectorization model corresponding to the size-variable component according to the default parameter size and the preset parameter size driving table;
and the constructing unit is used for constructing the non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring default parameter sizes of size-variable components of an entity to be modeled, a preset parameter size driving table of the size-variable components, an initial non-vectorization model corresponding to the size-variable components and a non-vectorization model corresponding to the size-invariable components;
according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on the initial non-vectorization model corresponding to the size variable component;
and constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
According to a fourth aspect of the present invention, there is provided a computer apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
acquiring default parameter sizes of size-variable components of an entity to be modeled, a preset parameter size driving table of the size-variable components, an initial non-vectorization model corresponding to the size-variable components and a non-vectorization model corresponding to the size-invariable components;
according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on an initial non-vectorization model corresponding to the size variable component;
and constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
Compared with the method for displaying entity finished products with different design sizes by reestablishing the entity model in the current finished product display, the method, the device and the computer equipment provided by the invention can obtain the default parameter size of the size-variable part of the entity to be displayed, the preset parameter size driving table of the size-variable part, the initial non-vectorization model corresponding to the size-variable part and the non-vectorization model corresponding to the size-invariable part; according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on the initial non-vectorization model corresponding to the size variable component; meanwhile, according to the non-vectorization model adjusted by the size variable part and the non-vectorization model corresponding to the size invariable part, the non-vectorization model corresponding to the entity to be built is built, so that parametric size driving of the entity model in finished product display is realized, the size of the entity model can be modified in real time according to the entity specification set by a user, the design effect of the entity is seen, a large amount of work brought by re-modeling for displaying entity finished products with different design sizes is reduced, and the entity modeling efficiency and the rendering efficiency of finished product display in finished product display are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
FIG. 1 is a flowchart illustrating a method for building a solid model in a finished product display according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for building a mockup in a finished product display according to another embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for constructing a solid model in a finished product display according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for building a solid model in a finished product display according to another embodiment of the present invention;
FIG. 5 is a block diagram illustrating an example of a physical structure of a computer device according to an embodiment of the present invention;
FIG. 6 shows an optical intensity decay curve provided by an embodiment of the present invention;
FIG. 7 illustrates a graph of the position of shadows provided by an embodiment of the present invention;
fig. 8 shows a transverse stretching curve of the light shadow provided by the embodiment of the invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict.
As background art, currently, when displaying finished products, a three-dimensional model of an entity is usually built in modeling software according to an actual design size of the entity, and an effect of displaying the finished product of the entity is displayed by rendering the three-dimensional model of the entity.
In order to solve the above problem, an embodiment of the present invention provides a method for constructing a solid model in a finished product display, as shown in fig. 1, the method includes:
101. obtaining default parameter size of a size-variable component of an entity to be modeled, a preset parameter size driving table of the size-variable component, an initial non-vectorization model corresponding to the size-variable component and a non-vectorization model corresponding to the size-non-variable component.
In the embodiment of the present invention, each component of an entity to be modeled is divided into a size-variable component and a size-invariable component according to whether the component size is variable, an initial set size of the size-variable component of the entity to be modeled is obtained, the initial set size can be set according to the actual requirements of a user, an initial non-vectorization model corresponding to the size-variable component is built according to the initial set size, and simultaneously a set size of the size-invariable component is obtained, the set size can be set according to the actual requirements of the user, a non-vectorization model corresponding to the size-invariable component is built according to the set size, the vectorization construction of the non-vectorization model can be completed in a three-dimensional preset modeling software, it should be noted that the preset three-dimensional software of the embodiment of the present invention may be but is not limited to 3D modeling software, and the drive size of the non-vectorization model corresponding to the size-variable component is implemented on the basis of the parameterized model corresponding to the size-variable component.
In addition, for the preset parameter size driving table in the embodiment of the present invention, according to the size variation relationship between the default parameter of the size-variable component and other characteristic parameters of the size-variable component in the CAD drawing of the entity to be modeled, the driving rule corresponding to other characteristic parameters under different default parameter sizes is determined, and according to the driving rule, the size of other characteristic parameters can be calculated, for example, according to the CAD drawing of the size-variable component, it is known that 1030 ≤ BB <2751, and B1= BB-40, where BB is the default parameter of the size-variable component, B1 is other characteristic parameters of the size-variable component, and the driving rule between B1 and BB is B1= BB-40, thereby establishing the mapping relationship between different default parameter sizes, different other characteristic parameters, and different driving rules, and establishing the preset parameter size driving table of the size-variable component according to the mapping relationship, so as to be able to search for other characteristic parameter sizes from the preset parameter size driving table according to the default parameter size of the size-variable component set by the user, and dynamically adjust the size of the initial non-variable model corresponding to the size, thereby achieving vectorization of the vectorized variable component.
Taking elevator decoration display as an example, each part of an elevator is divided into a size variable part and a size invariable part, wherein the size variable part can be a plane, an inclined plane, a step plane, an arc surface, an arched reinforcing rib, an outer carriage body and an inner carriage body in an elevator car, the size invariable part can be a pendant on the top of the elevator car, such as a down lamp, an acrylic lamp, a square lamp and other guiding parts, a non-vectorization model corresponding to the size invariable part and an initial non-vectorization model corresponding to the size variable part are constructed in 3D max software according to the set size of the size invariable part and the initial set size of the size variable part in an elevator car CAD drawing, meanwhile, a car width, a car depth, a car height, a car door width and a car door height are set as default parameters of the elevator car according to the size variation relation of the size variable part in the elevator car CAD drawing, namely how the sizes of other size variable parts vary when the car size varies, and a parameter size driving rule of the size variable part is established according to the default parameters and other characteristic parameters of the elevator car.
102. And adjusting the size of the initial non-vectorization model corresponding to the size variable component according to the default parameter size and the preset parameter size driving table.
For the embodiment of the present invention, a preset parameter size driving table is searched according to a default parameter size of an entity to be modeled input by a user, a driving rule of another feature parameter under the default parameter size is determined, another feature parameter size is calculated according to a driving rule corresponding to another feature parameter, for example, the default parameter size is 1000, the preset parameter size driving table is searched, it is known that 800 ≦ AA <2601, A1= AA/4-90, A2= AA/2+100, A3= AA-60, another feature parameter size is calculated according to the default parameter size AA =1000 and the driving rule of another feature parameter size A1, A2, A3 to obtain A1=160, A2=600, A3=940, and then the feature parameter size of an initial non-vectorization model corresponding to a size-variable component is modified according to the default parameter size and the other feature parameter size, in addition, the embodiment of the invention realizes the size driving of the initial non-vectorization model by constructing the initial non-vectorization model of the size variable part and a preset parameter size driving table of the size variable part, and compared with the mode of realizing the parameterization driving of the size variable part through CAD modeling, the mode can reduce the consumption of a disk and improve the rendering speed of the entity model.
103. And constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
For the embodiment of the invention, the non-vectorization model after the size variable part adjustment and the non-vectorization model corresponding to the size non-variable part are assembled and positioned, the non-vectorization model after the size variable part adjustment and the non-vectorization model corresponding to the size non-variable part are combined into the non-vectorization model corresponding to the entity to be modeled, specifically, an assembly reference of the non-vectorization model after the size variable part adjustment and the non-vectorization model corresponding to the size non-variable part is firstly determined, the assembly reference can be a world coordinate system, the positioning of the non-vectorization model after the size variable part adjustment and the non-vectorization model corresponding to the size non-variable part is completed by specifying the relationship between the non-vectorization model after the size variable part adjustment and the non-vectorization model corresponding to the size non-variable part and the assembly reference, and for the non-vectorization model after the size variable part adjustment, the assembling and positioning of the non-vectorization model after the size variable part is adjusted are realized by coinciding the self coordinate system of the non-vectorization model after the size variable part is adjusted with the world coordinate system and setting offset distances on the X axis, the Y axis and the Z axis, the characteristic parameters in the preset parameter driving table of the size variable part not only comprise the size parameters of the size variable part but also comprise the offset distances, namely the offset distances can also be subjected to parametric driving, the preset parameter size driving table is searched according to default parameter sizes, the offset distances of the non-vectorization model after the size variable part is adjusted on the X axis, the Y axis and the Z axis are determined, further, when the self coordinate system of the non-vectorization model after the size variable part is adjusted is not different from the world coordinate system, the characteristic parameters in the preset parameter driving table of the size variable part not only comprise the size parameters of the size variable part, the offset distance and the direction parameter are also included; for the non-vectorization model corresponding to the size-invariable component, the non-vectorization models corresponding to a plurality of size-invariable components can be introduced in an array mode, an array is created by specifying the starting point, the array direction and the array interval of the array, the characteristic parameters in the preset parameter driving table of the size-invariable component also comprise the array direction and the array interval, namely, the array direction and the array interval can also be subjected to parametric driving, the preset parameter size driving table is searched according to the default parameter size, the array direction and the array interval are determined, for example, the number of the top lamps of an elevator car can be more than one, and the plurality of top lamps are integrally assembled and positioned by specifying the starting point of the top lamp array, wherein the direction, the interval between the top lamps and the number of the top lamps can be subjected to parametric driving, namely, the number, the direction and the interval of the top lamps can be changed along with the change of the car size.
Compared with the method for displaying solid finished products with different design sizes by reestablishing the solid model in the current finished product display, the method for constructing the solid model in the finished product display provided by the embodiment of the invention can obtain the default parameter size of the size-variable part of the entity to be modeled, the preset parameter size driving table of the size-variable part, the initial non-vectorization model corresponding to the size-variable part and the non-vectorization model corresponding to the size-invariable part; according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on the initial non-vectorization model corresponding to the size variable component; meanwhile, according to the non-vectorization model adjusted by the size variable part and the non-vectorization model corresponding to the size invariable part, the non-vectorization model corresponding to the entity to be built is built, so that parametric size driving of the entity model in finished product display is realized, the size of the entity model can be modified in real time according to the entity specification set by a user, the design effect of the entity is seen, a large amount of work brought by re-modeling for displaying entity finished products with different design sizes is reduced, and the entity modeling efficiency and the rendering efficiency of finished product display in finished product display are improved.
Further, in order to better describe the size-driven process of the non-vectorization model corresponding to the entity to be modeled, as a refinement and an extension to the foregoing embodiment, an embodiment of the present invention provides another method for constructing an entity model in a finished product display, as shown in fig. 2, where the method includes:
201. obtaining default parameter size of a size-variable component of an entity to be modeled, a preset parameter size driving table of the size-variable component, an initial non-vectorization model corresponding to the size-variable component and a non-vectorization model corresponding to the size-non-variable component.
For embodiments of the present invention, to implement parametric dimensional driving of a dimensionally variable part, prior to step 201, the method further comprises: before the obtaining a preset parameter size driving table of the size variable component, the method further comprises: obtaining a vectorization model corresponding to the entity to be modeled, and dividing each part in the vectorization model into a size-variable part and a size-invariable part according to whether the size of the part is variable; acquiring driving rules of other characteristic parameters of the size-variable component, wherein different default parameter sizes correspond to different driving rules; and establishing a mapping relation among different default parameter sizes, different other characteristic parameters and different driving rules, and establishing a preset parameter size driving table of the size variable component according to the mapping relation. Specifically, each part of an entity to be modeled is divided into a variable-size part and an invariable-size part, an initial set size of each part is obtained from a CAD drawing of the entity to be modeled, an initial non-vectorization model corresponding to the variable-size part and a non-vectorization model corresponding to the invariable-size part are constructed according to the initial set size, a size variation relation of characteristic parameters of the variable-size part is obtained from the CAD drawing, as shown in table 1, a default parameter and other characteristic parameters of the variable-size part and a driving rule between the default parameter and other characteristic parameters are determined according to the size variation relation, driving rules of other characteristic parameters corresponding to different default parameter sizes are different, different default parameter sizes and mapping relations between different other characteristic parameters and different driving rules are established, and a parameter size driving table of the variable-size part is constructed according to the mapping relations, as shown in table 2, wherein # BB is the default parameter of the variable-size part, and N2, B1, B2, leftboltformtlength and frontodendex length and frontoclumeff are other characteristic parameters.
TABLE 1
BB N2 B1 B2
1030≤BB<1501 7 BB/7 BB-40
1501≤BB<1701 8 BB/8 BB-40
1701≤BB<1901 9 BB/9 BB-40
1901≤BB<2751 10 BB/10 BB-40
TABLE 2
Figure BDA0002089970900000081
Figure BDA0002089970900000091
202. And inquiring other characteristic parameter sizes of the size variable component from the preset parameter size driving table according to the default parameter size.
For the embodiment of the present invention, in order to calculate the other characteristic parameter dimensions of the dimension-variable component, step 202 specifically includes: inquiring the preset parameter size driving table according to the default parameter size, and determining driving rules of other characteristic parameters corresponding to the default parameter size; and calculating other characteristic parameter sizes of the variable component according to the default parameter size and the driving rules corresponding to the other characteristic parameters. Specifically, when a modeling instruction of the entity model is received, a default parameter input interface is output, a default parameter size input through the input interface is obtained, according to the default parameter size input by a user, a program can automatically query a driving rule meeting the conditions in a preset parameter size driving table, and according to the default parameter size input by the user and the corresponding driving rule, other characteristic parameter sizes are calculated, for example, the width of a car input by the user is 160cm, namely the default parameter size of the car is 160cm, the preset parameter size driving table of the car is searched according to the width of the car, as shown in table 3, it can be known that other characteristic parameter sizes of the car are calculated according to a third row driving rule in the preset parameter size driving table, and the size of the car model is updated according to the default parameter size of the car and other characteristic parameter sizes.
203. And according to the other inquired characteristic parameter sizes and the default parameter size, carrying out size adjustment on the initial non-vectorization model corresponding to the size variable component.
For example, the default parameters of the elevator car are car width, car depth, car height, car door width and car door height, the default parameter sizes input by a user through an input interface are respectively 1500mm car width, 1600mm car depth, 2400mm car height, 2100mm car door height and 975mm car door width, a preset parameter size driving table of the elevator car is searched according to the default parameter sizes of the car, other characteristic parameter sizes of the variable-size elevator car component are calculated, the size of the initial car model is updated according to the other characteristic parameter sizes and the default parameter sizes, vertex coordinates, normal lines, texture coordinates and a triangular sequence of a triangular grid are generated, a non-vectorization model adjusted by the variable-size component is constructed according to the attributes of the triangular grid, parametric size driving of the elevator car is achieved, a real-time design effect can be seen according to the car specification customized by the user, and convenience is provided for industrial design of the elevator industry.
204. And constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
For the embodiment of the present invention, the other characteristic parameter sizes include an offset distance between the non-vectorization model after being adjusted by the size-variable component and an assembly reference, a direction of the non-vectorization model array corresponding to the size-invariant component and a pitch of the non-vectorization model array corresponding to the size-invariant component, and in order to assemble the non-vectorization model after being adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariant component into a non-vectorization model corresponding to a to-be-molded entity, step 204 specifically includes: assembling and positioning the non-vectorization model after the size variable component is adjusted according to the offset distance; obtaining a starting point of a non-vectorization model array corresponding to the size-invariant component, and assembling and positioning a non-vectorization model corresponding to the size-invariant component according to the starting point of the non-vectorization model array, the direction of the non-vectorization model array and the distance of the non-vectorization model array; and determining a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model after the assembly positioning of the size-variable component and the non-vectorization model after the assembly positioning of the size-invariable component. Taking an arc surface of a size-variable part as an example, a self coordinate system of a non-vectorization model of the arc surface is overlapped with a world coordinate system, offset distances are set on an X axis, a Y axis and a Z axis, the offset distances can be subjected to parametric size driving, a preset parameter size driving table is searched according to the default parameter sizes of the arc surface, the offset distances are determined, the arc surface is assembled and positioned according to the offset distances, for the assembly of the size-variable part, the non-vectorization models corresponding to a plurality of size-variable parts can be led in an array mode, the array is determined by specifying the starting point of the array and the direction of the array, namely the array spacing, and the array of the non-vectorization models corresponding to the size-variable parts can be subjected to parameter driving, so that the parametric size driving of the whole entity model is realized.
205. And obtaining a material parameter of the entity to be modeled, and rendering a non-vectorization model corresponding to the entity to be modeled according to the material parameter.
For the embodiment of the present invention, the material parameters include a light type of the entity to be modeled and a material type of the entity to be modeled, and in order to increase a real-time rendering speed of the entity model, step 205 specifically includes: determining a light intensity attenuation curve of the entity to be modeled, a light shadow stretching curve of the entity to be modeled and a light shadow position curve of the entity to be modeled according to the light type of the entity to be modeled and the material type of the entity to be modeled; determining original materials required for generating the shadowgraph of the entity to be modeled according to the type of the light of the entity to be modeled; acquiring position information of a lamp and position information of a wall surface in a non-vectorization model corresponding to the entity to be modeled, and calculating the distance between the lamp and the wall surface; adjusting the original material to generate a light shadow map of the entity to be modeled according to the distance between the lamp and the wall surface, the light intensity attenuation curve, the light shadow stretching curve and the light shadow position curve; and rendering the non-vectorization model corresponding to the entity to be modeled according to the photo-map. For example, in order to ensure that the decoration effect of the elevator car is better and vivid, a light and shadow graph generation module is designed, a two-dimensional curve is adopted to control light and shadow on the car wall, in order to realize a surprisingly fine light and shadow effect, a light intensity attenuation curve, a light and shadow stretching curve and a light and shadow position curve are respectively defined for each type of light and material, as shown in fig. 6, 7 and 8, the abscissa of the three curves refers to the distance between a light source and the car wall, the ordinate of the three curves respectively represents different attributes of the light and shadow, for any type of light and material, the light and shadow generation can be controlled through the light intensity attenuation curve, the light and shadow stretching curve and the light and shadow position curve, in addition, according to the type of the car light, the method comprises the steps of determining an original material required for generating a car light shadow map, obtaining the distance between a light source and a car wall, respectively determining light intensity attenuation curve, a light shadow stretching curve and light shadow attributes in a light shadow position curve according to the distance between the light source and the car wall, stretching the original material according to the light shadow attributes, adjusting the position, adjusting the brightness and the like, finally obtaining the light shadow map of the car, and rendering a car model.
In addition, the material parameters further include surface texture mapping auxiliary parameters of the non-vectorized model after the size variable component is adjusted, and in order to enable the parameterized size-driven solid model to achieve a desired rendering effect, step 205 further includes: acquiring reference coordinates of the non-vectorization model after the size variable component is adjusted and position information of the non-vectorization model after the size variable component is adjusted; generating a reference virtual body of the non-vectorization model adjusted by the size variable component according to the reference coordinates; calculating surface texture mapping position information of the non-vectorization model adjusted by the size variable component according to the position information of the non-vectorization model adjusted by the size variable component, the reference virtual body, the default parameter size, the other characteristic parameter sizes and the surface texture mapping auxiliary parameter; and according to the surface texture mapping position information, mapping the non-vectorization model after the size variable component is adjusted. Specifically, for the non-vectorization model with the size-variable component adjusted, during running, a program dynamically generates a non-vectorization model of the size-variable component according to characteristic parameters of the size-variable component, in order to meet a rendering effect driven by the parameterized size of the solid model, a generation rule of a surface texture map needs to be set for the non-vectorization model corresponding to the size-variable component, a reference virtual body is generated according to reference coordinates, a non-vectorization model grid vertex of the size-variable component is transformed into a reference virtual body coordinate system, then linear transformation in a finite step is performed, the obtained coordinate value is surface texture map position information corresponding to the vertex, when the solid model is constructed, position information, size and surface texture map auxiliary parameters of the size-variable component are specified, the surface texture map auxiliary parameters include a scaling coefficient, an offset value and the like, during running, the program generates a reference virtual body according to the reference coordinates, and generates surface texture map position information by combining the surface texture map auxiliary parameters.
Further, the material parameters further include material channel information of the entity to be modeled, and in order to assign a material to the entity model, step 205 further includes: grouping the parts of the materials to be assigned in the non-vectorization model corresponding to the entity to be modeled according to the difference of the assigned materials; generating materials corresponding to the components in each group according to the material channel information corresponding to the components in different groups; and assigning the material corresponding to each group component to each channel of the component to be assigned with the material. In addition, the embodiment of the invention adopts a game rendering engine, and the cross-platform application is realized by taking OpenGLES as a rendering pipeline based on a C/C + + native development mode during development.
Compared with the method for displaying solid products with different design sizes by reestablishing the solid model in the current finished product display, the method for constructing the solid model in the finished product display provided by the embodiment of the invention can obtain the default parameter size of the size-variable part of the entity to be modeled, the preset parameter size driving table of the size-variable part, the initial non-vectorization model corresponding to the size-variable part and the non-vectorization model corresponding to the size-invariable part; according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on the initial non-vectorization model corresponding to the size variable component; meanwhile, a non-vectorization model corresponding to the entity to be modeled is constructed according to the non-vectorization model adjusted by the size variable component and the non-vectorization model corresponding to the size invariable component, so that parametric size driving of the entity model in finished product display is realized, the size of the entity model can be modified in real time according to an entity specification set by a user, the design effect of the entity is seen, and meanwhile, an efficient game engine and high-quality rendering are combined, so that the rendering effect and the rendering speed of the entity model after size driving are ensured, and cross-platform application is realized.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides an apparatus for building a solid model in a finished product display, as shown in fig. 3, the apparatus includes: an acquisition unit 31, an adjustment unit 32 and a construction unit 33.
The obtaining unit 31 may be configured to obtain a default parameter size of a size-variable component of an entity to be modeled, a preset parameter size driving table of the size-variable component, an initial non-vectorization model corresponding to the size-variable component, and a non-vectorization model corresponding to the size-non-variable component. The obtaining unit 31 is a main function module in the apparatus for obtaining a default parameter size of a size-variable component of an entity to be modeled, a preset parameter size driving table of the size-variable component, an initial non-vectorization model corresponding to the size-variable component, and a non-vectorization model corresponding to the size-invariable component.
The adjusting unit 32 may be configured to perform size adjustment on the initial non-vectorization model corresponding to the size-variable component according to the default parameter size and the preset parameter size driving table. The adjusting unit 32 is a main function module, which is also a core module, in the present apparatus, and performs size adjustment on the initial non-vectorization model corresponding to the size variable component according to the default parameter size and the preset parameter size driving table.
The constructing unit 33 may be configured to construct the non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariant component. The constructing unit 33 is a main function module in the apparatus, which constructs a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
For the embodiment of the present invention, in order to perform size adjustment on the initial non-vectorization model corresponding to the size variable component, the adjusting unit 32 may include: a query module 321 and an adjustment module 322, as shown in fig. 4.
The query module 321 may be configured to query other feature parameter sizes of the size-variable component from the preset parameter size driving table according to the default parameter size.
The adjusting module 322 may be configured to perform size adjustment on the initial non-vectorization model corresponding to the size-variable component according to the size of the other feature parameter of the query and the default parameter size.
For the embodiment of the present invention, in order to establish the preset parameter dimension driving table of the dimension variable part, the apparatus further comprises an establishing unit 34.
The obtaining unit 31 may be further configured to obtain a vectorization model corresponding to the entity to be modeled, and divide each component in the vectorization model into a size-variable component and a size-invariable component according to whether the component size is variable.
The obtaining unit 31 may be further configured to obtain driving rules of other characteristic parameters of the size-variable component, where different default parameter sizes correspond to different driving rules.
The establishing unit 34 may be configured to establish a mapping relationship between different default parameter sizes, different other characteristic parameters, and different driving rules, and establish a preset parameter size driving table of the size variable component according to the mapping relationship.
Further, in order to query the other characteristic parameter sizes of the size-variable component from the preset parameter size driving table, the query module 321 includes: a determination submodule and a calculation submodule.
The determining submodule may be configured to search the preset parameter size driving table according to the default parameter size, and determine a driving rule of another feature parameter corresponding to the default parameter size.
The calculation submodule may be configured to calculate the other feature parameter sizes of the variable component according to the default parameter size and the driving rule corresponding to the other feature parameters.
Furthermore, in order to assemble the non-vectorized model after the adjustment of the size-variable component and the vectorized model corresponding to the size-invariant component into a non-vectorized model of the entity to be modeled, the constructing unit 33 includes: an assembly module 331 and a determination module 332.
The assembling module 331 may be configured to assemble and position the non-vectorization model adjusted by the size variable component according to the offset distance.
The assembling module 331 may be further configured to obtain a starting point of a non-vectorization model array corresponding to the size-invariant component, and assemble and position the non-vectorization model corresponding to the size-invariant component according to the starting point of the non-vectorization model array, a direction of the non-vectorization model array, and a distance between the non-vectorization model arrays.
The determining module 332 may be configured to determine, according to the non-vectorized model after the assembly and positioning of the size-variable component and the non-vectorized model after the assembly and positioning of the size-invariable component, the non-vectorized model corresponding to the entity to be modeled.
In a specific application scenario, in order to render a non-vectorized model corresponding to an entity to be modeled, the apparatus further includes a rendering unit 35.
The rendering unit 35 may be configured to obtain a material parameter of the entity to be modeled, and render the non-vectorized model corresponding to the entity to be modeled according to the material parameter.
Further, in order to generate a shadowgraph of the non-vectorized model corresponding to the entity to be modeled, the rendering unit 35 includes: the device comprises a determination module, a calculation module, an adjustment module and a rendering module.
The determining module may be configured to determine, according to the light type of the entity to be modeled, an original material required for generating the light shadow map of the entity to be modeled.
The calculation module may be configured to obtain position information of a lamp and position information of a wall surface in a non-vectorization model corresponding to the entity to be modeled, and calculate a distance between the lamp and the wall surface.
The adjusting module may be configured to adjust the original material to generate a light map of the entity to be modeled according to a distance between the lamp and the wall surface, the light intensity attenuation curve, the light and shadow stretch curve, and the light and shadow position curve.
The rendering module may be configured to render the non-vectorized model corresponding to the entity to be modeled according to the shadow map.
In addition, in order to perform mapping processing on the non-vectorized model corresponding to the entity to be modeled, the rendering unit 35 further includes: the device comprises an acquisition module, a generation module and a mapping module.
The obtaining module may be configured to obtain the reference coordinates of the non-vectorized model after the size variable component is adjusted and the position information of the non-vectorized model after the size variable component is adjusted.
The generating module may be configured to generate the reference virtual body of the non-vectorized model adjusted by the size variable component according to the reference coordinates.
The calculating module may be further configured to calculate surface texture mapping position information of the non-vectorization model after the size variable component is adjusted according to the position information of the non-vectorization model after the size variable component is adjusted, the reference virtual body, the default parameter size, the other feature parameter sizes, and the surface texture mapping auxiliary parameter.
The mapping module may be configured to perform mapping processing on the non-vectorized model after the size-variable component is adjusted according to the surface texture mapping position information.
Meanwhile, in order to assign a material to the non-vectorized model corresponding to the entity to be modeled, the rendering unit 35 further includes: grouping module and endow material module.
The grouping module may be configured to group components to be provided with materials in the non-vectorization model corresponding to the entity to be modeled according to different provided materials.
The generation module may be further configured to generate a material corresponding to each group component according to the material channel information corresponding to different group components.
The material endowing module can be used for endowing the material corresponding to each group component to each channel of the component to be endowed with the material.
It should be noted that other corresponding descriptions of the functional modules involved in the apparatus for constructing an entity model in a finished product display provided in the embodiment of the present invention may refer to the corresponding descriptions of the method shown in fig. 1, and are not described herein again.
Based on the method shown in fig. 1, correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps: acquiring default parameter sizes of size-variable components of an entity to be modeled, a preset parameter size driving table of the size-variable components, an initial non-vectorization model corresponding to the size-variable components and a non-vectorization model corresponding to the size-invariable components; according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on an initial non-vectorization model corresponding to the size variable component; and constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
Based on the above embodiments of the method shown in fig. 1 and the apparatus shown in fig. 3, an embodiment of the present invention further provides an entity structure diagram of a computer device, as shown in fig. 5, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43 such that when the processor 41 executes the program, the following steps are performed: acquiring default parameter sizes of size-variable components of an entity to be modeled, a preset parameter size driving table of the size-variable components, an initial non-vectorization model corresponding to the size-variable components and a non-vectorization model corresponding to the size-invariable components; according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on an initial non-vectorization model corresponding to the size variable component; and constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
According to the technical scheme, the default parameter size of the size variable component of the entity to be modeled, the preset parameter size driving table of the size variable component, the initial non-vectorization model corresponding to the size variable component and the non-vectorization model corresponding to the size non-variable component can be obtained; according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on the initial non-vectorization model corresponding to the size variable component; meanwhile, a non-vectorization model corresponding to the entity to be modeled is constructed according to the non-vectorization model adjusted by the size variable component and the non-vectorization model corresponding to the size invariable component, so that parametric size driving of the entity model in finished product display is realized, the size of the entity model can be modified in real time according to an entity specification set by a user, the design effect of the entity is seen, and meanwhile, an efficient game engine and high-quality rendering are combined, so that the rendering effect and the rendering speed of the entity model after size driving are ensured, and cross-platform application is realized.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized in a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be executed out of order, or separately as individual integrated circuit modules, or multiple modules or steps thereof may be implemented as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for constructing a solid model in finished product display is characterized by comprising the following steps:
acquiring default parameter sizes of size-variable components of an entity to be modeled, a preset parameter size driving table of the size-variable components, initial non-vectorization models corresponding to the size-variable components and non-vectorization models corresponding to the size-invariable components;
according to the default parameter size and the preset parameter size driving table, carrying out size adjustment on an initial non-vectorization model corresponding to the size variable component;
and constructing a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
2. The method according to claim 1, wherein the resizing the initial non-vectorized model corresponding to the variable-size component according to the default parameter size and the preset parameter size driving table comprises:
according to the default parameter size, inquiring other characteristic parameter sizes of the size variable component from the preset parameter size driving table;
and adjusting the size of the initial non-vectorization model corresponding to the size variable component according to the other inquired characteristic parameter sizes and the default parameter size.
3. The method of claim 2, wherein prior to said obtaining a preset parametric size drive table for a variable-size component, the method further comprises:
obtaining a vectorization model corresponding to the entity to be modeled, and dividing each component in the vectorization model into a size-variable component and a size-invariable component according to whether the size of the component is variable;
acquiring driving rules of other characteristic parameters of the size-variable component, wherein different default parameter sizes correspond to different driving rules;
and establishing a mapping relation among different default parameter sizes, different other characteristic parameters and different driving rules, and establishing a preset parameter size driving table of the size variable component according to the mapping relation.
4. The method of claim 3, wherein said looking up other characteristic parameter sizes of said variable-size components from said preset parameter size driving table according to said default parameter size comprises:
searching the preset parameter size driving table according to the default parameter size, and determining the driving rules of other characteristic parameters corresponding to the default parameter size;
and calculating other characteristic parameter sizes of the variable component according to the default parameter size and the driving rules corresponding to the other characteristic parameters.
5. The method according to claim 4, wherein the other characteristic parameter sizes include an offset distance between the non-vectorization model after the adjustment by the variable-size component and an assembly reference, an orientation of the non-vectorization model array corresponding to the non-variable-size component and a pitch of the non-vectorization model array corresponding to the non-variable-size component, and the constructing the non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model after the adjustment by the variable-size component and the non-vectorization model corresponding to the non-variable-size component includes:
assembling and positioning the non-vectorization model after the size variable component is adjusted according to the offset distance;
acquiring a starting point of a non-vectorization model array corresponding to the size-invariable component, and assembling and positioning a non-vectorization model corresponding to the size-invariable component according to the starting point of the non-vectorization model array, the direction of the non-vectorization model array and the distance of the non-vectorization model array;
and determining a non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model after the assembly positioning of the size-variable components and the non-vectorization model after the assembly positioning of the size-invariable components.
6. The method according to any one of claims 1 to 5, wherein after the constructing a non-vectored model corresponding to the entity to be constructed according to the non-vectored model adjusted by the size-variable component and the non-vectored model corresponding to the size-invariable component, the method further comprises:
and obtaining the material parameters of the entity to be modeled, and rendering the non-vectorization model corresponding to the entity to be modeled according to the material parameters.
7. The method according to claim 6, wherein the material parameters include a light type of the entity to be modeled and a material type of the entity to be modeled, and the rendering the non-vectorized model corresponding to the entity to be modeled according to the material parameters includes:
determining a light intensity attenuation curve of the entity to be modeled, a light shadow stretching curve of the entity to be modeled and a light shadow position curve of the entity to be modeled according to the light type of the entity to be modeled and the material type of the entity to be modeled;
determining original materials required for generating a shadowgraph of the entity to be modeled according to the lighting type of the entity to be modeled;
acquiring position information of a lamp and position information of a wall surface in a non-vectorization model corresponding to the entity to be modeled, and calculating the distance between the lamp and the wall surface;
adjusting the original material to generate a light and shadow graph of the entity to be modeled according to the distance between the lamp and the wall surface, the light intensity attenuation curve, the light and shadow stretching curve and the light and shadow position curve;
and rendering the non-vectorization model corresponding to the entity to be modeled according to the light shadow map.
8. A device for constructing a solid model in finished product display is characterized by comprising:
an obtaining unit, configured to obtain a default parameter size of a size-variable component of an entity to be modeled, a preset parameter size driving table of the size-variable component, an initial non-vectorization model corresponding to the size-variable component, and a non-vectorization model corresponding to the size-invariable component;
an adjusting unit, configured to perform size adjustment on the initial non-vectorization model corresponding to the size-variable component according to the default parameter size and the preset parameter size driving table;
and the constructing unit is used for constructing the non-vectorization model corresponding to the entity to be modeled according to the non-vectorization model adjusted by the size-variable component and the non-vectorization model corresponding to the size-invariable component.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 7 when executed by the processor.
CN201910500262.7A 2019-06-11 2019-06-11 Method and device for constructing entity model in finished product display and computer equipment Active CN110379021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910500262.7A CN110379021B (en) 2019-06-11 2019-06-11 Method and device for constructing entity model in finished product display and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910500262.7A CN110379021B (en) 2019-06-11 2019-06-11 Method and device for constructing entity model in finished product display and computer equipment

Publications (2)

Publication Number Publication Date
CN110379021A CN110379021A (en) 2019-10-25
CN110379021B true CN110379021B (en) 2023-01-24

Family

ID=68250057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910500262.7A Active CN110379021B (en) 2019-06-11 2019-06-11 Method and device for constructing entity model in finished product display and computer equipment

Country Status (1)

Country Link
CN (1) CN110379021B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8447576B2 (en) * 2009-10-23 2013-05-21 Siemens Product Lifecycle Management Software Inc. System and method for producing editable three-dimensional models
CN106407567B (en) * 2016-09-21 2019-10-11 天津百利机械装备研究院有限公司 A kind of RV Parametric Design of Reducer modeling method

Also Published As

Publication number Publication date
CN110379021A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN102272798B (en) A tessellator whose tessellation time grows linearly with the amount of tessellation
CN105069226A (en) Three-dimensional modeling method based on template
CN108986200B (en) Preprocessing method and system for graphic rendering
JPH06223197A (en) Method and apparatus for tesselation of graphic image
CN105787865A (en) Fractal image generation and rendering method based on game engine and CPU parallel processing
US6222553B1 (en) Hybrid subdivision in computer graphics
CN103700134A (en) Three-dimensional vector model real-time shadow deferred shading method based on controllable texture baking
CN114693856B (en) Object generation method and device, computer equipment and storage medium
CN111986303A (en) Fluid rendering method and device, storage medium and terminal equipment
CN114756974A (en) Wall distance calculation method considering object plane normal information
CN110379021B (en) Method and device for constructing entity model in finished product display and computer equipment
CN104615832A (en) Method for generating 3D model brick paving in decorative tile and marble paving scheme
CN1776747A (en) GPU hardware acceleration based body drawing method for medical image
CN105956328B (en) Method for establishing blade model by using high-freedom-degree parametric surface
CN113076571B (en) Real-time simulation editing method and system for three-dimensional clothes
CN104537704A (en) Real-time dynamic generating method for features on bird body model
CN103679794A (en) Drawing method of simulated three-dimensional sketching pencil drawing
CN114139250A (en) Automatic light distribution method, device, equipment and storage medium based on illusion engine
CN113870406A (en) Free-form model making and material pasting method and readable storage medium
CN114139249A (en) Automatic light distribution method and device based on illusion engine and electronic equipment
CN1407511A (en) Tree-dimensional garment developing system
CN104143204A (en) Moving least square two-dimensional character deformation method considering topological structure
CN116664783B (en) Modeling method for complex three-dimensional modeling in webpage environment
KR20030070426A (en) Exact geometry based triangle mesh generating method
Liu et al. A computer aided design method for car form and its application based on shape parameters

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