CN110969568B - BIM model double-sided display accelerated rendering method, system, product and storage medium - Google Patents

BIM model double-sided display accelerated rendering method, system, product and storage medium Download PDF

Info

Publication number
CN110969568B
CN110969568B CN201911200737.7A CN201911200737A CN110969568B CN 110969568 B CN110969568 B CN 110969568B CN 201911200737 A CN201911200737 A CN 201911200737A CN 110969568 B CN110969568 B CN 110969568B
Authority
CN
China
Prior art keywords
light
rendering
bim model
illumination
specular
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911200737.7A
Other languages
Chinese (zh)
Other versions
CN110969568A (en
Inventor
戴钎
王泽�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Glodon Co Ltd
Original Assignee
Glodon Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Glodon Co Ltd filed Critical Glodon Co Ltd
Priority to CN201911200737.7A priority Critical patent/CN110969568B/en
Publication of CN110969568A publication Critical patent/CN110969568A/en
Application granted granted Critical
Publication of CN110969568B publication Critical patent/CN110969568B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention belongs to the field of computer graphics in engineering construction, and particularly relates to a BIM model double-sided display accelerated rendering method, a system, a product and a storage medium. The existing graphics card rendering pipeline has a back side rejection mechanism (back side rejection), and when the inner side surface needs to be displayed, the related operation of two displays must be completed, which greatly reduces the rendering efficiency by 50%. According to the invention, on the basis of comprehensively considering the factors, the fragment shader of the GPU is utilized to carry out the illumination calculation of the second stage on a fragment-by-fragment basis, the illumination results ColorResult of the front side and the back side are obtained through the double-sided illumination calculation, and the absolute value taking operation is carried out on the condition that the illumination results face the back side of the triangle. The front and back surfaces can be simultaneously rendered by only one rendering, so that not only is the rendering result of the back surface ensured, but also the rendering cost is saved, and the double-sided rendering process of the BIM model is greatly accelerated and simplified.

Description

BIM model double-sided display accelerated rendering method, system, product and storage medium
Technical Field
The invention belongs to the field of computer graphics in engineering construction, and relates to a three-dimensional building graphics rendering technology which is a core part of BIM (Building Information Modeling, building information model) technology, in particular to a BIM model double-sided display accelerated rendering method, a system, a product and a storage medium.
Background
BIM (building information model) is one of the ideas of the core in the building information field in recent years, the data basis is a three-dimensional information model of a building, and from the viewpoint of light weight of the building model, a plurality of primitives are in a simplified representation form, for example, a cylindrical surface is adopted for a pipeline, and one surface is adopted for a railing to express, so that the complexity of the precise primitives can be greatly displayed, but other problems are brought: when the display card displays the corresponding surface, the front and back directions of the surface need to be distinguished, and the surface (the back surface) serving as the inner side is not rendered from the perspective of optimizing the rendering efficiency; since the rendering of the inner side is eliminated, the display is missing when viewed from the other side.
Existing graphics card rendering pipelines typically exist with a back culling mechanism (back culling) from the point of view of both fixed pipeline and typically programmable pipeline processing, i.e., as an inside (or back, opposite line of sight) surface that will not be displayed. In the case where the inside surface needs to be displayed, then the display-related job must be completed twice, i.e., the inside surface is rendered once more. Obviously, in order to avoid the situation of rendering missing, the inner side surface must be rendered at the same time, and this strategy is adopted for all the primitives of the scene, which greatly slows down the rendering efficiency, and reduces the overall rendering efficiency by 50%.
Referring to fig. 1, a specific description is given below of a conventional processing manner for double-sided rendering, where a processing procedure of a fixed rendering pipeline through a graphics card includes:
1.1 a Central Processing Unit (CPU) sends rendering data to a Graphics Processing Unit (GPU), wherein the GPU generally receives triangles as basic rendering units, and a plurality of triangle vertex data and related setting information are mainly sent to the GPU in a computer through the CPU, and are generally completed by calling an API (OpenGL/DirectX) related to the graphics processing unit; meanwhile, corresponding illumination conditions are required to be set so as to calculate relevant rendering data, the specific data is described in the step 1.4, and data items irrelevant to the invention are omitted temporarily for simplicity and prominence.
1.2 After the GPU receives the vertex data, geometric transformation is carried out on the related triangle vertices and normals, preparation is carried out for subsequent further processing through the fixed pipelines, and the steps and the processing flows of other fixed pipelines are completed in a display card driving layer.
1.3 rasterization: since the display device is in a discrete grid format, the triangle needs to be rasterized into a tile (pixel) format; the actual order of connection of triangle vertices is done during the rasterization phase, i.e., after the vertex shader is run, the vertices are visible to the viewer. Under the default condition, all the faces back to the observer after the back face is removed are discarded, so that the rendering performance is saved. But since we need to force the rendering of the triangle on both sides, this step needs to turn on the switch on the rendering on both sides.
1.4 since illumination calculation is performed on the fragment (pixel) data after the double-sided processing, an overhead of 2 times the fragment (pixel) calculation is required compared to the fragment (pixel) data of the single-sided rendering. The illumination calculation model generally adopted by the fixed pipeline is a Blinn-Phong illumination model, and the main structure of the illumination calculation result of the illumination model comprises 3 components:
environmental emission term (Ambient) the illumination around the environment in which the primitive is located without determining the definition of the light source. In general, even in the dark, there is still usually some light in the world (moon, far light), so objects are almost never totally dark. To simulate these, we will use an ambient light constant that will always give some color to the object.
Diffuse reflection term (Diffuse), which simulates the directional effect of a light source on an object (Directional Impact). It is the most visually significant component in the Blinn-Phong illumination model. The more a certain part of the object is facing the light source, the brighter it will be.
Specular reflection term (speculum) simulates the bright spots that appear on a glossy object. The color of specular illumination may be more prone to the color of light than the color of the object.
If expressed by algorithm, the variables are defined and calculated as follows, wherein the variables which are not calculated are all sent from the CPU end, and all direction vector data are unitized by default for simplifying the expression:
position: coordinates of the color point of the surface of a graphic primitive
Normal: normal vector of coloring point on surface of graphic primitive
Light, light direction, the calculation mode is:
Position-LightPosition (light source Position)
View, the line of sight direction, the calculation mode is:
position-eye Position (viewpoint Position)
Global ambient light color
Light color
Ka, ambient light attenuation coefficient
Kd, diffuse reflection light attenuation coefficient
Ks: specular reflection light attenuation coefficient
Shinness specular high light diffusion degree control term
Half angle direction of included angle between line of sight and light:
HalfVector=-(Light+View)
the three component calculation formulas are respectively:
Ambient=Ka*GlobalAmbient
Diffuse=Kd*LightColor*DiffuseLight
Specular=Ks*LightColor*SpecularLight
the most critical two variables, diffuseLight and SpecularLight, are calculated in the following ways:
DiffuseLight=max((Normal*Light),0)
SpecularLight=pow(max((HalfVector*Normal),0),Shiness)
the final illumination result is:
ColorResult=Ambient+Diffuse+Specular
it will be seen that, except that the ambient light calculations are independent of the normal to the surface of the primitive, both Diffuse and speclar calculations need to be performed in the direction of the normal, where the operation of max (x, 0) ensures that these directional calculations do not calculate the illumination value in the opposite direction to the normal, i.e. a single calculation does not render the back of the primitive, and if it is required to render the back, an additional flow is needed to perform the calculations again.
And 1.5, outputting the result obtained by illumination calculation to a relevant cache of the display card, and finally rendering to a screen.
In the case of the current graphics card rendering system architecture, known alternatives, taking efficiency into account, as previously described, have problems with inefficiency.
Disclosure of Invention
On the basis of comprehensively considering the factors, the invention fully utilizes the programmable pipeline technology (Shader Programming) of the display card to realize the one-time double-sided rendering of the graphic element, namely improves the display control mechanism of the BIM model and solves the problem of twice rendering.
The invention provides a BIM model double-sided display accelerated rendering method, which comprises the following steps:
s1, a Central Processing Unit (CPU) sends BIM model data to a Graphics Processing Unit (GPU);
s2, performing geometric transformation on the vertexes and normals of the triangle by using a vertex shader, and simultaneously performing illumination calculation in the first stage to obtain a Light ray direction Light, a sight line direction View and a half angle direction HalfVector of an included angle between the sight line and the Light ray;
s3, the triangle is rasterized into a fragment, the back surface is not removed, and the fragment corresponds to a pixel of the display device;
s4, performing illumination calculation at a second stage by fragment by utilizing a fragment shader of the GPU, obtaining an illumination result ColorResult of the front side and the back side through double-sided illumination calculation, and performing absolute value taking operation on the condition that the illumination result faces the back side of the triangle;
s5, outputting the illumination results of the front side and the back side to a GPU related cache, and finally rendering to a display device.
Optionally, in step S1, this is accomplished by calling an API corresponding to the graphics card, where the API is derived from OpenGL/DirectX.
Optionally, the BIM model data includes calculation data based on triangle vertex data.
Optionally, in step S2, the Light direction Light is: position-LightPosition;
the viewing direction View is: position-EyePosition;
the half angle direction HalfVector of the included angle between the sight line and the Light is- (light+View);
wherein Position is the coordinates of the color point on the surface of the graphic element; lightPosition is the light source position; eye position is the viewpoint position.
Optionally, in step S4, colorresult=ambient+diffuse+specular;
Ambient=Ka*GlobalAmbient;
Diffuse=Kd*LightColor*DiffuseLight;
Specular=Ks*LightColor*SpecularLight;
wherein Ambin is an environmental radiation term, diffuse is a Diffuse reflection term, specular is a Specular reflection term, ka is an Ambient light attenuation coefficient, kd is a Diffuse reflection light attenuation coefficient, ks is a Specular reflection light attenuation coefficient, globalAmbin is a global Ambient light color, lightColor is a light source light color, and
DiffuseLight=abs(Normal*Light);
SpecularLight=pow(abs(HalfVector*Normal),Shininess);
wherein Normal is the Normal vector of the coloring point of the surface of the graphic primitive, and shiness is the specular reflection high light diffusion degree control term.
Optionally, the vertex shader and fragment shader are handled as programmable pipelines for graphics cards.
The invention also provides a BIM model double-sided display accelerated rendering system which comprises a Central Processing Unit (CPU), a graphic card (GPU) and a display device,
the CPU sends BIM model data to the GPU;
the GPU performs geometric transformation on the triangle vertexes and normals by using a vertex shader, and completes illumination calculation in the first stage to obtain a ray direction Light, a line-of-sight direction View and a half angle direction HalfVector of an included angle between the line of sight and the ray; the triangle is rasterized into fragments without removing the back surface;
the GPU performs illumination calculation in the second stage by fragment by using a fragment shader, obtains an illumination result ColorResult of the front side and the back side through double-sided illumination calculation, and performs absolute value taking operation on the condition that the illumination result faces the back side of the triangle;
the display device displays the final rendering result.
Optionally, the CPU executes by calling an API corresponding to the graphics card, the API being from OpenGL/DirectX.
Optionally, the BIM model data includes calculation data based on triangle vertex data.
Optionally, the Light direction Light is: position-LightPosition;
the viewing direction View is: position-EyePosition;
the half angle direction HalfVector of the included angle between the sight line and the Light is- (light+View);
wherein Position is the coordinates of the color point on the surface of the graphic element; lightPosition is the light source position; eye position is the viewpoint position.
Alternatively, colorresult=ambient+diffuse+specular;
Ambient=Ka*GlobalAmbient;
Diffuse=Kd*LightColor*DiffuseLight;
Specular=Ks*LightColor*SpecularLight;
wherein Ambin is an environmental radiation term, diffuse is a Diffuse reflection term, specular is a Specular reflection term, ka is an Ambient light attenuation coefficient, kd is a Diffuse reflection light attenuation coefficient, ks is a Specular reflection light attenuation coefficient, globalAmbin is a global Ambient light color, lightColor is a light source light color, and
DiffuseLight=abs(Normal*Light);
SpecularLight=pow(abs(HalfVector*Normal),Shininess);
wherein Normal is the Normal vector of the coloring point of the surface of the graphic primitive, and shiness is the specular reflection high light diffusion degree control term.
The invention also provides a product, which is provided with the BIM model double-sided display acceleration rendering system.
The invention also provides a storage medium storing computer readable instructions which, when executed by a computer, cause the computer to perform the method of any one of the preceding claims.
The invention has the beneficial effects that: compared with the existing fixed pipeline processing method through the display card and the common shader processing method, the invention can simultaneously render the front and the back through one-time rendering, thereby not only ensuring the rendering result of the back, but also saving the rendering cost, and greatly accelerating and simplifying the double-sided rendering process of the BIM model.
The foregoing description is only an overview of the disclosed technology, and may be implemented in accordance with the disclosure of the present disclosure, so that the above-mentioned and other objects, features and advantages of the present disclosure can be more clearly understood, and the following detailed description of the preferred embodiments is given with reference to the accompanying drawings.
Drawings
FIG. 1 is a schematic flow chart of a prior art double-sided rendering through a graphics card fixed pipeline;
fig. 2 is a flow chart of the accelerated rendering method for double-sided display of the present invention.
Detailed Description
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should also be noted that the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
In order to more clearly illustrate the embodiments of the invention or the prior art solutions, reference is made to the following description in connection with the accompanying drawings.
Referring to fig. 2, with respect to the prior art, the present invention utilizes a programmable pipeline (Shader Programming) of the graphics card to provide additional control of the graphics card end for both processing steps before and after rasterization, as follows:
2.1, the same as step 1.1, a Central Processing Unit (CPU) sends a plurality of triangle vertex data and related setting information of a BIM model to a Graphics Processing Unit (GPU), and a computer sends the triangle vertex data and related setting information to the GPU through the CPU and is completed by calling an API (OpenGL/DirectX) related to the graphics processing unit;
2.2 after the GPU receives the Vertex data, using a Vertex Shader (Vertex Shader) of a display card to perform geometric transformation on the vertices and normals of the triangle, and performing illumination calculation on a Vertex-by-Vertex basis, wherein a part of illumination calculation is completed in a Vertex Shader stage: including the calculations of Light, view and halfVector (refer to the calculation formula in 1.4), the coordinate Space of which is View Space (View Space), the result of the correlation calculation is passed into the fragment shader.
The processing mode of the vertex shader in the step is the same as that in the fixed pipeline in the prior art except for the calculation of related illumination parameter variables;
2.3 is the same as step 1.3, namely rasterizing: since the display devices are in discrete grid format, triangle is required to be rasterized into a pixel (pixel) format; since we need to force the rendering of the triangle on both sides, this step needs to turn on the switch on the rendering on both sides.
2.4, performing double-sided illumination calculation by using a fragment shader of a display card as a programmable pipeline fragment by fragment, wherein the specific algorithm is as follows:
with the fragment shader of the GPU, receiving the data after Light, view and HalfVector calculated by the 2.2 vertex shader, for each fragment, performing illumination calculation on both the front and back sides of the fragment, compared with the calculation process in 1.4, the most important calculation change is the calculation for DiffuseLight and specular Light:
DiffuseLight=abs(Normal*Light)
SpecularLight=pow(abs(HalfVector*Normal),Shininess)
wherein abs is an absolute value operation to replace max (x, 0) operation in 1.4
The three components of Blinn-Phong are calculated identically:
Ambient=Ka*GlobalAmbient
Diffuse=Kd*LightColor*DiffuseLight
Specular=Ks*LightColor*SpecularLight
the final illumination result is still:
ColorResult=Ambient+Diffuse+Specular
and 2.5, outputting the final result obtained by calculation to a display card related cache, and finally rendering to a screen.
For the rendering pipeline of the display card, it is obvious that the rendering efficiency is improved through optimizing illumination calculation.
Through an actual building model test, the double-sided rendering mode is started by using the fixed pipeline, the time for rendering the complete frame is approximately 2 times that of the single-sided rendering mode by adopting the fixed pipeline, and the time for rendering the double sides by adopting the programmable pipeline is 1.1 times that of the single-sided rendering mode by adopting the fixed pipeline, namely, the efficiency of the double-sided rendering model can be greatly improved by processing illumination of double-sided rendering by adopting the programmable pipeline.
The electronic device in the embodiment of the present invention may include, but is not limited to, a mobile terminal such as a notebook computer, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and the like, and a fixed terminal such as a desktop computer, and the like.
The electronic device may include a processing means (e.g., a central processing unit CPU, a graphics processor GPU, etc.) that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) or a program loaded from a storage means into a Random Access Memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM and RAM are connected to each other via a bus.
In particular, according to embodiments of the present invention, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from ROM. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by a processing device.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s).
It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases. The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as the above-mentioned features and the technical features disclosed in the present invention (but not limited to) having similar functions are replaced with each other.

