A map road rendering method and device

A road and map technology, applied in the computer field, can solve problems such as sudden changes in road width, achieve smooth switching, good switching animation effects, and avoid sudden changes in roads.

Active Publication Date: 2021-12-14
TENCENT TECH (SHENZHEN) CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The embodiment of the present invention provides a map road rendering method and device to solve the problem in the prior art that the road width suddenly changes when the map is zoomed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A map road rendering method and device
  • A map road rendering method and device
  • A map road rendering method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0080] refer to figure 2 As shown, the map rendering method provided by Embodiment 1 of the present invention specifically includes the following steps:

[0081] Step 200: Obtain the levels before and after zooming according to the zoom command.

[0082] In practice, map rendering usually involves modeling roads on the CPU side to generate a series of triangles, and then uploading the index data of these triangles to the GPU side for direct rendering during rendering. However, in the prior art, for different types of roads , when zooming, a uniform zoom amount is used to zoom, and there will be a problem of road width mutation. For example, when the map is zoomed in, the scale becomes 2 times, and a switching animation will be triggered. In the prior art, the The map is zoomed in globally, and the range of the zoom factor is [1,2]. Then, when the switching animation ends, it directly switches to the road width corresponding to the new level. However, the road width before an...

Embodiment 2

[0147] Hereinafter, a specific application scenario is adopted to further describe the foregoing embodiment in detail. In the second embodiment of the present invention, the description can be divided into two parts.

[0148] 1) CPU side.

[0149] The road model is established on the CPU side, and the normal vector is added to each vertex, and the road width is 0 for modeling.

[0150] 2) Vertex shader. See for details Figure 4 As shown, the details are as follows:

[0151] Step 400: Obtain the rendering width of each frame of the road during the scaling process.

[0152] Specifically, during the scaling process, the calculated road width of each frame can be passed to the vertex shader through the glUniformlf interface, and the vertex shader can obtain the rendering width of each frame.

[0153] Step 401: According to the normal vector of each original vertex of the road and the rendering width of any frame of the road, respectively calculate the offset of each vertex o...

Embodiment 3

[0158] In the embodiment of the present invention, refer to Figure 5 Shown is a schematic diagram of a server architecture environment in Embodiment 3 of the present invention.

[0159] The server is connected to the user terminal, and map applications, such as Tencent Maps, are installed in the user terminal. The user zooms in or out on the map, and then the server performs calculations and other operations, and renders the map in the user terminal according to the results.

[0160] Wherein, the user terminal may be any smart device such as a mobile phone, a computer, or an ipad, and the third embodiment of the present invention only uses a mobile phone as an example for illustration.

[0161] For example, a user opens Tencent Maps on a mobile phone, and after querying a location, wants to zoom in on the map so that the location can be viewed more clearly. Double-tap the screen or slide with two fingers to zoom in on the map, and the server side calculates the road in the ma...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention relates to the field of computer technology, in particular to a map road rendering method and device. The method is to obtain the level before and after zooming according to the zoom command; respectively calculate the rendering width of each frame of the road during the zooming process; wherein, the initial The frame corresponds to the level before zooming, and the end frame corresponds to the level after zooming; according to the rendering width of each frame of the road, and the original vertex position of the road, the normal vector of the original vertex, calculate the vertex of the road on the display screen position; the road is rendered, so that for different types of roads, the rendering width of each frame of the road during the zooming process is calculated separately, and the road width can be dynamically modified during the zooming process to realize adaptive processing of different types of roads Smooth switching of road widths.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a map road rendering method and device. Background technique [0002] Map rendering can display intuitive and convenient effects to users. At present, the open source graphics library (OpenGraphics Library, OpenGL) is usually used to render the map. For roads with width in the map, the native OpenGL has poor support for line rendering. Therefore, the current In existing technologies, triangular patches are generally used to render wide roads. [0003] First, the central processing unit (Central Processing Unit, CPU) end establishes a road model, for example, refer to figure 1 As shown, P1P2 is a line segment of the original road. Set the width of the road to w, then the two endpoints of P1 and P2 generate four vertices along the vertical direction of the line segment, and the order is ABCD. [0004] In this way, the position of the four vertices of the road can be ca...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06T3/40G06T11/20
CPCG06T3/40G06T11/20
Inventor 任亚飞庞海霞
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products