Trusted Software Excellence across Desktop and Embedded
Take a glance at the areas of expertise where KDAB excels ranging from swift troubleshooting, ongoing consulting and training to multi-year, large-scale software development projects.
Find out why customers from innovative industries rely on our extensive expertise, including Medical, Biotech, Science, Renewable Energy, Transportation, Mobility, Aviation, Automation, Electronics, Agriculture and Defense.
High-quality Embedded Engineering across the Stack
To successfully develop an embedded device that meets your expectations regarding quality, budget and time to market, all parts of the project need to fit perfectly together.
Learn more about KDAB's expertise in embedded software development.
Where the capabilities of modern mobile devices or web browsers fall short, KDAB engineers help you expertly architect and build high-functioning desktop and workstation applications.
Extensible, Safety-compliant Software for the Medical Sector
Create intelligent, patient-focused medical software and devices and stay ahead with technology that adapts to your needs.
KDAB offers you expertise in developing a broad spectrum of clinical and home-healthcare devices, including but not limited to, internal imaging systems, robotic surgery devices, ventilators and non-invasive monitoring systems.
Building digital dashboards and cockpits with fluid animations and gesture-controlled touchscreens is a big challenge.
In over two decades of developing intricate UI solutions for cars, trucks, tractors, scooters, ships, airplanes and more, the KDAB team has gained market leading expertise in this realm.
Build on Advanced Expertise when creating Modern UIs
KDAB assists you in the creation of user-friendly interfaces designed specifically for industrial process control, manufacturing, and fabrication.
Our specialties encompass the custom design and development of HMIs, enabling product accessibility from embedded systems, remote desktops, and mobile devices on the move.
Legacy software is a growing but often ignored problem across all industries. KDAB helps you elevate your aging code base to meet the dynamic needs of the future.
Whether you want to migrate from an old to a modern GUI toolkit, update to a more recent version, or modernize your code base, you can rely on over 25 years of modernization experience.
KDAB offers a wide range of services to address your software needs including consulting, development, workshops and training tailored to your requirements.
Our expertise spans cross-platform desktop, embedded and 3D application development, using the proven technologies for the job.
When working with KDAB, the first-ever Qt consultancy, you benefit from a deep understanding of Qt internals, that allows us to provide effective solutions, irrespective of the depth or scale of your Qt project.
Qt Services include developing applications, building runtimes, mixing native and web technologies, solving performance issues, and porting problems.
KDAB helps create commercial, scientific or industrial desktop applications from scratch, or update its code or framework to benefit from modern features.
Discover clean, efficient solutions that precisely meet your requirements.
Boost your team's programming skills with in-depth, constantly updated, hands-on training courses delivered by active software engineers who love to teach and share their knowledge.
Our courses cover Modern C++, Qt/QML, Rust, 3D programming, Debugging, Profiling and more.
The collective expertise of KDAB's engineering team is at your disposal to help you choose the software stack for your project or master domain-specific challenges.
Our particular focus is on software technologies you use for cross-platform applications or for embedded devices.
Since 1999, KDAB has been the largest independent Qt consultancy worldwide and today is a Qt Platinum partner. Our experts can help you with any aspect of software development with Qt and QML.
KDAB specializes in Modern C++ development, with a focus on desktop applications, GUI, embedded software, and operating systems.
Our experts are industry-recognized contributors and trainers, leveraging C++'s power and relevance across these domains to deliver high-quality software solutions.
KDAB can guide you incorporating Rust into your project, from as overlapping element to your existing C++ codebase to a complete replacement of your legacy code.
Unique Expertise for Desktop and Embedded Platforms
Whether you are using Linux, Windows, MacOS, Android, iOS or real-time OS, KDAB helps you create performance optimized applications on your preferred platform.
If you are planning to create projects with Slint, a lightweight alternative to standard GUI frameworks especially on low-end hardware, you can rely on the expertise of KDAB being one of the earliest adopters and official service partner of Slint.
KDAB has deep expertise in embedded systems, which coupled with Flutter proficiency, allows us to provide comprehensive support throughout the software development lifecycle.
Our engineers are constantly contributing to the Flutter ecosystem, for example by developing flutter-pi, one of the most used embedders.
KDAB invests significant time in exploring new software technologies to maintain its position as software authority. Benefit from this research and incorporate it eventually into your own project.
Start here to browse infos on the KDAB website(s) and take advantage of useful developer resources like blogs, publications and videos about Qt, C++, Rust, 3D technologies like OpenGL and Vulkan, the KDAB developer tools and more.
The KDAB Youtube channel has become a go-to source for developers looking for high-quality tutorial and information material around software development with Qt/QML, C++, Rust and other technologies.
Click to navigate the all KDAB videos directly on this website.
In over 25 years KDAB has served hundreds of customers from various industries, many of them having become long-term customers who value our unique expertise and dedication.
Learn more about KDAB as a company, understand why we are considered a trusted partner by many and explore project examples in which we have proven to be the right supplier.
The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications.
Read more about the history, the values, the team and the founder of the company.
When working with KDAB you can expect quality software and the desired business outcomes thanks to decades of experience gathered in hundreds of projects of different sizes in various industries.
Have a look at selected examples where KDAB has helped customers to succeed with their projects.
KDAB is committed to developing high-quality and high-performance software, and helping other developers deliver to the same high standards.
We create software with pride to improve your engineering and your business, making your products more resilient and maintainable with better performance.
KDAB has been the first certified Qt consulting and software development company in the world, and continues to deliver quality processes that meet or exceed the highest expectations.
In KDAB we value practical software development experience and skills higher than academic degrees. We strive to ensure equal treatment of all our employees regardless of age, ethnicity, gender, sexual orientation, nationality.
Interested? Read more about working at KDAB and how to apply for a job in software engineering or business administration.
Many new features were added to Qt 3D in the 5.10 release. One of them is the support for sprite sheets, contributed by KDAB,as provided by QSpriteGrid and QSpriteSheet and their respective QML items.
One way of animating things is to switch between many different versions of the same object at different points in time, like the flip books we all enjoyed as kids. If you flip fast enough, you get the illusion of animation.
In the context of OpenGL and Qt 3D, images are simply textures and are very commonly used to add details to 3d models. The naive approach to animating texture would be to use lots of them. However, switching textures has a very high cost so traditionally modellers will use texture atlases, where all the images are arranged into a single texture. This does complicate modelling slightly as the original texture coordinates need to be modified to point to the portion of the atlas that now contains the relevant image.
In effect, sprite sheets are simplified atlases that take care of this for you. They are commonly used in 2d or 2.5d applications to animate effects or characters.
Building Sprite Sheets
Simple sprite sheets are just regular grids of images.
However, as with general atlases, all individual images need not be the same size or be arranged in a grid. In that case, individual sprites need to be specified by their bounding rectangle within the texture.
There's a number of applications that can be used to create them. Blender can output steps in animations to a sprite sheet. TexturePacker can also be used to assemble pre-existing images.
Texture Transforms
In the simplest case, a sprite will be mapped on to planar surfaces, a simple rectangle. When applying textures to a surface, you of course need to provide texture coordinates, mapping points to pixels in the texture. In the case of the PlanarMesh, precomputed texture coordinates will map to textures such as it covers the entirety of the surface.
However, if the source texture is a sprite sheet, then the texture coordinates do not work any more as we want to cover the specific sprite, not the entire sheet.
One thing you do NOT want to do is replace the texture coordinates every time you want to change sprite.
In effect, texture coordinates need to be:
scaled to cover the range of a sprite cell
offset to specify the right origin
This transformation can easily be encoded in a 3x3 matrix which is applied to texture coordinates in the vertex shader. In order to support this, QTextureLoader has been extended with a textureTransform parameter which is passed to the shader as a uniform.
Putting it all together
A sprite sheet is conceptually very simple in Qt 3D. It has:
a list of "areas", one for each sprite
a current sprite index in that list
an input texture to pick sprites from
a 3x3 texture transform matrix which is updated every time the current index changes
So simple animations can be achieved by changing the current sprite index and binding the texture transform to the matching property in the QTextureLoader instance.
Sprite Grids
QSpriteGrid is used when sprites are arranged in regular grid.
Entity{PlaneMesh{id:mesh}TextureMaterial{id:materialtexture:TextureLoader{id:textureLoadersource:"spritegrid.png"mirrored:false}textureTransform:spriteGrid.textureTransform}SpriteGrid{id:spriteGridrows:2;columns:6texture:textureLoader}components:[ mesh, material ]}
Images in the grid are assumed to be arranged in row major order. So currentIndex must remain between 0 and rows * columns.
The texture property points to the image containing the sprites. The current index, number of rows and columns and the actual size of the texture are all used to compute the texture transform.
Sprite Sheets
QSpriteSheet is used when the sprites are not all the same size and/or are not organised in a grid. You then need specify the extent of each sprite.
Entity{PlaneMesh{id:mesh}TextureMaterial{id:materialtexture:TextureLoader{id:textureLoadersource:"spritegrid.png"mirrored:false}textureTransform:spriteGrid.textureTransform}SpriteSheet{id:spriteSheettexture:textureLoaderSpriteItem{x:0;y:0;width:250;height:172}SpriteItem{x:276;y:0;width:250;height:172}SpriteItem{x:550;y:0;width:250;height:172}//...}components:[ mesh, material ]}
The currentIndex must remain between 0 and the number to QSpriteItem children.
Example
To watch this video on our website please or view it directly on YouTube
In this example, we use a sprite grid which contains frames of an explosion. A timer is used to change the current index. While the animation runs, the object is faded out.
Looking straight on, you see a rather nice effect. The illusion becomes clear when you look at it sideways and see the plane on which the texture is mapped.
Notes:
In the general 3d case, it is common to combine sprite sheets with billboards in order to keep the plane aligned with the screen. This can normally easily be done in the shaders.
QSpriteSheet doesn't currently support rotated sprites.
QTextureMaterial does not currently support alpha blending, so transparent portions of the textures will appear black. This can worked around by building a custom material and will be fixed in 5.11.
One of the problems with putting all the images in one texture is that you get quickly limited by the maximum texture size. For bigger images, a more modern approach may be to use QTexture2DArray. However, in this case all images need to be the same size. But the only limit then would be the maximum texture size and the amount of texture memory available...
Happy to see some info on this. The API docs are still a bit spartan so I couldn't figure out how to use it when I ran across it. Would also love to see these examples fleshed out with C++ example code for these kinds of posts! I sometimes find myself scratching my head trying to figure out how to translate QML to C++ because I am not as familiar with QML.
28 - Mar - 2018
Mike Krus
The example I built for this is indeed in QML, mostly because I'm using QtQuick to drive the animation. Time permitting I'd like to write a C++ version which would use Qt3D's own animation engine to do the work...
28 - Mar - 2018
Elvis Stansvik
Nice write-up. One nitpick:
"So currentIndex must remain between 0 and rows * columns."
I think you mean rows * columns - 1 right? Or maybe write it as "in range [0, rows * columns)".
Also, the way it's written ("So...") you make it sound like it's because they are in row major, but it would hold even if it's column major order, so I suggest dropping to "So".
28 - Mar - 2018
Mike Krus
yes, you are correct about the range
30 - Mar - 2018
Pavel
What is the difference between SpriteGrid and AnimatedSprite qml types? They look very similar. Does SpriteGrid provide significant performance benefit?
31 - Mar - 2018
Mike Krus
While they may appear to do the same thing, they are completely different beasts. AnimatedSprite is to use with QtQuick, SpriteGrid can only be used in Qt 3D scenes.
12 - Apr - 2019
Marcel
Thanks, this is really cool! I'm wondering: Is there a way to create dynamic textures from a QImage? I tried to use a TextureLoader with a source pointing to a custom QQuickImageProvider, but nothing appears on screen.
Mike Krus
Senior Software Engineer & Teamlead
Senior Software Engineer at KDAB. Mike has been developing with C++ since 1996 and Qt since 2004. He has a broad range of experience in scientific applications, mainly in civil engineering and oil & gas industries. His range of expertise includes C++, QML and interactive 3D visualization software design on desktop and mobile as well as macOS development. Mike is the Qt maintainer for the tvOS platform, one of the core contributors to Qt 3D and is interested in building mobile applications with Qt, mainly on iOS. He has a PhD in Computer Science.
7 Comments
27 - Mar - 2018
Will
Happy to see some info on this. The API docs are still a bit spartan so I couldn't figure out how to use it when I ran across it. Would also love to see these examples fleshed out with C++ example code for these kinds of posts! I sometimes find myself scratching my head trying to figure out how to translate QML to C++ because I am not as familiar with QML.
28 - Mar - 2018
Mike Krus
The example I built for this is indeed in QML, mostly because I'm using QtQuick to drive the animation. Time permitting I'd like to write a C++ version which would use Qt3D's own animation engine to do the work...
28 - Mar - 2018
Elvis Stansvik
Nice write-up. One nitpick:
"So currentIndex must remain between 0 and rows * columns."
I think you mean rows * columns - 1 right? Or maybe write it as "in range [0, rows * columns)".
Also, the way it's written ("So...") you make it sound like it's because they are in row major, but it would hold even if it's column major order, so I suggest dropping to "So".
28 - Mar - 2018
Mike Krus
yes, you are correct about the range
30 - Mar - 2018
Pavel
What is the difference between SpriteGrid and AnimatedSprite qml types? They look very similar. Does SpriteGrid provide significant performance benefit?
31 - Mar - 2018
Mike Krus
While they may appear to do the same thing, they are completely different beasts. AnimatedSprite is to use with QtQuick, SpriteGrid can only be used in Qt 3D scenes.
12 - Apr - 2019
Marcel
Thanks, this is really cool! I'm wondering: Is there a way to create dynamic textures from a QImage? I tried to use a TextureLoader with a source pointing to a custom QQuickImageProvider, but nothing appears on screen.