laitimes

One architecture, one language for the ultimate full-stack digital cockpit experience

Qt provides graphical tools to easily develop graphical interfaces in the in-vehicle digital cockpit. At the same time, Qt for Android Automotive integrates Qt technology, in-vehicle infotainment systems and Android platforms, provides Qt/C++ packaging of Java APIs, and provides development teams with easy-to-use, reliable and stable android IVI underlying interfaces.

One architecture, one language for the ultimate full-stack digital cockpit experience

Senior Technical Consultant Lin Bin, Qt China

As an internationally renowned software, Qt has been developed for 26 years and has a wide range of applications in various industries, the company is headquartered in Finland, mainly providing graphical development frameworks and rendering engines. Currently, Qt is listed on nasdaq Helsinki and maintains a growth rate of 30%-40% per year.

In the automotive industry, Qt serves many customers, projects, and there are several benchmark users around the world, one is Mercedes-Benz, MBUX's full range of digital cockpit systems are developed based on the Qt platform; Tesla's digital cockpit is also based on Qt development; and Ford, Hyundai and so on. Domestic manufacturers also have more cooperation, such as SAIC Volkswagen, GAC and so on, Tier One includes Yanfeng Visteon and Desay SV.

Extreme rendering

Qt itself is a very large architecture, covering desktop application development, embedded or smart wearables have corresponding solutions. Multiple development methods are available. There are more development methods used in the digital cockpit, one is a 2D and 3D UI based on Qt Quick technology, and the other is Qt supports WebUI, Qt's built-in browser, which can embed HTML content on the Qt interface.

Lin Bin introduced the most important part - Qt Quick rendering engine/graphics technology. The technology is first and foremost a development language, QML, which is also a rendering engine that can render both 2D and 3D content. This is where Qt differs from many manufacturers' technologies, it unifies 2D and 3D design tools, and the design team can easily drag and drop to combine the picture.

Lin Bin introduced that the flowchart/software architecture diagram displayed by Qt is the rendering bus of the complete Qt Quick technology. It is worth mentioning the 2D rendering engine, why is there a separate 2D rendering engine? Because the 2D scene is also rendered by the GPU, but some of the requirements of the 2D scene are different from the 3D scene, the 2D scene will produce a large number of fragmented elements, and it needs to be integrated in batches, or some performance optimization, and its rendering efficiency will be greatly improved. In short, if you use GPUs to render 2D scenes, you must have such a professional engine.

In addition to the 2D rendering engine, Qt also provides a 3D rendering engine specifically for rendering content under 3D scenes, and its optimization logic and algorithm are different from 2D. Qt can achieve complete solutions in 2D and 3D. Qt now GPU rendering will be based on the OpenGL standard, most of the software is based on the OpenGL standard for development, but OpenGL is already considered to be the previous generation of architecture, the new generation of technical architecture represented by Vulkan has a trend of replacement, the next five to ten years, the two will coexist. Qt has made a layer of rendering hardware interface in the output part of the engine, which will not directly dock with OpenGL or Vulkan, but in the form of plug-ins for users to freely choose, customers can switch different outputs directly through environment variables without modifying a line of code.

In terms of 3D performance, Qt can support advanced lighting algorithms, image-based lighting technology (IBL) and other technologies to meet the needs of automotive apps.

One architecture, one language for the ultimate full-stack digital cockpit experience

As shown in the figure, the non-stop rotating ball is another technology - real physical rendering (PBR) technology, which can simulate the reflection of the real metal or object surface with great precision, or in that case, if there is a car body control car model, the reflection of the car mold surface or some reflection can be completely achieved with this technology.

Qt can dynamically generate vertices, dynamically generate materials, for the automotive industry is very typical terrain generation needs, that is, ADAS or some car navigation road around the need for some randomly generated terrain, Qt fully supports this function, can be randomly generated or added to some algorithms to generate maps.

The Qt post shader can add some changes to the picture, such as I want to do some dynamic blur in the whole picture, or do some color changes with your theme color.

In the development of a common question, the car 3D graphical interface on the screen fine requirements are very high, the perfection requirements are very high, so Qt Quick also added a rich comprehensive anti-aliasing function.

