Model file generation method, model and model group display method and system
By selecting and synthesizing model components, extracting feature information, and replacing materials, the problem of the inability to customize UE4's 3ds Max models has been solved, enabling flexible material replacement and customized display of the models.
Patent Information
- Application Number
- CN202110009220.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-05
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-01-05
AI Technical Summary
Existing UE4-based 3ds Max models cannot flexibly adjust or replace the materials of some models, thus failing to meet the customized needs of home decoration design.
By selecting the first type of component and the second type of component, a model to be displayed is synthesized, and its feature information and material information are extracted to generate a model file. After importing the model into the display tool, the component positions are adjusted and the materials are replaced according to the feature information.
It enables customized display of models, allowing for flexible replacement of the materials of multiple components in the display model to meet the customization needs of home decoration design.
Smart Images

Figure CN112785719B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of virtual reality technology, and in particular to a model file generation method, a model file generation system, a virtual model display method, a virtual model display system, a virtual model group display method and a virtual model display system. Background Art
[0002] The 3dmax model based on UE4 is a whole model. In the virtual space, you can only adjust the length, width, and height of the model, but not only part of the model, nor can you replace different materials for some of the models. In home decoration design software, the cabinet needs to be customized, and the traditional 3dmax model can no longer meet the needs. Summary of the invention
[0003] The purpose of the present invention is to provide a model file generation method, a model file generation system, a virtual model display method, a virtual model display system, a virtual model group display method and a virtual model display system, which can flexibly replace the materials of multiple components in the display model to achieve customized display of the model.
[0004] In order to achieve the above-mentioned object, the first aspect of the present invention provides a model file generation method, the model file generation method comprising: selecting a first type component and a second type component, wherein the identification of the first type component and the second type component is associated under the model to be displayed, and any one of the first type components is configured with at least one material; synthesizing the first type component and the second type component into the model to be displayed; extracting feature information of each of the first type components and each of the second type components, wherein the feature information at least includes identification and displacement; and recording the feature information of each of the first type components and each of the second type components, and the information of the at least one material configured by any one of the first type components, so as to form a model file about the model to be displayed. In the model file.
[0005] Preferably, before executing the selection of the first category components and the second category components, the model file generation method also includes: establishing the first category components and the second category components; configuring corresponding identifiers for each of the first category components and the second category components; and associating the identifiers of each of the first category components and the second category components under the model to be displayed.
[0006] Preferably, any one of the first category components and any one of the second category components are configured with at least one style, and accordingly, the model file generation method also includes: recording the information of the at least one style of any one of the first category components and any one of the second category components in the model file.
[0007] Preferably, the model file is a json file.
[0008] Preferably, said synthesizing the first category components and the second category components into the model to be displayed comprises: synthesizing the first category components and the second category components into the model to be displayed through 3dmax, and correspondingly, said extracting the feature information of each of the first category components and each of the second category components comprises: extracting the feature information of each of the first category components and each of the second category components by traversing the scene where the model to be displayed is located through the extraction plug-in in the 3d max.
[0009] Preferably, the characteristic information also includes scaling and / or rotation.
[0010] Through the above technical scheme, the present invention creatively first selects a first type of component and a second type of component, then synthesizes the first type of component and the second type of component into a model to be displayed, then extracts the characteristic information of each of the first type of component and the second type of component, and then writes the characteristic information of each of the first type of component and the second type of component and the information of at least one material configured by any of the first type of components into a model file. Thus, the present invention can generate a model file of components including a variety of replaceable materials, so that the materials of multiple components in the display model can be flexibly replaced through the first type of components and the model file in the generated model file, thereby realizing customized display of the model.
[0011] A second aspect of the present invention provides a virtual model display method, characterized in that the virtual model display method includes: importing a model file generated by the model file generation method into a display tool, and reading feature information of any one of the first category components and any one of the second category components of the model to be displayed in the model file, and information of at least one material configured by any one of the first category components, wherein the feature information at least includes an identifier and a displacement; importing the first category components and the second category components corresponding to the identifiers in the feature information and the at least one material configured by the first category components into the display tool; adjusting the positions of the first category components and the second category components in the display tool according to the displacement in the feature information to generate the object to be displayed; selecting a specific material from at least one material configured by a specific component in the first category components; and replacing the material of the specific component with the specific material to display the object to be displayed.
[0012] Preferably, the characteristic information may also include scaling and / or rotation. Accordingly, the adjusting the positions of the first category components and the second category components in the display tool includes: determining the position matrix of the first category components and the second category components according to the displacement, scaling and / or rotation in the characteristic information; and adjusting the positions of the first category components and the second category components in the display tool according to the position matrix of the first category components and the second category components.
[0013] Preferably, when the model file also records information of at least one style configured for any one of the first category components and any one of the second category components, after performing the adjustment of the positions of the first category components and the second category components in the display tool, the virtual model display method also includes: selecting a specific style from the at least one style configured for a specific component in the first category components and / or the second category components; and replacing the style of the specific component with the specific style to display the object to be displayed.
[0014] Preferably, after performing the step of replacing the material of the specific component with the specific material, the virtual model display method further comprises: adjusting at least one of the displacement, scaling and rotation of the model to be displayed.
[0015] Preferably, after performing the step of adjusting at least one of the displacement, scaling and rotation of the model to be displayed, the virtual model display method further comprises: storing the identifier of the model to be displayed and at least one of the adjusted displacement, scaling and rotation.
[0016] Preferably, the display tool is a three-dimensional display tool based on Threejs.
[0017] Through the above technical scheme, the present invention creatively reads the characteristic information of any one of the first category components and the second category components of the model to be displayed in the model file and the information of at least one material of any one of the first category components after importing the model file into the display tool, and then imports the component corresponding to the identifier in the characteristic information and the at least one material configured by the first category component into the display tool, and then adjusts the position of the component in the display tool according to the displacement in the characteristic information to generate the object to be displayed, and finally selects a specific material from the at least one material configured by the specific component in the first category of components, and replaces the material of the specific component with the specific material to display the object to be displayed. Therefore, the present invention can flexibly replace the materials of multiple components in the display model, thereby realizing customized display of the model.
[0018] The third aspect of the present invention also provides a virtual model group display method, which includes: displaying at least two cabinets in the model group to be displayed according to the virtual model display method; determining the size and position of the combination components of the model group to be displayed according to the boundary boxes of the at least two cabinets; importing a preset combination component with a preset size into the display tool, and updating the size of the preset combination component according to the size of the combination component; and adjusting the position of the updated preset combination component in the display tool according to the position of the combination component.
[0019] Preferably, the combined component is a skirting and / or a table top.
[0020] Through the above technical scheme, the present invention creatively first displays at least two cabinets in the model group to be displayed according to the above virtual model display method, and then determines the size and position of the skirting and / or countertop of the model group to be displayed according to the boundary box of the at least two cabinets, and then after importing the skirting assembly and / or countertop assembly into the display tool, updates the size of the skirting assembly and / or countertop assembly according to the calculated size, and finally adjusts the position of the updated skirting assembly and / or countertop assembly in the display tool according to the calculated position. Therefore, the present invention can display the model group to be displayed with skirting and / or countertop, and can also flexibly replace the materials of multiple components in the display model group, thereby realizing customized display of the model.
[0021] The fourth aspect of the present invention also provides a model file generation system, which includes: a component selection device for selecting a first category of components and a second category of components, wherein the identifiers of the first category of components and the second category of components are associated under the model to be displayed, and any one of the first category of components is configured with at least one material; a synthesis device for synthesizing the first category of components and the second category of components into the model to be displayed; an extraction device for extracting feature information of each of the first category of components and each of the second category of components, wherein the feature information includes at least an identifier and a displacement; and a recording device for recording the feature information of each of the first category of components and each of the second category of components, and information of the at least one material configured for any one of the first category of components, so as to form a model file about the model to be displayed.
[0022] Preferably, the model file generation system also includes: an establishment device for establishing the first category of components and the second category of components; a configuration device for configuring corresponding identifiers for each of the first category of components and the second category of components; and an association device for associating the identifiers of each of the first category of components and the second category of components under the model to be displayed.
[0023] Preferably, any one of the first category components and any one of the second category components are configured with at least one style, and accordingly, the recording device is also used to record the information of the at least one style of any one of the first category components and any one of the second category components in the model file.
[0024] Preferably, the model file is a json file.
[0025] Preferably, the synthesis device is 3d max, and correspondingly, the extraction device is an extraction plug-in in the 3d max, which is used to extract the feature information of each of the first category components and each of the second category components by traversing the scene where the model to be displayed is located.
[0026] For the specific details and benefits of the model file generation system provided by the present invention, please refer to the above description of the model file generation method, which will not be repeated here.
[0027] The fifth aspect of the present invention also provides a virtual model display system, which includes: a file importing device, which is used to import a model file generated by the model file generation system into a display tool, and read the characteristic information of any one of the first category components and any one of the second category components of the model to be displayed in the model file, and the information of at least one material configured by any one of the first category components, wherein the characteristic information at least includes an identifier and a displacement; a material importing device, which is used to import the first category components and the second category components corresponding to the identifier in the characteristic information and the at least one material configured by the first category components into the display tool; a position adjustment device, which is used to adjust the position of the first category components and the second category components in the display tool according to the displacement in the characteristic information to generate the object to be displayed; a material selection device, which is used to select a specific material from at least one material configured by a specific component in the first category components; and a material replacement device, which is used to replace the material of the specific component with the specific material to display the object to be displayed.
[0028] Preferably, the characteristic information may also include scaling and / or rotation. Accordingly, the position adjustment device includes: a determination module, used to determine the position matrix of the first type of components and the second type of components according to the displacement, scaling and / or rotation in the characteristic information; and an adjustment module, used to adjust the positions of the first type of components and the second type of components in the display tool according to the position matrix of the first type of components and the second type of components.
[0029] Preferably, when the model file also records information of at least one style configured for any one of the first category components and any one of the second category components, the virtual model display system further includes: a style selection device for selecting a specific style from the at least one style configured for a specific component in the first category components and / or the second category components; and a style replacement device for replacing the style of the specific component with the specific style to display the object to be displayed.
[0030] Preferably, the virtual model display system further comprises: a feature adjustment device for adjusting at least one of the displacement, scaling and rotation of the model to be displayed.
[0031] Preferably, the virtual model display system further comprises: a feature storage device for storing the identification of the model to be displayed and at least one of the adjusted displacement, scaling and rotation.
[0032] Preferably, the display tool is a three-dimensional display tool based on Threejs.
[0033] For specific details and benefits of the virtual model display system provided by the present invention, please refer to the above description of the virtual model display method, which will not be repeated here.
[0034] The sixth aspect of the present invention also provides a virtual model group display system, which includes: according to the virtual model display system, it is used to display at least two cabinets in the model group to be displayed; a position determination device, which is used to determine the size and position of the combination components of the model group to be displayed according to the boundary boxes of the at least two cabinets; an updating device, which is used to import a preset combination component with a preset size into the display tool, and update the size of the preset combination component according to the size of the combination component; and a position adjustment device, which is used to adjust the position of the updated skirting board component and / or the countertop component in the display tool according to the position of the combination component.
[0035] Preferably, the combined component is a skirting and / or a table top.
[0036] The specific details and benefits of the virtual model group display system provided by the present invention can be found in the above description of the virtual model group display method, which will not be repeated here.
[0037] The seventh aspect of the present invention further provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the model file generation method, the virtual model display method and the virtual model group display method.
[0038] The eighth aspect of the present invention also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the model file generation method, the virtual model display method and the virtual model group display method.
[0039] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0041] Figure 1 is a flow chart of a model file generation method provided by an embodiment of the present invention;
[0042] Figure 2 is a schematic diagram of a cabinet model display process provided by an embodiment of the present invention;
[0043] Figure 3 is a flowchart of a virtual model display method provided by an embodiment of the present invention; and
[0044] Figure 4 It is a flow chart of a virtual model group display method provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0045] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0046] Figure 1 1 is a flow chart of a model file generation method provided by an embodiment of the present invention. The model file generation method may include the following steps S101-S104.
[0047] Before executing step S101 , a component customization library and a material library may be created first.
[0048] First, the process of making a component customization library is briefly explained using furniture as an example.
[0049] Before executing step S101, the model file generation method also includes: establishing a first type of component and a second type of component; configuring a corresponding identifier for each of the first type of component and the second type of component; and associating the identifier of each of the first type of component and the second type of component under the model to be displayed.
[0050] Specifically, first, according to the actual furniture design, each replaceable component is modeled in a synthesis tool (such as 3ds max) and exported into obj format. The replaceable components may include first-class components (such as Figure 2 Type A components shown in the figure) and Type II components (such as Figure 2 Specifically, any one of the first-type components may be configured with at least one style and at least one material (i.e., a type of component with replaceable style and replaceable material), for example, Figure 2 The style and material of the panels or shutters in the second type of components are replaceable. Any of the second type of components is configured with at least one style (i.e., a type of component that can replace the style but not the material), for example, Figure 2 The style of the sink or handle is replaceable but the material is not. Then, a unique identifier (for example, handle ID01, sink ID02, etc.) is configured for each of the first type of components and the second type of components, and the obj format components and corresponding identifiers are stored in the component customization library and associated with the identifier of the same furniture model (for example, cabinet model ID). Then, the identifiers of multiple replaceable materials configured for the same component can also be associated with the component, that is, the identifiers of different replaceable materials can be the first sub-identifier of the identifier of the component. For example, the dark walnut identifier of the handle is ID01-1-1, the hardwood identifier of the handle is ID01-1-2, and the walnut identifier of the handle is ID01-1-3, etc.; the dark walnut identifier of the sink is ID02-1-1, the hardwood identifier of the sink is ID02-1-2, and the walnut identifier of the sink is ID02-1-3, etc.
[0051] Secondly, the process of making a material library is briefly introduced.
[0052] For all components used in the material (such as Figure 2 The dark walnut, hardwood, walnut, white ash, ash and other materials shown in the figure are generated by material tool software. Then, each material is assigned a unique material identifier (such as material ID), and each material and the corresponding identifier are stored in the material library. Each material contains three maps: color (BaseColor), normal (Normal) and mixed map (AO_M_R). Among them, the mixed map contains roughness (Roughness), metal (Metallic), and ambient occlusion (Ambient Occlusion).
[0053] Step S101, selecting a first type of component and a second type of component.
[0054] The identifiers of the first type of components and the second type of components are associated with the model to be displayed, and any one of the first type of components is configured with at least one material (such as Figure 2 You can select a default material for each component. Of course, you can also select a default material for the entire model. For example, the entire cabinet model uses the dark walnut material.
[0055] Specifically, the first type of components (e.g., panels, doors) and the second type of components (e.g., sinks, handles) associated with the cabinet model in the component customization library can be selected, and the first type of components and the second type of components can be imported into a synthesis tool (e.g., 3d max).
[0056] In one embodiment, the first category of components are components of replaceable materials, for example, the default material of the panel may be dark walnut, and its replaceable materials may be walnut, white ash, ash and other materials; while the second category of components are components of non-replaceable materials (whose material may be the default material, for example, dark walnut).
[0057] In another embodiment, any one of the first type of components and any one of the second type of components are configured with at least one style. The first type of components are components with replaceable styles and replaceable materials, for example, the board can be style a or style b, and the material of the board can be walnut, white ash, ash, etc.; while the second type of components are components with replaceable styles but non-replaceable materials, for example, the style of the handle can be style A, style B, etc., but the material of the handle can only be a default material (for example, dark walnut material). Specifically, the identifiers of multiple replaceable styles configured for the same component can be associated with the component, that is, the identifiers of different replaceable styles can be the second sub-identifier of the identifier of the component. For example, the identifier of handle style A is ID01-2-1 and the identifier of handle style B is ID01-2-2, etc.; the identifier of sink style C is ID02-2-1 and the identifier of sink style D is ID02-2-2, etc.
[0058] Step S102: synthesize the first-category components and the second-category components into the model to be displayed.
[0059] For step S102, the step of combining the first type of components and the second type of components into a model to be displayed may include: combining the first type of components and the second type of components into the model to be displayed by using 3d max. Specifically, the selected components are spliced by using 3d max to form a cabinet model.
[0060] Step S103, extracting feature information of each of the first-category components and each of the second-category components.
[0061] The characteristic information at least includes identification and displacement.
[0062] For step S103, the extracting of characteristic information of each of the first category components and each of the second category components may include: extracting the characteristic information of each of the first category components and each of the second category components by traversing the scene where the model to be displayed is located through the extraction plug-in in the 3d max.
[0063] Specifically, the self-made max plug-in can traverse the entire max scene to extract the ID, displacement (i.e., spatial coordinates) and other feature information of each component of the cabinet model. Of course, the feature information may also include scaling and / or rotation (i.e., rotation angle).
[0064] Step S104, recording the characteristic information of each of the first-category components and each of the second-category components, and the information of the at least one material configured for any of the first-category components, to form a model file about the model to be displayed.
[0065] The model file may be a json file.
[0066] Specifically, in one embodiment, the feature information extracted in step S104 and the material IDs of the first type of components (such as panels, shutters and other components) that can be used interchangeably may be written into a json file.
[0067] In another embodiment, when any one of the first type of components and any one of the second type of components are configured with at least one style, the model file generation method may further include: recording information of the at least one style of any one of the first type of components and any one of the second type of components in the model file. That is, the feature information extracted in step S104, the material ID of the first type of components (such as panels, shutters, etc.) that can be used interchangeably, and the ID of at least one style that can be used interchangeably for each component can be written into the json file.
[0068] After obtaining multiple model files (files recording specific feature information about multiple models) in the above manner, the multiple model files can be stored with unique identifiers to form a model library. Specifically, the multiple json files generated by the above steps can be stored in the model library.
[0069] To summarize, the present invention creatively first selects a first type of component and a second type of component, then synthesizes the first type of component and the second type of component into a model to be displayed, then extracts feature information of each of the first type of component and the second type of component, and then writes the feature information of each of the first type of component and the second type of component and information of at least one material configured by any of the first type of components into a model file. Thus, the present invention can generate a model file of components including a variety of replaceable materials, so that the materials of multiple components in the display model can be flexibly replaced by the first type of components and the model file in the generated model file, thereby realizing customized display of the model.
[0070] Figure 3 FIG. 1 is a flow chart of a virtual model display method provided by an embodiment of the present invention. Figure 3 As shown, the virtual model display method may include the following steps S301-S305.
[0071] Step S301, importing the model file generated by the model file generation method into the display tool, and reading the feature information of each of the first category components and each of the second category components of the model to be displayed in the model file, and the information of at least one material configured for any of the first category components.
[0072] The characteristic information may include at least identification and displacement.
[0073] Wherein, the display tool may be a three-dimensional display tool based on Threejs.
[0074] After the previously stored json file is imported into the three-dimensional display tool, the previous json file is read by the three-dimensional display tool, and the ID, displacement and other characteristic information of the first type of components (such as type A components) and the second type of components (such as type B components) used in the cabinet model are identified through this json file. Of course, in the above, if the previous json file also includes scaling and / or rotation, correspondingly, the ID, displacement, scaling and / or rotation and other characteristic information of the first type of components (such as type A components) and the second type of components (such as type B components) used in the cabinet model are identified through this json file (as described below).
[0075] Of course, when a model library is formed by the above-mentioned model file generation method, the corresponding model file (the model file corresponding to the model to be displayed) can be first obtained from the model library, and then the model file (such as a json file) can be imported into the three-dimensional display tool.
[0076] Step S302: Import the first-type component and the second-type component corresponding to the identifier in the feature information and the at least one material configured by the first-type component into the display tool.
[0077] Corresponding components may be imported from a component customization library according to IDs of various components used by the identified cabinet model.
[0078] Step S303: adjusting the positions of the first type of components and the second type of components in the display tool according to the displacement in the characteristic information to generate the object to be displayed.
[0079] The characteristic information may also include scaling and / or rotation. Accordingly, for step S303, adjusting the positions of the first-type components and the second-type components in the display tool may include: determining the position matrix of the first-type components and the second-type components according to the displacement, scaling and / or rotation in the characteristic information; and adjusting the positions of the first-type components and the second-type components in the display tool according to the position matrix of the first-type components and the second-type components.
[0080] The position matrix of each component can be calculated according to the information of displacement, scaling, rotation, etc. of each component, and then the position of each component in the three-dimensional display tool can be adjusted according to the position matrix.
[0081] In another embodiment, when the model file also records information of at least one style configured by any one of the first type of components and any one of the second type of components, after executing step S303, the virtual model display method may further include: selecting a specific style from the at least one style configured by a specific component in the first type of components and / or the second type of components; and replacing the style of the specific component with the specific style (for example, by selecting a different second sub-identifier) to display the object to be displayed. For each component, a default style may be selected. That is, according to the user's preference, a specific style may be selected from the at least one style configured by each component, and the default style may be replaced with the selected specific style.
[0082] Step S304: Select a specific material from at least one material configured for a specific component in the first type of components.
[0083] According to the user's preference, a specific material can be selected from at least one material configured for the Class A components such as the panel and / or the shutter, for example, by selecting a different first sub-identifier.
[0084] If the model file (for example, a json file) is modified, specifically, the replaceable material ID of a component is modified and the modified material ID does not exist in the material library (that is, the material library does not contain a material corresponding to the modified material ID), the default material of the model to be displayed (for example, a cabinet model) is used.
[0085] Step S305: replacing the material of the specific component with the specific material to display the object to be displayed.
[0086] The default material can be replaced with a specific material for the selected panel and / or door type A component.
[0087] After executing step S305, the virtual model display method may further include: adjusting at least one of the displacement, scaling and rotation of the model to be displayed. Specifically, in the three-dimensional display tool, the length, width and height of each component can be adjusted through the operation bar, and the rotation and position of the component can be adjusted.
[0088] After performing the adjustment of at least one of the displacement, scaling and rotation of the model to be displayed, the virtual model display method may further include: storing the identification of the model to be displayed and at least one of the adjusted displacement, scaling and rotation. Specifically, in the three-dimensional display tool, the relevant serialized data of the adjusted cabinet model can be exported (the serialized data may include the ID of each component, feature information and the material used by the Class A component, etc.). In subsequent applications, the adjusted custom model can be restored by importing these serialized data.
[0089] To summarize, the present invention creatively reads the characteristic information of each of the first category components and the second category components of the model to be displayed in the model file and the information of at least one material of each of the first category components after importing the model file into the display tool, and then imports the components corresponding to the identifiers in the characteristic information and the at least one material configured by the first category components into the display tool, and then adjusts the positions of the components in the display tool according to the displacements in the characteristic information to generate objects to be displayed, and finally selects a specific material from the at least one material configured by a specific component in the first category components, and replaces the material of the specific component with the specific material to display the object to be displayed. Therefore, the present invention can flexibly replace the materials of multiple components in the display model, thereby realizing customized display of the model.
[0090] Figure 4 FIG. 1 is a flow chart of a virtual model group display method provided by an embodiment of the present invention. Figure 4As shown, the virtual model group display method may include: step S401, displaying at least two cabinets in the model group to be displayed according to the virtual model display method; step S402, determining the size and position of the combination components of the model group to be displayed according to the boundary boxes of the at least two cabinets; step S403, importing a preset combination component with a preset size into the display tool, and updating the size of the preset combination component according to the size of the combination component; and step S404, adjusting the position of the updated preset combination component in the display tool according to the position of the combination component. Wherein, the combination component is a skirting and / or a countertop.
[0091] Specifically, the three-dimensional display model can also support the addition of skirting and / or countertops. Figure 2 In the case of a cabinet model shown in the figure, in one embodiment, a skirting line can be added to the cabinet combination model: the size and position of the skirting line can be calculated through the bounding boxes of multiple cabinet models; then a preset skirting line component with a preset size in the component customization library is used to generate a skirting line component with the size; then the position of the newly generated skirting line component is adjusted according to the calculated position of the skirting line to form the cabinet combination model with the skirting line. In another embodiment, a countertop can also be added to the cabinet combination model: the size and position of the countertop can be calculated through the bounding boxes of multiple cabinet models; then a preset countertop component with a preset size in the component customization library is used to generate a countertop component with the size; then the position of the newly generated countertop component is adjusted according to the calculated position of the countertop to form the cabinet combination model with the countertop. In addition, whether to add a water barrier can be determined based on whether the countertop collides with the wall, and the water barrier also comes from the model in the component customization library.
[0092] In another embodiment, a skirting and a countertop can be added to the cabinet combination model: the first size and first position of the skirting and the second size and second position of the countertop can be calculated through the bounding boxes of multiple cabinet models; then a preset skirting component with a preset size in the component customization library is used to generate a skirting component with the first size, and a preset countertop component with a preset size in the component customization library is used to generate a countertop component with the second size; then the position of the newly generated skirting component is adjusted according to the calculated first position, and the position of the newly generated countertop component is adjusted according to the calculated second position, so as to form the cabinet combination model with the skirting and the countertop. In addition, the materials of the countertop and the skirting component can be selected from the material library.
[0093] The present invention creatively first displays at least two cabinets in the model group to be displayed according to the above-mentioned virtual model display method, and then determines the size and position of the skirting and / or countertop of the model group to be displayed according to the boundary box of the at least two cabinets. Then, after importing the skirting assembly and / or countertop assembly into the display tool, the size of the skirting assembly and / or countertop assembly is updated according to the calculated size. Finally, according to the calculated position, the position of the updated skirting assembly and / or countertop assembly in the display tool is adjusted. Thus, the present invention can display the model group to be displayed with skirting and / or countertop, and can also flexibly replace the materials of multiple components in the display model group, thereby realizing customized display of the model.
[0094] An embodiment of the present invention also provides a model file generation system, which includes: a component selection device for selecting a first category of components and a second category of components, wherein the identifiers of the first category of components and the second category of components are associated under the model to be displayed, and any one of the first category of components is configured with at least one material; a synthesis device for synthesizing the first category of components and the second category of components into the model to be displayed; an extraction device for extracting feature information of each of the first category of components and each of the second category of components, wherein the feature information includes at least an identifier and a displacement; and a recording device for recording the feature information of each of the first category of components and each of the second category of components, and information of the at least one material configured for any one of the first category of components, so as to form a model file about the model to be displayed.
[0095] Preferably, the model file generation system also includes: an establishment device for establishing the first category of components and the second category of components; a configuration device for configuring corresponding identifiers for each of the first category of components and the second category of components; and an association device for associating the identifiers of each of the first category of components and the second category of components under the model to be displayed.
[0096] Preferably, any one of the first category components and any one of the second category components are configured with at least one style, and accordingly, the recording device is also used to record the information of the at least one style of any one of the first category components and any one of the second category components in the model file.
[0097] Preferably, the model file is a json file.
[0098] Preferably, the synthesis device is 3d max, and correspondingly, the extraction device is an extraction plug-in in the 3d max, which is used to extract the feature information of each of the first category components and each of the second category components by traversing the scene where the model to be displayed is located.
[0099] Preferably, the characteristic information also includes scaling and / or rotation.
[0100] For the specific details and benefits of the model file generation system provided by the present invention, please refer to the above description of the model file generation method, which will not be repeated here.
[0101] An embodiment of the present invention further provides a virtual model display system, the virtual model display system comprising: a file importing device, used to import a model file generated by the model file generating system into a display tool, and read the characteristic information of any one of the first type components and any one of the second type components of the model to be displayed in the model file, and the information of at least one material configured by any one of the first type components, wherein the characteristic information at least includes an identifier and a displacement; a material importing device, used to import the first type components and the second type components corresponding to the identifier in the characteristic information and the at least one material configured by the first type components into the display tool; a position adjusting device, used to adjust the position of the first type components and the second type components in the display tool according to the displacement in the characteristic information to generate the object to be displayed; a material selecting device, used to select a specific material from at least one material configured by a specific component in the first type components; and a material replacing device, used to replace the material of the specific component with the specific material to display the object to be displayed.
[0102] Preferably, the characteristic information may also include scaling and / or rotation. Accordingly, the position adjustment device includes: a determination module, used to determine the position matrix of the first type of components and the second type of components according to the displacement, scaling and / or rotation in the characteristic information; and an adjustment module, used to adjust the positions of the first type of components and the second type of components in the display tool according to the position matrix of the first type of components and the second type of components.
[0103] Preferably, when the model file also records information of at least one style configured for any one of the first category components and any one of the second category components, the virtual model display system further includes: a style selection device for selecting a specific style from the at least one style configured for a specific component in the first category components and / or the second category components; and a style replacement device for replacing the style of the specific component with the specific style to display the object to be displayed.
[0104] Preferably, the virtual model display system further comprises: a feature adjustment device for adjusting at least one of the displacement, scaling and rotation of the model to be displayed.
[0105] Preferably, the virtual model display system further comprises: a feature storage device for storing the identification of the model to be displayed and at least one of the adjusted displacement, scaling and rotation.
[0106] Preferably, the display tool is a three-dimensional display tool based on Threejs.
[0107] For specific details and benefits of the virtual model display system provided by the present invention, please refer to the above description of the virtual model display method, which will not be repeated here.
[0108] An embodiment of the present invention further provides a virtual model group display system, the virtual model group display system comprising: a device for displaying at least two cabinets in a model group to be displayed according to the virtual model display system; a position determining device for determining the size and position of a combination component of the model group to be displayed according to a boundary box of the at least two cabinets; an updating device for importing a preset combination component with a preset size into the display tool, and updating the size of the preset combination component according to the size of the combination component; and a position adjusting device for adjusting the position of the updated skirting board component and / or the countertop component in the display tool according to the position of the combination component.
[0109] Preferably, the combined component is a skirting and / or a table top.
[0110] The specific details and benefits of the virtual model group display system provided by the present invention can be found in the above description of the virtual model group display method, which will not be repeated here.
[0111] An embodiment of the present invention further provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the model file generation method, the virtual model display method, and the virtual model group display method.
[0112] An embodiment of the present invention also provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the model file generation method, the virtual model display method and the virtual model group display method.
[0113] The optional implementation modes of the embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above implementation modes. Within the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical scheme of the embodiments of the present invention, and these simple modifications all belong to the protection scope of the embodiments of the present invention.
[0114] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.
[0115] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a single-chip microcomputer, a chip or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0116] In addition, various implementation modes of the embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed by the embodiments of the present invention.
Claims
1. A method for generating a model file, characterized in that: The model file generation method comprises: Selecting a first type of component and a second type of component, wherein the identifiers of the first type of component and the second type of component are associated under the model to be displayed, the first type of component is a type of component whose material can be replaced, the second type of component is a type of component whose material cannot be replaced, and any one of the first type of components is configured with at least one material; Combining the first-type components and the second-type components into the model to be displayed; Extracting characteristic information of each of the first type of components and each of the second type of components, wherein the characteristic information at least includes an identification and a displacement; and The characteristic information of each of the first-category components and each of the second-category components, and the information of the at least one material configured for any of the first-category components, are recorded to form a model file about the model to be displayed.
2. The model file generation method according to claim 1, characterized in that: Before executing the selecting of the first type of components and the second type of components, the model file generating method further includes: establishing the first type of components and the second type of components; Configuring a corresponding identifier for each of the first-type components and the second-type components; and The identifier of each of the first-category component and the second-category component is associated with the model to be displayed.
3. The model file generation method according to claim 1, characterized in that: Any one of the first type of components and any one of the second type of components are configured with at least one style, Correspondingly, the model file generation method further includes: recording information of the at least one style of any one of the first-category components and any one of the second-category components in the model file.
4. A virtual model display method, characterized in that: The virtual model display method comprises: Importing the model file generated by the model file generation method according to any one of claims 1 to 3 into a display tool, and reading the characteristic information of each of the first-category components and each of the second-category components of the model to be displayed in the model file, and the information of at least one material configured for any of the first-category components, wherein the characteristic information at least includes an identification and a displacement; Importing the first type of components and the second type of components corresponding to the identifiers in the feature information and the at least one material configured by the first type of components into the display tool; According to the displacement in the characteristic information, adjusting the positions of the first type of components and the second type of components in the display tool to generate an object to be displayed; selecting a specific material from at least one material configured for a specific component in the first type of components; and The material of the specific component is replaced with the specific material to display the object to be displayed.
5. A model file generation system, characterized in that: The model file generation system comprises: A component selection device, used for selecting a first type of component and a second type of component, wherein the identifiers of the first type of component and the second type of component are associated under the model to be displayed, the first type of component is a type of component whose material can be replaced, the second type of component is a type of component whose material cannot be replaced, and any one of the first type of components is configured with at least one material; A synthesis device, used for synthesizing the first type of components and the second type of components into the model to be displayed; an extraction device, used to extract characteristic information of each of the first type of components and each of the second type of components, wherein the characteristic information at least includes an identification and a displacement; and A recording device is used to record the characteristic information of each of the first category components and each of the second category components, and the information of the at least one material configured for any of the first category components, so as to form a model file about the model to be displayed.
6. The model file generation system according to claim 5, characterized in that: The model file generation system also includes: Establishing means for establishing the first type of components and the second type of components; a configuration device, configured to configure a corresponding identifier for each of the first type of components and the second type of components; and An associating device is used to associate the identifier of each of the first type of components and the second type of components under the model to be displayed.
7. The model file generation system according to claim 5, characterized in that: Any one of the first type of components and any one of the second type of components are configured with at least one style, Correspondingly, the recording device is also used to record the information of the at least one style of any one of the first-category components and any one of the second-category components in the model file.
8. A virtual model display system, characterized in that: The virtual model display system comprises: A file importing device, used for importing the model file generated by the model file generating system according to claim 5 into the display tool, and reading the characteristic information of each of the first type of components and each of the second type of components of the model to be displayed in the model file, and the information of at least one material configured by any of the first type of components, wherein the characteristic information at least includes an identification and a displacement; A material importing device, used for importing the first type of component and the second type of component corresponding to the identifier in the feature information and the at least one material configured by the first type of component into the display tool; A position adjustment device, used for adjusting the positions of the first type of components and the second type of components in the display tool according to the displacement in the characteristic information, so as to generate an object to be displayed; a material selection device for selecting a specific material from at least one material configured for a specific component in the first type of components; and The material replacement device is used to replace the material of the specific component with the specific material to display the object to be displayed.
9. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing a machine to execute the model file generation method described in any one of claims 1 to 3 and the virtual model display method described in claim 4.
10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the model file generation method described in any one of claims 1 to 3 and the virtual model display method described in claim 4.
Citation Information
Patent Citations
Method and system for building information modeling light weight and three-dimensional scene visualization
CN108710739A
Three-dimensional model display method based on WebGL
CN109753334A