A rendering method and device

By generating index files and determining component number lists, the problem of information loss after BIM model is solved, efficient rendering is achieved, and the rendering efficiency and accuracy of the BIM model are improved.

CN113313809BActive Publication Date: 2024-12-27CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110621472.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-03
Publication Date
2024-12-27
Estimated Expiration
2041-06-03

AI Technical Summary

Technical Problem

When the BIM model is lightened after decorrelation of components, it leads to a large amount of internal building information being lost and cannot play its original role.

Method used

By obtaining the room number and component number in the model to be rendered, determining the center point of the room and generating a component number list, generating room space attribute information, creating an index file, and determining the component number list of the room where the camera is located based on the index file, thereby rendering and eliminating Geometric grid outside the viewing angle range.

Benefits of technology

It greatly improves the rendering efficiency of the BIM model, ensuring the completeness of information and the accuracy of rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113313809B_ABST
    Figure CN113313809B_ABST
Patent Text Reader

Abstract

The present application discloses a rendering method and device, and relates to the field of computer technology, and specifically to the field of artificial intelligence technology. The method includes obtaining a model to be rendered, determining the room number and component number in the model to be rendered; determining the center point of the room in the model to be rendered corresponding to the room number, and then filtering the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point; generating a room space attribute information pair corresponding to the room number according to the component number list; generating an index file according to each room number, the component number list corresponding to each room number, and the space attribute information pair corresponding to each room number; determining the room number where the camera is located in the current frame of the model to be rendered, and then determining the component number list corresponding to the room number where the camera is located based on the index file, so as to render the corresponding component. Thus, a large number of geometric grids outside the viewing angle are eliminated, greatly improving the rendering efficiency of the BIM model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, specifically to the field of artificial intelligence technology, and in particular to a rendering method and device. Background Art

[0002] At present, Building Information Model (BIM) plays a very important role in the whole process management of construction projects, including the emerging smart buildings, smart parks, smart cities, etc., which all rely on BIM models for industry applications. However, BIM models are criticized by the industry for their huge size. Therefore, many methods for preprocessing BIM models have emerged in the industry. After preprocessing the BIM model, such as de-association of components and lightweighting of the BIM model, a lot of building information inside the BIM model is completely lost, leaving only part of the data, which does not play the original role of the BIM model.

[0003] In the process of implementing this application, the inventors found that there are at least the following problems in the prior art:

[0004] After the components of the BIM model are decoupled and the BIM model is lightweight, a lot of building information within the BIM model is lost, leaving only partial data, which does not play the original role of the BIM model. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a rendering method and device, which can solve the problem that after the existing BIM model is lightweighted after component de-association, a lot of building information inside the BIM model is completely lost, and only part of the data remains, which does not play the original role of the BIM model.

[0006] To achieve the above objective, according to one aspect of an embodiment of the present application, a rendering method is provided, including:

[0007] Obtain the model to be rendered, and determine the room number and component number in the model to be rendered;

[0008] Determine the center point of the room in the to-be-rendered model corresponding to the room number, and then filter the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point;

[0009] According to the component number list, generate room space attribute information pairs corresponding to the room numbers;

[0010] Generate an index file according to each room number, a component number list corresponding to each room number, and a pair of space attribute information corresponding to each room number;

[0011] The room number of the camera in the current frame of the model to be rendered is determined, and then based on the index file, a component number list corresponding to the room number of the camera is determined to render the corresponding component.

[0012] Optionally, a list of component numbers corresponding to room numbers is filtered according to the center point and the auxiliary lines passing through the center point, including:

[0013] For each room number in the model to be rendered, rays are emitted from the center point in all directions to determine the component number of the first component intersected by each ray, and then a list of component numbers corresponding to the room numbers is generated.

[0014] Optionally, generating a room space attribute information pair corresponding to the room number includes:

[0015] The maximum and minimum values ​​of the spatial coordinates of all components in the component number list corresponding to each room number in the rendering model are calculated, and the calculated maximum and minimum values ​​of the spatial coordinates of the components corresponding to each room number are determined as the room space attribute information pair corresponding to the room number.

[0016] Optionally, determining the room number where the camera in the current frame of the model to be rendered is located includes:

[0017] Determine the current spatial coordinates of the camera in the current frame of the model to be rendered;

[0018] Obtain the spatial coordinates of the camera of the previous frame of the current frame of the model to be rendered and determine them as the spatial coordinates of the previous frame;

