Continued windows testing cannot load 3DS file

25 views
Skip to first unread message

Bruce Clay

unread,
Nov 9, 2022, 11:49:13 AM11/9/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
I cannot load any of the 3DS files that I have on vsgwithosg or vsgconv.
vsgconv --features shows that I do have support for 3ds but the models throw an warning 
Warning: Failed to load texture:  texPath <file name.jpg>
vsgwithosg 

the files all load successfully with on the online 3d viewers

I checked osgPlugins-3.5.10 and osgdb_jpeg.dll and osgdb_jpegd.dll both present

in the debugger   vsgwithosg at line 222
    auto vsg_scene = vsg::read_cast<vsg::Node>(filename, options);

returns NULL but not messages are reported


Robert Osfield

unread,
Nov 9, 2022, 11:55:00 AM11/9/22
to vsg-...@googlegroups.com
Hi Bruce,

The vsgXchange::Assimp loader should be able to load 3DS files. Have you compiled vsgXchange with Assimp?

The vsgXchange library also has built-in support for jpeg so this shouldn't require any further support.

Together this should mean you won/t need to rely upon osg2vsg to handle any of the load requirements.

Could you try loading the model with:

      vsgviewer model.3ds

Could you provide an example 3DS file that fails?

Thanks,
Robert.

Bruce Clay

unread,
Nov 9, 2022, 2:46:35 PM11/9/22
to vsg-...@googlegroups.com
Robert:
  I set assimp_DIR to G:\SupportLibraries3\MergedProjects but when I click Configure in CMake it changes the path to 
G:/SupportLibraries3/MergedProjects/lib/cmake/assimp-5.2.  The file does exist CMake reports assimp_VERSION 5.2.5 
Assimp in the include directory and assimp-vc141-mt.lib is in the lib directory.. 

My CMAKE_INSTALL_PREFIX is set tp G:/SupportLibraries3/MergedProjects.

 assimp does not show in either the vsgXchange nor the vsgconv include paths in Visual Studio

but conv --features shows a long list of which only part is shown below

   vsgXchange::assimp provides support for 70 extensions, and 0 protocols.
        Extensions      Supported ReaderWriter methods
        ----------      ------------------------------
        .3d             read(vsg::Path, ..) read(std::istream, ..) read(uint8_t* ptr, size_t size, ..)
        .3ds            read(vsg::Path, ..) read(std::istream, ..) read(uint8_t* ptr, size_t size, ..)
        .3mf            read(vsg::Path, ..) read(std::istream, ..) read(uint8_t* ptr, size_t size, ..)
        .ac             read(vsg::Path, ..) read(std::istream, ..) read(uint8_t* ptr, size_t size, ..)
        .ac3d           read(vsg::Path, ..) read(std::istream, ..) read(uint8_t* ptr, size_t size, ..)
        .acc            read(vsg::Path, ..) read(std::istream, ..) read(uint8_t* ptr, size_t size, ..)

vsgviewer does not load the models either

I am using the rc2 release.


--
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%2BVAkqn%3D6d9Eh15Hge92EUTxNRzGDY7D_1Gd%3D7QO4zGybg%40mail.gmail.com.
gipsy.3DS

Robert Osfield

unread,
Nov 9, 2022, 3:48:29 PM11/9/22
to vsg-...@googlegroups.com
HI Bruce,

Thanks for the file.  From your previous post there was a report of error of not being able to find a texture file, do you have the file as well?

vsgconv only reports features as being supported if it the relevant ReaderWriter is compiled in - it's assimp itself that is reporting the supported formats to vsgXchange::Assimp so it does look like it should be functional.

vsgwithosg doesn't know about vsgXchange so can't access vsgXchange to load unless it uses the OSG to load. This restriction applies because osg2vsg has to build before vsgXchange, as vsgXchange links in osg2vsg::OSG.  vsgwithosg is just a simple test program so not meant to be full general purpose app.

In your own applications you won't have this restriction and will be able to link with VSG, OSG, osg2vsg, vsgXchange.

I will try the model once I'm back on my dev system.

Cheers,
Robert

Robert Osfield

unread,
Nov 9, 2022, 3:56:07 PM11/9/22
to vsg-...@googlegroups.com
The models loads fine for me, I get errors reported for lack of texture files but as I don't have them this is appropriate.

$ vsgviewer gipsy.3DS  
Warning: Failed to load texture:  texPath = D.BMP
Warning: Failed to load texture:  texPath = WOOD-BOI.JPG

image.png

Robert Osfield

unread,
Nov 9, 2022, 4:06:17 PM11/9/22
to vsg-...@googlegroups.com
Hi Bruce,

When vsgXchange's CMake is configured it creates the include/vsgXchange/Version.h, this has the version number entries as well as defines for each of the ReaderWriters that are supported.  You can check this file to double check what should be supported.

The second half of my Version.h looks like:
   /// standard Features
   #define vsgXchange_all
   #define vsgXchange_images
   #define vsgXchange_models
   #define vsgXchange_stbi
   #define vsgXchange_dds
   #define vsgXchange_ktx
   #define vsgXchange_spv
   #define vsgXchange_cpp

   /// optional Features
/* #undef vsgXchange_freetype */
   #define vsgXchange_assimp
/* #undef vsgXchange_OSG */
   #define vsgXchange_GDAL
   #define vsgXchange_CURL
/* #undef vsgXchange_OpenEXR */

Note the #define vsgXchange_assimp is provided so vsgXchange has picked up on it and built against it. 




Reply all
Reply to author
Forward
0 new messages