Claims (10)

1. The BIM model double-sided display accelerated rendering method is characterized by comprising the following steps of:
s1, a Central Processing Unit (CPU) sends BIM model data to a Graphics Processing Unit (GPU);
s2, performing geometric transformation on the vertexes and normals of the triangle by using a vertex shader, and simultaneously performing illumination calculation in the first stage to obtain a Light ray direction Light, a sight line direction View and a half angle direction HalfVector of an included angle between the sight line and the Light ray;
s3, rasterizing the triangle into fragments without removing the back surface;
s4, performing illumination calculation at a second stage by fragment by utilizing a fragment shader of the GPU, obtaining an illumination result ColorResult of the front side and the back side through double-sided illumination calculation, and performing absolute value taking operation on the condition that the illumination result faces the back side of the triangle;
s5, outputting the illumination results of the front side and the back side to a GPU related cache, and finally rendering to a display device;
in step S4, colorresult=ambient+diffuse+specular;
Ambient=Ka*GlobalAmbient;
Diffuse=Kd*LightColor*DiffuseLight;
Specular=Ks*LightColor*SpecularLight;
wherein Ambin is an environmental radiation term, diffuse is a Diffuse reflection term, specular is a Specular reflection term, ka is an Ambient light attenuation coefficient, kd is a Diffuse reflection light attenuation coefficient, ks is a Specular reflection light attenuation coefficient, globalAmbin is a global Ambient light color, lightColor is a light source light color, and
DiffuseLight=abs(Normal*Light);
SpecularLight=pow(abs(HalfVector*Normal),Shininess);
wherein Normal is the Normal vector of the coloring point of the surface of the graphic primitive, and shiness is the specular reflection high light diffusion degree control term.
2. The BIM model double-sided display acceleration rendering method of claim 1, wherein: in step S1, the method is completed by calling an API corresponding to the display card, wherein the API is from OpenGL/DirectX.
3. The BIM model double-sided display acceleration rendering method of claim 1, wherein: the BIM model data includes calculation data based on triangle vertex data.
4. The BIM model double-sided display acceleration rendering method of claim 1, wherein: in step S2, the Light direction Light is: position-LightPosition;
the viewing direction View is: position-EyePosition;
the half angle direction HalfVector of the included angle between the sight line and the Light is- (light+View);
wherein Position is the coordinates of the color point on the surface of the graphic element; lightPosition is the light source position; eye position is the viewpoint position.
5. A BIM model double-sided display accelerated rendering system is characterized in that the system comprises a Central Processing Unit (CPU), a Graphics Processing Unit (GPU) and a display device,
the CPU sends BIM model data to the GPU;
the GPU performs geometric transformation on the triangle vertexes and normals by using a vertex shader, and completes illumination calculation in the first stage to obtain a ray direction Light, a line-of-sight direction View and a half angle direction HalfVector of an included angle between the line of sight and the ray; the triangle is rasterized into fragments without removing the back surface;
the GPU performs illumination calculation in the second stage by fragment by using a fragment shader, obtains an illumination result ColorResult of the front side and the back side through double-sided illumination calculation, and performs absolute value taking operation on the condition that the illumination result faces the back side of the triangle;
the display device displays the final rendering result;
ColorResult=Ambient+Diffuse+Specular;
Ambient=Ka*GlobalAmbient;
Diffuse=Kd*LightColor*DiffuseLight;
Specular=Ks*LightColor*SpecularLight;
wherein Ambin is an environmental radiation term, diffuse is a Diffuse reflection term, specular is a Specular reflection term, ka is an Ambient light attenuation coefficient, kd is a Diffuse reflection light attenuation coefficient, ks is a Specular reflection light attenuation coefficient, globalAmbin is a global Ambient light color, lightColor is a light source light color, and
DiffuseLight=abs(Normal*Light);
SpecularLight=pow(abs(HalfVector*Normal),Shininess);
wherein Normal is the Normal vector of the coloring point of the surface of the graphic primitive, and shiness is the specular reflection high light diffusion degree control term.
6. The BIM model dual-sided display accelerated rendering system of claim 5, wherein: the CPU executes by calling an API corresponding to the graphics card, the API being from OpenGL/DirectX.
7. The BIM model dual-sided display accelerated rendering system of claim 5, wherein: the BIM model data includes calculation data based on triangle vertex data.
8. The BIM model dual-sided display accelerated rendering system of claim 5, wherein: the Light direction Light is: position-LightPosition;
the viewing direction View is: position-EyePosition;
the half angle direction HalfVector of the included angle between the sight line and the Light is- (light+View);
wherein Position is the coordinates of the color point on the surface of the graphic element; lightPosition is the light source position; eye position is the viewpoint position.
9. A product, characterized in that: the product has a BIM model dual-sided display acceleration rendering system as claimed in any one of claims 5 to 8.
10. A storage medium, characterized by: for storing computer readable instructions which, when executed by a computer, cause the computer to perform the method of any of claims 1-4.
CN201911200737.7A 2019-11-29 2019-11-29 BIM model double-sided display accelerated rendering method, system, product and storage medium Active CN110969568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911200737.7A CN110969568B (en) 2019-11-29 2019-11-29 BIM model double-sided display accelerated rendering method, system, product and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911200737.7A CN110969568B (en) 2019-11-29 2019-11-29 BIM model double-sided display accelerated rendering method, system, product and storage medium

