CN103617650A - Displaying method for complex three-dimensional terrain - Google Patents

Displaying method for complex three-dimensional terrain Download PDF

Info

Publication number
CN103617650A
CN103617650A CN201310624871.6A CN201310624871A CN103617650A CN 103617650 A CN103617650 A CN 103617650A CN 201310624871 A CN201310624871 A CN 201310624871A CN 103617650 A CN103617650 A CN 103617650A
Authority
CN
China
Prior art keywords
data
dimensional
prime
theta
dimensional topography
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.)
Pending
Application number
CN201310624871.6A
Other languages
Chinese (zh)
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.)
Harbin Engineering University
Original Assignee
Harbin Engineering University
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 Harbin Engineering University filed Critical Harbin Engineering University
Priority to CN201310624871.6A priority Critical patent/CN103617650A/en
Publication of CN103617650A publication Critical patent/CN103617650A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a displaying method for complex three-dimensional terrain. The method comprises the steps that, firstly, data conversion is conducted, and conversion and processing are conducted on read-in three-dimensional terrain data; secondly, data processing is conducted, after data conversion is finished, an OpenGL software interface is adopted to carry out processing on the converted three-dimensional terrain data, and the three-dimensional terrain data are converted into the data which a computer can identify and process; thirdly, texture manufacturing is conducted, the data range is divided into a plurality of sub ranges, and the data in each sub range correspond to the same terrain color; fourthly, three-dimensional terrain display is conducted, and parameter setting, terrain model mapping, viewpoint-model transformation, projection transformation and viewport transformation are conducted on the three-dimensional terrain model. The displaying method for the complex three-dimensional terrain has the advantages of Supporting the displaying of the terrain with the large range and the complex earth surface situation, ensuring the good display effect, and supporting mouse and keyboard operations to achieve wandering of the three-dimensional terrain.

Description