Qt provides two very professional independent rendering engines, that is to say, Qt can achieve both editing 2D and editing 3D in the same original code, 3D and 2D controls mixed state, or can draw 3D and 2D originals in the same Cartesian coordinate system, the 2D text or photo floating display, there is a 3D car model or 3D model from front to back non-stop traversal.

In addition, starting with Qt6.0, Qt supports bone animation, deformation animation, and 3D particle effects.

Complete toolchain ensures timely and high-quality delivery

Qt's tools are also a very important part, offering the most complete toolchain in the industry.

First, Qt provides Designer Tools, Qt's designer tool, which provides simple tototo drag-and-drop, and edit keyframes to achieve animation tools, which is on the front design end.

Second, Qt also provides Developer Tools, which can be used to write code, compile, and debug.

Third, Qt supports automated testing tools, Qt has a widget that integrates automated regression testing, so Qt writes some test scripts and puts them in Qt's CI/CD tools, so that every time you develop, or every time you commit code, you can perform complete automated tests. This improves the quality of development results and shortens development time.

One architecture, one language for the ultimate full-stack digital cockpit experience

Qt's design tool, Design Studio, has several features.

First, you can support material import. 2D materials include Photoshop, Illustrator, Sketch, Figma, etc., which directly convert the UI developed by the tool into Qt code.

The second is to generate this scene to edit its animation, edit its state machine, and achieve simple scene stitching. This version of Qt also includes some optimizations for 3D development, including edits to its visual 3D particle effects, including its PBR advanced material edits, and edits for custom shaders.

Qt's testing tool, which breaks down Qt's three products:

The first is Squish, an automated regression testing tool.

The second is COCO, a statistical tool for code coverage, how much code has been tested, how much code has been run, how much code is dead code, all of which can be analyzed and optimized through this tool.

The third is Test Center, a test results management tool, which is a service that can put all the test reports generated earlier in it.

This is a collection of Qt testing tools.

Integrate Android

Ten years ago, the entire Qt program could be put on Android, and the product is called Qt for Android. Qt can use Qt's development tools to develop Android APP, and the developed program can be compiled through Android's NDK, packaged to generate an Apk.

Qt for Android Automotive can encapsulate the entire Qt UI into a Surface, which can be embedded into the native Android Activity display. Qt can also be set to make it the top layer of the system, which can become a floating window, floating on any interface. Typical applications such as some 3D interactive avatars, do some human-machine dialogue functions, or do some 3D information push.

Another big category is about IVI Launcher, IVI desktop system, Android desktop development for cars will actually have very special requirements for desktop, Qt hopes that Android APP becomes a card. The general Android APP is running in full screen once it is started, Qt wants to turn the Android APP into a window or the card runs on the desktop, so that Qt can run many, many APPS on the desktop, and use the window combination situation to manage. Therefore, Qt created this desktop system, once the Android native APP is launched, it becomes a card or a small window running on the desktop, this window can also be customized layout. It uses the technology of the Qt window management module, as well as modifying the Android native, modifying the life cycle to a state where it can run in parallel. There are four apps in the video, and all four are native, and windows can be dragged and dropped, positioned or sequenced, and so on.

Qt has another scheme on Android. Now the digital cockpit will generally use hypervisor's virtual machine to do operating system isolation, resource isolation, but some car manufacturers will feel that Hypervisor is more expensive, technical support or some problems, can you find an alternative to Hypervisor?

Qt has his sights set on the Linux kernel, which comes with its own Container mechanism, which is LXC technology. What does Container achieve? Independent separation of applications. Qt can be based on the Concept of Container to create a technical solution, Android bottom is Linux, Android bottom Linux running two containers, one container directly running Linux, the output is the dashboard interface, the other container running Android application components, forming an Android ecosystem. Interprocess isolation between the two containers is possible.

One architecture, one language for the ultimate full-stack digital cockpit experience

Full stack service

Qt's vision is to adapt to a variety of solution architectures to create a complete and unified user experience. Qt adapts to multiple operating systems on the dashboard, and Qt can also be perfectly adapted to developing applications on Android. Similarly, Qt also provides a Qt for MCUs module that runs the Qt UI directly on a low-end microcontroller, based on which to create a Console interface. More critically, all platforms can use the same language uniformly, and the code can be written directly on each platform, which helps developers create a complete and unified user experience cockpit.

One architecture, one language for the ultimate full-stack digital cockpit experience

Read on