CN-121982246-A - Data-driven-based interactive three-dimensional model material switching method and system
Abstract
A material switching method and system based on a data-driven interactive three-dimensional model comprises a data structure definition module, a data asset storage module and a three-dimensional entity logic module, wherein the data structure definition module is used for creating a self-defined data structure, the data structure at least comprises a material asset reference field and an associated information field, the data asset storage module is used for storing the data structure to form a plurality of material options, each material option corresponds to an identifier, and the three-dimensional entity logic module is used for receiving input information, referencing corresponding materials in the material options according to the input information and rendering a target through the referenced materials. According to the interactive three-dimensional model material switching method and system based on data driving, material data and program logic are completely separated, all material options can be managed by editing visual data tables, the searching process is simple, maintenance and management are convenient, complex codes or blueprints are not required to be contacted, and team cooperation efficiency is greatly improved.
Inventors
- LIAN ZHEN
- GUAN WENCHAO
- HONG XIAO
- CAI CHENGMIN
- ZHU SIXING
- SI XIAOQIAN
Assignees
- 上海市建筑装饰工程集团有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251224
Claims (6)
- 1. An interactive three-dimensional model material switching system based on data driving, which is characterized by comprising: The system comprises a data structure definition module, a storage module and a storage module, wherein the data structure definition module is used for creating a self-defined data structure, and the data structure at least comprises a material asset reference field and an associated information field; the data asset storage module is used for storing the data structure to form a plurality of material options, wherein each material option corresponds to an identifier; And the three-dimensional entity logic module is used for receiving input information, referencing corresponding materials in the material options according to the input information, and rendering the target through the referenced materials.
- 2. The data-driven interactive three-dimensional model material switching system according to claim 1, wherein the three-dimensional physical logic module comprises: A referencing sub-module for calling the corresponding material in the material options; The material switching execution interface sub-module is used for receiving the input information, searching the material corresponding to the material option according to the input information, calling through the reference sub-module according to the searched material, and applying the called material to the target rendering sub-module; and the target rendering sub-module is used for rendering the target.
- 3. The data-driven interactive three-dimensional model material switching system of claim 1, wherein the data asset storage module comprises: A table construction sub-module, configured to create a data table based on the data structure, where each row in the data table corresponds to an independent texture option; the identification giving sub-module is used for giving corresponding identifiers for each material option.
- 4. The data-driven interactive three-dimensional model material switching system according to claim 1, the interactive three-dimensional model material switching system based on data driving is characterized by further comprising: and the interaction module is used for providing corresponding operation buttons and information display.
- 5. A method for switching materials of an interactive three-dimensional model based on data driving, which is characterized in that the method is implemented by adopting the interactive three-dimensional model material switching system based on data driving in the claims 1 to 4, and comprises the following steps: creating a custom data structure, wherein the data structure at least comprises a material asset reference field and an associated information field; Storing the data structure to form a plurality of material options, wherein each material option corresponds to an identifier; Receiving input information, referencing corresponding materials in the material options according to the input information, and rendering the target through the referenced materials.
- 6. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, performs the method of claim 5.
Description
Data-driven-based interactive three-dimensional model material switching method and system Technical Field The invention relates to the technical field of decoration construction design, in particular to a data-driven interactive three-dimensional model material switching method and system. Background In the design and construction of decoration engineering projects, facing materials are often required to be matched so as to carry out final decision of overall visual attractiveness, the traditional mode of effect patterns is long in period, low in efficiency and high in cost, the problem of long period existing in offline rendering is solved by carrying out dynamic real-time material switching, viewing and matching through an illusion engine, the pain point which can be viewed without waiting for rendering to be finished is obtained, and the method is a mainstream solution at present, but the function of allowing a user to dynamically change three-dimensional model materials still has the following defects: Hard coding mode, namely, a developer directly hard codes the references of material assets in the form of arrays, lists or enumerations in the program codes or blueprint script of the object. When the material options need to be added, deleted or modified, the source code or script must be modified and recompiled, the flow is complicated, the maintenance cost is high, errors are very easy to occur, and when the number of the material options is huge, the hard-coded list becomes abnormally bulky, and the searching and the management are difficult. At the same time, loading and managing these hard-coded asset references at runtime may also be inefficient. Disclosure of Invention Therefore, the invention aims to provide the interactive three-dimensional model material switching method and system based on data driving, which completely separate material data from program logic, can manage all material options by editing visual data tables, has simple searching flow, is convenient to maintain and manage, does not need to contact complex codes or blueprints, and greatly improves team cooperation efficiency. The invention provides a material switching system of an interactive three-dimensional model based on data driving, which comprises the following components: The system comprises a data structure definition module, a storage module and a storage module, wherein the data structure definition module is used for creating a self-defined data structure, and the data structure at least comprises a material asset reference field and an associated information field; the data asset storage module is used for storing the data structure to form a plurality of material options, wherein each material option corresponds to an identifier; And the three-dimensional entity logic module is used for receiving input information, referencing corresponding materials in the material options according to the input information, and rendering the target through the referenced materials. In one embodiment, the three-dimensional physical logic module includes: A referencing sub-module for calling the corresponding material in the material options; The material switching execution interface sub-module is used for receiving the input information, searching the material corresponding to the material option according to the input information, calling through the reference sub-module according to the searched material, and applying the called material to the target rendering sub-module; and the target rendering sub-module is used for rendering the target. In one embodiment, the data asset storage module comprises: A table construction sub-module, configured to create a data table based on the data structure, where each row in the data table corresponds to an independent texture option; the identification giving sub-module is used for giving corresponding identifiers for each material option. In one embodiment, the data-driven interactive three-dimensional model material switching system further comprises: and the interaction module is used for providing corresponding operation buttons and information display. The invention also provides a data-driven interactive three-dimensional model material switching method, which is implemented by adopting the data-driven interactive three-dimensional model material switching system, and comprises the following steps: creating a custom data structure, wherein the data structure at least comprises a material asset reference field and an associated information field; Storing the data structure to form a plurality of material options, wherein each material option corresponds to an identifier; Receiving input information, referencing corresponding materials in the material options according to the input information, and rendering the target through the referenced materials. The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed