CN116091677A - Material effect generation method, device and product based on three-dimensional model - Google Patents

Material effect generation method, device and product based on three-dimensional model Download PDF

Info

Publication number
CN116091677A
CN116091677A CN202211447317.0A CN202211447317A CN116091677A CN 116091677 A CN116091677 A CN 116091677A CN 202211447317 A CN202211447317 A CN 202211447317A CN 116091677 A CN116091677 A CN 116091677A
Authority
CN
China
Prior art keywords
component
dimensional model
dimensional
identifier
instrument
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
CN202211447317.0A
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.)
Wuming Technology Hangzhou Co ltd
Original Assignee
Wuming Technology Hangzhou 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 Wuming Technology Hangzhou Co ltd filed Critical Wuming Technology Hangzhou Co ltd
Priority to CN202211447317.0A priority Critical patent/CN116091677A/en
Publication of CN116091677A publication Critical patent/CN116091677A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/04Architectural design, interior design
    • 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

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

Abstract

The application discloses a material effect generation method, device and product based on a three-dimensional model, and relates to the technical field of computers. The method comprises the following steps: acquiring a three-dimensional model, wherein the three-dimensional model comprises at least one component element; under the condition that the three-dimensional model has material display requirements, determining material properties corresponding to the component elements in the three-dimensional model, wherein the material properties are used for determining target material effects corresponding to the component elements; obtaining texture map data corresponding to texture attributes; and displaying the component elements under the effect of the target material in the three-dimensional model based on the material map data. The material display effect corresponding to various component elements in the three-dimensional model can be automatically realized in factory design software, the display diversity of the three-dimensional model is improved, and the material effect generation efficiency of the three-dimensional model is improved.

Description

