All VSG apps tired fail load load model

213 views
Skip to first unread message

Bruce Clay

unread,
Feb 22, 2022, 2:18:56 PM2/22/22
to vsg-...@googlegroups.com
I am working with the VSG downloaded yesterday on Windows 10 with Visual Studio 2017.

I have been able to build vsg and associated libraries as well as the sample applications,  

I have tried loading a variety of models including flt, 3ds, gltf, glb and I always get an error stating that the app cannot load the file.

I have tried running from the command line as well as in the debugger.

Is there any way to get a more detailed error to say why it cannot load the model?

Is there a particular model format that we need to use?

Bruce



Sam

unread,
Feb 22, 2022, 2:33:57 PM2/22/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
Hey Bruce,

Did you also grab the vsgExamples repository? I grab that and setup my variables as such:

vsg_env_variables.png

With the above you will be able to use everything pretty out of the box. If you are doing something that isn't using the VSG_FILE_PATH variable, feel free to post a snippet.

Thanks, Sam

Denis Taniguchi

unread,
Feb 22, 2022, 3:44:00 PM2/22/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
Also check if you have assimp installed.

Bruce Clay

unread,
Feb 22, 2022, 4:42:58 PM2/22/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
Thank you for you replies.

 walked back through the various projects and found in vsgXchange that assimp_DIR keeps getting set to NOTFOUND.  I have tried various paths to assimp but none of them but  satisfy cmake.  That is the only project that I could find that uses assimp.

I tried setting all of the environment variables as suggested but that did not help.

I have not gotten as far as trying my own application so I am working with the MyFirstVsgApplication project and trying to use the vsgEexample projects

Bruce

Denis Taniguchi

unread,
Feb 22, 2022, 4:53:12 PM2/22/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
Yeah, if vsgXchange doesn't find assimp you will restricted to .vsgt and .vsgb files. Try setting assimp_DIR to where assimp-config.cmake (or something like that) is located.

Robert Osfield

unread,
Feb 22, 2022, 5:37:57 PM2/22/22
to vsg-...@googlegroups.com
Hi Bruce,

I'm not a Windows user so can't comment on the specific issues with Windows.  I would like to know what issue Windows users come across and see about what extra docs or CMake support might help avoid problems.

In your case which version of Assimp do you have installed, how did you install/build it and where are the Assimp libs/dill/includes and lib/cmake files installed?

Cheers,
Robert.

Sam

unread,
Feb 22, 2022, 6:20:09 PM2/22/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
If you are having trouble with the assimp installation on windows, make sure to set your pathing appropriately:

vsg_assimp_config.png

Then I setup my assimp_DIR to C:\Programming\libraries\assimp\bin\lib\cmake\assimp-5.2

Bruce Clay

unread,
Feb 22, 2022, 8:13:31 PM2/22/22
to vsg-...@googlegroups.com
Robert:
  Thanks for your reply.  This appears to be a CMake issue.  I have been working through various options of paths and have not found a suitable one.  If I turn off Assimp and vsgGIS I can create a project.  After that I go into the project and replace the assimp and gdal fallback fils with the actual files then mod the include path and library paths I can build the solution.

I am still plagued by the dreaded Visual Studio error "Error MSB6006 "cmd.exe" exited with code 1"

My file structure is shown below

SupportLibraries3
  assimp
  gdal+3-4-1
  VulcanSceneGraph
    include
    src
    vsgExamples
    vsgGIS
    vsgQt
    vsgXchange


assimp was pulled from github then I used cmake to build it.   Not sure the version number but it was pulled today.

Most of the project build fairly easy.  The main vsg had no issues the subprojects had minor issues I could resolve adding a set path in the cmakefile.txt but vsgXchange defies all attempts to build strictly from cmake.  The cmd.exe error has shown up at various times in various projects for years with no rhyme nor reason.

Bruce



--
You received this message because you are subscribed to a topic in the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vsg-users/VSMZFJdQFAM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vsg-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vsg-users/CAFN7Y%2BX_h3W16yrt1NxS3FooCTXsi%2B0CULrPPYfGncZkJg8D%3Dg%40mail.gmail.com.

Robert Osfield

unread,
Feb 23, 2022, 3:07:53 AM2/23/22
to vsg-...@googlegroups.com
Hi Bruce,

On Wed, 23 Feb 2022 at 01:13, Bruce Clay <bcla...@gmail.com> wrote:
Robert:
  Thanks for your reply.  This appears to be a CMake issue. 

What version of CMake and VisualStudio are you using?

