CN107833269B - Method for realizing terrain transparency in three-dimensional scene - Google Patents

Method for realizing terrain transparency in three-dimensional scene Download PDF

Info

Publication number
CN107833269B
CN107833269B CN201710846040.1A CN201710846040A CN107833269B CN 107833269 B CN107833269 B CN 107833269B CN 201710846040 A CN201710846040 A CN 201710846040A CN 107833269 B CN107833269 B CN 107833269B
Authority
CN
China
Prior art keywords
terrain
terrain tile
nodes
tile
transparency
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
CN201710846040.1A
Other languages
Chinese (zh)
Other versions
CN107833269A (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.)
Zhejiang Kelan Information Technology Co ltd
Original Assignee
Zhejiang Kelan Information Technology 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 Zhejiang Kelan Information Technology Co ltd filed Critical Zhejiang Kelan Information Technology Co ltd
Priority to CN201710846040.1A priority Critical patent/CN107833269B/en
Publication of CN107833269A publication Critical patent/CN107833269A/en
Application granted granted Critical
Publication of CN107833269B publication Critical patent/CN107833269B/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
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/22Cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/62Semi-transparency

Abstract

The invention provides a method for realizing terrain transparency in a three-dimensional scene, which comprises the following steps: step 1), drawing an object which is located below the ground, shielded by the ground and wanted to see through the ground. And 2) constructing terrain tile nodes, and removing the sheltered terrain tile nodes. And 3) drawing the terrain tile nodes. The invention can display the landform in the three-dimensional scene with any transparency, the transparency can be adjusted, the underground object can be seen when the viewpoint is above the ground, the underground structure and the underground pipeline layout are clearly arranged in front of the user, a simple, convenient and visual mode is provided for the user, and the invention is beneficial to the user to make city planning and auxiliary decision by better utilizing the underground space. Meanwhile, the elimination algorithm of the shielding tiles aiming at the spherical terrain provided by the invention can also reduce unnecessary nodes for drawing and improve the rendering efficiency.

Description

