A Visualization Method and Device of Game Engine Based on BIM Scenario
By classifying and coding the components in the BIM scene, the problem of low frame rate and poor display effect in the Unity game engine of BIM scenes is solved, and efficient scene import and optimized display effect is achieved.
Patent Information
- Application Number
- CN202210566599.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-05-23
AI Technical Summary
In the prior art, when BIM scenes are imported into the Unity game engine, the operation and maintenance scenes have problems with low frame rates and poor display effects.
By classifying and coding components in BIM scenes, the number of scene components is reduced, and material matching and rendering optimization is performed in the game engine to achieve dynamic loading and visual effect enhancement.
It improves the running frame rate in the game engine, improves the display effect of BIM scenes in the game engine, and reduces manpower and time consumption.
Smart Images

Figure CN115138067B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of engineering data processing, and particularly relates to a method and device for visualizing a game engine based on a BIM scenario. Background Art
[0002] With the continuous research and development and optimization of BIM software platforms in recent years, as well as the continuous progress of game engines and virtual reality technologies, the combined application of BIM technology and game platforms in engineering projects has become a new and valuable important topic, and application research has been gradually carried out in the industry. The current mainstream game engine is Unity, which has many development packages, simple software operations, excellent 3D graphics processing performance, and strong scalability. In traditional methods, when importing a BIM scenario into a game engine, the scenario and components must be first deconstructed to form independent data blocks, and then each data block is imported into the game engine in the form of an FBX file, and finally the scenario is recombined in the game engine editor. For large scenarios, this work not only requires a large amount of manpower and a large amount of time, but also the final display effect in the game engine is relatively poor. Moreover, for large scenarios, the BIM data volume is too large, and when importing into the Unity game engine, it will cause the operation and maintenance scenario running frame rate to be too low. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method and device for visualizing a game engine based on a BIM scenario to solve the technical problems of too low operation and maintenance scenario running frame rate and poor Unity display effect in the prior art.
[0004] The technical solutions proposed by the present invention are as follows:
[0005] In a first aspect of an embodiment of the present invention, a method for visualizing a game engine based on a BIM scenario is provided. The method for visualizing a game engine based on a BIM scenario includes: obtaining a pre-constructed BIM scenario and classifying and coding components included in the BIM scenario according to preset service requirements; performing merge control processing on components in the BIM scenario during the process of importing the BIM scenario into the game engine according to the classification coding result of the components and preset component merge control rules in the game engine to obtain a game scenario to be displayed; and responding to loading and rendering operations on the game scenario to be displayed.
[0006] Optionally, responding to the loading operation on the game scenario to be displayed includes: dividing the game scenario to be displayed according to the type of the game scenario to be displayed; and responding to the loading operation on the divided game scenario to be displayed according to a received viewing instruction.
[0007] Optionally, in response to a rendering operation on the game scene to be displayed, it includes: matching the materials in the pre-configured material library in the game engine with the materials of the components in the game scene to be displayed; adjusting the material attributes of the materials in the material library according to the matching result and synchronizing the adjusted materials to the components corresponding to the game scene to be displayed.
[0008] Optionally, the method further includes: creating any data area in the storage space corresponding to the game scene to be displayed to store the first engine value and the first state value corresponding to each component after importing the BIM scene into the game engine; when the BIM scene changes, importing the changed BIM scene into the game engine and obtaining the second state value and the second engine value corresponding to each component; comparing the second engine value corresponding to each component with the corresponding first state value; when the second engine value corresponding to any component is consistent with the first state value, the component corresponding to the game scene to be displayed in the game engine is not modified, and the first state value and the first engine value corresponding to the component are updated according to the second state value; when the second engine value corresponding to any component is inconsistent with the first state value, the component corresponding to the game scene to be displayed in the game engine is modified, and the third engine value corresponding to the component is obtained.
[0009] Optionally, after the step of when the second engine value corresponding to any component is inconsistent with the first state value, the component corresponding to the game scene to be displayed in the game engine is modified, and the third engine value corresponding to the component is obtained, the method further includes: comparing the second state value corresponding to the component modified in the game scene to be displayed with the first state value; when the second state value is consistent with the first state value, the component corresponding to the changed BIM scene is not modified, and the first engine value is updated according to the third engine value; when the second state value is inconsistent with the first state value, the component corresponding to the changed BIM scene is modified, and the first engine value corresponding to the component is updated according to the third engine value, or the first state value and the first engine value corresponding to the component are updated according to the second state value.
[0010] Optionally, the method further includes: constructing a corresponding Internet of Things material resource library according to the BIM scene; adjusting the parameters of the materials in the Internet of Things material resource library according to the components of the BIM scene, and outputting the adjusted material parameters to the game engine through a preset Internet of Things data platform for visualization.
[0011] In a second aspect of the embodiments of the present invention, a game engine visualization device based on a BIM scene is provided. The game engine visualization device based on the BIM scene includes: an acquisition module, configured to acquire a pre-constructed BIM scene and classify and code the components included in the BIM scene according to preset service requirements; a processing module, configured to perform merge control processing on the components in the BIM scene during the process of importing the BIM scene into the game engine according to the classification and coding results of the components and the preset component merge control rules in the game engine, to obtain a game scene to be displayed; and a response module, configured to respond to the loading and rendering operations of the game scene to be displayed.
[0012] Optionally, the device further includes: a division module, configured to divide the game scene to be displayed according to the type of the game scene to be displayed; and a loading module, configured to respond to the loading operation of the divided game scene to be displayed according to the received viewing instruction.
[0013] In a third aspect of the embodiments of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the BIM-scene-based game engine visualization method as described in the first aspect and any one of the first aspects of the embodiments of the present invention.
[0014] In a fourth aspect of the embodiments of the present invention, an electronic device is provided, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the BIM-scene-based game engine visualization method as described in the first aspect and any one of the first aspects of the embodiments of the present invention.
[0015] The technical solution provided by the present invention has the following effects:
[0016] The BIM-scene-based game engine visualization method provided by the embodiments of the present invention acquires a pre-constructed BIM scene and classifies and codes the components included in the BIM scene according to preset service requirements; performs merge control processing on the components in the BIM scene during the process of importing the BIM scene into the game engine according to the classification and coding results of the components and the preset component merge control rules in the game engine, to obtain a game scene to be displayed; and responds to the loading and rendering operations of the game scene to be displayed. When importing the BIM scene into the game engine, this method reduces the number of scene components by classifying and coding the components in the BIM scene and performing merge control processing, solves the problem of too low running frame rate, and enables the components to have a good display effect after being imported into the game engine. Description of the Drawings
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings required for the description of the specific embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0018] Figure 1 is a flowchart of a method for visualizing a game engine based on a BIM scene according to an embodiment of the present invention;
[0019] Figure 2 is a flowchart of implementing scene import using an AIOS system according to an embodiment of the present invention;
[0020] Figure 3 is a structural block diagram of a device for visualizing a game engine based on a BIM scene according to an embodiment of the present invention;
[0021] Figure 4 is a structural schematic diagram of a computer-readable storage medium according to an embodiment of the present invention;
[0022] Figure 5 is a structural schematic diagram of an electronic device according to an embodiment of the present invention. Specific Embodiments
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
[0024] The embodiments of the present invention provide a method for visualizing a game engine based on a BIM scene. As Figure 1 shown, the method includes the following steps:
[0025] Step S101: Obtain a pre-constructed BIM scene and classify and code the components included in the BIM scene according to preset business requirements. Specifically, the BIM scene can be determined according to the actual project, representing all the content selected by the user in the Revit project. For example, if a Revit project is a building, then this building is the BIM scene; if a Revit project is a campus with several buildings, then the entire campus is the BIM scene.
[0026] The components included in the BIM scene represent the basic elements that make up the BIM scene. For example, a certain section of stairs, a certain wall, a certain pipe, or a certain chair can all be a component.
[0027] When the business requirement is to classify according to component types, classification coding is performed based on the category attribute information of the components. Components of the same type are then classified into one category, and the coding method is not limited as long as the component type can be determined from the coding result. For example, all chairs are classified into one category, and all air conditioners are classified into one category. When the business requirement is to classify components with the same functional attribute into one category, classification coding is performed after classification according to the functional attribute. For example, when the functional attribute is office supplies, computers, keyboards, and mice can be classified into one category.
[0028] Step S102: According to the classification coding result of the components and the preset component merging control rules in the game engine, during the process of importing the BIM scene into the game engine, perform merging control processing on the components in the BIM scene to obtain the game scene to be displayed.
[0029] Specifically, first, according to the business requirement, without affecting the business, extract the merging rules. For example, in the business, for the chairs in a room, there is no need to distinguish them, and only a simple display of these chairs is required. Then, during the import process, all chairs can be merged according to the family category (classification coding result) to which the chairs belong.
[0030] Secondly, during the merging process, it is also necessary to extract the component merging control rules according to the business requirement. For example, among the 10 air conditioners in a room, 1 air conditioner needs to be controlled separately in the business. Then, this air conditioner cannot be merged into the family category (classification coding result) to which the air conditioners belong. That is, during the merging process of components according to the classification coding result of the components, it is also necessary to control the components according to the control rules.
[0031] Finally, import the BIM scene into the game engine to obtain the game scene to be displayed. During the import process, by performing merging control processing on the components in the BIM scene, the number of scene components is reduced, achieving the purpose of optimization. Among them, the game engine represents the core component of a written editable computer game system or some interactive real-time image application programs, which can be Unreal Engine, Unity, Frostbite Engine, Origin Engine, etc. The present invention does not make specific limitations on this, as long as the requirements are met.
[0032] Step S103: Respond to the loading and rendering operations of the game scene to be displayed. Specifically, in the preset game engine, use the corresponding engine plug-in to load the imported game scene to be displayed.
[0033] Render the game scene to be displayed while loading. Specifically, it can be rendered using the sky system, weather system, and four-season system integrated in the background, and select the appropriate system for rendering according to the constructed BIM scene during use.
[0034] First, in daily production work, it is necessary to adjust the sky parameters to achieve a more suitable sky environment effect. Users can open the sky system menu, where they can select longitude, latitude, and date to determine the specific location and time of the game scene to be displayed in the physical world, and adjust the specific time within a day through a slider. And detailed adjustments can be made to parameters such as the sun (intensity, color temperature, height, brightness, angle, etc.) and atmospheric fog (fog color, intensity, transparency, fog start distance, etc.).
[0035] Secondly, different weather effects can also be selected for the game scene to be displayed according to different effect requirements. Specifically, open the weather panel in the weather system and adjust the parameters to achieve different effects. For example, in rainy weather, the rainfall can be adjusted through a slider to achieve different effects such as light rain, moderate rain, and heavy rain. Among them, templates such as sunny, cloudy, rainy, and snowy are preset in the weather panel.
[0036] Finally, when the game scene to be displayed contains plants such as flowers, trees, and grass, different seasons can also be created in the four-season system for the game scene to be displayed. Specifically, open the four-season panel in the four-season system and quickly apply the four preset templates of spring, summer, autumn, and winter to the game scene to be displayed.
[0037] By selecting different theme filter templates in different systems, the visual effect of the game scene to be displayed can be quickly generated or dynamically changed, and dynamic scene lighting and shadow are supported.
[0038] In one example, the entire pre-constructed BIM scene can be imported into the game engine with one key using the self-developed AIOS system, without the need for manual re-checking of the scene. Specifically, the AIOS system includes two functional modules: ExportPlugin (export plug-in) and Import Plugin (import plug-in). This system supports a variety of 3D design applications and various data formats, including Autodesk 3ds Max, Autodesk AutoCAD, Autodesk Revit, Autodesk Navisworks, Autodesk VRED, etc.
[0039] After installing the Export Plugin in Autodesk Revit, the BIM scene constructed in the Revit software can be exported as a self-developed data format file (Custom Files) for storage with one click. The Import Plugin of the game engine is used to read the Custom Files and directly generate a Game scene in the engine, which accurately corresponds to the BIM scene. For example, Figure 2 as shown
[0040] The game engine visualization method based on the BIM scene provided by the embodiment of the present invention reduces the number of scene components by classifying and coding the components in the BIM scene and performing merge control processing when importing the BIM scene into the game engine, solves the problem of too low running frame rate, and makes the display effect of the components better after being imported into the game engine.
[0041] As an optional implementation manner of the embodiment of the present invention, responding to the loading operation of the game scene to be displayed includes: dividing the game scene to be displayed according to the type of the game scene to be displayed; responding to the loading operation of the divided game scene to be displayed according to the received viewing instruction. Specifically, when there are too many game scenes to be displayed, the game engine needs a certain amount of time to load, and due to too many scenes, there may be situations such as stuttering during the loading process.
[0042] In the present invention, first, the game scene to be displayed can be divided according to the type of the game scene to be displayed. For example, when the BIM scene is a building (10 floors), it can be divided into 10 game sub-scenes An (n represents the number of floors) to be displayed according to the requirements by floors, which are respectively represented as A1, A2, A3,...., A10. Secondly, when the user wants to view, the corresponding game sub-scene is loaded according to the viewing requirement. For example, when the user wants to display the picture of the first floor (i.e., view the first floor), the game engine only needs to load the game sub-scene A1 corresponding to the first floor. Through this dynamic loading method, the purpose of maximizing the use of hardware performance can be achieved.
[0043] In one embodiment, different sub-scene construction rules (classified by type) are abstracted according to business requirements, and the components are respectively stored in different sub-scenes. For example, all the components on the first floor are put into sub-scene 1, and all the components on the second floor are put into sub-scene 2. When switching from displaying the second floor to displaying the first floor, all the components in sub-scene 2 are unloaded from the memory, and all the components in sub-scene 1 are loaded from the hard disk into the memory and then submitted to the graphics card for display of the picture.
[0044] As an optional implementation manner of an embodiment of the present invention, responding to the rendering operation of the game scene to be displayed includes: matching the materials in the pre-configured material library in the game engine with the materials of the components in the game scene to be displayed; adjusting the material attributes of the materials in the material library according to the matching result and synchronizing the adjusted materials to the components corresponding to the game scene to be displayed. Specifically, BIM software has natural disadvantages in terms of rendering effects. Therefore, in order to achieve a realistic rendering effect, a PBR-based material library is constructed in the game engine (for example, UE4), and the materials and parameter adjustment are customized through the supporting material library to optimize and enhance the visual effect.
[0045] First, a corresponding material library is pre-configured in the game engine UE4, which can include conventional materials such as brick walls, ceilings, concrete, fabrics, glass, grilles, floors, leather, metal, plastic, roofs, tiles, wood, etc. Then, in the game engine UE4, the materials are assigned to the components in the corresponding BIM scene through operations such as mouse dragging or clicking (i.e., matching). Finally, the material attributes corresponding to the successfully matched materials can be adjusted secondarily, such as secondary adjustments of UV scaling, UV offset, etc., and the adjusted materials are synchronized to the components corresponding to the game scene to be displayed to achieve the purpose of enhancing the visual effect of the scene. Among them, the material attributes can include brightness, saturation, metallicity, specular, roughness, etc.
[0046] As an optional implementation manner of an embodiment of the present invention, the method further includes: creating any data area in the storage space corresponding to the game scene to be displayed to store the first engine value and the first state value corresponding to each component of the BIM scene after being imported into the game engine; when the BIM scene changes, importing the changed BIM scene into the game engine and obtaining the second state value and the second engine value corresponding to each component; comparing the second engine value corresponding to each component with the corresponding first state value; when the second engine value corresponding to any component is consistent with the first state value, the corresponding component in the game scene to be displayed in the game engine is not modified, and the first state value and the first engine value corresponding to the component are updated according to the second state value; when the second engine value corresponding to any component is inconsistent with the first state value, the corresponding component in the game scene to be displayed in the game engine is modified, and the third engine value corresponding to the component is obtained.
[0047] Specifically, the engine value belongs to the game scene and is modified and adjusted by the staff responsible for the game scene in the game scene. Among them, the first engine value represents the engine value after the previous import; the second engine value and the third engine value both represent the engine values after the current import in different scenes.
[0048] The first status value belongs to the game scene. If it is modified, it can only be modified by the second status value imported this time, or not modified. The second status value belongs to the import process and is the value imported this time from the BIM scene. This value can only be modified by the BIM scene staff in the BIM scene before this import.
[0049] Generally speaking, staff will make certain changes to the scene in the game engine to meet the requirements of real-time rendering, such as texture replacement, model update, etc. However, according to the actual situation, the source scene or design data being processed also needs to be changed to meet new needs or incorporate the feedback of project stakeholders into the project.
[0050] Specifically, first, in the storage space corresponding to the game scene to be displayed, a data area named BimDataArea is allocated to store the first status value (Import Data) when the component is imported, such as the position of the component in the BIM scene, the texture used by the component, the model used by the component, etc. At this time, the first status value is the first engine value. Both the status value and the engine value represent the status information value of the corresponding component in the BIM scene, such as the position value in the BIM scene, etc.
[0051] Second, when the BIM scene changes, the changed BIM scene is imported into the corresponding game engine again, and the second engine value and the second status value corresponding to each component are obtained; then, for each component, the second engine value is compared with the first status value:
[0052] 1. If they are the same, it means that the engine operator has not modified the corresponding component in this game engine, so the first status value and the engine value (i.e., the first engine value) are updated with the newly imported status value (i.e., the second status value);
[0053] 2. If they are different, it means that the engine operator has modified the attributes of the component in the game engine. At this time, the third engine value corresponding to the modified component in the game engine is obtained.
[0054] Then, it is necessary to determine whether the component is modified in the source scene, including: comparing the second state value corresponding to the component that will be modified in the game scene to be displayed with the first state value; when the second state value is consistent with the first state value, the component corresponding to the unchanged component in the BIM scene where the scene changes is updated according to the third engine value; when the second state value is inconsistent with the first state value, the component corresponding to the changed component in the BIM scene where the scene changes is updated according to the third engine value, or the first state value and the first engine value corresponding to the component are updated according to the second state value.
[0055] Specifically, compare the second state value with the first state value:
[0056] 2.1. If the two are consistent, it indicates that the component has not been modified in the BIM scene. At this time, the component has no change and still presents the modification of the operator in the engine (that is, update the first engine value using the corresponding third engine value).
[0057] 2.2. If the two are inconsistent, it indicates that the BIM scene has also modified the component. At this time, either the BIM scene modification or the engine scene modification can be used as the standard:
[0058] 2.2.1. Taking the BIM scene modification as the standard, using the newly imported value (i.e., the second state value) as the final engine value (i.e., the updated first engine value), and updating the first state value with the newly imported value (i.e., the second state value);
[0059] 2.2.2. Taking the engine scene modification as the standard, still presenting the modification of the operator in the engine (that is, update the first engine value using the corresponding third engine value).
[0060] Through this method, not only can the changes of new content in the source scene (BIM scene) be reflected, but also the changes and production of the content that has been completed in the game engine will not be lost, avoiding heavy and costly rework.
[0061] As an optional implementation manner of an embodiment of the present invention, the method further includes: constructing a corresponding Internet of Things material resource library according to the BIM scene; adjusting the parameters of the materials in the Internet of Things material resource library according to the components of the BIM scene and outputting the adjusted material parameters to the game engine through a preset Internet of Things data platform for visualization.
[0062] Specifically, first, a huge Internet of Things (IoT) material resource library is constructed according to the BIM scenario, and the parameters of the IoT materials are adjusted so that they correspond to a certain material in the real world (i.e., the actual component in the real world corresponding to any component in the BIM scenario), such as intelligent lamp posts, intelligent trash cans, etc.
[0063] Then, the adjusted material parameters are output and docked to UE4 (game engine) through the unified data format of the IoT data platform to achieve visual presentation.
[0064] In this way, a digital twin scenario can be quickly constructed to achieve a one-to-one mapping between the virtual and the real.
[0065] Moreover, some IoT devices can also be reversely controlled by the UE4 visualization platform to control the IoT hardware devices, such as controlling the brightness of a specific single lamp in UE4 and controlling the camera to turn to view real-time video, etc., that is, realizing the control operation of the game engine on the actual component.
[0066] The embodiment of the present invention also provides a game engine visualization device based on the BIM scenario, as Figure 3 shown, the device includes:
[0067] An acquisition module 301, configured to acquire a pre-constructed BIM scenario and classify and code the components included in the BIM scenario according to preset service requirements; for detailed content, refer to the relevant description of step S101 in the above method embodiment.
[0068] A processing module 302, configured to perform merge control processing on the components in the BIM scenario during the process of importing the BIM scenario into the game engine according to the classification coding result of the components and the preset component merge control rules in the game engine, to obtain a game scene to be displayed; for detailed content, refer to the relevant description of step S102 in the above method embodiment.
[0069] A response module 303, configured to respond to the loading and rendering operations of the game scene to be displayed; for detailed content, refer to the relevant description of step S103 in the above method embodiment.
[0070] The game engine visualization device based on the BIM scenario provided by the embodiment of the present invention reduces the number of scene components by classifying and coding and performing merge control processing on the components in the BIM scenario when importing the BIM scenario into the game engine, solves the problem of too low running frame rate, and makes the display effect of the components better after being imported into the game engine.
[0071] As an alternative implementation manner of an embodiment of the present invention, the device further includes: a division module, configured to divide the game scene to be displayed according to the type of the game scene to be displayed; a loading module, configured to respond to a received viewing instruction and perform a loading operation on the divided game scene to be displayed.
[0072] As an alternative implementation manner of an embodiment of the present invention, the device further includes: a matching module, configured to match the materials in the material library pre-configured in the game engine with the materials of the components in the game scene to be displayed; an adjustment module, configured to adjust the material attributes of the materials in the material library according to the matching result and synchronize the adjusted materials to the components corresponding to the game scene to be displayed.
[0073] As an alternative implementation manner of an embodiment of the present invention, the device further includes: a creation module, configured to create any data area in the storage space corresponding to the game scene to be displayed to store the first engine value and the first state value corresponding to each component after the BIM scene is imported into the game engine; a first acquisition module, configured to, when the BIM scene changes, import the changed BIM scene into the game engine and acquire the second state value and the second engine value corresponding to each component; a first comparison module, configured to compare the second engine value corresponding to each component with the corresponding first state value; a first update module, configured to, when the second engine value corresponding to any component is consistent with the first state value, not modify the corresponding component in the game scene to be displayed in the game engine and update the first state value and the first engine value corresponding to the component according to the second state value; a second acquisition module, configured to, when the second engine value corresponding to any component is inconsistent with the first state value, modify the corresponding component in the game scene to be displayed in the game engine and acquire the third engine value corresponding to the component.
[0074] As an alternative implementation manner of an embodiment of the present invention, the device further includes: a second comparison module, configured to compare the second state value corresponding to the component modified in the game scene to be displayed with the first state value; a second update module, configured to, when the second state value is consistent with the first state value, not modify the corresponding component in the changed BIM scene and update the first engine value according to the third engine value; a third update module, configured to, when the second state value is inconsistent with the first state value, modify the corresponding component in the changed BIM scene and update the first engine value corresponding to the component according to the third engine value, or update the first state value and the first engine value corresponding to the component according to the second state value.
[0075] As an optional implementation manner of an embodiment of the present invention, the device further includes: a construction module, configured to construct a corresponding Internet of Things material resource library according to the BIM scenario; a second processing module, configured to adjust the parameters of the materials in the Internet of Things material resource library according to the components of the BIM scenario and output the adjusted material parameters to the game engine through a preset Internet of Things data platform for visualization.
[0076] For the detailed function description of the game engine visualization device based on the BIM scenario provided in the embodiment of the present invention, please refer to the description of the game engine visualization method based on the BIM scenario in the above embodiment.
[0077] An embodiment of the present invention also provides a storage medium, as Figure 4 shown, on which a computer program 401 is stored. When the instruction is executed by a processor, the steps of the game engine visualization method based on the BIM scenario in the above embodiment are implemented. Audio and video stream data, feature frame data, interaction request signaling, encrypted data, and a preset data size, etc. are also stored on the storage medium. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memories.
[0078] Those skilled in the art can understand that to implement all or part of the processes in the above embodiment methods, it can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memories.
[0079] An embodiment of the present invention also provides an electronic device, as Figure 5 shown. The electronic device may include a processor 51 and a memory 52. The processor 51 and the memory 52 can be connected through a bus or other means. Figure 5 Taking the connection through the bus as an example.
[0080] The processor 51 may be a Central Processing Unit (CPU). The processor 51 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., in the form of chips, or combinations of the above types of chips.
[0081] As a non-transitory computer-readable storage medium, the memory 52 can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the corresponding program instructions / modules in the embodiments of the present invention. The processor 51 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 52, that is, to implement the method for visualizing a game engine based on a BIM scenario in the above method embodiments.
[0082] The memory 52 may include a program storage area and a data storage area. Among them, the program storage area can store an operating device and application programs required for at least one function; the data storage area can store data created by the processor 51, etc. In addition, the memory 52 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 52 may optionally include a memory remotely provided relative to the processor 51, and these remote memories can be connected to the processor 51 through a network. Examples of the above networks include, but are not limited to, the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof.
[0083] The one or more modules are stored in the memory 52 and, when executed by the processor 51, execute the method for visualizing a game engine based on a BIM scenario in the embodiment shown in Figure 1 -3.
[0084] Specific details of the above electronic device can be understood by referring to the corresponding relevant descriptions and effects in the embodiments shown in Figures 1 to 3 and will not be elaborated here.
[0085] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A visualization method of a game engine based on a BIM scenario, characterized in that, The method includes the following steps: Obtain a pre - constructed BIM scene and classify and code the components included in the BIM scene according to preset business requirements; According to the classification and coding results of the components and the preset component merging control rules in the game engine, perform merging control processing on the components in the BIM scene during the process of importing the BIM scene into the game engine to obtain a game scene to be displayed; Respond to the loading and rendering operations of the game scene to be displayed; The method further includes: Create any data area in the storage space corresponding to the game scene to be displayed to store the first engine value and the first status value corresponding to each component after importing the BIM scene into the game engine; When the BIM scene changes, import the changed BIM scene into the game engine and obtain the second status value and the second engine value corresponding to each component; Compare the second engine value corresponding to each component with the corresponding first status value; When the second engine value corresponding to any component is consistent with the first status value, the component corresponding to the unchanged component in the game scene to be displayed in the game engine is not modified, and the first status value and the first engine value corresponding to the component are updated according to the second status value; When the second engine value corresponding to any component is inconsistent with the first status value, the component corresponding to the changed component in the game scene to be displayed in the game engine is modified, and the third engine value corresponding to the component is obtained.
2. The method according to claim 1, wherein Responding to the loading operation of the game scene to be displayed includes: Divide the game scene to be displayed according to the type of the game scene to be displayed; Respond to the loading operation of the divided game scene to be displayed according to the received viewing instruction.
3. The method according to claim 1, wherein Responding to the rendering operation of the game scene to be displayed includes: Match the materials in the pre - configured material library in the game engine with the materials of the components in the game scene to be displayed; Adjust the material attributes of the materials in the material library according to the matching result and synchronize the adjusted materials to the components corresponding to the game scene to be displayed.
4. The method according to claim 1, wherein After the step that when the second engine value corresponding to any component is inconsistent with the first status value, the component corresponding to the changed component in the game scene to be displayed in the game engine is modified, and the third engine value corresponding to the component is obtained, the method further includes: Compare the second status value of the component corresponding to the changed component in the game scene to be displayed with the first status value; When the second status value is consistent with the first status value, the component corresponding to the unchanged component in the changed BIM scene is not modified, and the first engine value is updated according to the third engine value; When the second status value is inconsistent with the first status value, the component corresponding to the changed component in the changed BIM scene is modified, and the first engine value corresponding to the component is updated according to the third engine value, or the first status value and the first engine value corresponding to the component are updated according to the second status value.
5. The method according to claim 3, characterized in that, The method further includes: Construct a corresponding Internet of Things material resource library according to the BIM scene; Adjust the parameters of the materials in the Internet of Things material resource library according to the components of the BIM scenario, and output the adjusted material parameters to the game engine through a preset Internet of Things data platform for visualization.
6. A game engine visualization device based on a BIM scenario, characterized in that Including: An acquisition module, configured to acquire a pre-constructed BIM scenario and classify and code the components included in the BIM scenario according to preset business requirements; A processing module, configured to perform merge control processing on the components in the BIM scenario during the process of importing the BIM scenario into the game engine according to the classification and coding results of the components and the preset component merge control rules in the game engine, so as to obtain a game scenario to be displayed; A response module, configured to respond to the loading and rendering operations of the game scenario to be displayed; The device further includes: A creation module, configured to create any data area in the storage space corresponding to the game scenario to be displayed to store the first engine value and the first state value corresponding to each component after the BIM scenario corresponding to the BIM scenario is imported into the game engine; A first acquisition module, configured to, when the BIM scenario changes, import the BIM scenario with the changed scenario into the game engine and acquire the second state value and the second engine value corresponding to each component; A first comparison module, configured to compare the second engine value corresponding to each component with the corresponding first state value; A first update module, configured to, when the second engine value corresponding to any component is consistent with the first state value, the component corresponding to the component in the game scenario to be displayed in the game engine is not modified, and the first state value and the first engine value corresponding to the component are updated according to the second state value; A second acquisition module, configured to, when the second engine value corresponding to any component is inconsistent with the first state value, the game engine.
7. The device according to claim 6, characterized in that, The device further includes: A division module, configured to divide the game scenario to be displayed according to the type of the game scenario to be displayed; A loading module, configured to respond to the loading operation of the divided game scenario to be displayed according to the received viewing instruction.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the BIM-scenario-based game engine visualization method according to any one of claims 1-5.
9. An electronic device, characterized in that, Including: A memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the BIM-scenario-based game engine visualization method according to any one of claims 1-5.
Citation Information
Patent Citations
Model component information display method and device, computer equipment and storage medium
CN111046472A
Building model processing method and device, computer equipment and storage medium
CN112348954A