A kind of complex three-dimensional gound-mapping method
Technical field
What the present invention relates to is a kind of display packing of dimensional topography, particularly a kind of three-dimensional terrain display method with mass data and high fidelity demonstration.
Background technology
Three-dimensional terrain display method is as the important component part of vision simulation in virtual demonstration emulation field, and it is studied and is applied in the progress that has obtained leap in decades.The key problem of dimensional topography display technique is to solve complex-terrain surface model that massive terrains data form and the contradiction between the limited graphic capability of Computer graphics hardware.Current three-dimensional terrain display method has all adopted and has simplified the operation, and is keeping model to describing under the prerequisite of the certain degree of accuracy of topographical surface, the data volume that minimizing method is processed.But that the method is not suitable for is with a varied topography, earth's surface changes erratic situation, therefore, with existing method show dimensional topography can cause lower to topograph fidelity, cannot truly reflect the problems such as actual landform situation.
Along with the foundation of the three-dimensional picture software standards such as the appearance of three-dimensional picture hardware chip and OpenGL, Direct3D, thereby three-dimensional picture software and specific application framework are carried out effectively in conjunction with the demonstration that realizes three-dimensional picture, having obtained certain development.Can design a kind of complex three-dimensional gound-mapping method based on OpenGL software interface for this reason, its principal feature is the gound-mapping that support scope is large, earth's surface situation is more complicated, and can guarantee that display effect is good and support mouse and keyboard operation to complete the roaming of dimensional topography.Therefore the fidelity that, the processing of massive terrains data and dimensional topography show becomes the focus that complex three-dimensional gound-mapping method is paid close attention to.
Name is called in the patent document of a < < global three-dimensional terrain display method > >, utilizes triangle quaternary tree subdivision model to build level elevation and data texturing model; Application number is 200810224016.5, name is called in mono-kind of the < < patent document for the display packing > > of the dimensional topography of video production, DEM altitude figures and GIS terrain data have been carried out to regularization processing, and dimensional topography is carried out to texture mapping, because this patent adopts existing texture, carry out pinup picture, aspect fidelity, need to improve.
Summary of the invention
The object of the present invention is to provide a kind of not harshly to the requirement of dimensional topography model, display effect is level and smooth, and the response time is short, the complex three-dimensional gound-mapping method low to the dependence of dimensional topography data layout.
The object of the present invention is achieved like this:
Step 1: data-switching, the dimensional topography data of reading in are changed and processed;
Step 2: data processing, after data-switching completes, dimensional topography data after adopting OpenGL software interface to conversion are processed, by pixel operation, evaluator, rasterisation, operation based on summit and substantially mate the processing that realizes pixel data and vertex data, dimensional topography data are converted to computing machine and can identify and the data of processing;
Step 3: connection with production of structures, through data-switching with process after, data area is divided into some subranges, landform color corresponding to data in each subrange is identical;
Step 4: dimensional topography shows, after data and texture are all disposed, generating three-dimensional landform, carries out parameter setting, relief block mapping, viewpoint-model transferring, projective transformation and the viewport transform to dimensional topography model.
The present invention can also comprise:
1, the method for described data-switching is: using original dimensional topography data as input, judge that its whether all data are active data form, if not, carry out data-switching to invalid data; The concrete mode of data-switching is: detect in these data, whether there is the distinctive identifier of target data, as do not have, at the first identifier that adds of data; Invalid data is converted to after valid data, merges with original valid data; The concrete mode that data merge is: the data file after conversion is kept under the root directory identical with original valid data file, and when system input data, loads with raw data file simultaneously; After data merge, whether the data after judgement merges are " square formation type " data, if not being, data are carried out to " square formation ", the data amount check comprising in data file is certain positive integer square, and between each row of data, uses enter key interval, between colleague's data, use space bar interval, the concrete mode of " square formation " is: the every MapSize of the data in file is made as to one group, and after group, adds enter key, until file is last.
2, the method that described employing OpenGL software interface is processed the dimensional topography data after changing is: first pixel data and vertex data are stored in display list, again for pixel operate after and texture assemble, for vertex data, carry out after the processing of evaluator, carry out operation and basic assembling based on summit, two data are carried out to rasterisation simultaneously, finally after fragment operation, be stored to frame buffer zone.
3, described connection with production of structures specifically comprises:
(1) first read in the dimensional topography data in certain region;
(2) according to display precision, dimensional topography data need to be divided into some altitude ranges, altitude range partition process is that each numeral in data file is referred in the different digital scope setting in advance, and texture color corresponding to data in digital scope of the same race is identical;
(3) by output accuracy is set, dimensional topography data are output as to the texture maps of a MapSize*MapSize size.
4, described dimensional topography demonstration specifically comprises:
(1) parameter setting
Light source parameters and color mode are set;
(2) relief block mapping
First digital terrain data is changed into the data layout that OpenGL can identify and operate, then calculate the parameters such as apex coordinate and vertex scheme vector;
(3) viewpoint-model transferring
The running transform that employing is moved object space, the rotational transform that object is rotated, three kinds of geometric transformations of scale transformation that object is carried out to scaled realize viewpoint-model transferring;
The summit that pel is provided is as one-column matrix, and hypothesized model viewing matrix M is the matrix of 4*4, one-column matrix X Y Z W The new coordinate corresponding with visual coordinate after just obtaining conversion with model view matrix multiple X e Y e Z e W e . As shown in Equation (1):
X Y Z W 4 &times; 4 M = X e Y e Z e W e - - - ( 1 )
Translation transformation:
x &prime; y &prime; z &prime; 1 = x y z 1 1 0 0 0 0 1 0 0 0 0 1 0 T x T y T z 1 - - - ( 2 )
Wherein, before conversion, point coordinate be (x, y, z), and conversion afterwards point coordinate is (x ', y ', z '), T x, T y, T zrepresent that respectively in conversion below, the definition of these parameters is constant along X, Y, Z tri-principal axis transformation amount of movements;
Rotational transform: rotation can be divided into three kinds conventionally,
Point rotates computing formula around X-axis:
x &prime; y &prime; z &prime; 1 = x y z 1 1 0 0 0 0 cos &theta; cos &theta; 0 0 - sin &theta; cos &theta; 0 0 0 0 1 - - - ( 3 )
Point rotates computing formula around Y-axis:
x &prime; y &prime; z &prime; 1 = x y z 1 cos &theta; 0 - sin &theta; 0 0 1 0 0 - sin &theta; 0 cos &theta; 0 0 0 0 1 - - - ( 4 )
Point rotates computing formula around Z axis:
x &prime; y &prime; z &prime; 1 = x y z 1 cos &theta; sin &theta; 0 0 - sin &theta; cos &theta; 0 0 0 0 1 0 0 0 0 1 - - - ( 5 )
Wherein, in formula, θ is angular unit, and the positive and negative of it carries out as given a definition: from turning axle positive dirction, looking over, is positive-angle in a clockwise direction, and take is negative angle counterclockwise;
Scale transformation computing formula:
x &prime; y &prime; z &prime; 1 = x y z 1 S x 0 0 0 0 S y 0 0 0 0 S z 0 0 0 0 1 - - - ( 6 )
Wherein, S x, S y, S zrepresent respectively three scaling sizes on change in coordinate axis direction;
(4) projective transformation
Adopt perspective transform to complete projective transformation, wherein establish perspective projection transformation matrix P as shown in Equation (7), wherein, near is projected object minor increment to projecting plane in X-direction, far is projected object ultimate range to projecting plane in X-direction, top is projected object ultimate range to projecting plane in Y direction, bottom is projected object minor increment to projecting plane in Y direction, right is projected object minor increment to projecting plane in Z-direction, left is projected object ultimate range to projecting plane in Z-direction,
P = 2 * near right - left 0 right + left right - left 0 0 2 * near top - bottom top + bottom top - bottom 0 0 0 near + far near - far 2 * far * near near - far 0 0 - 1 0 - - - ( 7 )
(5) viewport transform.
The problem such as the present invention is directed to that landform scope is large, the landform of earth's surface situation when complicated is cannot be by the fidelity of 3-D display or demonstration lower, has proposed a kind of complex three-dimensional gound-mapping method.
Fully the accuracy problem in focused data processing procedure, makes altitude figures and the corresponding texture image of complex three-dimensional landform, in data volume, in larger and irregular situation, realizes data corresponding one by one with texture pixel.Utilize Qt application framework to realize the reading and storing of altitude figures processing the advantage of large data, utilize the powerful 3-D view processing capacity of OpenGL software interface to realize playing up the drafting of three-dimensional picture and scene.
The present invention also has such Some features:
1. the requirement of pair dimensional topography model is not harsh.When relief block is comparatively gently or comparatively complicated, irregular, all can draw out the dimensional topography figure that the sense of reality is stronger;
2. the feature in dimensional topography roam procedure with " zero buffering, nothing are waited for ".In interactive process, by mouse or keyboard, dimensional topography is moved, overturn and the operation such as rotation, display effect is level and smooth, and the response time is very short;
3. the dependence of pair dimensional topography data layout is very low.Terrain data form can be Surfer Grid(ASC II Format) the common data layout such as data, digital elevation model (DEM) data and XYZ Grid data.
Accompanying drawing explanation
Fig. 1 complex three-dimensional gound-mapping method realization flow figure.
The data-switching process flow diagram of Fig. 2 complex three-dimensional gound-mapping method.
The flow chart of data processing figure of Fig. 3 complex three-dimensional gound-mapping method.
The connection with production of structures process flow diagram of Fig. 4 complex three-dimensional landform.
Fig. 5 complex three-dimensional gound-mapping theory diagram.
Each signal of parameter physical significance and setting coordinate figure in Fig. 6 projective transformation formula; Fig. 6 (a) is each parameter physical significance schematic diagram in projective transformation formula, and Fig. 6 (b) is setting coordinate figure.
Embodiment
Below in conjunction with accompanying drawing, for example the present invention is described in more detail, it should be noted that the environmental structure of programmed environment, OpenGL software interface and the Qt application framework of the method is universal method, therefore no longer its schematic diagram is described.
1. the present invention is directed to landform is more complicated, indication range is larger situation and designed on the whole following steps and carry out the demonstration of dimensional topography, by reference to the accompanying drawings 1, the attached complex three-dimensional gound-mapping method realization flow figure that Figure 1 shows that:
Step 1: data-switching.The dimensional topography data of reading in (form can be the conventional dimensional topography data layouts such as dem, Surfer Grid, xyz) are changed and processed the input using the dimensional topography data after conversion as method;
Step 2: data processing.After data-switching completes, data are inputed in this method, dimensional topography data after adopting OpenGL software interface to conversion are processed, by pixel operation, evaluator, rasterisation, operation based on summit and the processing that basic step realizes pixel data and vertex data such as substantially mate, so far, data have been converted to the data that computing machine can be identified and process;
Step 3: connection with production of structures.Through data-switching with process after, the texture range of this method is determined, according to data area, can be divided into some subranges, landform color corresponding to data in each subrange is identical.
Step 4: dimensional topography shows.After data and texture are all disposed, get final product generating three-dimensional landform, for still exporting the good dimensional topography of visual effect in the larger situation of assurance dimensional topography scope, this method has been carried out parameter setting, relief block mapping, viewpoint-model transferring, projective transformation and the viewport transform to dimensional topography model.
2. the present invention is very low to dimensional topography data layout dependence, after data being changed and processed, can be used as the data of this method generating three-dimensional landform.By reference to the accompanying drawings 2, the attached data-switching process flow diagram that Figure 2 shows that complex three-dimensional gound-mapping method.This method is supported the data of multiple format, but will guarantee that the data of all importings are effective data available, must be unified for a kind of form.First using original dimensional topography data as input, judge that its whether all data are active data form, if not being, invalid data are carried out to data-switching, the concrete mode of data-switching is: detect in these data, whether there is the distinctive identifier of target data, as do not have, at the first this identifier that adds of data.Invalid data is converted to after valid data, merge with original valid data, the concrete mode that data merge is: the data file after conversion is kept under the root directory identical with original valid data file, and when system input data, loads with raw data file simultaneously.After data merge, whether the data after judgement merges are " square formation type " data, if not being, data are carried out to " square formation ", so-called " square formation type " data, refer to that the data amount check that comprises in data file is certain positive integer (being made as MapSize here) square, and use enter key interval between every MapSize data (being each row of data), between colleague's data, use space bar interval, the concrete mode of " square formation " is: by the every MapSize of the data in file, be made as one group, and after group, add enter key, until file is last.So far, the data that this method is read in can be corresponding one by one with the pixel realization of texture image, accurately drawing three-dimensional landform.
3. the present invention adopts OpenGL software interface to process dimensional topography data, by pixel operation, evaluator, rasterisation, operation based on summit and the processing that basic step realizes pixel data and vertex data such as substantially mate.By reference to the accompanying drawings 3, the attached flow chart of data processing figure that Figure 3 shows that complex three-dimensional gound-mapping method, wherein data comprise vertex data (the graphic based point of method acquiescence) and pixel data.If the display precision of object is improved, obtains so image fidelity and also will improve, yet this means the calculation task as astronomical figure, so the program design of OpenGL three-dimensional picture is the art of compromising between quality and travelling speed to a great extent.The present invention utilizes the existing three-dimensional data processing capacity of OpenGL DLL (dynamic link library) module, rationally, has effectively set up the logical relation between each functional module, has designed flow process and the method for processing vertex data and pixel data.First pixel data and vertex data are stored in display list, again for pixel operate after and texture assemble, for vertex data, carry out after the processing of evaluator, carry out operation and basic assembling based on summit, two data are carried out to rasterisation simultaneously, finally after fragment operation, be stored to frame buffer zone, through above process, guaranteeing that computing machine calculates task not heavy.
4. the present invention is directed to landform and comparatively in complexity and the larger situation of scope, paste the problem that existing texture can cause fidelity to reduce, proposed a kind of production method of complex texture.By reference to the accompanying drawings 4, accompanying drawing 4 is the connection with production of structures process flow diagram of complex three-dimensional landform.OpenGL software interface with 3-D view painted, play up function, can characterize differing heights scope by different colours, but when landform is more complicated, scope is when larger, this method is often because of calculated amount considerable influence method response speed, and the sense of reality a little less than.So the present invention adopts the mode of texture mapping to improve this method response speed and strengthens the sense of reality that dimensional topography shows.Obviously, how producing the key problem that accurate, vivid texture is this part, is also the important composition that guarantees display effect.The concrete implementation step of connection with production of structures method of the present invention is as follows:
Step 1, first read in certain region dimensional topography data (reading data need meet in embodiment 2 under requirement, if do not met, can modify by method shown in embodiment 2), and guarantee that this region is consistent with the regional extent at the data place of accompanying drawing 2 conversions, as inconsistent, need to carry out reselecting of data;
Step 2, according to display precision, terrain data need to be divided into some altitude ranges, altitude range partition process is that each numeral in data file is referred in the different digital scope setting in advance, texture color corresponding to data in digital scope of the same race is identical, visible, altitude range is divided manyly, and display effect is meticulousr;
Step 3, by output accuracy (during output accuracy and embodiment 2 adopts translation data, output accuracy must be unified) is set, is output as dimensional topography data the texture maps of a MapSize*MapSize size herein.
In addition,, after step 2 finishes, if needed, also can customize the color attribute of each altitude range.In self-defined process, can be with reference to the scheme of colour of paper map.
5. the present invention has carried out to dimensional topography model the excellent results that the steps such as parameter setting, relief block mapping, viewpoint-model transferring, projective transformation and the viewport transform guarantee 3-D display.By reference to the accompanying drawings 5, the attached complex three-dimensional gound-mapping theory diagram that Figure 5 shows that.This method is input as altitude figures and data texturing, through following steps, exports three-dimensional land map:
(1) parameter setting
Light source parameters (light source character, light source position) and color mode (index, RGBA) etc. are set.In light source parameters setting up procedure of the present invention, shadow model and light source position have been designed; In color parameter setting up procedure, adopted RGBA pattern that color is set.
(2) relief block mapping
In relief block mapping process, first the present invention changes into digital terrain data the data layout that OpenGL can identify and operate, and then calculates the parameters such as apex coordinate and vertex scheme vector.Wherein, when the coordinate on summit is corresponding with the coordinate of texture, just can guarantee the authenticity of 3-D view, the normal vector on summit has determined object can be accepted how much illumination at that point.While calculating vertex scheme vector, because each face in three-dimensional environment has both direction, while therefore calculating triangulation method vector, must calculate the normal vector on each summit, more leg-of-mutton normal vector around this summit is added, and result vector is carried out to unit.
(3) viewpoint-model transferring
With camera finding, liken the viewpoint-model transferring in three-dimensional scenic, viewpoint change is exactly for determining the shooting point of scene, and model transferring is equivalent to model where to be placed on exactly.Consider the three kinds of positions and the big or small variation that in dimensional topography procedure for displaying, exist, comprise translation, rotation and convergent-divergent, in the present invention, three kinds of geometric transformations of scale transformation of adopted the running transform that object space is moved, the rotational transform that object is rotated, object being carried out to scaled realize viewpoint-model transferring, and have designed running transform function, rotational transform function, convergent-divergent function and gone to realize these operations.
The summit that pel is provided is as one-column matrix, and hypothesized model viewing matrix M is the matrix of 4*4, one-column matrix X Y Z W The new coordinate corresponding with visual coordinate after just obtaining conversion with model view matrix multiple X e Y e Z e W e . As shown in Equation (1):
X Y Z W 4 &times; 4 M = X e Y e Z e W e - - - ( 1 )
Translation transformation:
x &prime; y &prime; z &prime; 1 = x y z 1 1 0 0 0 0 1 0 0 0 0 1 0 T x T y T z 1 - - - ( 2 )
Wherein, before conversion, point coordinate be (x, y, z), and conversion afterwards point coordinate is (x ', y ', z '), T x, T y, T zrepresent that respectively in conversion below, the definition of these parameters is constant along X, Y, Z tri-principal axis transformation amount of movements.
Rotational transform: rotation can be divided into three kinds conventionally.
Point rotates computing formula around X-axis:
x &prime; y &prime; z &prime; 1 = x y z 1 1 0 0 0 0 cos &theta; cos &theta; 0 0 - sin &theta; cos &theta; 0 0 0 0 1 - - - ( 3 )
Point rotates computing formula around Y-axis:
x &prime; y &prime; z &prime; 1 = x y z 1 cos &theta; 0 - sin &theta; 0 0 1 0 0 - sin &theta; 0 cos &theta; 0 0 0 0 1 - - - ( 4 )
Point rotates computing formula around Z axis:
x &prime; y &prime; z &prime; 1 = x y z 1 cos &theta; sin &theta; 0 0 - sin &theta; cos &theta; 0 0 0 0 1 0 0 0 0 1 - - - ( 5 )
Wherein, in formula, θ is angular unit, and the positive and negative of it carries out as given a definition: from turning axle positive dirction, looking over, is positive-angle in a clockwise direction, and take is negative angle counterclockwise.
Scale transformation computing formula:
x &prime; y &prime; z &prime; 1 = x y z 1 S x 0 0 0 0 S y 0 0 0 0 S z 0 0 0 0 1 - - - ( 6 )
Wherein, S x, S y, S zrepresent respectively three scaling sizes on change in coordinate axis direction.
(4) projective transformation
Also adopting camera shooting to do here likens, projective transformation cans be compared to selects a camera lens, with it, go to determine the size of range of observation and the mode of project objects screen, that is to say projective transformation is exactly to determine how the scene conversion having completed is become to the final image on screen.Projection centre changes and changes according to situation to the distance on projecting plane, and projective transformation can be divided into two kinds of parallel projection conversion and perspective projection transformations.Due in landform comparatively under complicated situation, perspective projection transformation more meets the view mode of people's naked eyes to real world, so the present invention adopts perspective transform to complete projective transformation.Wherein establish perspective projection transformation matrix P as shown in Equation (7), wherein accompanying drawing 6 is shown in the setting of parameter physical significance and coordinate.Wherein, near is projected object minor increment to projecting plane in X-direction, far is projected object ultimate range to projecting plane in X-direction, top is projected object ultimate range to projecting plane in Y direction, bottom is projected object minor increment to projecting plane in Y direction, right is projected object minor increment to projecting plane in Z-direction, and left is projected object ultimate range to projecting plane in Z-direction.
P = 2 * near right - left 0 right + left right - left 0 0 2 * near top - bottom top + bottom top - bottom 0 0 0 near + far near - far 2 * far * near near - far 0 0 - 1 0 - - - ( 7 )
(5) viewport transform
Adopt camera shooting to do and liken, the viewport transform has determined the size of final photograph, has determined the shared regional extent in computer screen of the image in real scene.Because landform scope is when larger, viewport can affect display effect largely, therefore the present invention has added viewport transform module, guarantees that wide-range terrain can all be presented on screen, and can be by regulating viewport transform parameter to realize good display effect.

Claims (5)

1. a complex three-dimensional gound-mapping method, is characterized in that:
Step 1: data-switching, the dimensional topography data of reading in are changed and processed;
Step 2: data processing, after data-switching completes, dimensional topography data after adopting OpenGL software interface to conversion are processed, by pixel operation, evaluator, rasterisation, operation based on summit and substantially mate the processing that realizes pixel data and vertex data, dimensional topography data are converted to computing machine and can identify and the data of processing;
Step 3: connection with production of structures, through data-switching with process after, data area is divided into some subranges, landform color corresponding to data in each subrange is identical;
Step 4: dimensional topography shows, after data and texture are all disposed, generating three-dimensional landform, carries out parameter setting, relief block mapping, viewpoint-model transferring, projective transformation and the viewport transform to dimensional topography model.
2. complex three-dimensional gound-mapping method according to claim 1, the method that it is characterized in that described data-switching is: using original dimensional topography data as input, judge that its whether all data are active data form, if not, carry out data-switching to invalid data; The concrete mode of data-switching is: detect in these data, whether there is the distinctive identifier of target data, as do not have, at the first identifier that adds of data; Invalid data is converted to after valid data, merges with original valid data; The concrete mode that data merge is: the data file after conversion is kept under the root directory identical with original valid data file, and when system input data, loads with raw data file simultaneously; After data merge, whether the data after judgement merges are " square formation type " data, if not being, data are carried out to " square formation ", the data amount check comprising in data file is certain positive integer square, and between each row of data, uses enter key interval, between colleague's data, use space bar interval, the concrete mode of " square formation " is: the every MapSize of the data in file is made as to one group, and after group, adds enter key, until file is last.
3. complex three-dimensional gound-mapping method according to claim 1, it is characterized in that the method that the dimensional topography data after described employing OpenGL software interface is to conversion are processed is: first pixel data and vertex data are stored in display list, again for pixel operate after and texture assemble, for vertex data, carry out after the processing of evaluator, carry out operation and basic assembling based on summit, two data are carried out to rasterisation simultaneously, finally after fragment operation, be stored to frame buffer zone.
4. complex three-dimensional gound-mapping method according to claim 1, is characterized in that described connection with production of structures specifically comprises:
(1) first read in the dimensional topography data in certain region;
(2) according to display precision, dimensional topography data need to be divided into some altitude ranges, altitude range partition process is that each numeral in data file is referred in the different digital scope setting in advance, and texture color corresponding to data in digital scope of the same race is identical;
(3) by output accuracy is set, dimensional topography data are output as to the texture maps of a MapSize*MapSize size.
5. complex three-dimensional gound-mapping method according to claim 1, is characterized in that described dimensional topography shows specifically to comprise:
(1) parameter setting
Light source parameters and color mode are set;
(2) relief block mapping
First digital terrain data is changed into the data layout that OpenGL can identify and operate, then calculate the parameters such as apex coordinate and vertex scheme vector;
(3) viewpoint-model transferring
The running transform that employing is moved object space, the rotational transform that object is rotated, three kinds of geometric transformations of scale transformation that object is carried out to scaled realize viewpoint-model transferring;
The summit that pel is provided is as one-column matrix, and hypothesized model viewing matrix M is the matrix of 4*4, one-column matrix X Y Z W The new coordinate corresponding with visual coordinate after just obtaining conversion with model view matrix multiple X e Y e Z e W e . As shown in Equation (1):
X Y Z W 4 &times; 4 M = X e Y e Z e W e - - - ( 1 )
Translation transformation:
x &prime; y &prime; z &prime; 1 = x y z 1 1 0 0 0 0 1 0 0 0 0 1 0 T x T y T z 1 - - - ( 2 )
Wherein, before conversion, point coordinate be (x, y, z), and conversion afterwards point coordinate is (x ', y ', z '), T x, T y, T zrepresent that respectively in conversion below, the definition of these parameters is constant along X, Y, Z tri-principal axis transformation amount of movements;
Rotational transform: rotation can be divided into three kinds conventionally,
Point rotates computing formula around X-axis:
x &prime; y &prime; z &prime; 1 = x y z 1 1 0 0 0 0 cos &theta; cos &theta; 0 0 - sin &theta; cos &theta; 0 0 0 0 1 - - - ( 3 )
Point rotates computing formula around Y-axis:
x &prime; y &prime; z &prime; 1 = x y z 1 cos &theta; 0 - sin &theta; 0 0 1 0 0 - sin &theta; 0 cos &theta; 0 0 0 0 1 - - - ( 4 )
Point rotates computing formula around Z axis:
x &prime; y &prime; z &prime; 1 = x y z 1 cos &theta; sin &theta; 0 0 - sin &theta; cos &theta; 0 0 0 0 1 0 0 0 0 1 - - - ( 5 )
Wherein, in formula, θ is angular unit, and the positive and negative of it carries out as given a definition: from turning axle positive dirction, looking over, is positive-angle in a clockwise direction, and take is negative angle counterclockwise;
Scale transformation computing formula:
x &prime; y &prime; z &prime; 1 = x y z 1 S x 0 0 0 0 S y 0 0 0 0 S z 0 0 0 0 1 - - - ( 6 )
Wherein, S x, S y, S zrepresent respectively three scaling sizes on change in coordinate axis direction;
(4) projective transformation
Adopt perspective transform to complete projective transformation, wherein establish perspective projection transformation matrix P as shown in Equation (7), wherein, near is projected object minor increment to projecting plane in X-direction, far is projected object ultimate range to projecting plane in X-direction, top is projected object ultimate range to projecting plane in Y direction, bottom is projected object minor increment to projecting plane in Y direction, right is projected object minor increment to projecting plane in Z-direction, left is projected object ultimate range to projecting plane in Z-direction,
P = 2 * near right - left 0 right + left right - left 0 0 2 * near top - bottom top + bottom top - bottom 0 0 0 near + far near - far 2 * far * near near - far 0 0 - 1 0 - - - ( 7 )
(5) viewport transform.
CN201310624871.6A 2013-11-29 2013-11-29 Displaying method for complex three-dimensional terrain Pending CN103617650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310624871.6A CN103617650A (en) 2013-11-29 2013-11-29 Displaying method for complex three-dimensional terrain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310624871.6A CN103617650A (en) 2013-11-29 2013-11-29 Displaying method for complex three-dimensional terrain

Publications (1)

Publication Number Publication Date
CN103617650A true CN103617650A (en) 2014-03-05

Family

ID=50168354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310624871.6A Pending CN103617650A (en) 2013-11-29 2013-11-29 Displaying method for complex three-dimensional terrain

Country Status (1)

Country Link
CN (1) CN103617650A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104932858A (en) * 2015-06-29 2015-09-23 中国船舶重工集团公司第七二四研究所 Method for realizing overlapping display of background map supporting accurate matching and real-time roaming
CN109934911A (en) * 2019-03-15 2019-06-25 鲁东大学 Mobile terminal high-precision oblique photograph three-dimensional modeling method based on OpenGL
CN110555085A (en) * 2018-03-29 2019-12-10 中国石油化工股份有限公司 Three-dimensional model loading method and device
CN111815775A (en) * 2020-06-12 2020-10-23 中国船舶重工集团公司第七二四研究所 OpenGL-based three-dimensional background map rapid filling method
CN112017227A (en) * 2020-08-27 2020-12-01 上海交通建设总承包有限公司 Method for hybrid visualization of terrain model and tidal data generated by point cloud fusion

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010027456A1 (en) * 1997-09-09 2001-10-04 Geosoftware,Inc. Rapid terrain model generation with 3-D object features and user customization interface
CN102117497A (en) * 2009-12-30 2011-07-06 新奥特(北京)视频技术有限公司 Method and system for three-dimensional terrain modeling

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010027456A1 (en) * 1997-09-09 2001-10-04 Geosoftware,Inc. Rapid terrain model generation with 3-D object features and user customization interface
CN102117497A (en) * 2009-12-30 2011-07-06 新奥特(北京)视频技术有限公司 Method and system for three-dimensional terrain modeling

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
GNUSER: "OpenGL Projection Matrix", 《HTTP://BLOG.CSDN.NET/GNUSER/ARTICLE/DETAILS/5146598》 *
刘敏莺 等: "基于OpenGL的地形三维可视化", 《海洋测绘》 *
徐长青 等: "《计算机图形学》", 29 February 2004, 机械工业出版社 *
陈哲锋: "基于opengl的地形三维可视化研究与应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104932858A (en) * 2015-06-29 2015-09-23 中国船舶重工集团公司第七二四研究所 Method for realizing overlapping display of background map supporting accurate matching and real-time roaming
CN110555085A (en) * 2018-03-29 2019-12-10 中国石油化工股份有限公司 Three-dimensional model loading method and device
CN110555085B (en) * 2018-03-29 2022-01-14 中国石油化工股份有限公司 Three-dimensional model loading method and device
CN109934911A (en) * 2019-03-15 2019-06-25 鲁东大学 Mobile terminal high-precision oblique photograph three-dimensional modeling method based on OpenGL
CN111815775A (en) * 2020-06-12 2020-10-23 中国船舶重工集团公司第七二四研究所 OpenGL-based three-dimensional background map rapid filling method
CN112017227A (en) * 2020-08-27 2020-12-01 上海交通建设总承包有限公司 Method for hybrid visualization of terrain model and tidal data generated by point cloud fusion

Similar Documents

Publication Publication Date Title
US20230053462A1 (en) Image rendering method and apparatus, device, medium, and computer program product
CN104268922B (en) A kind of image rendering method and image rendering device
ES2351961T3 (en) PROCEDURE BASED ON IMAGES OF REPRESENTATION AND REPRODUCTION OF THREE-DIMENSIONAL OBJECTS.
US8243065B2 (en) Image presentation method and apparatus for 3D navigation and mobile device including the apparatus
CN103761397B (en) Three-dimensional model slice for surface exposure additive forming and projection plane generating method
CN102289845B (en) Three-dimensional model drawing method and device
JP6149676B2 (en) Image processing apparatus, image processing method, and program
CN106096016A (en) A kind of network three-dimensional point cloud method for visualizing and device
CN105247575A (en) Overlaying two-dimensional map data on a three-dimensional scene
CN103617650A (en) Displaying method for complex three-dimensional terrain
CN102306386B (en) Method for quickly constructing third dimension tree model from single tree image
JPH06223198A (en) Device and method for image preparation by light beam tracking
CN104318605B (en) Parallel lamination rendering method of vector solid line and three-dimensional terrain
CN106204704A (en) The rendering intent of three-dimensional scenic and device in virtual reality
CN102930601A (en) Construction method of dual-mode three-dimensional terrain stereo environment
CN107146287A (en) Two-dimensional projection image to threedimensional model mapping method
CN106326334A (en) Display method and device for electronic map and generation method and device for electronic map
CN105894551A (en) Image drawing method and device
CN115690336A (en) Satellite beam coverage area visualization method, server and storage medium
CN106067160B (en) Large screen merges projecting method
US10909752B2 (en) All-around spherical light field rendering method
CN114419241A (en) Three-dimensional model construction method and device and storage medium
CN102111562A (en) Projection conversion method for three-dimensional model and device adopting same
KR100489572B1 (en) Image processing method
CN113034657A (en) Rendering method, device and equipment for illumination information in game scene

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140305