Method for realizing terrain transparency in three-dimensional scene
Technical Field
The invention relates to the technical field of space geographic information systems, in particular to a method for realizing terrain transparency in a three-dimensional scene.
Background
In a three-dimensional geographic information system, after layers such as terrain, models, vectors and the like are loaded, some data may be blocked due to the overlapping of the layers. Such as underground pipelines, cannot be directly observed above the ground by the user because they are located below the ground. If the viewpoint is moved to the position below the ground, the above-ground model and the underground pipeline cannot be checked at the same time and cannot be compared; if the terrain is hidden, the spatial orientation reference is lost, and the effect is not real. Therefore, a transparency method is needed, which can make the terrain transparent, and realize the linear change of the transparency degree of the terrain by adjusting the transparency degree of the terrain, so that the user can directly check and operate the model and vector data of the underground above the ground, and also can see the objects on the ground when the user roams underground, thereby providing a more intuitive and convenient decision-making way for the user.
Disclosure of Invention
The invention provides a method for realizing terrain transparency in a three-dimensional scene, which can directly see objects such as models and vectors below the ground when a viewpoint is above the ground by adjusting the terrain transparency.
The specific steps for realizing the terrain transparency are as follows:
step 1), drawing an object which is located below the ground, shielded by the ground and is expected to see through the ground;
step 2), constructing terrain tile nodes, and removing the sheltered terrain tile nodes;
and 3) drawing the terrain tile nodes.
The step 2) of constructing the terrain tile nodes comprises the steps of dividing a terrain area based on a quadtree space to obtain a series of terrain sub-areas called terrain tiles, constructing image data and elevation data of a single terrain tile into the terrain tile nodes, organizing the nodes through the quadtree, and realizing dynamic scheduling of the terrain tile nodes according to the distance from a viewpoint to the terrain tile nodes.
And 2), the step of eliminating the sheltered terrain tile nodes comprises the steps of judging whether the terrain tile nodes are sheltered or not according to the position relation between the terrain tile nodes and the viewpoint, and if the terrain tile nodes are located in the viewpoint invisible area, cutting the terrain tile nodes.
The method for eliminating the blocked terrain tile nodes comprises the following steps:
calculating the position of a control point of the terrain tile;
and judging whether the terrain tile node is shielded and should be cut, and cutting the terrain tile node if the terrain tile node is shielded.
Wherein the calculating the control point position of the terrain tile comprises the following steps:
assume each mesh vertex P (lon) in the terrain tileP,latP,hP) Wherein lonP,latP,hPIs the longitude and latitude high coordinate representation of the point P, then
Figure BDA0001411846190000021
Figure BDA0001411846190000022
Figure BDA0001411846190000023
Wherein h ispIs the elevation of point P, R is the earth's major axis radius, O is the center point of the terrain tile, DPOTraversing each mesh vertex in the terrain tile for the distance from the point P to the center point O of the terrain tile to obtain fdThen the calculation formula of the terrain tile control point C is:
C=0+n·max(fd)
wherein n is a vector which is vertically outward from the center point O of the terrain tile.
Wherein, the judging whether the terrain tile node is blocked and should be cut comprises:
constructing a vector EC from viewpoint to terrain tile control point, where DECThe distance from the viewpoint to the control point of the terrain tile; if the expression is true, the terrain tile node is located in the viewpoint invisible area and should be cut, otherwise, the terrain tile node is located in the viewpoint visible area and should not be cut
Figure BDA0001411846190000031
The drawing of the nodes of the terrain tiles in the step 3) specifically includes that a source segment color of the terrain and a target segment color in the color buffer area are superposed according to a transparency factor to obtain a terrain segment color to be drawn, wherein the transparency factor is set as required, the range is 0.0 to 1.0, 1.0 represents opaque, 0.0 represents fully transparent, and an equation calculated by superposition of the segment colors according to the transparency factor is as follows:
Cf=f·Cs+(1-f)·Cd
wherein Cs is the topographical color, CdIs the color in the color buffer, CfIs the color of the terrain segment to be drawn, and f is a transparency factor and ranges from 0.0 to 1.0, wherein 1.0 represents opaque and 0.0 represents fully transparent.
Advantageous results of the invention
The invention can display the landform in the three-dimensional scene with any transparency, the transparency can be adjusted, the underground object can be seen when the viewpoint is above the ground, the underground structure and the underground pipeline layout are clearly arranged in front of the user, a simple, convenient and visual mode is provided for the user, and the invention is beneficial to the user to make city planning and auxiliary decision by better utilizing the underground space. Meanwhile, the elimination algorithm of the shielding tiles aiming at the spherical terrain provided by the invention can also reduce unnecessary nodes for drawing and improve the rendering efficiency.
Drawings
Fig. 1 is a flow chart of a method for implementing terrain transparency in a three-dimensional scene consistent with an embodiment of the present invention.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
Fig. 1 shows a method for implementing terrain transparency in a three-dimensional scene, which is consistent with an embodiment of the present invention, and includes:
step 1), drawing an object which is located below the ground, shielded by the ground and is expected to see through the ground;
step 2), constructing terrain tile nodes, and removing the sheltered terrain tile nodes;
and 3) drawing the terrain tile nodes.
The step 2) of constructing the terrain tile nodes comprises the steps of dividing a terrain area based on a quadtree space to obtain a series of terrain sub-areas called terrain tiles, constructing image data and elevation data of a single terrain tile into the terrain tile nodes, organizing the nodes through the quadtree, and realizing dynamic scheduling of the terrain tile nodes according to the distance from a viewpoint to the terrain tile nodes.
And 2), the step of eliminating the sheltered terrain tile nodes comprises the steps of judging whether the terrain tile nodes are sheltered or not according to the position relation between the terrain tile nodes and the viewpoint, and if the terrain tile nodes are located in the viewpoint invisible area, cutting the terrain tile nodes.
The method for eliminating the blocked terrain tile nodes comprises the following steps:
calculating the position of a control point of the terrain tile;
and judging whether the terrain tile node is shielded and should be cut, and cutting the terrain tile node if the terrain tile node is shielded.
Wherein the calculating the control point position of the terrain tile comprises the following steps:
assume each mesh vertex P (lon) in the terrain tileP,latP,hP) Wherein lonP,latP,hPIs the longitude and latitude high coordinate representation of the point P, then
Figure BDA0001411846190000041
Figure BDA0001411846190000042
Figure BDA0001411846190000043
Wherein h ispIs the elevation of point P, R is the earth's major axis radius, O is the center point of the terrain tile, DPOTraversing each mesh vertex in the terrain tile for the distance from the point P to the center point O of the terrain tile to obtain fdThen the calculation formula of the terrain tile control point C is:
C=0+n·max(fd)
wherein n is a vector which is vertically outward from the center point O of the terrain tile.
Wherein, the judging whether the terrain tile node is blocked and should be cut comprises:
constructing a vector EC from viewpoint to terrain tile control point, where DECThe distance from the viewpoint to the control point of the terrain tile; if the expression is true, the terrain tile node is located in the viewpoint invisible area and should be cut, otherwise, the terrain tile node is located in the viewpoint visible area and should not be cut
Figure BDA0001411846190000051
The drawing of the nodes of the terrain tiles in the step 3) specifically includes that a source segment color of the terrain and a target segment color in the color buffer area are superposed according to a transparency factor to obtain a terrain segment color to be drawn, wherein the transparency factor is set as required, the range is 0.0 to 1.0, 1.0 represents opaque, 0.0 represents fully transparent, and an equation calculated by superposition of the segment colors according to the transparency factor is as follows:
Cf=f·Cs+(1-f)·Cd
wherein Cs is the topographical color, CdIs the color in the color buffer, CfIs the color of the terrain segment to be drawn, and f is a transparency factor and ranges from 0.0 to 1.0, wherein 1.0 represents opaque and 0.0 represents fully transparent.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (3)

