CN109215103A - A kind of high-volume text rendering method based on OSG - Google Patents
A kind of high-volume text rendering method based on OSG Download PDFInfo
- Publication number
- CN109215103A CN109215103A CN201811005869.XA CN201811005869A CN109215103A CN 109215103 A CN109215103 A CN 109215103A CN 201811005869 A CN201811005869 A CN 201811005869A CN 109215103 A CN109215103 A CN 109215103A
- Authority
- CN
- China
- Prior art keywords
- texture
- vertex
- text
- memory
- method based
- 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
Links
- 238000009877 rendering Methods 0.000 title claims abstract description 26
- 238000000034 method Methods 0.000 title claims abstract description 14
- 230000015572 biosynthetic process Effects 0.000 claims 1
- 238000003786 synthesis reaction Methods 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 3
- 241001269238 Data Species 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000007794 visualization technique Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/04—Texture mapping
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
A kind of high-volume text rendering method based on OSG, comprising the following steps: step 1, the Texture features of texts all in system are merged into one or multiple merge on texture;Step 2, the texture coordinate for modifying text vertex, makes it be directed toward corresponding position in newly-generated large texture;Step 3, merge text vertex, all text vertex are merged into one piece of vertex memory, and modify its index value;The vertex created in step 4, binding step 1-3, index, texture coordinate memory, the texture after binding merging are rendered.It is several by thousands of batches of render times rapid drawdowns, to improve rendering efficiency on the basis of guaranteeing same display effect.
Description
Technical field
The invention belongs to geographic information system technology field, in particular to a kind of high-volume text rendering side based on OSG
Method.
Background technique
In GIS-Geographic Information System (abbreviation GIS) industry, mass data is always a notable feature of geodata, nothing
By being grid and vector data or model business datum, TB grades can be easily reached, in order to it is intuitive and easily check these Pang
Big data, three-dimensional visualization technique are quickly grown, and OpenSceneGraph (abbreviation OSG) is as a open source efficient three
Dimension engine, which also receives, to be more and more widely used.In order to which institute's display data is annotated and illustrated in three-dimensional scenic, text
The use of word has been multiplied.Such as the geographical name datas at different levels in our whole nations for often loading or even the whole world, from national capital
To provincial capital of each province, from districts and cities at different levels again to village small towns, the dosage of text is huge, this brings huge pressure to figure rendering
Power.By taking Shaanxi Province as an example, under about 1768 small towns, if the name real-time rendering of each small towns, the rendering of system
Frame per second meeting dramatic decrease, causes Caton even stuck.Common hardware environment renders mode, Neng Goucheng according to conventional text
Probably 1000 or so (specifically by machine performance depending on), and actual demand is much larger than this to the text rendering amount received.
In order to solve contradiction of the conventional text rendering efficiency lowly between its great demand, common solution is to utilize
The thought of Levels of Detail (abbreviation LOD) shows different place names in different ranks, such as looks down in space
Terrestrial time, we can only show the place name in various countries capital, and when the distance of viewpoint furthers, the place name in capital disappears, provincial capital
Place name occurs, and the final place name for showing small towns cuts the place name other than the ken in combination with Frustum culling technology, from
And while control is with screen text the upper limit of the number, and all information of place names can be viewed by the movement of viewpoint.This side
Although case can solve the problems, such as to a certain extent, in itself, it is a kind of scheduling scheme, and there is no fundamentally mention for it
The rendering efficiency of text, and this scheduling are risen, can be used in certain situations, but may cannot be expired in other scene
Sufficient demand, for example in certain target monitoring systems, text is responsible for showing the current state of each target, is to show always
Show, in this case, the scheme of LOD can not be just applicable in, therefore we need new scheme to solve the problems, such as.
Summary of the invention
The high-volume text rendering method based on OSG that the purpose of the present invention is to provide a kind of, to solve the above problems.
To achieve the above object, the invention adopts the following technical scheme:
A kind of high-volume text rendering method based on OSG, comprising the following steps:
Step 1, the Texture features of texts all in system are merged into one or multiple merges on texture;
Step 2, the texture coordinate for modifying text vertex, makes it be directed toward corresponding position in newly-generated large texture;
Step 3, merge text vertex, all text vertex are merged into one piece of vertex memory, and modify its index
Value;
The vertex created in step 4, binding step 1-3, index, texture coordinate memory, the texture after binding merging carry out
Rendering.
Further, step 1 specifically: then one opening and closing of creation and texture traverse each text object, take out wherein
Texture features, then the pixel value of Texture features is written to and is merged in texture, if an opening and closing and texture are not enough to store
Alphabet texture then creating a new merging texture again, and repeats step 1.
Further, the size for merging texture is 512*512 pixel, 1024*1024 pixel or 2048*2048 pixel.
Further, step 2 specifically: then one piece of texture coordinate memory of creation traverses each text object, modifies
Its texture coordinate makes it be directed toward corresponding position in the merging texture synthesized in step 1, and then new texture coordinate is written
Into texture coordinate memory.
Further, step 3 specifically includes:
1) one piece of vertex memory is created, each text object is then traversed, the vertex data of single text object is write
Enter into vertex memory;
2) one piece of index memory is created, each text object is then traversed, the index value of single text object is written
Into index memory, while rope value is modified, current index value is added to the vertex sum having been written into.
Compared with prior art, the present invention has following technical effect:
The texture coordinate that existing multiple batches of rendering objects are passed through Texture features, modify text vertex by the present invention, and
Merge text vertex and merge rendering, to be much higher than this for once rendering the efficiency of mass data in design using video card
A little data separate the mechanism repeatedly rendered, can be several by thousands of batches of render times rapid drawdowns, thus same aobvious in guarantee
Show and improves rendering efficiency on the basis of effect.
Detailed description of the invention
Fig. 1 is the flow chart of the method for the present invention;
Specific embodiment
Below in conjunction with attached drawing, the present invention is further described:
Referring to Fig. 1, a kind of high-volume text rendering method based on OSG, comprising the following steps:
Step 1, the Texture features of texts all in system are merged into one or multiple merges on texture;
Step 2, the texture coordinate for modifying text vertex, makes it be directed toward corresponding position in newly-generated large texture;
Step 3, merge text vertex, all text vertex are merged into one piece of vertex memory, and modify its index
Value;
The vertex created in step 4, binding step 1-3, index, texture coordinate memory, the texture after binding merging carry out
Rendering.
Step 1 specifically: then one opening and closing of creation and texture traverse each text object, take out character line therein
Then the pixel value of Texture features is written to and merges in texture by reason, if simultaneously texture is not enough to store alphabet for an opening and closing
Texture then creating a new merging texture again, and repeats step 1.
The size for merging texture is 512*512 pixel, 1024*1024 pixel or 2048*2048 pixel.
Step 2 specifically: then one piece of texture coordinate memory of creation traverses each text object, modify its texture seat
Mark makes it be directed toward corresponding position in the merging texture synthesized in step 1, and new texture coordinate is then written to texture and is sat
It marks in memory.
Step 3 specifically includes:
1) one piece of vertex memory is created, each text object is then traversed, the vertex data of single text object is write
Enter into vertex memory;
2) one piece of index memory is created, each text object is then traversed, the index value of single text object is written
Into index memory, while rope value is modified, current index value is added to the vertex sum having been written into.
By taking 10 characters as an example, embodiment 1:
An opening and closing and texture, such as 1024*1024 are created, each text object is then traversed, takes out character therein
Then the pixel value of Texture features is written in large texture by texture, if one big texture is not enough to store alphabet line
Reason then creating a new large texture again, and repeats step 3;
One piece of texture coordinate memory is created, then the texture coordinate memory of corresponding 320 bytes of 10 characters traverses each
Text object modifies its texture coordinate, corresponding position in the merging texture for synthesizing its direction in step 1, then will be new
Texture coordinate be written in texture coordinate memory.
One piece of vertex memory is created, 480 bytes is saved as in 10 character corresponding vertexs, then traverses each text pair
As the vertex data of single text object is written in vertex memory;
One piece of index memory is created, 240 bytes is saved as in 10 character manipulative indexings, then traverses each text pair
As the index value of single text object is written in index memory, while modifying rope value, it usually needs by current index value plus
On have been written into vertex sum.
Tested as follows using FreeEarth platform: any three-dimensional platform can realize that this example is only used
FreeEarth platform is tested on same machine, successively renders 2000 certifications with the scheme after normal mode and optimization
Word,
It renders time-consuming as follows:
FreeEarth be based on OpenSceneGraph, OSGEarth exploitation conglomerate can the secondary of spread open
GIS platform is sent out, transformation is optimized to the text object of OSG in the platform, so that in the application scenarios of high-volume text,
Its rendering efficiency is obviously improved.
Claims (5)
1. a kind of high-volume text rendering method based on OSG, which comprises the following steps:
Step 1, the Texture features of texts all in system are merged into one or multiple merges on texture;
Step 2, the texture coordinate for modifying text vertex, makes it be directed toward corresponding position in newly-generated large texture;
Step 3, merge text vertex, all text vertex are merged into one piece of vertex memory, and modify its index value;
The vertex created in step 4, binding step 1-3, index, texture coordinate memory, the texture after binding merging carry out wash with watercolours
Dye.
2. a kind of high-volume text rendering method based on OSG according to claim 1, which is characterized in that step 1 is specific
Are as follows: then one opening and closing of creation and texture traverse each text object, take out Texture features therein, then by Texture features
Pixel value be written to and merge in texture, if an opening and closing and texture are not enough to store alphabet texture, then create one
The merging texture of Zhang Xin, and repeat step 1.
3. a kind of high-volume text rendering method based on OSG according to claim 2, which is characterized in that merge texture
Size be 512*512 pixel, 1024*1024 pixel or 2048*2048 pixel.
4. a kind of high-volume text rendering method based on OSG according to claim 1, which is characterized in that step 2 is specific
Are as follows: then one piece of texture coordinate memory of creation traverses each text object, modifies its texture coordinate, is directed toward it in step 1
New texture coordinate, is then written in texture coordinate memory by corresponding position in the merging texture of middle synthesis.
5. a kind of high-volume text rendering method based on OSG according to claim 1, which is characterized in that step 3 is specific
Include:
1) one piece of vertex memory is created, each text object is then traversed, the vertex data of single text object is written to
In vertex memory;
2) one piece of index memory is created, each text object is then traversed, the index value of single text object is written to rope
Draw in memory, while modifying rope value, current index value is added to the vertex sum having been written into.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811005869.XA CN109215103A (en) | 2018-08-30 | 2018-08-30 | A kind of high-volume text rendering method based on OSG |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811005869.XA CN109215103A (en) | 2018-08-30 | 2018-08-30 | A kind of high-volume text rendering method based on OSG |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109215103A true CN109215103A (en) | 2019-01-15 |
Family
ID=64986382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811005869.XA Pending CN109215103A (en) | 2018-08-30 | 2018-08-30 | A kind of high-volume text rendering method based on OSG |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109215103A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109712237A (en) * | 2018-12-21 | 2019-05-03 | 西安恒歌数码科技有限责任公司 | A kind of mixing based on altitude data and meteorological data sets color method |
CN110619675A (en) * | 2019-09-11 | 2019-12-27 | 西安恒歌数码科技有限责任公司 | OsgEarth-based surface vector data loading method |
CN110930490A (en) * | 2019-10-31 | 2020-03-27 | 北京庚图科技有限公司 | Large-scale and high-dynamic character annotation rapid visualization method |
CN116431848A (en) * | 2023-06-15 | 2023-07-14 | 北京麟卓信息科技有限公司 | Texture dynamic indexing method based on data pollution propagation analysis |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620740A (en) * | 2008-06-30 | 2010-01-06 | 北京壁虎科技有限公司 | Interactive information generation method and interactive information generation system |
CN103345771A (en) * | 2013-06-28 | 2013-10-09 | 中国科学技术大学 | Efficient image rendering method based on modeling |
CN103617220A (en) * | 2013-11-22 | 2014-03-05 | 北京掌阔移动传媒科技有限公司 | Method and device for implementing mobile terminal 3D (three dimensional) model |
CN104637089A (en) * | 2015-02-15 | 2015-05-20 | 腾讯科技(深圳)有限公司 | Three-dimensional model data processing method and device |
CN105046733A (en) * | 2015-08-25 | 2015-11-11 | 克拉玛依红有软件有限责任公司 | Three-dimensional multi-texture based mapping method |
CN106683189A (en) * | 2016-11-29 | 2017-05-17 | 浙江科澜信息技术有限公司 | Method of rendering text in three-dimensional scene |
-
2018
- 2018-08-30 CN CN201811005869.XA patent/CN109215103A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620740A (en) * | 2008-06-30 | 2010-01-06 | 北京壁虎科技有限公司 | Interactive information generation method and interactive information generation system |
CN103345771A (en) * | 2013-06-28 | 2013-10-09 | 中国科学技术大学 | Efficient image rendering method based on modeling |
CN103617220A (en) * | 2013-11-22 | 2014-03-05 | 北京掌阔移动传媒科技有限公司 | Method and device for implementing mobile terminal 3D (three dimensional) model |
CN104637089A (en) * | 2015-02-15 | 2015-05-20 | 腾讯科技(深圳)有限公司 | Three-dimensional model data processing method and device |
CN105046733A (en) * | 2015-08-25 | 2015-11-11 | 克拉玛依红有软件有限责任公司 | Three-dimensional multi-texture based mapping method |
CN106683189A (en) * | 2016-11-29 | 2017-05-17 | 浙江科澜信息技术有限公司 | Method of rendering text in three-dimensional scene |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109712237A (en) * | 2018-12-21 | 2019-05-03 | 西安恒歌数码科技有限责任公司 | A kind of mixing based on altitude data and meteorological data sets color method |
CN109712237B (en) * | 2018-12-21 | 2023-03-31 | 西安恒歌数码科技有限责任公司 | Mixed color setting method based on elevation data and meteorological data |
CN110619675A (en) * | 2019-09-11 | 2019-12-27 | 西安恒歌数码科技有限责任公司 | OsgEarth-based surface vector data loading method |
CN110619675B (en) * | 2019-09-11 | 2023-04-18 | 西安恒歌数码科技有限责任公司 | OsgEarth-based surface vector data loading method |
CN110930490A (en) * | 2019-10-31 | 2020-03-27 | 北京庚图科技有限公司 | Large-scale and high-dynamic character annotation rapid visualization method |
CN116431848A (en) * | 2023-06-15 | 2023-07-14 | 北京麟卓信息科技有限公司 | Texture dynamic indexing method based on data pollution propagation analysis |
CN116431848B (en) * | 2023-06-15 | 2023-08-15 | 北京麟卓信息科技有限公司 | Texture dynamic indexing method based on data pollution propagation analysis |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109215103A (en) | A kind of high-volume text rendering method based on OSG | |
Vanegas et al. | Modelling the appearance and behaviour of urban spaces | |
KR102047031B1 (en) | Deep Stereo: Learning to predict new views from real world images | |
US9241212B2 (en) | Ray tracing apparatus and method | |
EP3069104B1 (en) | Presenting markup in a scene using transparency | |
US12094163B2 (en) | Method, apparatus, and computer program product for displaying virtual graphical data based on digital signatures | |
CN103164516A (en) | Electronic chart data conversion device and electronic chart data conversion method | |
KR20070026521A (en) | Tile based graphics rendering | |
CN107784622B (en) | Graphics processing system and graphics processor | |
CN108027957A (en) | Efficient preservation and recovery for the contextual information of context switching | |
US20180089791A1 (en) | Rendering map data using descriptions of raster differences | |
CN107369205A (en) | A kind of three-dimensional linkage display methods of mobile terminal city two | |
CN103019690B (en) | A kind of visual assembly module development approach based on JET technology | |
CN106055294A (en) | Layer composition optimization method and apparatus | |
CN114782705A (en) | Method and device for detecting closed contour of object | |
CN105913475B (en) | A kind of change in time and space process dynamics method for visualizing | |
US20160307294A1 (en) | Systems and Methods for Displaying Patterns of Recurring Graphics on Digital Maps | |
CN103679727A (en) | Multi-dimensional space-time dynamic linkage analysis method and device | |
CN107958209B (en) | Illegal construction identification method and system and electronic equipment | |
CN101562005A (en) | Character display apparatus | |
CN104182498B (en) | Electronic chart engine and without time delay display methods under Android platform | |
US20120218261A1 (en) | Graphic system comprising a fragment graphic module and relative rendering method | |
US20130300738A1 (en) | Map rendering device | |
Dong et al. | Real-time occlusion handling for dynamic augmented reality using geometric sensing and graphical shading | |
CN105069841A (en) | Sea and land combined visualization method based on OSG three-dimensional engine |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190115 |