I’ve added a new example, GLFTImporter to the VTK Examples Project. glTF (derivative short form of GL Transmission Format) is a file format for 3D scenes and models using the JSON standard.
There are a few issues with this importer.
- Images are dark. There is no light extension loaded
- If run from the command line, the gltf filename must be a full path. Otherwise the .bin file is not found. I’m working on an MR for this.
- Some error and warning messages do not include the bad filename.
I’ve attached a few results.
@lorensen thank you for doing this !
However, I do not seem to have any issues using relative file paths. Could you provide more information on how to reproduce this bug ?
Thank you @lorensen !
Indeed the images are dark but you can improve this using an environment lighting.
You can make any skybox contribute to lighting and this brings awesome reflections with glossy materials.
Have a look at this test.
You can also use projected texture for the environment (that you can download here for example). See here for the test.
This problem exists for .gltf files that reference .bin file. .glb files are fine. The tests use .glb files or .gltf file that do not reference .bin files.
Can you share a command line that works for you and verify that you are using .gltf files that reference a .bin file?
Well, using the example code and the FlightHelmet model:
Are you building with VTK master ?
That is not a relative path. Move away from the directory that contans FlightHelmet and use … relative path.
Yes, I use the master.
Here is what fails for me using the GLTFImporter example:
fails to find the .bin file, while
Try a similar experiment with your example.
After trying your example, there is definitely an issue. I misunderstood what you meant.
I pushed a fix for it at https://gitlab.kitware.com/vtk/vtk/merge_requests/5761
Thank you for spotting this !