1. A method for realizing terrain transparency in a three-dimensional scene comprises the following steps:
step 1), drawing an object which is located below the ground, shielded by the ground and is expected to see through the ground;
step 2), constructing terrain tile nodes, and removing the sheltered terrain tile nodes;
step 3), drawing a terrain tile node;
the step 2) of constructing the terrain tile nodes comprises the steps of dividing a terrain area based on a quadtree space to obtain a series of terrain sub-areas, called terrain tiles, constructing image data and elevation data of a single terrain tile into the terrain tile nodes, organizing the nodes through the quadtree, and realizing dynamic scheduling of the terrain tile nodes according to the distance from a viewpoint to the terrain tile nodes;
the method for eliminating the blocked terrain tile nodes comprises the following steps:
calculating the position of a control point of the terrain tile;
judging whether the terrain tile nodes are shielded and should be cut, and if the terrain tile nodes are shielded, cutting the terrain tile nodes;
wherein said calculating the control point position of the terrain tile comprises the steps of:
assume each mesh vertex P (lon) in the terrain tileP,latP,hP) Wherein lonP,latP,hPIs the longitude and latitude high coordinate representation of the point P, then
Figure FDA0002936530470000011
Figure FDA0002936530470000012
Figure FDA0002936530470000013
Wherein h ispIs the elevation of point P, R is the earth's major axis radius, and O is in the terrain tileCenter point, DPOTraversing each mesh vertex in the terrain tile for the distance from the point P to the center point O of the terrain tile to obtain fdThen the calculation formula of the terrain tile control point C is:
C=0+n·max(fd)
wherein n is a vector which is perpendicular to the ground and outwards at the central point O of the terrain tile;
wherein said determining whether the terrain tile node is occluded and should be cropped comprises:
constructing a vector EC from viewpoint to terrain tile control point, where DECThe distance from the viewpoint to the control point of the terrain tile; if it is
Figure FDA0002936530470000014
And if the expression is true, the terrain tile node is positioned in the viewpoint invisible area and should be cut, otherwise, the terrain tile node is positioned in the viewpoint visible area and should not be cut.
2. The method according to claim 1, wherein the removing the occluded terrain tile nodes in step 2) comprises determining whether the terrain tile nodes are occluded according to a position relationship between the terrain tile nodes and a viewpoint, and clipping the terrain tile nodes if the terrain tile nodes are located in an area where the viewpoint is not visible.
3. The method for realizing terrain transparency in a three-dimensional scene as claimed in claim 1, wherein said rendering the terrain tile nodes in step 3) specifically includes superimposing the source fragment color of the terrain with the target fragment color in the color buffer according to a transparency factor to obtain the terrain fragment color to be rendered, wherein the transparency factor is set as required and ranges from 0.0 to 1.0, wherein 1.0 represents opaque, 0.0 represents fully transparent, and the equation calculated by superimposing the fragment colors according to the transparency factor is as follows:
Cf=f·Cs+(1-f)·Cd
where Cs is the terrain color, Cd is the color in the color buffer, Cf is the terrain segment color to be drawn, f is the transparency factor, ranging from 0.0 to 1.0, where 1.0 represents opaque and 0.0 represents fully transparent.
CN201710846040.1A 2017-09-19 2017-09-19 Method for realizing terrain transparency in three-dimensional scene Active CN107833269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710846040.1A CN107833269B (en) 2017-09-19 2017-09-19 Method for realizing terrain transparency in three-dimensional scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710846040.1A CN107833269B (en) 2017-09-19 2017-09-19 Method for realizing terrain transparency in three-dimensional scene

