Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Examples Viewer Tutorial] Can't find a supported format #375
I'm enjoying learning about Magnum through your very well made example library, however I'm having some issues with the Examples Viewer.
Namely, the files I'm handing it doesn't appear to load.
examples_viewer.exe ship.obj # Importing mesh 0 # Trade::ObjImporter::mesh3D(): polygons are not supported # Cannot load the mesh, skipping
Fair enough, assuming "polygon" means "quad", converting the model to triangles.
examples_viewer.exe shipTri.obj # Importing mesh 0 # Trade::ObjImporter::mesh3D(): unknown keyword # Cannot load the mesh, skipping
Hm, allright. Maybe ZBrush is doing something different to the format that the ObjImporter doesn't like.
examples_viewer.exe shipMaya.obj # Importing mesh 0 # Cannot load the mesh, skipping
Hm, no message about why it didn't load this time. Maybe if I adjust the export settings?
examples_viewer.exe shipMayaAfter.obj # Importing mesh 0
Success! I made note of the description in the docs about not supporting automatic generation of normals and materials and figured maybe this was it.
This little adventure took me "out of the zone" in experiencing your set of tutorials, I think the tutorial could be improved by providing an example model. (Or if there is one, increase its visibility). You're welcome to have my ship model if you'd like; alternatively I was looking to find the model of Suzanne, like in the screenshot at the beginning of the tutorial. I think that would have been great, and I think it's open source as well?
The one I found (here) was in gltf format, which I thought would have worked, however..
examples_viewer.exe scene.gltf PluginManager::Manager::load(): plugin GltfImporter is not static and was not found in C:/examples_viewer/build/Debug/magnum-d/importers Trade::AnySceneImporter::openFile(): cannot load GltfImporter plugin
And sure enough, there wasn't a plug-in by that name in there. Despite having gotten Magnum off of
In any case, hope it helps, and great work!
uh, sorry about this, it's a common annoyance
For actually usable plugins there's the magnum-plugins repository containing most of importers you'd need. A reasonable default set can be installed via
For a model, Blender's Suzanne is available in the examples repo, linking that from the example is a second TODO for me, then :) There's quite a lot of various
Thanks for getting back!
I think that's perfectly reasonable. Personally, I'm happy to format my data to conform to the limitations of the importer, rather than complicate the importer(s) to handle more data. To benefit from that particular tutorial, I'd imagine the particular format used to import something isn't important; the important bits are getting to grips with the scene graph and plug-in mechanism in general.
With that in mind, perhaps it would suffice with a provided OBJ in text form?
From there, the reader would know that even if their custom file isn't working, they've at least followed the tutorial correctly. In my case, that took a while to figure out.
Good point about providing just a cube so even the "core" ObjImporter works, will do that as well (fourth TODO for me). The best would be to have the builtin ObjImporter updated to not be so shitty (otherwise what would be the point of even having it), but .... too much to do, too little time, so I have to prioritize. Was thinking about providing the full Suzanne instead of just a box, but in a textual form it's over a megabyte, which is a bit excessive :D
I'll ping you back once I have the changes done, in case you'd have further suggestions -- you're providing a very valuable feedback, thank you!
So, if you look at latest updates to the tutorials (I already dragged you through the less-shitty Getting Started Guide, thanks for the feedback on that), there's added sections about plugins:
And then, in the Viewer tutorial, it links to a plain OBJ cube and the Suzanne model as well, plus showing what you need to enable / build / install in order to view those: https://doc.magnum.graphics/magnum/examples-viewer.html#examples-viewer-compilation