[0019] According to the current space coordinates and the previous frame space coordinates, determine the room number where the camera in the current frame is located.

[0020] Optionally, determining the room number where the camera in the current frame is located according to the current spatial coordinates and the spatial coordinates of the previous frame includes:

[0021] In response to determining that the current spatial coordinates are the same as the spatial coordinates of the previous frame, determining that the room number where the camera in the current frame is located is the same as the room number where the camera in the previous frame was located, obtain the room number where the camera in the previous frame is located and determine it as the room number where the camera in the current frame is located.

[0022] Optionally, determining a list of component numbers corresponding to the room number where the camera is located includes:

[0023] The component number list corresponding to the room number where the camera in the previous frame is located is obtained, and is determined to be the component number list corresponding to the room number where the camera in the current frame is located.

[0024] Optionally, determining a list of component numbers corresponding to the room number where the camera is located includes:

[0025] The index file is called to determine a component number list corresponding to the room number where the camera in the current frame is located according to the room number where the camera in the previous frame is located.

[0026] Optionally, determining the room number where the camera in the current frame is located according to the current spatial coordinates and the spatial coordinates of the previous frame includes:

[0027] In response to determining that the current spatial coordinates are different from the spatial coordinates of the previous frame, the index file is called to compare the current spatial coordinates with each room spatial attribute information pair in the index file to determine the corresponding spatial attribute information pair and then determine the corresponding room number.

[0028] In addition, the present application also provides a rendering device, including:

[0029] An acquisition unit is configured to acquire the model to be rendered and determine the room number and component number in the model to be rendered;

[0030] A screening unit is configured to determine a center point of a room in the to-be-rendered model corresponding to the room number, and then screen a list of component numbers corresponding to the room number according to the center point and an auxiliary line passing through the center point;

[0031] A room space attribute information pair generating unit is configured to generate a room space attribute information pair corresponding to a room number according to a component number list;

[0032] An index file generating unit configured to generate an index file according to each room number, a component number list corresponding to each room number, and a pair of space attribute information corresponding to each room number;

[0033] The rendering unit is configured to determine the room number where the camera is located in the current frame of the model to be rendered, and then determine the component number list corresponding to the room number where the camera is located based on the index file to render the corresponding component.

[0034] Optionally, the screening unit is further configured to:

[0035] For each room number in the model to be rendered, rays are emitted from the center point in all directions to determine the component number of the first component intersected by each ray, and then a list of component numbers corresponding to the room numbers is generated.

[0036] Optionally, the room space attribute information pair generating unit is further configured to:

[0037] The maximum and minimum values ​​of the spatial coordinates of all components in the component number list corresponding to each room number in the rendering model are calculated, and the calculated maximum and minimum values ​​of the spatial coordinates of the components corresponding to each room number are determined as the room space attribute information pair corresponding to the room number.

[0038] Optionally, the rendering unit is further configured to:

[0039] Determine the current spatial coordinates of the camera in the current frame of the model to be rendered;

[0040] Obtain the spatial coordinates of the camera of the previous frame of the current frame of the model to be rendered and determine them as the spatial coordinates of the previous frame;

[0041] According to the current space coordinates and the previous frame space coordinates, determine the room number where the camera in the current frame is located.

[0042] Optionally, the rendering unit is further configured to:

[0043] In response to determining that the current spatial coordinates are the same as the spatial coordinates of the previous frame, determining that the room number where the camera in the current frame is located is the same as the room number where the camera in the previous frame was located, obtain the room number where the camera in the previous frame is located and determine it as the room number where the camera in the current frame is located.

[0044] Optionally, the rendering unit is further configured to:

[0045] The component number list corresponding to the room number where the camera in the previous frame is located is obtained, and is determined to be the component number list corresponding to the room number where the camera in the current frame is located.

[0046] Optionally, the rendering unit is further configured to:

[0047] The index file is called to determine a component number list corresponding to the room number where the camera in the current frame is located according to the room number where the camera in the previous frame is located.

[0048] Optionally, the rendering unit is further configured to:

[0049] In response to determining that the current spatial coordinates are different from the spatial coordinates of the previous frame, the index file is called to compare the current spatial coordinates with each room spatial attribute information pair in the index file to determine the corresponding spatial attribute information pair and then determine the corresponding room number.

[0050] In addition, the present application also provides a rendering electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the rendering method as described above.

[0051] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the rendering method as described above is implemented.