Material effect generation method, device and product based on three-dimensional model
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a product for generating a material effect based on a three-dimensional model.
Background
Along with the development of intelligent software, in the industrial field, in order to improve the design efficiency of factory buildings, professional factory design software is gradually used to improve the design simulation and emulation of factories. In the existing factory design software, the design process mainly aims at considering the arrangement mode of the contents such as equipment, pipelines and the like in the factory, so that the real performance of a model is not concerned, the model is used for simply expressing the effect in colors, and the colors of the model can only be used for distinguishing different types of parts.
After the plant model is designed, in the construction of the entity plant and the display stage of the plant model, high-fidelity model restoration is required, and the designed plant model cannot be directly applied to display, so that a professional art designer is required to reproduce the model with texture expression in other modeling software.
However, the above method requires high labor resources, and the manufacturing efficiency of the factory model is low.
Disclosure of Invention
The embodiment of the application provides a material effect generation method, device and product based on a three-dimensional model, which can improve the material effect generation efficiency of the three-dimensional model. The technical scheme is as follows:
in one aspect, a method for generating a material effect based on a three-dimensional model is provided, the method comprising:
acquiring a three-dimensional model, wherein the three-dimensional model comprises at least one component element;
determining a material attribute corresponding to the component element in the three-dimensional model under the condition that the three-dimensional model has a material display requirement, wherein the material attribute is used for determining a target material effect corresponding to the component element;
obtaining texture map data corresponding to the texture attributes;
and displaying the component elements under the target material effect in the three-dimensional model based on the material map data.
In another aspect, a device for generating a material effect based on a three-dimensional model is provided, the device comprising:
an acquisition module for acquiring a three-dimensional model, wherein the three-dimensional model comprises at least one component element;
the determining module is used for determining material properties corresponding to the component elements in the three-dimensional model under the condition that the three-dimensional model has material display requirements, and the material properties are used for determining target material effects corresponding to the component elements;
the acquisition module is further used for acquiring texture map data corresponding to the texture attributes;
and the display module is used for displaying the component elements under the target material effect in the three-dimensional model based on the material map data.
In another aspect, a computer device is provided, where the terminal includes a processor and a memory, where the memory stores at least one instruction, at least one section of program, a code set, or an instruction set, where the at least one instruction, the at least one section of program, the code set, or the instruction set is loaded and executed by the processor to implement a three-dimensional model-based material effect generating method according to any one of the embodiments of the present application.
In another aspect, a computer readable storage medium is provided, where at least one program code is stored, where the program code is loaded and executed by a processor to implement a three-dimensional model-based material effect generating method according to any one of the embodiments of the present application.
In another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the three-dimensional model-based texture effect generation method according to any one of the above embodiments.
The technical scheme provided by the application at least comprises the following beneficial effects:
in the design process of the model for realizing the digitization, when the material display requirement exists in the three-dimensional model, determining the material attribute corresponding to the part element in the three-dimensional model, acquiring corresponding material map data according to the material attribute, and rendering and displaying the part element in the three-dimensional model based on the material map data. Namely, the material display effect corresponding to various component elements in the three-dimensional model can be automatically realized in model design software, the display diversity of the three-dimensional model is improved, and the material effect generation efficiency of the three-dimensional model is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of an electronic device provided in an exemplary embodiment of the present application;
FIG. 2 is a schematic illustration of an implementation environment provided by an exemplary embodiment of the present application;
FIG. 3 is a flowchart of a three-dimensional model-based material effect generation method according to an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of rendering of materials corresponding to component elements provided in an exemplary embodiment of the present application;
FIG. 5 is a flowchart of a three-dimensional model-based material effect generation method according to an exemplary embodiment of the present application;
FIG. 6 is a flowchart of a three-dimensional model-based material effect generation method according to an exemplary embodiment of the present application;
FIG. 7 is a schematic illustration of an adjustment based on collision detection results provided in accordance with an exemplary embodiment of the present application;
FIG. 8 is a schematic diagram of generating a three-dimensional model through a pipeline meter flow diagram provided in one exemplary embodiment of the present application;
FIG. 9 is a block diagram of a three-dimensional model-based material effect generation apparatus according to an exemplary embodiment of the present application;
fig. 10 is a block diagram of a terminal according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, the terms involved in the embodiments of the present application will be briefly described:
three-dimensional factory design software: the factory is a collection of a large number of elements such as building structures, pipelines, electricity, equipment and the like, the three-dimensional factory design software can be used for efficiently designing and managing the elements of the factory, and along with the forever pursuit of resource saving and efficiency improvement in modern society, the requirement on the three-dimensional factory design software is necessarily stronger and stronger. Common factory design software includes CADworx, autoCAD, etc.
Fig. 1 shows a block diagram of an electronic device according to an exemplary embodiment of the present application. The electronic device 100 includes: an operating system 120 and application programs 122.
Operating system 120 is the underlying software that provides applications 122 with secure access to computer hardware.
The application 122 is a program supporting the factory design functions. In some embodiments, the application 122 described above may be implemented as a model design application capable of providing the design, simulation, and emulation functions of a three-dimensional model. The model design application can be a single-machine type application program or a network online type application program.
In some embodiments, when the model design application is implemented as a standalone application, the implementation environment of the embodiments of the application includes a terminal device. Optionally, the terminal device includes devices in various forms such as a mobile phone, a tablet computer, a desktop computer, a portable notebook computer, an intelligent household appliance, a vehicle-mounted terminal, and the like.
Illustratively, a user runs a model design application through a terminal device, and the user can design a three-dimensional model in the model design application. When the three-dimensional model has a material display requirement, the model design application determines the component elements which need to be subjected to material rendering in the three-dimensional model, determines the material attributes corresponding to the component elements, acquires the material map data corresponding to the material attributes from a local storage area, and displays the component elements subjected to material rendering in the three-dimensional model according to the material map data.
In other embodiments, when the model design application is implemented as a web-online version of an application program, an implementation environment of an embodiment of the present application is shown in fig. 2, where a computer system in the implementation environment includes: the terminal device 210, the server 220 and the communication network 230, wherein the terminal device 210 and the server 220 are connected through the communication network 230.
The server 220 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud security, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), basic cloud computing services such as big data and artificial intelligence platforms, and the like.
Cloud Technology (Cloud Technology) refers to a hosting Technology that unifies serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
In some embodiments, the server 220 described above may also be implemented as a node in a blockchain system. Blockchain (Blockchain) is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like.
In one example, when there is a material display requirement for the model design application running in the terminal device 210, the model design application determines a component element that needs to be rendered in the three-dimensional model, determines a material attribute corresponding to the component element, sends a data acquisition request to the server 220 according to the material attribute, the server 220 acquires, according to the data acquisition request, material map data corresponding to the material attribute from a database, sends the material map data to the terminal device 210, and the model design application in the terminal device 210 displays the component element after the material rendering in the three-dimensional model according to the material map data.
In another example, the plant design software may be implemented as a cloud application, that is, when there is a material display requirement, the server 220 as a cloud server obtains the material attribute of the three-dimensional model of the cloud, obtains the texture map data according to the material attribute, performs rendering through the installed cloud engine, and transmits the rendered virtual scene picture including the three-dimensional model to the terminal device 210 as a data stream, where the terminal device 210 performs picture display according to the data stream.
Or after the first terminal in the terminal device 210 performs three-dimensional model design through the factory design software, the exported model file is uploaded to the cloud server 220, when the second terminal needs to preview the three-dimensional model, the cloud engine in the server 220 generates the three-dimensional model with the material rendering effect according to the model file, and transmits the corresponding virtual scene picture as a data stream to the second terminal, and the second terminal performs picture display according to the data stream.
Referring to fig. 3, a flowchart of a three-dimensional model-based material effect generation method according to an embodiment of the present application is shown, alternatively, the three-dimensional model may be implemented as a three-dimensional factory model, a three-dimensional office building model, a three-dimensional residence model, a three-dimensional campus model, or a virtual building model including component elements, where in the embodiment of the present application, a three-dimensional model is implemented as a three-dimensional factory model by way of example in the method, and the method includes:
in step 310, a three-dimensional model is obtained, the three-dimensional model including at least one component element.
Alternatively, the three-dimensional model may be designed by a user through design software; alternatively, the three-dimensional model may be automatically generated from a model configuration file in a specified format; alternatively, the three-dimensional model may be read from a storage area, and is not limited thereto.
In some embodiments, when the three-dimensional model is implemented as a three-dimensional plant model, the component elements may include equipment components in the three-dimensional model, where the equipment components include equipment in a plant of virtual instrumentation, virtual pipes, virtual elements, and the like. Optionally, the component elements may further include building components corresponding to the three-dimensional model, where the building components include a virtual ground, a virtual wall, a virtual roof, a virtual window, a virtual door, and the like.
Step 320, determining the material attribute corresponding to the element in the three-dimensional model under the condition that the three-dimensional model has the material display requirement.
The material attribute is used for determining a target material effect corresponding to the component element.
Illustratively, the component elements may be configured with material effects of different material types, which may optionally include at least one of a plastic type, an iron type, an aluminum alloy type, a concrete type, a rubber type, and the like.
Alternatively, the target material effect may be a material effect corresponding to one material type, or may be a material effect obtained by combining multiple material types, which is not limited herein.
In some embodiments, multiple material effects may be corresponding to the same material type, and in one example, corresponding material effects under different years may be configured for the same material type, so as to represent effects of the part element in the three-dimensional model under different service lives.
Optionally, the material display requirement may be implemented as at least one of:
first, the display requirements of the three-dimensional model. That is, when the plant design software needs to display the three-dimensional model in the virtual scene, the material rendering is automatically performed on the component elements in the process of displaying the three-dimensional model.
Second, the display requirements for the material effect. Illustratively, when the three-dimensional model is displayed by the factory design software, displaying the material effect is turned off by default, a material effect display control is provided in the model display interface, the trigger operation is received by the material effect display control, the display requirement of the material effect of the current three-dimensional model is determined, and the material of the component elements in the three-dimensional model is rendered by the factory design software.
Thirdly, when the equipment capacity of the terminal equipment meets the material rendering requirement, determining that a material display requirement exists. Schematically, the factory design software obtains the equipment capability of the current terminal equipment, determines whether the terminal equipment meets the material rendering requirement according to the equipment capability, if so, determines that the material display requirement exists, and if not, determines that the material display requirement does not exist.
Alternatively, the device capabilities may include at least one of a processing resource occupation of a central processing unit (Central Processing Unit, CPU) of the terminal device, a processing resource occupation of a graphics processor (Graphics Processing Unit, GPU), a CPU/GPU model, a running memory occupation, and the like.
In one example, in response to determining that an amount of idle processing resources corresponding to a GPU of the terminal device meets a preset amount of demand, determining that device capabilities of the terminal device meet a material rendering demand, and determining that the three-dimensional model has a material display demand.
Optionally, the material attribute corresponding to the element in the three-dimensional model may be read from the model configuration file; alternatively, the material properties of the element parts may be user-defined, and are not limited herein.
In step 330, texture map data corresponding to the texture attributes is obtained.
In this embodiment, the factory design software provides a preset texture library, and texture map data corresponding to various texture effects is stored in the preset texture library.
In some embodiments, by manually designing the texture map, the computer device generates texture map data according to a correspondence between the texture map and the texture identifier, and stores the texture map data in a preset texture library corresponding to the factory design software.
In some embodiments, the texture attribute of the lesion includes a texture identifier corresponding to the target texture effect, and then the texture identifier is determined from the texture attribute, and texture map data is obtained from a preset texture library based on the texture identifier. Namely, the material identification and the material map data are correspondingly stored in the preset material library.
In one example, in a preset texture library, a texture identifier is used as a query Key (Key), texture map data is used as a result Value (Value), and corresponding texture map data can be queried according to the determined texture identifier.
In another example, the texture identifier is used as a query Key (Key), the storage address of the texture map data is used as a result Value (Value), and after the storage address corresponding to the texture map data is determined according to the texture identifier, the texture map data is read through the storage address.
Optionally, the preset material library may be stored in a local storage area of the terminal device, or may be stored in a server, and obtained by a data obtaining instruction sent by the terminal device to the server.
Step 340, displaying the component elements under the target texture effect in the three-dimensional model based on the texture map data.
In some embodiments, the model design application is provided with a model display interface, and the model design application displays a virtual scene in the model display interface, wherein the virtual scene comprises a three-dimensional model supported by at least one component element, and the three-dimensional model displays the component element under the effect of the target material.
In some embodiments, the material attribute further includes a component identifier and a component type identifier corresponding to the component element. Wherein the component identification is used to uniquely identify the component elements in the three-dimensional model, i.e. each component element corresponds to a unique component identification in the three-dimensional model. The component type identifier is used for indicating a component type corresponding to the component element, for example, if the component element is a virtual compressor, the component type identifier of the component element is an identifier corresponding to the virtual compressor.
Illustratively, since the above-described component identifier is used to uniquely identify a component element in the three-dimensional model, a position corresponding to the component element can be determined from the component identifier, that is, a target position of the component element in the three-dimensional model can be determined based on the component identifier. In one example, a component identifier corresponding to a component element is determined from a material attribute, and a target location corresponding to the component element is queried in a component location configuration file corresponding to the three-dimensional model according to the component identifier.
Illustratively, since the above-described component type identifier is used to indicate the component type to which the component element corresponds, the target element shape to which the component element corresponds can be determined from the component type identifier, that is, the target element shape to which the component element corresponds can be determined based on the component type identifier. In one example, a component type identifier corresponding to a component element is determined from a material attribute, and a target element shape corresponding to the component element is obtained from a model material library of a model design application, where the target element shape may be implemented as a component model that is not rendered by the material.
Illustratively, the terminal device renders based on the target element shape and the texture map data to obtain the component elements under the target texture effect, then arranges the component elements under the target texture effect at target positions in the virtual scene, and displays the component elements.
When rendering the material of the component elements in the three-dimensional model, optionally, rendering the material of all the component elements in the three-dimensional model can be realized; or rendering the material of the specified component elements in the three-dimensional model; alternatively, the material rendering is performed on the component elements of the specified component type in the three-dimensional model, and is not particularly limited herein.
Illustratively, converting a component element displayed with a first display effect in the three-dimensional model into a component element displayed with a second display effect based on the texture map data; the first display effect is used for indicating a display style when the component element is not loaded with the target material effect, and the second display effect is used for indicating a display style when the component element is loaded with the target material effect.
In an example, as shown in fig. 4, a schematic diagram of rendering a material corresponding to a component element according to an exemplary embodiment of the present application is shown, where the component element 400 is displayed with a first display effect 410, and after the rendering of the material, is displayed with a second display effect 420.
In some embodiments, after the model display interface renders the material for the component element in the three-dimensional model, the rendering effect of the material may be turned off through a turning-off operation, that is, in response to receiving the turning-off operation for the target material effect, the component element displayed with the second display effect in the three-dimensional model is converted into the component element displayed with the first display effect. Optionally, the closing operation may be implemented through a material effect closing control in the model display interface, or the closing operation may also be implemented through a designated shortcut key trigger, which is not limited herein.
In some embodiments, the model design application may further perform file export on the three-dimensional model, where in a process of exporting a file of the model, the terminal device may automatically configure a material attribute file corresponding to each component element of the three-dimensional model, and after the three-dimensional model is transmitted, the three-dimensional model may also be displayed by selecting material rendering to be turned on/off.
In summary, in the method for generating a texture effect based on a three-dimensional model according to the embodiments of the present application, when a requirement for displaying texture exists in a three-dimensional model in a design process of implementing a digitized three-dimensional model, a texture attribute corresponding to a component element in the three-dimensional model is determined, corresponding texture map data is obtained according to the texture attribute, and rendering and displaying are performed on the component element in the three-dimensional model based on the texture map data. Namely, the material display effect corresponding to various component elements in the three-dimensional model can be automatically realized in the factory design software, the display diversity of the three-dimensional model is improved, and the material effect generation efficiency of the three-dimensional model is improved.
Namely, corresponding material properties are automatically configured for various component elements in a factory scene in the design stage of the three-dimensional model, so that requirements for different view effects in the design stage are met, convenient switching is performed under different display effects, meanwhile, the designed three-dimensional model can be rapidly applied to downstream building and display links, and the manufacturing efficiency of the whole model is improved.
Referring to fig. 5, a flowchart of a method for generating a texture effect based on a three-dimensional model according to an exemplary embodiment of the present application is shown, in this embodiment of the present application, a mode of acquiring texture attributes is schematically illustrated, that is, steps 321a to 323a and steps 321b to 322b are lower steps of step 320 in fig. 3, where a solution indicated by steps 321a to 323a is texture attributes corresponding to each component element in the three-dimensional model in a manner that a user can manually configure in real time, and a solution indicated by steps 321b to 322b is texture attributes that may be preset. The method comprises the following steps:
first implementation:
step 321a, receiving a configuration operation, where the configuration operation is used to configure a texture attribute of a target component element in at least one component element.
Illustratively, the configuration operation includes a material identifier corresponding to the target component element.
In some embodiments, the three-dimensional model is displayed in a model display interface, wherein each component element in the three-dimensional model is a component element that is not configured with a material property.
Illustratively, the model display interface includes a texture configuration control, through which the configuration operation can be implemented.
Optionally, the triggering process of the material configuration control may be at least one of the following:
first, the texture configuration control is displayed in a toolbar corresponding to the model display interface, and after the texture configuration control receives a trigger operation, a candidate texture list is displayed, wherein the candidate texture list comprises a plurality of candidate texture options. When the target material options in the plurality of candidate material options receive the drag operation and the path end point of the drag path corresponding to the drag operation is the target component element, determining to configure a target material effect corresponding to the target material options for the target component element, and determining the material identifier corresponding to the target component element according to the target material options.
Second, the texture configuration control is displayed in an attribute setting area corresponding to the component element. Schematically, when a target component element in the model display interface receives a click operation, an attribute setting area corresponding to the target component element is displayed in the model display interface, a material configuration control corresponding to the target component element is displayed in the attribute setting area, and a material identifier corresponding to the target component element can be indicated through the material configuration control.
In other embodiments, the configuration operation may be triggered by a designated shortcut key, which is not specifically limited herein.
In step 322a, in response to the configuration operation, the component identifier and the component type identifier corresponding to the target component element are obtained.
Illustratively, after receiving a configuration operation, determining a target component element aimed by the configuration operation, and obtaining a component identifier and a component type identifier corresponding to the target component element, where the component identifier is used to uniquely identify the target component element in a three-dimensional model, and the component type identifier is used to indicate a component type corresponding to the target component element.
In step 323a, a texture attribute corresponding to the target component element is generated based on the component identifier, the component type identifier, and the texture identifier.
That is, in one implementation manner of the embodiment of the present application, a user configures a required material effect for a component element in a three-dimensional model in a model design application, for example, for a virtual pipe in the three-dimensional model, the user may select to configure the component element as any one of a plastic material, an alloy material, an aluminum material, a composite material, and the like.
The second implementation mode:
and 321b, obtaining a model identifier corresponding to the three-dimensional model.
In other embodiments, the material properties corresponding to each component element in the three-dimensional model are all preconfigured, so in the embodiments of the present application, when the material properties corresponding to the component element need to be obtained, a model identifier of the three-dimensional model is first obtained, where the model identifier is used to find a configuration file corresponding to the three-dimensional model in the storage area, and the model identifier is uniquely identifying the three-dimensional model.
Step 322b, obtaining a configuration file corresponding to the three-dimensional model based on the model identification.
Illustratively, the configuration file includes material properties corresponding to at least one component element in the three-dimensional model. In one example, as shown in Table one, a configuration file of one exemplary provided three-dimensional model is shown, indicating the model configuration for the three-dimensional model with model identification "123".
List one
Figure BDA0003950885370000111
In summary, in the method for generating a texture effect based on a three-dimensional model according to the embodiments of the present application, when a requirement for displaying texture exists in a three-dimensional model in a design process of implementing a digitized three-dimensional model, a texture attribute corresponding to a component element in the three-dimensional model is determined, corresponding texture map data is obtained according to the texture attribute, and rendering and displaying are performed on the component element in the three-dimensional model based on the texture map data. Namely, the material display effect corresponding to various component elements in the three-dimensional model can be automatically realized in the factory design software, the display diversity of the three-dimensional model is improved, and the material effect generation efficiency of the three-dimensional model is improved.
Referring to fig. 6, a flowchart of a method for generating a material effect based on a three-dimensional model according to an exemplary embodiment of the present application is shown, in this embodiment of the present application, a method for acquiring a three-dimensional model is schematically illustrated, that is, steps 311a to 312a and steps 311b to 316b are lower steps of step 310 in fig. 3, where a solution indicated by steps 311a to 312a is that a user may generate a three-dimensional model through a model configuration file with a specified format, and a solution indicated by steps 311b to 316b is that a user may implement generation of a three-dimensional model through manual arrangement of component elements. The method comprises the following steps:
first implementation:
step 311a, obtaining a pipeline instrument flow chart corresponding to the three-dimensional model.
In the embodiment of the present application, the model configuration file in the above specified format is schematically illustrated by taking a pipeline meter flowchart (Process & Instrumentation Drawing, PID) as an example. Wherein the PID map refers to the system of all equipment, meters, piping, valves and other related utility systems, as described in detail by uniformly specified graphic symbols and literal symbols: the sewage treatment system comprises a sewage conventional treatment, a power generation system, a condensed water heating scheme and a drawing of a central air conditioning system. The PID diagram is developed on the basis of the process design, is an important working link of engineering design, and is a main basis for developing the work of each related specialty in engineering design.
The PID diagram is characterized by that by means of uniformly defined graphic symbols and character codes, all the equipment, instruments, pipelines, valves and main pipe fittings required for building chemical technological equipment are combined according to their respective functions so as to attain the goal of meeting technological requirements and safety and economic goal.
The PID diagram is not only the basis of design and construction, but also part of complete technical data required by various aspects of enterprise management, test operation, maintenance, start-stop and the like. It is also helpful to simplify the data exchange between departments that take on the tasks of development, engineering design, construction, operation, and maintenance of the process device.
Schematically, a PID diagram corresponding to a three-dimensional model to be generated is read, where the PID diagram is used to represent an internal condition of a building that needs to be constructed on site, such as: representing a layout situation between an instrument component and a pipeline in a plant, wherein the instrument component is marked with first attribute data, the pipeline is marked with second attribute data, the first attribute data is used for describing a three-dimensional form of the instrument component, and the second attribute data is used for describing a corresponding three-dimensional form of the pipeline, namely, a three-dimensional instrument element and a three-dimensional pipeline element are included in at least one component element in a three-dimensional model generated through a PID diagram.
In one example, the above-mentioned plant may be implemented as a sewage treatment plant, and the design contents of the PID map are used to represent the internal conditions of the sewage treatment plant to be constructed, including the instrument components in the plant, the respective position conditions of the instrument components, and the layout conditions between pipelines. Wherein the pipeline layout is designed based on basic attribute information among instrument components and also based on positional relationships.
It should be noted that the PID diagram may include any number of instrument components and pipelines, any two instrument components may be connected by a pipeline, the manner of connecting the instrument components by a pipeline may be arbitrary, and the pipeline layout situation is designed based on basic attribute information and positional relationship between the instrument components, that is, the pipeline layout situation may be arbitrary, which is not limited in this embodiment.
At step 312a, a three-dimensional model is automatically generated and displayed in the virtual scene based on the pipeline meter flow diagram.
Illustratively, when generating a three-dimensional model from the PID map, the PID map is mapped three-dimensionally to generate the three-dimensional model.
Illustratively, the instrument component in the PID map corresponds to first attribute data describing the three-dimensional morphology of the instrument component, the first attribute data including, but not limited to, at least one of the following information: the material of the instrument component, the name of the instrument component, the model of the instrument component, the specification parameters of the instrument component, and the like.
Illustratively, the pipeline corresponds to second attribute data describing a three-dimensional morphology of the pipeline, the second attribute data including, but not limited to, at least one of the following information: diameter of the pipeline, length of the pipeline, material of the pipeline, and the like.
In some embodiments, the PID map further includes third attribute data corresponding to the component part, where the third attribute data is used to describe a three-dimensional form of the component part, and the third attribute data includes, but is not limited to, at least one of the following information: the material of the element, the name of the element, the model of the element, the specification parameters of the element, etc.
In some embodiments, the process of generating a three-dimensional model from a PID map can be implemented as:
s1, generating a three-dimensional instrument arrangement model corresponding to the instrument component based on the first attribute data.
Wherein, the three-dimensional instrument arrangement model comprises the arrangement effect of three-dimensional instrument elements.
In the three-dimensional instrument arrangement model, the arrangement effect of the three-dimensional instrument elements is obtained based on the position of the instrument part in the PID diagram and the first attribute data of the instrument part, and mainly the conversion of the instrument part from two dimensions to three dimensions is realized.
Optionally, based on the position of the instrument component in the PID map and the first attribute data, two manners of generating the three-dimensional instrument arrangement model are as follows: 1. automatically generating a three-dimensional instrument arrangement model corresponding to the pipeline instrument flow chart; 2. and receiving related instructions for operation, and generating a specified three-dimensional instrument arrangement model corresponding to the pipeline instrument flow chart.
Optionally, automatically generating the three-dimensional instrument arrangement model corresponding to the PID map includes the steps of: s11, generating a corresponding three-dimensional instrument arrangement model based on the size of the pipeline instrument flow chart; s12, displaying a three-dimensional instrument arrangement model; s13, displaying three-dimensional instrument elements in the three-dimensional instrument arrangement model based on the positions of instrument components in the pipeline instrument flow chart and the first attribute data.
In one example, the PID map is a two-dimensional drawing with dimensions 15 x 12. The PID diagram has a length of 15 units and a width of 12 units. And carrying out three-dimensional mapping on the PID diagram to generate a three-dimensional instrument arrangement model, wherein the corresponding three-dimensional numerical value is 15-12-8. The three-dimensional instrument arrangement model is 15 units long, 12 units wide and 8 units high.
In one example, a planar rectangular coordinate system is established with the center point of the PID map as the origin (0, 0), and the planar rectangular coordinate system includes a horizontal axis (X-axis) and a vertical axis (Y-axis). Each instrument part in the PID diagram has a coordinate, and the coordinate of the instrument part corresponds to a plane rectangular coordinate system and is generated based on the position of the instrument part in the PID diagram so as to represent the distribution condition of each instrument part in the PID diagram.
The PID diagram comprises a first instrument part, a second instrument part and a first pipeline, wherein the first instrument part and the second instrument part are connected through the first pipeline. The first instrument part has coordinates (2, 2) in the coordinate system, and the coordinates represent that the distance between the first instrument part and the origin (0, 0) is 2 units long in the positive direction of the horizontal axis and 2 units long in the positive direction of the vertical axis. The coordinates of the second instrument part in the coordinate system are (-2, -2), which means that the distance between the second instrument part and the origin (0, 0) is 2 units of length in the negative direction of the horizontal axis and 2 units of length in the negative direction of the vertical axis. The first attribute data of the first instrument component comprises a material type, a name, a model and a specification parameter of the first instrument component; the first attribute data of the second instrument component includes a material class, a name, a model, and a specification parameter of the second instrument component. Based on the above information, three-dimensional instrument elements having the same three-dimensional morphology as the first instrument part and the second instrument part are displayed in the three-dimensional instrument arrangement model.
In some embodiments, after the three-dimensional instrument arrangement model is generated based on the above steps, the three-dimensional instrument arrangement model is displayed on a terminal screen.
It should be noted that the three-dimensional instrument arrangement result included in the three-dimensional instrument arrangement model may be arbitrary, and the manner of generating the three-dimensional instrument arrangement model by performing three-dimensional mapping on the PID map includes, but is not limited to, one of the two manners; when the three-dimensional instrument arrangement model is generated automatically, the three steps are included but not limited to; this embodiment is not limited thereto.
It should be noted that the size corresponding value of the PID map may be arbitrary, and the unit length of the PID map may be arbitrary; the PID map is mapped in three dimensions, and a three-dimensional instrument arrangement model is generated, where the three-dimensional numerical value corresponding to the three-dimensional instrument arrangement model may be arbitrary, and the unit length may be arbitrary.
It should be noted that, when the PID map is mapped in three dimensions to generate a three-dimensional instrument layout model, other manners other than the manner of establishing a plane rectangular coordinate system and generating position coordinates for instrument components in the pipeline instrument flow chart may be used; if a manner of establishing a planar rectangular coordinate system is used, the coordinates of each instrument component in the PID map may be arbitrary, and the unit length of the coordinates may be arbitrary, which is not limited in this embodiment.
It should be noted that the instrument component in the PID map is labeled with first attribute data, which may include any kind of data type for describing the three-dimensional morphology of the instrument component; the pipeline in the PID diagram is marked with second attribute data, and the second attribute data can comprise any kind of data type and is used for describing the three-dimensional form corresponding to the pipeline; the PID diagram can comprise any number of instrument parts and pipelines, any two instrument parts can be connected through pipelines, the mode of connecting the instrument parts through the pipelines can be arbitrary, and the pipeline layout situation is designed based on basic attribute information among the instrument parts and also based on the position relation, namely the pipeline layout situation can be arbitrary; this embodiment is not limited thereto.
S2, generating three-dimensional pipeline elements among the three-dimensional instrument elements based on pipe orifice configuration data of the three-dimensional instrument elements in the three-dimensional instrument arrangement model and second attribute data corresponding to the pipelines in the PID diagram, wherein the three-dimensional pipeline elements are used for conducting pipeline connection among the three-dimensional instrument elements, and the three-dimensional instrument elements and the three-dimensional pipeline elements form the three-dimensional model.
Wherein the three-dimensional tubing element is used to make tubing connections between three-dimensional instrument components. The nozzle configuration data includes a nozzle orientation and a nozzle height of the three-dimensional instrument assembly, and the three-dimensional pipe elements between the three-dimensional instrument assemblies are automatically generated based on the nozzle orientation and the nozzle height of the three-dimensional instrument assembly and the second attribute data.
Optionally, the PID map includes a first instrument component and a second instrument component, where the first instrument component and the second instrument component are connected by a first pipeline, the first pipeline is a straight line, and the second attribute data of the first pipeline includes a diameter, a length, and a material of the first pipeline.
The first three-dimensional instrument component and the second three-dimensional instrument component are correspondingly arranged in the three-dimensional instrument arrangement model and are connected through a first pipeline, the first pipeline is generated based on the pipe opening direction of the three-dimensional instrument component, the pipe opening height and second attribute data of the first pipeline, and the first pipeline is located in the three-dimensional pipeline element.
Illustratively, the position relations among the component elements are recorded in the PID diagram, and because the PID diagram is a two-dimensional plan diagram, when the three-dimensional model is generated according to the PID diagram, the model design application can arrange the component models corresponding to the component elements in the three-dimensional model according to the position relations among the component elements in the PID diagram in addition to acquiring the corresponding component models according to the attribute data corresponding to the component elements.
In some embodiments, in the process of arranging the component models corresponding to the component elements, mapping positions corresponding to the component elements in the PID diagram onto a designated plane in the three-dimensional scene, performing collision detection on the component models of the mapped component elements, determining corresponding collision detection results, and adaptively adjusting longitudinal relations between the component models based on the collision detection results, so as to generate the three-dimensional model.
Illustratively, in generating the three-dimensional pipe element, a collision detection result is obtained in response to a collision detection operation. And performing arrangement adjustment processing on the second pipeline based on the priority of the first pipeline and the priority of the second pipeline in the case that the collision detection result indicates that a collision phenomenon exists between the first pipeline and the second pipeline. And displaying the adjusted three-dimensional pipeline elements in response to the arrangement adjustment process. And in response to no collision phenomenon between the pipelines, directly displaying the three-dimensional pipeline elements.
In some embodiments, in the event of a collision between the first pipe and the second pipe, when the priority of the first pipe is higher than the priority of the second pipe, the arrangement adjustment process includes a shift-up process and a sink process.
In some embodiments, the sum of the lengths of each pipe may be considered in addition to processing based on their respective priorities. In order to save materials, in practical situations, the smaller the sum of the lengths of the pipelines is, the stronger the beneficial effect brought by the PID diagram is.
In some embodiments, when the priority of the first pipe and the priority of the second pipe are the same, the pipe length that needs to be increased for performing the arrangement adjustment processing on the first pipe and the pipe length that needs to be increased for performing the arrangement adjustment processing on the second pipe may be considered respectively, so that the effect that the total length of the pipes is minimized while no collision occurs between the first pipe and the second pipe.
For example, please refer to fig. 7, which illustrates a schematic diagram of adjustment according to the collision detection result provided in an exemplary embodiment of the present application, when it is detected that there is a collision between the first pipe 710 and the second pipe 720 in the above specified plane, the plane in which the center of the first pipe 710 is located is adjusted, so as to avoid the collision with the second pipe 720.
In one example, as shown in FIG. 8, a schematic diagram of generating a three-dimensional model 820 through a pipeline meter flow diagram 810 provided by an exemplary embodiment of the present application is shown.
In some embodiments, pipeline data is generated based on three-dimensional pipeline elements, wherein the pipeline data is used to assist in the acquisition of physical material of the pipeline, and pipeline material required at construction is acquired based on and in actual condition adjusting the pipeline data.
Optionally, based on the three-dimensional pipe elements, data of the solid material is generated according to preset proportion, including but not limited to data of size, volume, material, bending degree, shape and the like of the solid pipe.
Optionally, the solid material corresponding to the first pipeline is generated based on the three-dimensional pipeline element, and is a cylindrical pipeline with the diameter of 10 cm and the length of 20 cm, and the solid material is plastic.
It is noted that the type of the pipeline data generated based on the three-dimensional pipeline element may be arbitrary, including but not limited to at least one of size, volume, material, bending degree, shape, etc., and the manner of generating the pipeline data based on the three-dimensional pipeline element may be arbitrary; if the data of the solid material is generated according to the preset proportion, the preset proportion can be arbitrary; the pipeline data may be adjusted and then used as a basis for obtaining the physical material, or the pipeline data may be directly used as a basis for obtaining the physical material, which is not limited in this embodiment.
The second implementation mode:
step 311b, in response to receiving a selection operation of a component element from the plurality of candidate component elements, determining a component type identifier corresponding to the component element.
Illustratively, the component type identifier is used to indicate the component type to which the component element corresponds.
In the embodiment of the application, the user can design and complete the three-dimensional model through the factory design function provided by the model design application. Illustratively, the user may receive the selection operation through a model design interface provided by a model design application, where the model design interface and the model presentation interface may be implemented as the same interface, or may be implemented as two interfaces independent of each other, which is not limited herein.
In some embodiments, a list of part elements is provided in the model design interface, where the list of part elements includes candidate part elements that a user may select to place in the three-dimensional model. Illustratively, in response to receiving a selection operation for a specified part element in the part element list, the selected specified part element is determined to be the part element to be configured into the three-dimensional model.
Illustratively, when a user selects a specified part element from the candidate part elements, the factory design software records the part type of the currently-to-be-configured part element by the part type identification.
Step 312b, in response to receiving the layout operation on the part element, determines positional information of the part element in the three-dimensional model.
Alternatively, the layout operation described above may be implemented as at least one of the following:
first, after a user selects a designated component element from a component element list, a drag operation is performed on the designated component element, the designated component element is dragged into a virtual scene where a three-dimensional model is located, and the layout position of the designated component element in the three-dimensional model is determined according to a path end point of a drag path corresponding to the drag operation, so that the position information of the designated component element in the three-dimensional model is determined.
Second, after the user selects the specified component element in the component element list, a click operation is specified at the specified position in the virtual scene, and the factory design software generates the component model corresponding to the specified component element at the specified position in the virtual scene, and at the same time, records the position information of the specified component element in the three-dimensional model.
Thirdly, candidate component elements in the component element list are respectively bound with a keyboard input shortcut key, when the terminal equipment receives the keyboard input shortcut key, the terminal equipment generates a designated component element bound with the keyboard input shortcut key according to the position of a mouse cursor in a virtual scene, and meanwhile, the model design application records the position information of the designated component element in the three-dimensional model.
Fourth, after selecting a specified component element from the component element list, the user inputs the three-dimensional coordinates of the specified component element in the virtual scene, and determines the position information of the specified component element in the three-dimensional model according to the three-dimensional coordinates.
Step 313b, generating a component identifier corresponding to the component element.
When a user configures a specified component element in the three-dimensional model, the plant design software generates a component identifier corresponding to the specified component element, where the component identifier is used to uniquely identify the component element in the three-dimensional model.
Step 314b, obtaining the material identifier corresponding to the component element based on the component type identifier.
In this embodiment of the present application, the component elements of different component types correspond to pre-configured material types, and different material types or combinations of different material types correspond to different material effects, which is schematically indicated that, when a specified component element is selected and laid out in a three-dimensional model, the model design application may determine the corresponding material effect according to the component type selected by the user, so as to determine the material identifier.
In other embodiments, the material identifier corresponding to the component element may be manually set by the user after the layout of the component element, which is not specifically limited herein.
Step 315b, generating a texture attribute corresponding to the component element based on the component type identifier, the component identifier, and the texture identifier.
Illustratively, the model design application generates material properties corresponding to the part elements in the three-dimensional model according to the part type identifier, the part identifier and the material identifier, so as to be used for the material rendering process of the part elements.
Step 316b, generating component elements in the virtual scene based on the component type identification and the location information, the component elements being used to compose a three-dimensional model.
That is, when a component model corresponding to a component element is determined according to the component type identification, and position information determined according to the layout operation, the corresponding component element can be generated and displayed in the virtual scene.
In some embodiments, when the three-dimensional model in the virtual scene is configured by the component elements, in addition to the equipment component and the building component, a virtual light source, a virtual job object, and the like may be configured in the virtual scene, which is not limited herein.
In summary, in the method for generating a texture effect based on a three-dimensional model according to the embodiments of the present application, when a requirement for displaying texture exists in a three-dimensional model in a design process of implementing a digitized three-dimensional model, a texture attribute corresponding to a component element in the three-dimensional model is determined, corresponding texture map data is obtained according to the texture attribute, and rendering and displaying are performed on the component element in the three-dimensional model based on the texture map data. Namely, the material display effect corresponding to various component elements in the three-dimensional model can be automatically realized in the factory design software, the display diversity of the three-dimensional model is improved, and the material effect generation efficiency of the three-dimensional model is improved.
Referring to fig. 9, a block diagram of a three-dimensional model-based material effect generating apparatus according to an exemplary embodiment of the present application is shown, where the apparatus includes the following modules:
an acquisition module 910 for acquiring a three-dimensional model, the three-dimensional model including at least one component element therein;
a determining module 920, configured to determine a material attribute corresponding to the component element in the three-dimensional model when a material display requirement exists in the three-dimensional model, where the material attribute is used to determine a target material effect corresponding to the component element;
the obtaining module 910 is further configured to obtain texture map data corresponding to the texture attribute;
a display module 930, configured to display the component element under the target texture effect in the three-dimensional model based on the texture map data.
In some optional embodiments, the texture attribute includes a texture identifier corresponding to the target texture effect;
the determining module 920 is further configured to determine the material identifier from the material attribute;
the obtaining module 910 is further configured to obtain the texture map data from a preset texture library based on the texture identifier.
In some optional embodiments, the material attribute further includes a component identifier and a component type identifier corresponding to the component element, where the component identifier is used to uniquely identify the component element in the three-dimensional model, and the component type identifier is used to indicate a component type corresponding to the component element;
The determining module 920 is further configured to determine a target location of the component element in the three-dimensional model based on the component identifier;
the determining module 920 is further configured to determine a target element shape corresponding to the component element based on the component type identifier;
the determining module 920 is further configured to render, based on the target element shape and the texture map data, a component element under the target texture effect;
the display module 930 is further configured to arrange the component elements under the target material effect at the target position, and display the component elements.
In some alternative embodiments, the apparatus further comprises:
a receiving module (not shown in the figure) configured to receive a configuration operation, where the configuration operation is configured to perform material attribute configuration on a target component element in the at least one component element, and the configuration operation includes a material identifier corresponding to the target component element;
the obtaining module 910 is further configured to obtain, in response to the configuration operation, a component identifier and a component type identifier corresponding to the target component element, where the component identifier is used to uniquely identify the target component element in the three-dimensional model, and the component type identifier is used to indicate a component type corresponding to the target component element;
A generating module (not shown in the figure) is configured to generate the texture attribute corresponding to the target component element based on the component identifier, the component type identifier, and the texture identifier.
In some optional embodiments, the obtaining module 910 is further configured to obtain a model identifier corresponding to the three-dimensional model;
the obtaining module 910 is further configured to obtain a configuration file corresponding to the three-dimensional model based on the model identifier, where the configuration file includes material properties corresponding to the at least one component element in the three-dimensional model respectively.
In some alternative embodiments, the at least one component element comprises a three-dimensional instrument element and a three-dimensional conduit element;
the obtaining module 910 is further configured to obtain a pipeline instrument flow chart corresponding to the three-dimensional model, where the pipeline instrument flow chart is used to represent a layout situation between an instrument component and a pipeline, the instrument component is labeled with first attribute data, the pipeline is labeled with second attribute data, the first attribute data is used to describe a three-dimensional form of the instrument component, and the second attribute data is used to describe a three-dimensional form corresponding to the pipeline;
the generating module is further configured to generate a three-dimensional instrument arrangement model corresponding to the instrument component based on the first attribute data, where the three-dimensional instrument arrangement model includes an arrangement effect of the three-dimensional instrument elements;
The generating module is further configured to generate three-dimensional pipeline elements between the three-dimensional instrument elements based on pipe orifice configuration data of the three-dimensional instrument elements in the three-dimensional instrument arrangement model and second attribute data corresponding to the pipelines in the pipeline instrument flow chart, where the three-dimensional pipeline elements are used for performing pipeline connection between the three-dimensional instrument elements, and the three-dimensional instrument elements and the three-dimensional pipeline elements form the three-dimensional model.
In some optional embodiments, the determining module 920 is further configured to determine, in response to receiving a selection operation of the part element from a plurality of candidate part elements, a part type identifier corresponding to the part element, where the part type identifier is used to indicate a part type corresponding to the part element;
the determining module 920 is further configured to determine, in response to receiving a layout operation on the part element, location information of the part element in the three-dimensional model;
the generating module is further configured to generate a component identifier corresponding to the component element, where the component identifier is used to uniquely identify the component element in the three-dimensional model;
The obtaining module 910 is further configured to obtain a material identifier corresponding to the component element based on the component type identifier;
the generating module is further configured to generate a material attribute corresponding to the component element based on the component type identifier, the component identifier, and the material identifier;
the generating module is further configured to generate the component element in a virtual scene based on the component type identifier and the location information, where the component element is used to compose the three-dimensional model.
In some optional embodiments, the display module 930 is further configured to convert the component element displayed with the first display effect into the component element displayed with the second display effect in the three-dimensional model based on the texture map data; the first display effect is used for indicating a display style when the component element does not load the target material effect, and the second display effect is used for indicating a display style when the component element loads the target material effect;
in some alternative embodiments, the component element displayed in the second display effect in the three-dimensional model is converted to the component element displayed in the first display effect in response to receiving a closing operation on the target material effect.
In summary, in the device for generating a material effect based on a three-dimensional model according to the embodiments of the present application, when a material display requirement exists in a three-dimensional model in a design process of implementing a digitized three-dimensional model, material attributes corresponding to part elements in the three-dimensional model are determined, corresponding material map data is obtained according to the material attributes, and rendering and displaying are performed on the part elements in the three-dimensional model based on the material map data. Namely, the material display effect corresponding to various component elements in the three-dimensional model can be automatically realized in the factory design software, the display diversity of the three-dimensional model is improved, and the material effect generation efficiency of the three-dimensional model is improved.
It should be noted that: the three-dimensional model-based material effect generating device provided in the above embodiment is only exemplified by the division of the above functional modules, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the three-dimensional model-based material effect generating device and the three-dimensional model-based material effect generating method provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 10 shows a block diagram of a terminal 1000 according to an exemplary embodiment of the present application. The terminal 1000 may be: a smart phone, a tablet computer, a dynamic video expert compression standard audio layer 3 player (Moving Picture Experts Group Audio Layer III, MP 3), a dynamic video expert compression standard audio layer 4 (Moving Picture Experts Group Audio Layer IV, MP 4) player, a notebook computer, or a desktop computer. Terminal 1000 can also be referred to by other names of user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, terminal 1000 can include: a processor 1001 and a memory 1002.
The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1001 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1001 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a central processor (Central Processing Unit, CPU), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with an image processor (Graphics Processing Unit, GPU) for use in the rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 1001 may also include an artificial intelligence (Artificial Intelligence, AI) processor for processing computing operations related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. Memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1002 is configured to store at least one instruction for execution by processor 1001 to implement the three-dimensional model-based material effect generation method provided by the method embodiments herein.
Terminal 1000 can also illustratively include other components, and it will be understood by those skilled in the art that the structure shown in FIG. 10 is not limiting of terminal 1000, and can include more or fewer components than shown, or can combine certain components, or employ a different arrangement of components.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing related hardware, and the program may be stored in a computer readable storage medium, which may be a computer readable storage medium included in the memory of the above embodiments; or may be a computer-readable storage medium, alone, that is not incorporated into the terminal. The computer readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, where the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the three-dimensional model-based material effect generation method according to any one of the above embodiments.
Alternatively, the computer-readable storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), solid state disk (SSD, solid State Drives), or optical disk, etc. The random access memory may include resistive random access memory (ReRAM, resistance Random Access Memory) and dynamic random access memory (DRAM, dynamic Random Access Memory), among others. The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments is merely exemplary in nature and is in no way intended to limit the invention, since it is intended that all modifications, equivalents, improvements, etc. that fall within the spirit and scope of the invention.

