O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integration with 3D modeling software

Geometric shapes provided by the Qt3DExtras module are great for prototyping. As we saw, these mesh generators come in handy when you want to create and test a new game quickly. However, a real game usually contains more complex figures than spheres and cubes. The meshes are usually prepared using specialized 3D modelling software. Qt 3D provides wide capabilities for importing 3D data from external files.

The first way of importing such data is the Mesh component. You only need to attach this component to an entity and specify the path to the file using the source property. As of Qt 5.10, Mesh supports OBJ, PLY, STL, and Autodesk FBX file formats.

As always, you can use a real filename or a Qt resource ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required