Qt 3D apparently is here to stay (and improve)

programming

Users of Qt 3D might fear their favourite tool is set to disappear, now that Qt Quick 3D is on its way. KDAB senior software engineer Sean Harmer took to the Qt blog to dispel those doubts and give a detailed overview of what’s to come for the library.

Qt 3D is a library for near real-time simulations, which was introduced to the public in June 2016. It was developed to allow users to integrate 3D content into their applications and create mixed dimensional user interfaces for domains such as automotive and medical visualisation.

Since using it can get quite tricky quite fast, Qt Quick 3D was presented in August 2019 as a way to facilitate adding simple 3D elements to a project. This left some wondering about the future of Qt 3D, but Harmer is certain there will always be a place for the library – and not just because his company used it as a foundation for another tool and various projects.

According to him, Qt 3D is here to stay because, for one, complex use cases won’t be covered by the new tool. Apart from that there are still people who want to use a “more complete C++ API instead of QML” or who simply cannot use GPL or commercial licensing.

Advertisement

Instead of relying on those however, the team behind Qt 3D is actively working on improving the project’s performance and reducing its shortcomings to maybe lure some more people into the community. Amongst other things, the developers found that the current implementation isn’t up to snuff with some of today’s hardware, which made some simplifications necessary.

They for example stepped back from Qt 3D’s initial threading architecture, so that it doesn’t get into the way on some embedded hardware anymore. A part of this change was the removal of the Aspect Thread in Qt 5.14, which leaves devs with an environment variable to control a thread pool for horizontal scaling.

Another thing that didn’t work too well on a variety of devices was the use of frame buffer objects when overlays of 2d over 3d content had to be realised. A new property compositingMode resolves this by allowing the library to directly draw to the screen when Underlay is set.

To improve performance, the team introduced some smaller changes like only traversing a frame graph when something changes that affects the output or updating uniforms only on value changes. More significant speedups are meant to be noticeable once the implementation of a new approach to the way property changes between frontend and backend are handled is finished. Harmer references current benchmarks for this, which promise 200-300 per cent speedups in the property change distribution in scenes with thousands of entities.

Further steps are currently being researched, but talking about those this is something Harmer wants to keep for another day.

- Advertisement -