Occasionally we do see Windows users struggle where other Windows don't.  We've followed Modern CMake conventions for building libs and using dependences so in theory this should help avoid these types of issue, but alas not all dependencies play ball, and not all Cmake installations seem to behave the same - I think it's possible to configure parts Cmake to not behave in standard ways.

In your case, if we can get to the bottom of why you're having issues while others are not, we should be able to improve docs or cmake search paths to make it better for everyone.

Oh, one small though, are you installing assimp and gdal?

--

As a general note, it's possible to just use VulkanSceneGraph itself to build applications, but you are limited to the native .vsgb, .vsgt and .spv shader files for loading.  This type of usage is what I envisage for embedded application development, where on the desktop a more complete suite of VSG libs is used to convert non native data.

Another approach that we've experimented with is vsgFramework where all the dependencies are pulled in and built as one overarching project.  The intent with vsgFramework is that it could be used as a template for users' own projects where they need to pull in a whole collection of different dependencies.

Cheers,
Robert.

Bruce Clay

unread,
Feb 23, 2022, 8:29:56 AM2/23/22
to vsg-...@googlegroups.com
Robert:

I am using Cmake version 3.21.1 and Visual Studio 2017.  I downloaded assimp from github then ran BUILDBINARIES_EXAMPLE.bat to create the executable.  I downloaded gdal binaries (release-1916-x64-gdal-3-4-1-mapserver-7-6-4.zip) and unzipped into the directory mentioned in a previous email.  I did not execute an install process per se.

I just tried using the vsgFramework with the following results

numerous "CUSTOMBUILD : error : could not load cache" errors

other messages extracted from the build stream

24>  CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
24>  -- Configuring incomplete, errors occurred!
24>    Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR) (found version
24>    "GDAL_VERSION-NOTFOUND")
24>  Call Stack (most recent call first):
24>    C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
24>    C:/Program Files/CMake/share/cmake-3.21/Modules/FindGDAL.cmake:185 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
24>    CMakeLists.txt:21 (find_package)

27>  CMake Error at CMakeLists.txt:19 (find_package):
27>  -- Configuring incomplete, errors occurred!
27>    By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
27>    asked CMake to find a package configuration file provided by "Qt5", but
27>    CMake did not find one.
27>
27>    Could not find a package configuration file provided by "Qt5" with any of
27>    the following names:
27>
27>      Qt5Config.cmake
27>      qt5-config.cmake
27>
27>    Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
27>    to a directory containing one of the above files.  If "Qt5" provides a
27>    separate development package or SDK, be sure it has been installed.


At the end of the first pass the results were

29>Time Elapsed 00:00:00.11
30>------ Skipped Rebuild All: Project: INSTALL, Configuration: Debug x64 ------
30>Project not selected to build for this solution configuration
========== Rebuild All: 16 succeeded, 10 failed, 4 skipped ==========

I ran build again and got the following results

27>Time Elapsed 00:10:05.25
28>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
28>Project not selected to build for this solution configuration
========== Build: 20 succeeded, 4 failed, 2 up-to-date, 4 skipped ==========

Still had the GDAL and qt errors

I have Qt installed in the c:\Qt drive but I do have 3 versions there so that  may cause some issues with the find script.  My goal at this time is to use version Qt5.14.2

I tried to resolve the GDAL issue by adding 
    set(GDAL_LIBRARY M:/SupportLibraries3/gdal_3-4-1/lib)
    set(GDAL_INCLUDE_DIR M:/SupportLibraries3/gdal_3-4-1/include)

to the CMakeList.txt file but it did not help.

in the end it looks like everything built except for vsgGIS and vsgQt.  I was able to load a 3ds file in vsgViewer

With vsgFramework I do not see how to change the properties in Visual Studio to add the search paths.






--
You received this message because you are subscribed to the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vsg-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vsg-users/CAFN7Y%2BVWpKNN-fMVXH%2Bf1Hv6HLUm5DtYAfdcwv0T%2B2z3tVgwvw%40mail.gmail.com.

Robert Osfield

unread,
Feb 23, 2022, 9:11:11 AM2/23/22
to vsg-...@googlegroups.com
Hi Bruce,

Thanks for the info.  Sorry the process of getting things work has been troublesome.  I'm hoping that other Windows users will be able to use this info to help make suggestions on how they set things up to make things smoother.

