Sceneloader cannot load 3D models under Linux
-
I use sceneloader in Windows to successfully load .obj and .mtl files, but I can't display the model when running under Linux, and I get the following error:
Qt3D.Renderer.SceneLoaders: Qt3DCore::QEntity* Qt3DRender::Render::LoadSceneJob::tryLoadScene(Qt3DRender::Render::Scene*, Qt3DRender::QSceneLoader::Status&, const QStri)
I run the paogram under the nxp development board, and my qt version is 5.10.1.
Anybody can help me? Thanks in advance :) -
Hi and welcome to devnet,
Something is not clear, are you developing directly on the NXP board ?
Cross-compiling ?
If it's a deployed application, did you also deploy the needed plugins ? -
hello,
I'm developing directly on the NXP board and it's Cross-compiling.
These figures show the plugins deployed for Qt.
And these are QT configuration parameters in qtbse_git.bb
***PACKAGECONFIG ?= "
${PACKAGECONFIG_RELEASE}
${PACKAGECONFIG_DEFAULT}
${PACKAGECONFIG_OPENSSL}
${PACKAGECONFIG_GL}
${PACKAGECONFIG_FB}
${PACKAGECONFIG_X11}
${PACKAGECONFIG_FONTS}
${PACKAGECONFIG_SYSTEM}
${PACKAGECONFIG_DISTRO}
"PACKAGECONFIG[release] = "-release,-debug"
PACKAGECONFIG[debug] = ""
PACKAGECONFIG[developer] = "-developer-build"
PACKAGECONFIG[optimize-size] = "-optimize-size"
PACKAGECONFIG[sm] = "-sm,-no-sm"
PACKAGECONFIG[tests] = "-make tests,-nomake tests"
PACKAGECONFIG[examples] = "-make examples -compile-examples,-nomake examples"
PACKAGECONFIG[tools] = "-make tools,-nomake tools"only for completeness, configure will add libs even if you try to explicitly remove it
PACKAGECONFIG[libs] = "-make libs"
accessibility is required to compile qtquickcontrols
PACKAGECONFIG[accessibility] = "-accessibility,-no-accessibility"
PACKAGECONFIG[glib] = "-glib,-no-glib,glib-2.0"use either system freetype or bundled freetype, if you disable freetype completely
fontdatabases/basic/qbasicfontdatabase.cpp will fail to build and system freetype
works only together with fontconfig
PACKAGECONFIG[freetype] = "-system-freetype,-qt-freetype,freetype"
PACKAGECONFIG[harfbuzz] = "-system-harfbuzz,-no-harfbuzz,harfbuzz"
PACKAGECONFIG[jpeg] = "-system-libjpeg,-libjpeg,jpeg"
PACKAGECONFIG[libpng] = "-system-libpng,-libpng,libpng"
PACKAGECONFIG[gif] = "-gif,-no-gif"
PACKAGECONFIG[ico] = "-ico,-no-ico"
PACKAGECONFIG[zlib] = "-system-zlib,-qt-zlib,zlib"
PACKAGECONFIG[pcre] = "-system-pcre,-qt-pcre,pcre2"
PACKAGECONFIG[eglfs] = "-eglfs,-eglfs,drm"
PACKAGECONFIG[gl] = "-opengl desktop,,virtual/libgl"
PACKAGECONFIG[gles2] = "-opengl es2,,virtual/libgles2 virtual/egl"
PACKAGECONFIG[no-opengl] = "-no-opengl"
PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib"
PACKAGECONFIG[cups] = "-cups,-no-cups,cups"
PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus"
PACKAGECONFIG[xcb] = "-xcb -xcb-xlib -system-xcb,-no-xcb,libxcb xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil"
PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase"
PACKAGECONFIG[sql-mysql] = "-sql-mysql -mysql_config ${STAGING_BINDIR_CROSS}/mysql_config,-no-sql-mysql,mysql5"
PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql"
PACKAGECONFIG[sql-odbc] = "-sql-odbc,-no-sql-odbc"
PACKAGECONFIG[sql-oci] = "-sql-oci,-no-sql-oci"
PACKAGECONFIG[sql-tds] = "-sql-tds,-no-sql-tds"
PACKAGECONFIG[sql-db2] = "-sql-db2,-no-sql-db2"
PACKAGECONFIG[sql-sqlite2] = "-sql-sqlite2,-no-sql-sqlite2,sqlite"
PACKAGECONFIG[sql-sqlite] = "-sql-sqlite -system-sqlite,-no-sql-sqlite,sqlite3"
PACKAGECONFIG[xinput2] = "-xinput2,-no-xinput2,libxi"
PACKAGECONFIG[iconv] = "-iconv,-no-iconv,virtual/libiconv"
PACKAGECONFIG[xkb] = "-xkb,-no-xkb -no-xkbcommon,libxkbcommon"
PACKAGECONFIG[xkbcommon-evdev] = "-xkbcommon-evdev,-no-xkbcommon-evdev,libxkbcommon,xkeyboard-config"
PACKAGECONFIG[evdev] = "-evdev,-no-evdev"
PACKAGECONFIG[mtdev] = "-mtdev,-no-mtdev,mtdev"depends on glib
PACKAGECONFIG[fontconfig] = "-fontconfig,-no-fontconfig,fontconfig"
PACKAGECONFIG[gtk] = "-gtk,-no-gtk,gtk+3"
PACKAGECONFIG[directfb] = "-directfb,-no-directfb,directfb"
PACKAGECONFIG[linuxfb] = "-linuxfb,-linuxfb"
PACKAGECONFIG[kms] = "-kms,-kms,drm virtual/egl"
PACKAGECONFIG[gbm] = "-gbm,-gbm,virtual/mesa"
PACKAGECONFIG[icu] = "-icu,-no-icu,icu"
PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev"
PACKAGECONFIG[openssl] = "-openssl,-no-openssl,openssl,libssl"
PACKAGECONFIG[widgets] = "-widgets,-no-widgets"
PACKAGECONFIG[libproxy] = "-libproxy,-no-libproxy,libproxy"
PACKAGECONFIG[libinput] = "-libinput,-no-libinput,libinput"
PACKAGECONFIG[journald] = "-journald,-no-journald,systemd"QT_CONFIG_FLAGS_GOLD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-use-gold-linker', '-no-use-gold-linker', d)}"
QT_CONFIG_FLAGS += "
${QT_CONFIG_FLAGS_GOLD}
-shared
-silent
-no-pch
-no-rpath
-pkg-config
${PACKAGECONFIG_CONFARGS}
"***Do you see any problems with this information?
Thanks a lot! -
What system are you using to create these images ?
It looks like there are sceneparsers plugins missing. -
@SGaist hi, SGaist, these are the sceneparsers plugins in Qt 5.10.1 sdk:
./qt/sdknew/sysroots/aarch64-poky-linux/usr/lib/qt5/plugins/sceneparsers/libgltfsceneexport.so
./qt/sdknew/sysroots/aarch64-poky-linux/usr/lib/qt5/plugins/sceneparsers/libgltfsceneimport.so
./qt/sdknew/sysroots/aarch64-poky-linux/usr/lib/qt5/plugins/geometryloaders/libgltfgeometryloader.soI don't found any assimp.so in sceneparsers, and I have these in sdk:
./qt/sdk/sysroots/x86_64-pokysdk-linux/usr/lib/libassimp.so.3
./qt/sdk/sysroots/x86_64-pokysdk-linux/usr/lib/libassimp.so
./qt/sdk/sysroots/x86_64-pokysdk-linux/usr/lib/libassimp.so.3.3.1
./qt/sdk/sysroots/aarch64-poky-linux/usr/lib/.debug/libassimp.so.3.3.1
./qt/sdk/sysroots/aarch64-poky-linux/usr/lib/libassimp.so.3
./qt/sdk/sysroots/aarch64-poky-linux/usr/lib/libassimp.so
./qt/sdk/sysroots/aarch64-poky-linux/usr/lib/libassimp.so.3.3.1Does it mean that I did not generate a libassimpsceneimport.so ?
Or there are some wrongs about my qt3d Configuration?
By the way, it has another name called assimpsceneimport.dll in the Windows , and libassimpsceneimport.so in the Ubuntu.
I have no idea. Thank you for your help.
-
You should inspect your SDK build logs to see why it failed to detect assimp when configuring Qt.