[0052] One embodiment of the above invention has the following advantages or beneficial effects: the present application obtains the model to be rendered, determines the room number and component number in the model to be rendered; determines the center point of the room in the model to be rendered corresponding to the room number, and then filters the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point; generates the room space attribute information pair corresponding to the room number according to the component number list; generates an index file according to each room number, the component number list corresponding to each room number, and the space attribute information pair corresponding to each room number; determines the room number where the camera is located in the current frame of the model to be rendered, and then determines the component number list corresponding to the room number where the camera is located based on the index file to render the corresponding component. Thus, a large number of geometric meshes outside the viewing angle are eliminated, greatly improving the rendering efficiency of the BIM model.

[0053] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.

[0055] Figure 1 is a schematic diagram of the main process of the rendering method according to the first embodiment of the present application;

[0056] Figure 2 is a schematic diagram of the main process of the rendering method according to the second embodiment of the present application;

[0057] Figure 3 is a schematic diagram of an application scenario of a rendering method according to a third embodiment of the present application;

[0058] Figure 4 is a schematic diagram of main modules of a rendering device according to an embodiment of the present application;

[0059] Figure 5 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;

[0060] Figure 6 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0061] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0062] Figure 1 is a schematic diagram of the main process of the rendering method according to the first embodiment of the present application, such as Figure 1 As shown, the rendering method includes:

[0063] Step S101, obtaining a model to be rendered, and determining room numbers and component numbers in the model to be rendered.

[0064] In this embodiment, the execution subject of the rendering method (for example, it can be a server) can obtain the model to be rendered for realizing indoor browsing fast rendering by wired connection or wireless connection. The model to be rendered can be a building information model (Building Information Model, BIM). Specifically, the execution subject can preprocess the BIM model to obtain the room numbers and component numbers of each room. Read the model configuration information of the BIM model (specifically read the serial number (1~n), the component number corresponding to the serial number, the component data information set corresponding to the component number, and store the data in the BIM model file according to the component number), and then build a BIM model database. Specifically, the room number of each room in the BIM model is not repeated and is unique. Number all the rooms of the BIM model. The rooms here are not just rooms in the traditional sense. The enclosed spaces in the building are defined as rooms, such as lobbies, corridors, etc. When determining the room number, ensure that all numbers are unique, that is, unique identification numbers. Extract a model of a floor from the BIM building model. Specifically, the room numbers can be 001, 002, 003, 004, and 005.

[0065] Then all components are numbered, and the specific numbers are 1, 2, 3, ..., 25, 26. Specifically, all components of the BIM model are numbered. The components here are the smallest components that constitute the BIM model, including walls, plates, beams, columns, windows, doors, stairs, etc. These components cannot be divided. The numbering of components follows the rule of from small to large, and all numbers are unique.

[0066] For example, components may specifically include walls, floors, and ceilings. Component numbers may be wall-1, wall-2, wall-3, wall-4, floor-5, ceiling-6, wall-7, wall-8, wall-9, floor-10, ceiling-11, wall-12, wall-13, wall-14, floor-15, ceiling-16, wall-17, wall-18, wall-19, floor-20, ceiling-21, wall-22, wall-23, wall-24, floor-25, and ceiling-26. Component numbers corresponding to each room are also non-repetitive. For example, component numbers corresponding to room 001 may include: wall-1, wall-2, wall-3, wall-4, floor-5, and ceiling-6. Component numbers corresponding to room 002 may include: wall-4, wall-7, wall-8, wall-9, floor-10, and ceiling-11. The component numbers corresponding to room 003 may include: wall-8, wall-12, wall-13, wall-14, floor-15, ceiling-16. The component numbers corresponding to room 004 may include: wall-17, wall-3, wall-9, wall-14, wall-19, wall-18, floor-20, ceiling-21. The component numbers corresponding to room 005 may include: wall-22, wall-18, wall-24, wall-23, floor-25, ceiling-26.

[0067] Step S102, determining the center point of the room in the to-be-rendered model corresponding to the room number, and then filtering the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point.