Publications (2)

Publication Number Publication Date
CN110969568A CN110969568A (en) 2020-04-07
CN110969568B true CN110969568B (en) 2023-06-13

Family

ID=70032111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911200737.7A Active CN110969568B (en) 2019-11-29 2019-11-29 BIM model double-sided display accelerated rendering method, system, product and storage medium

Country Status (1)

Country Link
CN (1) CN110969568B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112927342B (en) * 2021-02-22 2022-12-20 中铁二院工程集团有限责任公司 Illumination calculation method and fixed pipeline rendering and programmable pipeline rendering methods

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015225081A (en) * 2014-05-28 2015-12-14 天津先陽科技発展有限公司 Diffusion spectrum data processing method and processing device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4005277B2 (en) * 1999-09-06 2007-11-07 富士フイルム株式会社 Image processing apparatus, method, and recording medium
CN102722861A (en) * 2011-05-06 2012-10-10 新奥特(北京)视频技术有限公司 CPU-based graphic rendering engine and realization method
CN104157004B (en) * 2014-04-30 2017-03-29 常州赞云软件科技有限公司 The method that a kind of fusion GPU and CPU calculates radiancy illumination
CN107045729B (en) * 2017-05-05 2018-09-18 腾讯科技(深圳)有限公司 A kind of image rendering method and device
CN110243370A (en) * 2019-05-16 2019-09-17 西安理工大学 A kind of three-dimensional semantic map constructing method of the indoor environment based on deep learning
CN110443893B (en) * 2019-08-02 2023-04-25 广联达科技股份有限公司 Large-scale building scene rendering acceleration method, system, device and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015225081A (en) * 2014-05-28 2015-12-14 天津先陽科技発展有限公司 Diffusion spectrum data processing method and processing device