Claims (10)

1. A method for generating a material effect based on a three-dimensional model, the method comprising:
Acquiring a three-dimensional model, wherein the three-dimensional model comprises at least one component element;
determining a material attribute corresponding to the component element in the three-dimensional model under the condition that the three-dimensional model has a material display requirement, wherein the material attribute is used for determining a target material effect corresponding to the component element;
obtaining texture map data corresponding to the texture attributes;
and displaying the component elements under the target material effect in the three-dimensional model based on the material map data.
2. The method according to claim 1, wherein the texture attribute includes a texture identifier corresponding to the target texture effect;
the obtaining texture map data corresponding to the texture attribute includes:
determining the material identifier from the material attribute;
and acquiring the texture mapping data from a preset texture library based on the texture identifier.
3. The method according to claim 2, wherein the material attribute further comprises a component identifier and a component type identifier corresponding to the component element, the component identifier is used for uniquely identifying the component element in the three-dimensional model, and the component type identifier is used for indicating a component type corresponding to the component element;
The displaying the component element under the target material effect in the three-dimensional model based on the material map data comprises the following steps:
determining a target position of the component element in the three-dimensional model based on the component identification;
determining a target element shape corresponding to the component element based on the component type identifier;
rendering based on the target element shape and the texture map data to obtain a component element under the target texture effect;
and arranging the component elements under the effect of the target material at the target position, and displaying the component elements.
4. A method according to any one of claims 1 to 3, wherein determining the material properties corresponding to the component elements in the three-dimensional model comprises:
receiving a configuration operation, wherein the configuration operation is used for configuring the material attribute of a target component element in the at least one component element, and the configuration operation comprises a material identifier corresponding to the target component element;
responding to the configuration operation, acquiring a component identifier and a component type identifier corresponding to the target component element, wherein the component identifier is used for uniquely identifying the target component element in the three-dimensional model, and the component type identifier is used for indicating the component type corresponding to the target component element;
And generating the material attribute corresponding to the target component element based on the component identifier, the component type identifier and the material identifier.
5. A method according to any one of claims 1 to 3, wherein determining the material properties corresponding to the component elements in the three-dimensional model comprises:
obtaining a model identifier corresponding to the three-dimensional model;
and acquiring a configuration file corresponding to the three-dimensional model based on the model identifier, wherein the configuration file comprises material properties corresponding to the at least one component element in the three-dimensional model.
6. A method according to any one of claims 1 to 3, wherein the at least one component element comprises a three-dimensional instrument element and a three-dimensional pipe element;
the acquiring the three-dimensional model includes:
obtaining a pipeline instrument flow chart corresponding to the three-dimensional model, wherein the pipeline instrument flow chart is used for representing the layout situation between an instrument part and a pipeline, the instrument part is marked with first attribute data, the pipeline is marked with second attribute data, the first attribute data is used for describing the three-dimensional form of the instrument part, and the second attribute data is used for describing the three-dimensional form corresponding to the pipeline;
Generating a three-dimensional instrument arrangement model corresponding to the instrument component based on the first attribute data, wherein the three-dimensional instrument arrangement model comprises arrangement effects of the three-dimensional instrument elements;
generating three-dimensional pipeline elements among the three-dimensional instrument elements based on pipe orifice configuration data of the three-dimensional instrument elements in the three-dimensional instrument arrangement model and second attribute data corresponding to the pipelines in the pipeline instrument flow chart, wherein the three-dimensional pipeline elements are used for conducting pipeline connection among the three-dimensional instrument elements, and the three-dimensional instrument elements and the three-dimensional pipeline elements form the three-dimensional model.
7. A method according to any one of claims 1 to 3, wherein said acquiring a three-dimensional model comprises:
in response to receiving a selection operation of the part element from a plurality of candidate part elements, determining a part type identifier corresponding to the part element, wherein the part type identifier is used for indicating a part type corresponding to the part element;
determining positional information of the component element in the three-dimensional model in response to receiving a layout operation on the component element;
generating a component identifier corresponding to the component element, wherein the component identifier is used for uniquely identifying the component element in the three-dimensional model;
Acquiring a material identifier corresponding to the component element based on the component type identifier;
generating a material attribute corresponding to the component element based on the component type identifier, the component identifier and the material identifier;
generating the component elements in a virtual scene based on the component type identification and the location information, the component elements being used to compose the three-dimensional model.
8. A method according to any one of claims 1 to 3, wherein displaying the component elements under the target texture effect in the three-dimensional model based on the texture map data comprises:
converting the part elements displayed in the three-dimensional model with the first display effect into the part elements displayed with the second display effect based on the texture map data; the first display effect is used for indicating a display style when the component element does not load the target material effect, and the second display effect is used for indicating a display style when the component element loads the target material effect;
the method further comprises the steps of:
and in response to receiving a closing operation on the target material effect, converting the part element displayed in the second display effect in the three-dimensional model into the part element displayed in the first display effect.
9. A three-dimensional model-based material effect generation device, the device comprising:
an acquisition module for acquiring a three-dimensional model, wherein the three-dimensional model comprises at least one component element;
the determining module is used for determining material properties corresponding to the component elements in the three-dimensional model under the condition that the three-dimensional model has material display requirements, and the material properties are used for determining target material effects corresponding to the component elements;
the acquisition module is further used for acquiring texture map data corresponding to the texture attributes;
and the display module is used for displaying the component elements under the target material effect in the three-dimensional model based on the material map data.
10. A computer program product comprising a computer program which, when executed by a processor, implements the three-dimensional model-based texture effect generation method of any one of claims 1 to 8.
CN202211447317.0A 2022-11-18 2022-11-18 Material effect generation method, device and product based on three-dimensional model Pending CN116091677A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211447317.0A CN116091677A (en) 2022-11-18 2022-11-18 Material effect generation method, device and product based on three-dimensional model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211447317.0A CN116091677A (en) 2022-11-18 2022-11-18 Material effect generation method, device and product based on three-dimensional model

