How can I reduce CPU usage in qml 3d

Viewed 75

I create a qml program to load 3d model(.obj file) by SceneLoader,but CPU usage has increased to 116% in arm (There are two cores, each with a CPU utilization of 50%-60%), and what should I do to reduce CPU usage? What's more,the fps is 60 fps when load 3d model.

enter image description here

1 Answers

The main problem is that .obj files use the text-based Wavefront format to describe the geometry.

Loading geometry from this file format requires SceneLoader or Mesh to parse the text first and populate lists of vertices/faces/etc which ends up being a costly operation and slow things down considerably.

You should investigate using .fbx files (Autodesk) with SceneLoader which is a file format that can store the geometry as binary data which is something much faster to load.

I believe the ~60 FPS limitation might be derived from the Qt window implementation for that particular platform. If you measure the FPS doing non-Qt3D rendering I suspect you should also see ~60 FPS.

In other words, the performance you are observing is expected for the way you are doing things.

Related