Also Published As

Publication number Publication date
CN110969568A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
US9754407B2 (en) System, method, and computer program product for shading using a dynamic object-space grid
US6417858B1 (en) Processor for geometry transformations and lighting calculations
US7307628B1 (en) Diamond culling of small primitives
EP3008701B1 (en) Using compute shaders as front end for vertex shaders
US7292242B1 (en) Clipping with addition of vertices to existing primitives
US10776997B2 (en) Rendering an image from computer graphics using two rendering computing devices
US7755626B2 (en) Cone-culled soft shadows
US8441497B1 (en) Interpolation of vertex attributes in a graphics processor
EP2831848B1 (en) Method for estimating the opacity level in a scene and corresponding device
US10593096B2 (en) Graphics processing employing cube map texturing
US20090046098A1 (en) Primitive binning method for tile-based rendering
JPH10222694A (en) Picture processor and method therefor
US8294713B1 (en) Method and apparatus for illuminating objects in 3-D computer graphics
US9153065B2 (en) System and method for adjusting image pixel color to create a parallax depth effect
TWI786233B (en) Method, device and non-transitory computer-readable storage medium relating to tile-based low-resolution depth storage
KR20180055446A (en) Tile-based rendering method and apparatus
US8004522B1 (en) Using coverage information in computer graphics
US7466322B1 (en) Clipping graphics primitives to the w=0 plane
CN109544674B (en) Method and device for realizing volume light
CN114758051A (en) Image rendering method and related equipment thereof
US7292239B1 (en) Cull before attribute read
EP1745440B1 (en) Graphics pipeline for rendering graphics
CN110969568B (en) BIM model double-sided display accelerated rendering method, system, product and storage medium
EP1759355B1 (en) A forward texture mapping 3d graphics system
EP2676245B1 (en) Method for estimation of occlusion in a virtual environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant