I haven't written any articles in my blog for a long time. My one-year high-intensity business trip has finally ended. Now I have time to think about and summarize some questions. During this rest period, we encountered two more questions about dynamic layers. One was the rapid development of airborne radar simulation, and the other was the testing of multi-object tracking and display. In fact, the development of dynamic layers is not difficult, and the core development is concentrated in the drawdynamiclayer method. The key point is how to design the target (target appearance style ), how to maintain the target object (how to facilitate query and retrieval ).
Here I want to talk about the performance test results. Because the number of targets required by the customer is around 50 thousand, the traditional method (element, template layer, DC) is definitely not good. The dynamic layer method is acceptable. However, if the drawdynamiclayer method uses the AO ready-made symbol method to define the drawing method of the target object, the bottleneck will occur after the number of target objects exceeds. The key to solving this problem is how to improve the rendering efficiency. Because AO objects rely on COM and are CPU-intensive, the efficiency will be low, which is the crux of the problem. How can this problem be solved? I can say that there is no way to solve this problem. We only need to avoid it. ESRI did this and made a dynamic Layer Based on OpenGL. The problem is solved by OpenGL. The efficient and GPU-intensive computing method is our life-saving solution. In drawdynamiclayer, I used OpenGL to draw the target directly, and the problem was solved. I set up 0.4 million simulated motion targets, and the real-time motion of the targets is extremely smooth. In fact, the number of targets is 0.4 million, and the screen is basically full.
0.4 million targets in motion (only the edges can see that the target is in motion)
As a matter of fact, I can see clearly on about 40 thousand screens, and set the target size to 4 pixels.
40 thousand targets, with a slightly vague background map
Some conclusions about OpenGL.
If you use OpenGL to draw images directly, pay attention to the following points:
1. For the coordinate system, the rendering process involves three coordinate systems, the screen coordinate system, the geographical coordinate system, and the OpenGL coordinate system, which need to be converted. The idisplaytransformation can be converted randomly between the three coordinate systems.
2. How to Improve the rendering performance of OpenGL depends on the graphics card. Currently, most graphics cards are drawn at the fastest speed in vector mode, instead of setting OpenGL to draw vertices at a point or a point, we use the data method. After assigning a large array at a time, we directly use OpenGL to draw the vertex.
3. If the first two problems are solved, it takes time to configure the display style of the target. We recommend that you use OpenGL to configure the display style. In short, OpenGL is used to draw objects, abandon the ready-made rendering method provided by AO, but it must be difficult. After all, we need to call a lot of OpenGL functions.
How to refer to dynamiclayer to design programs that are out of the AO system
It is easy to write by yourself. There are only two key technologies,
I. Slice the map in advance so that OpenGL can plot the cut map data by texture (supported by mainstream web programs)
2. design the symbolic style Library for the target under OpenGL (a pile of articles and a pile of articles)
This topic is almost written and will not be written in the future.
Reprinted please indicate the source!