FYI, I'm presently using CMake 3.18.4 on Ubuntu 21.04.  I have a range of 3rd party dependencies including gdal and assimp.  When I build I then follow up with a install to a local install directory in my home directory.  I pass in CMAKE_INSTALL_PREFIX to my initial cmake call for each project so they know whether to look for my locally built/install libs.  Perhaps a similar approach could be used on your system.

I typically do in source builds, as this just suits the way I work, but do out of source builds when required. I use the following bash script to build the VSG projects:

cd $VSG_DIR
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install
make -j 15
make install

cd ../vsgGIS
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install
make -j 15
make install

cd ../vsgXchange
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install
make -j 15
make install

cd ../vsgImGui
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install
make -j 15
make install

cd ../vsgQt
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install
make -j 15
make install

cd ../vsgExamples
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install
make -j 15
make

Doing the install helps because it'll place all the header, libs, executables and crucially for Cmake the lib/cmake/*.cmake.

Assimp installs it's own lib/assimp/*/cmake set, so I have:

$ ls ~/Install/lib/cmake/assimp-5.0/assimp
assimp-config.cmake          assimp-config-version.cmake  assimpTargets.cmake          assimpTargets-release.cmake

These .cmake files are the modern CMake way of extending the findpackage system, and tell CMake all the locations and options to use when building against the libs so well worth installing as it should help smooth integration of packages.

I say all of this from the experience I have under Linux, under Windows it broadly should be similar so hopefully me spelling out what I do and see might help.

Cheers,
Robert.

Sam

unread,
Feb 23, 2022, 1:17:04 PM2/23/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
Hey Bruce,

I get similar errors when I do a clean clone and build. I've opened an issues here: https://github.com/vsg-dev/vsgFramework/issues/5

I suspect the gdal location can't be found is because vsgFramework doesn't handle that dep as a download and build. Could you please try using the cmake-gui on a clean build folder and then run the INSTALL project directly from visual studio? Just wondering if you hit the same snag points.

Thanks, Sam

Bruce Clay

unread,
Feb 23, 2022, 1:24:47 PM2/23/22
to vsg-...@googlegroups.com
Sam:
  I was able to build vsgGIS after updating paths using the cmake-gui.  First I ran the vsgFramework build then adjusted paths to point to the results of the framework build

I don't know if it will help but I attached the cmake cache file for you to compare to your files.  Paths will of course differ based on our systems

Bruce

--
You received this message because you are subscribed to a topic in the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vsg-users/VSMZFJdQFAM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vsg-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vsg-users/0271d575-68ce-4154-a3a8-5709c93c05e3n%40googlegroups.com.
CMakeCache.txt

Sam

unread,
Feb 23, 2022, 1:42:36 PM2/23/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
It looks like the way vsgQt gets added via ExternalProject_Add it doesn't necessarily populate the the dependent Qt5 pathing. If you go to: vsgFramework/build/src/vsgQt-build do you see the following files?

CMakeCache.txt
vsgQtConfig.cmake
vsgQtConfigVersion.cmake

Under CMakeCache.txt I have the following entries:

//Set Qt package name, i.e. Qt5 or Qt6.
QT_PACKAGE_NAME:STRING=Qt5

//The directory containing a CMake configuration file for Qt5Core.
Qt5Core_DIR:PATH=C:/Programming/libraries/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5Core

//The directory containing a CMake configuration file for Qt5Gui.
Qt5Gui_DIR:PATH=C:/Programming/libraries/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5Gui

//The directory containing a CMake configuration file for Qt5Widgets.
Qt5Widgets_DIR:PATH=C:/Programming/libraries/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5Widgets

//The directory containing a CMake configuration file for Qt5.
Qt5_DIR:PATH=C:/Programming/libraries/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5

If you don't see those you can try setting the Qt5_DIR by appending on the following option "-DQt5_DIR=5.15.2/msvc2019_64/lib/cmake/Qt5. Adjust pathing as necessary. You want to point the directory to where your Q5Config.cmake is located.

Let me know how you get on.

Bruce Clay

unread,
Feb 23, 2022, 4:43:25 PM2/23/22
to vsg-...@googlegroups.com
With the exception of the cache file the files you asked about are in vsgFramework\build_x64\src\vsgQt\build_x64 not in  vsgFramework/build/src/vsgQt-build on my system.

The cache file in the build directory does not show the entities  you indicated but the cmake-gui in my current configuration does show valid qt paths and I was able to generate vs solution from there.  

Tomorrow or sometime soon I plan to start fresh to  try to pin down a clean process rather than the way got to where I am.

Thanks for you help.

Bruce

Reply all
Reply to author
Forward
0 new messages