Publications (2)

Publication Number Publication Date
CN107833269A CN107833269A (en) 2018-03-23
CN107833269B true CN107833269B (en) 2021-04-16

Family

ID=61643326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710846040.1A Active CN107833269B (en) 2017-09-19 2017-09-19 Method for realizing terrain transparency in three-dimensional scene

Country Status (1)

Country Link
CN (1) CN107833269B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117521431B (en) * 2024-01-08 2024-04-26 湖南卫导信息科技有限公司 Distributed parallel vision calculation method and device based on high-precision terrain

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100959349B1 (en) * 2009-06-19 2010-05-20 인하대학교 산학협력단 A method for accelerating terrain rendering based on quadtree using graphics processing unit
CN102737097A (en) * 2012-03-30 2012-10-17 北京峰盛博远科技有限公司 Three-dimensional vector real-time dynamic stacking technique based on LOD (Level of Detail) transparent textures
CN102867331A (en) * 2012-08-31 2013-01-09 电子科技大学 Graphics processing unit (GPU)-orientated large-scale terrain fast drawing method
CN104574489B (en) * 2014-12-16 2017-11-03 中国人民解放军理工大学 Landform and motion vector integrated approach based on lamination quaternary tree atlas
CN106127853B (en) * 2016-06-17 2019-02-05 中国电子科技集团公司第二十八研究所 A kind of unmanned plane Analysis of detectable region method
CN106408636B (en) * 2016-08-25 2019-03-29 浙江科澜信息技术有限公司 A kind of terrain rendering tile avoiding cracks method

Also Published As

Publication number Publication date
CN107833269A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
US11315308B2 (en) Method for representing virtual information in a real environment
JP7133470B2 (en) System and method for network augmented reality representation
CN105336003B (en) The method for drawing out three-dimensional terrain model with reference to the real-time smoothness of GPU technologies
CN103793452B (en) Map browser and method
US8325178B1 (en) Lines-of-sight and viewsheds determination system
JP2016505961A (en) How to represent virtual information in the real environment
CA2831709A1 (en) Multiple viewshed analysis
CN105953785A (en) Map representation method for robot indoor autonomous navigation
CN107170033A (en) Smart city 3D live-action map systems based on laser radar technique
US20060152503A1 (en) Method and apparatus for transforming two-dimensional building data to three-dimensional building data in real time and method and apparatus for three-dimensionally visualizing two-dimensional building data in real time
EP3655928B1 (en) Soft-occlusion for computer graphics rendering
JP5883818B2 (en) 3D map display system
CN104507047A (en) Method and device for acquiring POI (point of interest) areas
CN113570664B (en) Augmented reality navigation display method and device, electronic equipment and computer medium
CN104318605A (en) Parallel lamination rendering method of vector solid line and three-dimensional terrain
EP2589933B1 (en) Navigation device, method of predicting a visibility of a triangular face in an electronic map view
KR20200143228A (en) Method and Apparatus for localization in real space using 3D virtual space model
CN107833269B (en) Method for realizing terrain transparency in three-dimensional scene
KR101469757B1 (en) Method for calculating communication coverage using 3D Object Intersection and Storage medium thereof
CN109785421B (en) Texture mapping method and system based on air-ground image combination
KR102381678B1 (en) 4-dimensional path display method for unmanned vehicle using point cloud
CN113570256A (en) Data processing method and device applied to city planning, electronic equipment and medium
Kim et al. Automatic 3D city modeling using a digital map and panoramic images from a mobile mapping system
Bartie et al. Referring expressions in location based services: The case of the ‘opposite’relation
KR102406477B1 (en) 4-dimensional path display method for unmanned vehicle using point cloud

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