[0068] Specifically, the execution subject can generate a corresponding component number list for all rooms of the BIM model in a cyclic manner. The specific steps are as follows: determine the center point of the room in the model to be rendered corresponding to each room number, take the center point of each room as the center of the sphere in a cyclic manner, and make rays through the center of the sphere to all directions outside the room where the center of the sphere is located, and each ray exceeds the room where the center of the sphere is located, so as to ensure that the rays in all directions have an intersection with the room where the center of the sphere is located, wherein the ray is an auxiliary line. For example, the execution subject can emit rays in a sphere from the center point of a room, i.e., the center of the sphere, to all directions of 360° outside the room in a cyclic manner, and then determine the first intersecting component of the BIM model corresponding to the room with each ray, and add the component number corresponding to the determined first intersecting component to the container T(i), wherein i represents the room number. After the ray emission from the center point of the room to all directions outside the room is completed, the component numbers in the container T(i) are deduplicated, and then the remaining component numbers after deduplication are determined as the component number list corresponding to the room number i, which is defined as L(i).

[0069] Step S103: Generate room space attribute information pairs corresponding to room numbers according to the component number list.

[0070] Specifically, after the room component list is screened, the execution body can, in a cyclic manner, perform statistics on the maximum and minimum values ​​of the spatial coordinates of all components in the component number list corresponding to each room in turn to obtain the maximum coordinate point Pmax and the minimum coordinate point Pmin of each room, that is, Pmax(x, y, z) = (MAX(L(i).x), MAX(L(i).y), MAX(L(i).z), Pmin(x, y, z) = (MIN(L(i).x), MIN(L(i).y), MIN(L(i).z), Pmax(i) and Pmin(i) are the spatial attribute information of room R(i), and i is the room number. They correspond to the maximum coordinate point component and the minimum coordinate point component corresponding to each room number respectively. The room spatial attribute information pair corresponding to the room number, for example, can be<Pmin(001),Pmax(001)> , where 001 is the room number.

[0071] Step S104: Generate an index file based on each room number, a component number list corresponding to each room number, and a pair of space attribute information corresponding to each room number.

[0072] The execution entity can store the room numbers of the BIM model, the component number list corresponding to each room number, and the space attribute information corresponding to each room number in a one-to-one correspondence in the form of a list, and then generate a room component information index file of the BIM model, namely, index file F.

[0073] Step S105, determining the room number where the camera in the current frame of the model to be rendered is located, and then determining the component number list corresponding to the room number where the camera is located based on the index file, so as to render the corresponding components.

[0074] Specifically, BIM model rendering belongs to the category of graphic rendering and is a cyclic process.

[0075] In this embodiment, determining the room number where the camera in the current frame of the model to be rendered is located includes:

[0076] Determine the current spatial coordinates of the camera in the current frame of the model to be rendered; obtain the spatial coordinates of the camera in the previous frame of the current frame of the model to be rendered and determine them as the previous frame spatial coordinates; determine the room number where the camera in the current frame is located based on the current spatial coordinates and the previous frame spatial coordinates.

[0077] For example, the execution entity can obtain the current spatial coordinates Pc(x, y, z) of the camera in the current frame in a three-dimensional scene. Determine whether there is a change in the current spatial coordinates of the camera in the current frame compared with the previous frame: If there is a change, then compare Pc(x, y, z) with the spatial attribute information of each room in the index file F to find a pair of spatial attribute information pairs <Pmin(i), Pmax(i)> such that Pmin(x, y, z) < Pc(x, y, z) < Pmax(x, y, z). The room number R(i) corresponding to this pair of spatial attribute information <Pmin(i), Pmax(i)> is the room number where the camera is located in the current frame. Assume that the spatial coordinates of the camera satisfy Pmin(004) < Pc(x, y, z) < Pmax(004), then the room number where the current camera is located is R(i) = 004. If there is no change, then the GPU performs component rendering according to the component number list corresponding to the previous frame room number in the rendering pipeline.

[0078] Specifically, in some optional implementation manners in this embodiment, determining the room number where the camera is located in the current frame according to the current spatial coordinates and the previous frame spatial coordinates includes:

[0079] In response to determining that the current spatial coordinates are the same as the previous frame spatial coordinates, determine that the room number where the camera is located in the current frame is the same as the room number where the camera is located in the previous frame, obtain the room number where the camera is located in the previous frame and determine it as the room number where the camera is located in the current frame.

[0080] In this implementation manner, determining the component number list corresponding to the room number where the camera is located includes:

[0081] Obtain the component number list corresponding to the room number where the camera is located in the previous frame and determine it as the component number list corresponding to the room number where the camera is located in the current frame.

[0082] In this implementation manner, determining the component number list corresponding to the room number where the camera is located includes:

[0083] Call the index file to determine the corresponding component number list according to the room number where the camera is located in the previous frame, and then determine it as the component number list corresponding to the room number where the camera is located in the current frame. For example, the execution entity can call the index file to perform component list indexing according to the room number R(i) obtained from the previous frame to obtain the component list L(i); when R(i) = 004, according to the index list, index out its corresponding component list L(i) = <17, 3, 9, 14, 19, 18, 20, 21>, and L(i) is the rendering component list.

[0084] In some optional implementations of this embodiment, determining the room number where the camera in the current frame is located according to the current spatial coordinates and the spatial coordinates of the previous frame also includes:

[0085] In response to determining that the current spatial coordinates are different from the spatial coordinates of the previous frame, the index file is called to compare the current spatial coordinates with each room spatial attribute information pair in the index file to determine which room spatial attribute information pair the current spatial coordinates are within, and then the room number corresponding to the spatial attribute information pair in which the current spatial coordinates fall is determined as the room number where the camera in the current frame is located.

[0086] Specifically, the corresponding component rendering includes: BIM model rendering executes the rendering command in a loop according to the following program steps: reading the rendering component list value, that is, the component number list, and reading all the component data information sets I in sequence from the BIM database according to the component numbers in the rendering list, that is, the component number list, such as reading all the information attributes of the components numbered <17, 3, 9, 14, 19, 18, 20, 21> in sequence, including the vertex attributes, material attributes, map attributes, etc. of the components, and transferring all the read component attributes to the video memory, and the GPU renders the corresponding components according to the rendering pipeline.

[0087] This embodiment accurately determines the room number of the camera in the current frame of the model to be rendered by comparing the current spatial coordinates of the camera in the current frame with the spatial coordinates of the camera in the previous frame. When the room numbers corresponding to the rooms where the cameras are located in the previous frame and the current frame are the same, the component rendering is directly performed to streamline the rendering process and improve the efficiency and accuracy of BIM model rendering. When the room numbers corresponding to the rooms where the cameras are located in the previous frame and the current frame are different, the index file is called to quickly determine the room number corresponding to the current spatial coordinates of the camera in the current frame, and then the corresponding component number list is determined based on the index file to perform component rendering, which greatly improves the rendering efficiency of the BIM model.

[0088] Figure 2 is a schematic diagram of the main flow of the rendering method according to the second embodiment of the present application. Figure 2 As shown, the rendering method includes:

[0089] Step S201, obtaining the model to be rendered, and determining the room number and component number in the model to be rendered.

[0090] Step S202, determining the center point of the room in the to-be-rendered model corresponding to the room number, and then filtering the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point.

[0091] The principles of step S201 to step S202 are similar to those of step S101 to step S102 and will not be described in detail here.

[0092] Specifically, step S202 can also be implemented through step S2021:

[0093] Step S2021, for each room corresponding to the room number in the model to be rendered, rays are emitted from the center point in all directions, the component number of the first component intersected by each ray is determined, and then a component number list corresponding to the room number is generated.

[0094] Specifically, for each room number in the model to be rendered, the execution entity can determine the distance from the edge of each room farthest from the center point of each room to the center point, and then use the distance as the radius of the sphere to construct a sphere with the center point of each room as the center of the sphere. Rays are emitted from the center point of each room in various directions, and the rays can be replaced by the sphere radius of the sphere in various directions. Specifically, the execution entity can determine the component number list corresponding to the room number corresponding to each room by using the component number corresponding to the first intersection point of each sphere radius of the constructed sphere with the corresponding room.

[0095] This embodiment constructs a sphere with the center point of each room as the center of the sphere, and the distance from the edge of each room farthest from the center point to the center point as the radius of the sphere, and determines the component number list corresponding to each room by using the component number of the component corresponding to the first intersection point of the sphere radius in each direction with each room. This can achieve the elimination of a large number of geometric grids outside the viewing angle, greatly improving the rendering efficiency of the BIM model.

[0096] Step S203: Generate room space attribute information pairs corresponding to room numbers according to the component number list.

[0097] The principle of step S203 is similar to that of step S103 and will not be described in detail here.

[0098] Specifically, step S203 can also be implemented by step S2031:

[0099] Step S2031, calculate the maximum and minimum values ​​of the spatial coordinates of all components in the component number list corresponding to each room number in the rendering model, and determine the calculated maximum and minimum values ​​of the spatial coordinates of the components corresponding to each room number as the room space attribute information pair corresponding to the room number. For example, the room space attribute information pair can be<Pmin(001),Pmax(001)> , where 001 is the room number.

[0100] Step S204: Generate an index file based on each room number, a component number list corresponding to each room number, and a pair of space attribute information corresponding to each room number.

[0101] Step S205, determining the room number where the camera in the current frame of the model to be rendered is located, and then determining the component number list corresponding to the room number where the camera is located based on the index file, so as to render the corresponding component.

[0102] The principles of step S204 to step S205 are similar to those of step S104 to step S105 and will not be described in detail here.

[0103] Figure 3 FIG. 1 is a schematic diagram of an application scenario of a rendering method according to a third embodiment of the present application. The rendering method can be applied to a fast rendering scenario of indoor browsing of a building information model. Figure 3 As shown, the rendering method in this embodiment involves three steps: BIM model preprocessing, index file generation, and BIM model rendering.

[0104] Specifically, BIM model preprocessing: After the BIM model components are completed, the internal room numbers are not completely determined. The execution entity needs to first mark all rooms with unique identification numbers, and then mark all components in the BIM model (such as walls, plates, beams, columns, doors, windows, etc.) with unique identification numbers, and then determine all room numbers and component numbers inside the BIM model. Then, the execution entity can extract data from the BIM model, build a BIM model database, and store the BIM model in the database, including all room numbers and component numbers inside the BIM model, which are also stored in the corresponding BIM model database.

[0105] Generate index file: Generate BIM model room component index file. Specifically: filter components of all rooms corresponding to room numbers, and then generate a component number list of each room number, that is, obtain the component numbers of all components that constitute each room in the BIM model, and generate the corresponding room space attribute information pairs through the 3D coordinate information of all components, and store the component number list and space attribute information pairs of each room into an independent file (here named BIM model room component information index file, hereinafter referred to as index file), which exists as an attached file of the original BIM model file.

[0106] BIM model rendering: The BIM model rendering system reads the BIM model configuration information and index file into the memory, and then transfers the mesh data information of the BIM model components from the memory to the video memory for the video memory to call and render. Since the index file only stores the component index data and spatial attribute information of the room, it only consumes a very small amount of storage space and is directly transferred to the video memory, saving the delay time of data transmission from the memory to the video memory. When the graphics processing unit (GPU) renders each frame of the BIM model, it first reads the current spatial coordinates of the camera, and then compares the current spatial coordinates with the spatial coordinates of the camera in the previous frame to determine whether there is a change. When it is determined that there is no change, the corresponding component is directly rendered according to the component number list to be rendered determined in the previous frame; when it is determined that there is a change, the room number of the camera in the current frame is recalculated, and then the component number list that the GPU needs to render in the current frame is obtained through the room number where the camera is currently located according to the index file, and then the attribute value of the component in the component number list is obtained from the database, and then the corresponding component rendering is performed. In addition, after the current frame component rendering is completed, other rendering commands can be executed to update the current frame and determine the current spatial coordinates of the camera in the updated current frame until all components corresponding to all rooms in the BIM model are rendered. Thus, the mesh data of all irrelevant components outside the current frame room can be eliminated, which greatly reduces the number of components that need to be rendered, saves a lot of processing resources for GPU rendering, and improves the rendering efficiency of the BIM model.

[0107] The embodiment of the present application avoids the resource consumption problem of real-time rendering of BIM models by preprocessing the BIM spatial grid model in the rendering scene, generating specific spatial scene grid configuration information based on the camera position in the 3D scene, and eliminating a large number of geometric grids outside the viewing angle, thereby greatly improving the rendering efficiency of the BIM model.

[0108] The embodiment of the present application starts from the data source of the BIM model, solves the data problem of large-scale models, greatly improves the rendering efficiency, and enables the application platform of the BIM model to be transplanted from the high-performance PC end to the low-performance smartphone end and tablet end.

[0109] Figure 4 is a schematic diagram of the main modules of the rendering device according to an embodiment of the present application. Figure 4 As shown, the rendering device includes an acquisition unit 401, a screening unit 402, a room space attribute information pair generation unit 403, an index file generation unit 404 and a rendering unit 405.

[0110] The acquisition unit 401 is configured to acquire the model to be rendered and determine the room number and component number in the model to be rendered.

[0111] The screening unit 402 is configured to determine the center point of the room in the to-be-rendered model corresponding to the room number, and then screen the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point.

[0112] The room space attribute information pair generating unit 403 is configured to generate room space attribute information pairs corresponding to room numbers according to the component number list.

[0113] The index file generating unit 404 is configured to generate an index file based on each room number, a component number list corresponding to each room number, and a pair of space attribute information corresponding to each room number.

[0114] The rendering unit 405 is configured to determine the room number where the camera is located in the current frame of the model to be rendered, and then determine the component number list corresponding to the room number where the camera is located based on the index file to render the corresponding component.

[0115] In some embodiments, the screening unit 402 is further configured to: for each room corresponding to the room number in the model to be rendered, emit rays from the center point in all directions, determine the component number of the first component intersected by each ray, and then generate a list of component numbers corresponding to the room numbers.

[0116] In some embodiments, the room space attribute information pair generation unit 403 is further configured to: calculate the maximum and minimum values ​​of the spatial coordinates of all components in the component number list corresponding to each room number in the rendering model, and determine the calculated maximum and minimum values ​​of the spatial coordinates of the components corresponding to each room number as the room space attribute information pair corresponding to the room number.

[0117] In some embodiments, the rendering unit 405 is further configured to: determine the current spatial coordinates of the camera in the current frame of the model to be rendered; obtain the spatial coordinates of the camera in the previous frame of the current frame of the model to be rendered and determine them as the previous frame spatial coordinates; determine the room number where the camera in the current frame is located based on the current spatial coordinates and the previous frame spatial coordinates.

[0118] In some embodiments, the rendering unit 405 is further configured to: in response to determining that the current spatial coordinates are the same as the spatial coordinates of the previous frame, determine that the room number where the camera in the current frame is located is the same as the room number where the camera in the previous frame was located, obtain the room number where the camera in the previous frame is located and determine it as the room number where the camera in the current frame is located.

[0119] In some embodiments, the rendering unit 405 is further configured to: obtain a component number list corresponding to the room number where the camera in the previous frame is located, and determine it as a component number list corresponding to the room number where the camera in the current frame is located.

[0120] In some embodiments, the rendering unit 405 is further configured to: call the index file to determine the component number list corresponding to the room number where the camera in the current frame is located according to the room number where the camera in the previous frame is located.

[0121] In some embodiments, the rendering unit 405 is further configured to: in response to determining that the current spatial coordinates are different from the spatial coordinates of the previous frame, call the index file to compare the current spatial coordinates with each room spatial attribute information pair in the index file to determine the corresponding spatial attribute information pair, and then determine the corresponding room number.

[0122] It should be noted that the rendering method and the rendering device of the present application have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.

[0123] Figure 5 An exemplary system architecture 500 to which the rendering method or rendering device according to the embodiment of the present application can be applied is shown.

[0124] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0125] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0126] The terminal devices 501 , 502 , and 503 may be various electronic devices having a rendering processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0127] Server 505 can be a server that provides various services, such as a background management server that provides support for rendering requests submitted by users using terminal devices 501, 502, and 503 (only as an example). The background management server can obtain the model to be rendered, determine the room number and component number in the model to be rendered; determine the center point of the room in the model to be rendered corresponding to the room number, and then filter the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point; generate a room space attribute information pair corresponding to the room number according to the component number list; generate an index file according to each room number, the component number list corresponding to each room number, and the space attribute information pair corresponding to each room number; determine the room number where the camera is located in the current frame of the model to be rendered, and then determine the component number list corresponding to the room number where the camera is located based on the index file to render the corresponding component. Thus, a large number of geometric grids outside the viewing angle are eliminated, greatly improving the rendering efficiency of the BIM model.

[0128] It should be noted that the rendering method provided in the embodiment of the present application is generally executed by the server 505 , and accordingly, the rendering device is generally disposed in the server 505 .

[0129] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0130] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0131] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0132] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0133] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0134] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0135] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a screening unit, a room space attribute information pair generation unit, an index file generation unit, and a rendering unit. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0137] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device obtains the model to be rendered, determines the room number and component number in the model to be rendered; determines the center point of the room in the model to be rendered corresponding to the room number, and then filters the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point; generates a room space attribute information pair corresponding to the room number according to the component number list; generates an index file according to each room number, the component number list corresponding to each room number, and the space attribute information pair corresponding to each room number; determines the room number where the camera is located in the current frame of the model to be rendered, and then determines the component number list corresponding to the room number where the camera is located based on the index file, so as to render the corresponding component. .

[0138] According to the technical solution of the embodiment of the present application, a large number of geometric grids outside the viewing angle can be eliminated, greatly improving the rendering efficiency of the BIM model.

[0139] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A rendering method, characterized in that: include: Obtain a model to be rendered, and determine room numbers and component numbers in the model to be rendered; Determine the center point of the room in the to-be-rendered model corresponding to the room number, and then filter the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point; Generate a room space attribute information pair corresponding to the room number according to the component number list; the generating of the room space attribute information pair corresponding to the room number comprises: calculating the maximum and minimum values ​​of the spatial coordinates of all components in the component number list corresponding to each room number in the to-be-rendered model, and determining the calculated maximum and minimum values ​​of the spatial coordinates of the components corresponding to each room number as the room space attribute information pair corresponding to the room number; Generate an index file according to each of the room numbers, a list of component numbers corresponding to each of the room numbers, and a pair of space attribute information corresponding to each of the room numbers; The room number of the camera in the current frame of the model to be rendered is determined, and then based on the index file, a component number list corresponding to the room number of the camera is determined to render the corresponding component.

2. The method according to claim 1, characterized in that The filtering of the component number list corresponding to the room number according to the center point and the auxiliary line passing through the center point includes: For each room corresponding to a room number in the model to be rendered, rays are emitted from the center point in all directions to determine the component number of the first component intersected by each ray, thereby generating a component number list corresponding to the room number.

3. The method according to claim 1, characterized in that The step of determining the room number where the camera in the current frame of the model to be rendered is located includes: Determine the current spatial coordinates of the camera in the current frame of the model to be rendered; Obtain the spatial coordinates of the camera of the previous frame of the current frame of the model to be rendered and determine them as the spatial coordinates of the previous frame; The room number where the camera in the current frame is located is determined according to the current space coordinates and the previous frame space coordinates.

4. The method according to claim 3, characterized in that: The step of determining the room number where the camera in the current frame is located according to the current spatial coordinates and the previous frame spatial coordinates includes: In response to determining that the current spatial coordinates are the same as the spatial coordinates of the previous frame, determining that the room number where the camera in the current frame is located is the same as the room number where the camera in the previous frame is located, obtain the room number where the camera in the previous frame is located and determine it as the room number where the camera in the current frame is located.

5. The method according to claim 4, characterized in that The determining of the component number list corresponding to the room number where the camera is located includes: The component number list corresponding to the room number where the camera in the previous frame is located is obtained, and is determined to be the component number list corresponding to the room number where the camera in the current frame is located.