Publications (1)

Publication Number Publication Date
CN116091677A true CN116091677A (en) 2023-05-09

Family

ID=86203315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211447317.0A Pending CN116091677A (en) 2022-11-18 2022-11-18 Material effect generation method, device and product based on three-dimensional model

Country Status (1)

Country Link
CN (1) CN116091677A (en)

Similar Documents

Publication Publication Date Title
Finogeev et al. The convergence computing model for big sensor data mining and knowledge discovery
KR20220058793A (en) Realization of digital twin using xml parsing of building information modeling and energy visualization system using thereof
JP2010527090A (en) Digital design ecosystem
CN101834735A (en) Display method and display device of large-scale network node topological structure
CN102194018B (en) System and method for predictive analysis of energy consumption of building based on cloud computing
CN114253228B (en) Industrial equipment object modeling method and device based on digital twin
US9984179B2 (en) Providing building information modeling data
CN108255539B (en) Meteorological satellite data processing system based on cloud computing and data virtualization
US8396903B2 (en) Method and system for organizing and retrieving energy information
CN111708778B (en) Big data management method and system
CN109636669B (en) Multi-process architecture-based transformer substation online monitoring method
Farooq et al. Applications of Building Information Modeling in Electrical Systems Design.
CN111950061A (en) BIM model-based space illumination design method, system, device and medium
CN106502760A (en) A kind of virtual machine compatibility strategy visualization method and device
CN102906768A (en) System and method for providing an enhanced facility plan
Malik et al. A common data architecture for energy data analytics
CN111128357A (en) Monitoring method and device for hospital logistics energy consumption target object and computer equipment
CN116091677A (en) Material effect generation method, device and product based on three-dimensional model
CN118312439A (en) Test switching method, device, equipment and storage medium of different systems
US20190258653A1 (en) System of dynamic hierarchies based on a searchable entity model
Patti et al. Combining building information modelling and ambient data in interactive virtual and augmented reality environments
CN114282029A (en) Primitive management method and device, electronic equipment and storage medium
CN115439015B (en) Local area power grid data management method, device and equipment based on data middleboxes
CN114201306B (en) Multi-dimensional geographic space entity distribution method and system based on load balancing technology
CN113626032B (en) Configuration method and device of list page 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