6. The method according to claim 4, characterized in that The determining of the component number list corresponding to the room number where the camera is located includes: The index file is called to determine a component number list corresponding to the room number where the camera in the current frame is located according to the room number where the camera in the previous frame is located.

7. The method according to claim 3, characterized in that The step of determining the room number where the camera in the current frame is located according to the current spatial coordinates and the previous frame spatial coordinates includes: In response to determining that the current spatial coordinates are different from the spatial coordinates of the previous frame, the index file is called to compare the current spatial coordinates with each room spatial attribute information pair in the index file to determine the corresponding spatial attribute information pair, and then determine the corresponding room number.

8. A rendering device, characterized in that: include: An acquisition unit is configured to acquire the model to be rendered and determine the room number and component number in the model to be rendered; A screening unit is configured to determine a center point of a room in the to-be-rendered model corresponding to the room number, and then screen a list of component numbers corresponding to the room number according to the center point and an auxiliary line passing through the center point; The room space attribute information pair generating unit is configured to generate a room space attribute information pair corresponding to the room number according to the component number list; the generating of the room space attribute information pair corresponding to the room number comprises: calculating the maximum value and the minimum value of the spatial coordinates of all components in the component number list corresponding to each room number in the to-be-rendered model, and determining the calculated maximum value and minimum value of the spatial coordinates of the component corresponding to each room number as the room space attribute information pair corresponding to the room number; An index file generating unit configured to generate an index file according to each of the room numbers, a component number list corresponding to each of the room numbers, and a pair of space attribute information corresponding to each of the room numbers; The rendering unit is configured to determine the room number where the camera is located in the current frame of the model to be rendered, and then determine the component number list corresponding to the room number where the camera is located based on the index file to render the corresponding component.

9. The device according to claim 8, characterized in that The screening unit is further configured to: For each room corresponding to a room number in the model to be rendered, rays are emitted from the center point in all directions to determine the component number of the first component intersected by each ray, thereby generating a component number list corresponding to the room number.

10. A rendering electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.